-
Notifications
You must be signed in to change notification settings - Fork 0
/
constants.py
161 lines (161 loc) · 10.7 KB
/
constants.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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
constants = {
# --- COINS ASSETS FILE NAMES AND DELAY BETWEEN FOOTAGE
"CALIBRATION_CAMERA_STATIC_PATH": "assets/coins/cam1 - static/calibration.mov",
"CALIBRATION_CAMERA_MOVING_PATH": "assets/coins/cam2 - moving light/calibration.mp4",
"COIN_1_VIDEO_CAMERA_STATIC_PATH": "assets/coins/cam1 - static/coin1.mov",
"COIN_1_VIDEO_CAMERA_MOVING_PATH": "assets/coins/cam2 - moving light/coin1.mp4",
"COIN_2_VIDEO_CAMERA_STATIC_PATH": "assets/coins/cam1 - static/coin2.mov",
"COIN_2_VIDEO_CAMERA_MOVING_PATH": "assets/coins/cam2 - moving light/coin2.mp4",
"COIN_3_VIDEO_CAMERA_STATIC_PATH": "assets/coins/cam1 - static/coin3.mov",
"COIN_3_VIDEO_CAMERA_MOVING_PATH": "assets/coins/cam2 - moving light/coin3.mp4",
"COIN_4_VIDEO_CAMERA_STATIC_PATH": "assets/coins/cam1 - static/coin4.mov",
"COIN_4_VIDEO_CAMERA_MOVING_PATH": "assets/coins/cam2 - moving light/coin4.mp4",
"FILE_1_MOVING_CAMERA_DELAY": 2.724, # [seconds] (static) 3.609 - 0.885 (moving)
"FILE_2_MOVING_CAMERA_DELAY": 2.024, # [seconds] (static) 2.995 - 0.971 (moving)
"FILE_3_MOVING_CAMERA_DELAY": 2.275, # [seconds] (static) 3.355 - 1.08 (moving)
"FILE_4_MOVING_CAMERA_DELAY": 2.015, # [seconds] (static) 2.960 - 0.945 (moving)
# --- CAMERA CALIBRATION CONSTANTS
"CHESSBOARD_SIZE": (6, 9),
"CALIBRATION_FRAME_SKIP_INTERVAL": 40, # We just need some, not all
# --- ANALYSIS CONSTANTS
"SQUARE_GRID_DIMENSION": 200, # It will be a 200x200 square grid inside the marker
"LIGHT_DIRECTION_WINDOW_SIZE": 100, # There will be 100x100 possible light directions
"LIGHT_DIRECTION_WINDOW_SCALE": 2, # The light window will be 2 times the size
"ALIGNED_VIDEO_FPS": 30,
"ANALYSIS_FRAME_SKIP": 5, # It will skip this frames each iteration during analysis
"COINS_TEST_N_LIGHTS": 5,
"SSIM_GAUSSIAN_KERNEL_SIZE": 11,
"REMOVE_DATA_PROBABILITY": 0.0,
# --- PCA MODEL CONSTANTS
"PCA_BATCH_SIZE": 64,
"PCA_LEARNING_RATE": 0.0001,
"PCA_N_EPOCHS": 40,
"PCA_ORTHOGONAL_BASES": 8,
"PCA_H": 10,
"PCA_SIGMA": 0.3,
"PCA_INPUT_SIZE": 8 + (2 * 10), # PCA_ORTHOGONAL_BASES + (2 * H)
"GAUSSIAN_MATRIX_FILE_PATH": "data/gaussian_matrix.npz",
# --- NEURAL MODEL CONSTANTS
"NEURAL_BATCH_SIZE": 256 * 8,
"NEURAL_LEARNING_RATE": 0.01,
"NEURAL_N_EPOCHS": 50,
"NEURAL_H": 12,
"NEURAL_SIGMA_XY": 3.0,
"NEURAL_SIGMA_UV": 0.55,
"NEURAL_INPUT_SIZE": (4 * 12), # (4 * H)
"GAUSSIAN_MATRIX_FILE_PATH_XY": "data/gaussian_matrix_xy.npz",
"GAUSSIAN_MATRIX_FILE_PATH_UV": "data/gaussian_matrix_uv.npz",
# --- DEBUG CONSTANTS
"STATIC_CAMERA_FEED_WINDOW_TITLE": "Static camera feed",
"MOVING_CAMERA_FEED_WINDOW_TITLE": "Moving camera feed",
"WARPED_FRAME_WINDOW_TITLE": "Warped moving frame",
"LIGHT_DIRECTION_WINDOW_TITLE": "Light direction",
# --- INTERACTIVE RELIGHTING CONSTANTS
"INTERPOLATED_WINDOW_TITLE": "Interpolated Data",
"INPUT_LIGHT_DIRECTION_WINDOW_TITLE": "Light direction input",
# --- COIN DATA FILE NAMES CONSTANTS
"CALIBRATION_INTRINSICS_CAMERA_STATIC_PATH": "data/coins/static_intrinsics.xml",
"CALIBRATION_INTRINSICS_CAMERA_MOVING_PATH": "data/coins/moving_intrinsics.xml",
"COIN_1_ALIGNED_VIDEO_STATIC_PATH": "data/coins/1_static_aligned_video.mov",
"COIN_1_ALIGNED_VIDEO_MOVING_PATH": "data/coins/1_moving_aligned_video.mp4",
"COIN_1_PCA_MODEL": "data/coins/1_pca_model.pt",
"COIN_1_PCA_DATA_FILE_PATH": "data/coins/1_pca_data.npz",
"COIN_1_NEURAL_MODEL": "data/coins/1_neural_model.pt",
"COIN_2_ALIGNED_VIDEO_STATIC_PATH": "data/coins/2_static_aligned_video.mov",
"COIN_2_ALIGNED_VIDEO_MOVING_PATH": "data/coins/2_moving_aligned_video.mp4",
"COIN_2_PCA_MODEL": "data/coins/2_pca_model.pt",
"COIN_2_PCA_DATA_FILE_PATH": "data/coins/2_pca_data.npz",
"COIN_2_NEURAL_MODEL": "data/coins/2_neural_model.pt",
"COIN_3_ALIGNED_VIDEO_STATIC_PATH": "data/coins/3_static_aligned_video.mov",
"COIN_3_ALIGNED_VIDEO_MOVING_PATH": "data/coins/3_moving_aligned_video.mp4",
"COIN_3_PCA_MODEL": "data/coins/3_pca_model.pt",
"COIN_3_PCA_DATA_FILE_PATH": "data/coins/3_pca_data.npz",
"COIN_3_NEURAL_MODEL": "data/coins/3_neural_model.pt",
"COIN_4_ALIGNED_VIDEO_STATIC_PATH": "data/coins/4_static_aligned_video.mov",
"COIN_4_ALIGNED_VIDEO_MOVING_PATH": "data/coins/4_moving_aligned_video.mp4",
"COIN_4_PCA_MODEL": "data/coins/4_pca_model.pt",
"COIN_4_PCA_DATA_FILE_PATH": "data/coins/4_pca_data.npz",
"COIN_4_NEURAL_MODEL": "data/coins/4_neural_model.pt",
"COIN_1_EXTRACTED_DATA_FILE_PATH": "data/coins/1_extracted_data.npz",
"COIN_2_EXTRACTED_DATA_FILE_PATH": "data/coins/2_extracted_data.npz",
"COIN_3_EXTRACTED_DATA_FILE_PATH": "data/coins/3_extracted_data.npz",
"COIN_4_EXTRACTED_DATA_FILE_PATH": "data/coins/4_extracted_data.npz",
"COIN_1_TEST_DATA_FILE_PATH": "data/coins/1_test_data.npz",
"COIN_2_TEST_DATA_FILE_PATH": "data/coins/2_test_data.npz",
"COIN_3_TEST_DATA_FILE_PATH": "data/coins/3_test_data.npz",
"COIN_4_TEST_DATA_FILE_PATH": "data/coins/4_test_data.npz",
"COIN_1_INTERPOLATED_DATA_RBF_FILE_PATH": "data/coins/1_rbf_interpolated_data.npz",
"COIN_2_INTERPOLATED_DATA_RBF_FILE_PATH": "data/coins/2_rbf_interpolated_data.npz",
"COIN_3_INTERPOLATED_DATA_RBF_FILE_PATH": "data/coins/3_rbf_interpolated_data.npz",
"COIN_4_INTERPOLATED_DATA_RBF_FILE_PATH": "data/coins/4_rbf_interpolated_data.npz",
"COIN_1_INTERPOLATED_DATA_PTM_FILE_PATH": "data/coins/1_ptm_interpolated_data.npz",
"COIN_2_INTERPOLATED_DATA_PTM_FILE_PATH": "data/coins/2_ptm_interpolated_data.npz",
"COIN_3_INTERPOLATED_DATA_PTM_FILE_PATH": "data/coins/3_ptm_interpolated_data.npz",
"COIN_4_INTERPOLATED_DATA_PTM_FILE_PATH": "data/coins/4_ptm_interpolated_data.npz",
"COIN_1_INTERPOLATED_DATA_PCA_FILE_PATH": "data/coins/1_pca_interpolated_data.npz",
"COIN_2_INTERPOLATED_DATA_PCA_FILE_PATH": "data/coins/2_pca_interpolated_data.npz",
"COIN_3_INTERPOLATED_DATA_PCA_FILE_PATH": "data/coins/3_pca_interpolated_data.npz",
"COIN_4_INTERPOLATED_DATA_PCA_FILE_PATH": "data/coins/4_pca_interpolated_data.npz",
"COIN_1_INTERPOLATED_DATA_NEURAL_FILE_PATH": "data/coins/1_neural_interpolated_data.npz",
"COIN_2_INTERPOLATED_DATA_NEURAL_FILE_PATH": "data/coins/2_neural_interpolated_data.npz",
"COIN_3_INTERPOLATED_DATA_NEURAL_FILE_PATH": "data/coins/3_neural_interpolated_data.npz",
"COIN_4_INTERPOLATED_DATA_NEURAL_FILE_PATH": "data/coins/4_neural_interpolated_data.npz",
"COIN_1_DATAPOINTS_FILE_PATH": "data/coins/1_datapoints.npz",
"COIN_2_DATAPOINTS_FILE_PATH": "data/coins/2_datapoints.npz",
"COIN_3_DATAPOINTS_FILE_PATH": "data/coins/3_datapoints.npz",
"COIN_4_DATAPOINTS_FILE_PATH": "data/coins/4_datapoints.npz",
"COIN_1_TEST_DATAPOINTS_FILE_PATH": "data/coins/1_test_datapoints.npz",
"COIN_2_TEST_DATAPOINTS_FILE_PATH": "data/coins/2_test_datapoints.npz",
"COIN_3_TEST_DATAPOINTS_FILE_PATH": "data/coins/3_test_datapoints.npz",
"COIN_4_TEST_DATAPOINTS_FILE_PATH": "data/coins/4_test_datapoints.npz",
"COIN_1_PTM_MODEL": "No Model",
"COIN_1_RBF_MODEL": "No Model",
"COIN_2_PTM_MODEL": "No Model",
"COIN_2_RBF_MODEL": "No Model",
"COIN_3_PTM_MODEL": "No Model",
"COIN_3_RBF_MODEL": "No Model",
"COIN_4_PTM_MODEL": "No Model",
"COIN_4_RBF_MODEL": "No Model",
# --- SYNTH DATA FILE NAMES CONSTANTS
"SYNTH_LIGHT_DIRECTIONS_FILENAME": "dirs.lp",
"SYNTH_SINGLE_OBJECT_2_MATERIAL_3_EXTRACTED_DATA_FILE_PATH": "data/synth/single_2_3_extracted_data.npz",
"SYNTH_SINGLE_OBJECT_2_MATERIAL_3_TEST_DATA_FILE_PATH": "data/synth/single_2_3_test_data.npz",
"SYNTH_SINGLE_OBJECT_2_MATERIAL_3_PCA_MODEL": "data/synth/single_2_3_pca_model.pt",
"SYNTH_SINGLE_OBJECT_2_MATERIAL_3_PCA_DATA_FILE_PATH": "data/synth/single_2_3_pca_data.npz",
"SYNTH_SINGLE_OBJECT_2_MATERIAL_3_NEURAL_MODEL": "data/synth/single_2_3_neural_model.pt",
"SYNTH_SINGLE_OBJECT_2_MATERIAL_3_PTM_MODEL": "No model",
"SYNTH_SINGLE_OBJECT_2_MATERIAL_3_RBF_MODEL": "No model",
"SYNTH_SINGLE_OBJECT_2_MATERIAL_3_DATAPOINTS_FILE_PATH": "data/synth/single_2_3_datapoints.npz",
"SYNTH_SINGLE_OBJECT_2_MATERIAL_3_TEST_DATAPOINTS_FILE_PATH": "data/synth/single_2_3_test_datapoints.npz",
"SYNTH_SINGLE_OBJECT_2_MATERIAL_3_INTERPOLATED_DATA_RBF_FILE_PATH": "data/synth/single_2_3_rbf_interpolated_data.npz",
"SYNTH_SINGLE_OBJECT_2_MATERIAL_3_INTERPOLATED_DATA_PTM_FILE_PATH": "data/synth/single_2_3_ptm_interpolated_data.npz",
"SYNTH_SINGLE_OBJECT_2_MATERIAL_3_INTERPOLATED_DATA_PCA_FILE_PATH": "data/synth/single_2_3_pca_interpolated_data.npz",
"SYNTH_SINGLE_OBJECT_2_MATERIAL_3_INTERPOLATED_DATA_NEURAL_FILE_PATH": "data/synth/single_2_3_neural_interpolated_data.npz",
"SYNTH_MULTI_OBJECT_2_MATERIAL_3_EXTRACTED_DATA_FILE_PATH": "data/synth/multi_2_3_extracted_data.npz",
"SYNTH_MULTI_OBJECT_2_MATERIAL_3_TEST_DATA_FILE_PATH": "data/synth/multi_2_3_test_data.npz",
"SYNTH_MULTI_OBJECT_2_MATERIAL_3_PCA_MODEL": "data/synth/multi_2_3_pca_model.pt",
"SYNTH_MULTI_OBJECT_2_MATERIAL_3_PCA_DATA_FILE_PATH": "data/synth/multi_2_3_pca_data.npz",
"SYNTH_MULTI_OBJECT_2_MATERIAL_3_NEURAL_MODEL": "data/synth/multi_2_3_neural_model.pt",
"SYNTH_MULTI_OBJECT_2_MATERIAL_3_PTM_MODEL": "No model",
"SYNTH_MULTI_OBJECT_2_MATERIAL_3_RBF_MODEL": "No model",
"SYNTH_MULTI_OBJECT_2_MATERIAL_3_DATAPOINTS_FILE_PATH": "data/synth/multi_2_3_datapoints.npz",
"SYNTH_MULTI_OBJECT_2_MATERIAL_3_TEST_DATAPOINTS_FILE_PATH": "data/synth/multi_2_3_test_datapoints.npz",
"SYNTH_MULTI_OBJECT_2_MATERIAL_3_INTERPOLATED_DATA_RBF_FILE_PATH": "data/synth/multi_2_3_rbf_interpolated_data.npz",
"SYNTH_MULTI_OBJECT_2_MATERIAL_3_INTERPOLATED_DATA_PTM_FILE_PATH": "data/synth/multi_2_3_ptm_interpolated_data.npz",
"SYNTH_MULTI_OBJECT_2_MATERIAL_3_INTERPOLATED_DATA_PCA_FILE_PATH": "data/synth/multi_2_3_pca_interpolated_data.npz",
"SYNTH_MULTI_OBJECT_2_MATERIAL_3_INTERPOLATED_DATA_NEURAL_FILE_PATH": "data/synth/multi_2_3_neural_interpolated_data.npz",
# --- RTI DATASET FILE NAMES CONSTANTS
"RTI_EXTRACTED_DATA_FILE_PATH": "data/rti/extracted_data.npz",
"RTI_TEST_DATA_FILE_PATH": "data/rti/test_data.npz",
"RTI_PCA_MODEL": "data/rti/model_pca.pt",
"RTI_PCA_DATA_FILE_PATH": "data/rti/pca_data.npz",
"RTI_NEURAL_MODEL": "data/rti/model_neural.pt",
"RTI_PTM_MODEL": "No model",
"RTI_RBF_MODEL": "No model",
"RTI_DATAPOINTS_FILE_PATH": "data/rti/datapoints.npz",
"RTI_TEST_DATAPOINTS_FILE_PATH": "data/rti/test_datapoints.npz",
"RTI_INTERPOLATED_DATA_RBF_FILE_PATH": "data/rti/rbf_interpolated_data.npz",
"RTI_INTERPOLATED_DATA_PTM_FILE_PATH": "data/rti/ptm_interpolated_data.npz",
"RTI_INTERPOLATED_DATA_PCA_FILE_PATH": "data/rti/pca_interpolated_data.npz",
"RTI_INTERPOLATED_DATA_NEURAL_FILE_PATH": "data/rti/neural_interpolated_data.npz",
}