-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathflags.py
76 lines (62 loc) · 2.25 KB
/
flags.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
import numpy as np
data_path = 'Dataset/ITOP/'
#zmodel = 'ZMODEL/'
# demo_path = './demo_input_zzh.mat'
# basic training parameters
batch_size = 1
learning_rate_base = 5e-4
decay_steps = 1000
decay_rate = 0.95
learning_rate_min = 0.00001
weight = 1e-5
future_num = 5
# basic pcloud parameters
radius = 0.025
M = 4
height = 240
width = 320
joint_num = 15
window_size = 25
sample_num = 128
sample_pixel = 8
simplified_num = 56
# simplified_num = 10
group_size = 8
initial_temperature = 1
zsample_pixel = 20
zsamples = (2 * zsample_pixel) * (2 * zsample_pixel)
sample_pixel_total = (2 * sample_pixel) * (2 * sample_pixel)
bbox_size = np.array([1.8, 2, 1.5])
#
rot_temp = np.array([[[1 / 0.0035, 0], [0, -1 / 0.0035], [160, 120]]], dtype=np.float32)
rotmat = np.tile(rot_temp, (batch_size*window_size, 1, 1))
demo_rot = np.array([[[121.1511, 0], [0, -109.6735], [145.8649, 114.5711]]], dtype=np.float32)
demomat = np.tile(demo_rot, (batch_size*window_size, 1, 1))
# skeleton parameter
skeleton_id = [[1,2], [2,4], [4,6],
[1,3], [3,5], [5,7],
[8,9], [9,11], [11,13],
[8,10], [10,12], [12,14], [0, 1], [1, 8]]
bonearray = np.array([[0,1],[1,20],[20,8],[20,4],[8,9],[9,10],[10,11],[11,24],[11,23],[20,2],
[2,3],[4,5],[5,6],[6,7],[7,22],[7,21],[0,16],[16,17],[17,18],[18,19],[0,12],
[12,13],[13,14],[14,15]])
# NTU bonearray
# bonearray1 = np.zeros([25,24])
# for i in range(24):
# bonearray1[bonearray[i,0],i] = -1
# bonearray1[bonearray[i,1],i] = 1
# ITOP bonearray
bonearray1 = np.zeros([15,14])
for i in range(14):
bonearray1[skeleton_id[i][0],i] = -1
bonearray1[skeleton_id[i][1],i] = 1
skeleton = [0.18099216, 0.30136532, 0.3083691, 0.1809909, 0.30517647, 0.3111792, 0.26156965,
0.4784025, 0.46032718, 0.26156482, 0.47747827, 0.4607155, 0.23529877, 0.23755938]
ratio_id = [[0, 1], [1, 2],
[3, 4], [4, 5],
[6, 7], [7, 8],
[9, 10], [10, 11],
[0, 3], [1, 4],
[2, 5], [6, 9],
[7, 10], [8, 11], [12, 13], [12, 0], [12, 3]]
ratio = [0.5888, 0.9935, 0.5870, 0.9930, 0.5475, 1.0404, 0.5482, 1.0384, 1, 1, 1, 1, 1, 0.9994, 0.9816, 1.3014, 1.3014]