Skip to content

Commit 739ff63

Browse files
committed
Train rendecndec-cla
1 parent c879f64 commit 739ff63

34 files changed

Lines changed: 1677 additions & 762 deletions

code/autoencoder_model/scripts/config_sigc.py

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,18 @@
2222
else:
2323
path_var = 'zhora/'
2424

25-
DATA_DIR= '/local_home/JAAD_Dataset/iros/resized_imgs_208_sorted/train/'
25+
DATA_DIR= '/local_home/JAAD_Dataset/iros/resized_imgs_208_thesis/train/'
2626
# DATA_DIR= '/local_home/data/KITTI_data/'
2727

28-
TEST_DATA_DIR= '/local_home/JAAD_Dataset/iros/resized_imgs_208_sorted/test/'
28+
TEST_DATA_DIR= '/local_home/JAAD_Dataset/iros/resized_imgs_208_thesis/test/'
2929

30-
VAL_DATA_DIR= '/local_home/JAAD_Dataset/iros/resized_imgs_208_sorted/val/'
30+
VAL_DATA_DIR= '/local_home/JAAD_Dataset/iros/resized_imgs_208_thesis/val/'
3131

3232
PRETRAINED_C3D= '/home/pratik/git_projects/c3d-keras/models/sports1M_weights_tf.json'
3333
PRETRAINED_C3D_WEIGHTS= '/home/pratik/git_projects/c3d-keras/models/sports1M_weights_tf.h5'
3434

35+
RESULTS_DIR = '/local_home/JAAD_Dataset/thesis/results/baselineCla/'
36+
3537
MODEL_DIR = './../' + path_var + 'models'
3638
if not os.path.exists(MODEL_DIR):
3739
os.mkdir(MODEL_DIR)
@@ -48,10 +50,6 @@
4850
if not os.path.exists(CLA_GEN_IMAGES_DIR):
4951
os.mkdir(CLA_GEN_IMAGES_DIR)
5052

51-
# ATTN_WEIGHTS_DIR = './../' + path_var + 'attn_weights'
52-
# if not os.path.exists(ATTN_WEIGHTS_DIR):
53-
# os.mkdir(ATTN_WEIGHTS_DIR)
54-
5553
LOG_DIR = './../' + path_var + 'logs'
5654
if not os.path.exists(LOG_DIR):
5755
os.mkdir(LOG_DIR)
@@ -64,7 +62,7 @@
6462
if not os.path.exists(TF_LOG_CLA_DIR):
6563
os.mkdir(TF_LOG_CLA_DIR)
6664

67-
TEST_RESULTS_DIR = './../' + path_var + 'test_results'
65+
TEST_RESULTS_DIR = RESULTS_DIR + 'test_results/'
6866
if not os.path.exists(TEST_RESULTS_DIR):
6967
os.mkdir(TEST_RESULTS_DIR)
7068

@@ -90,8 +88,6 @@
9088
ZOOM_MAX = 0.2
9189
BRIGHT_RANGE_L = 0.5
9290
BRIGHT_RANGE_H = 1.5
93-
KL_COEFF = 0
94-
ATTN_COEFF = 10
9591

9692
ped_actions = ['slow down', 'standing', 'walking', 'speed up', 'nod', 'unknown',
9793
'clear path', 'handwave', 'crossing', 'looking', 'no ped']
@@ -104,7 +100,8 @@
104100
print ("Config file: " + str(__name__))
105101

106102
BATCH_SIZE = 15
107-
NB_EPOCHS_CLASS = 20
103+
TEST_BATCH_SIZE = 1
104+
NB_EPOCHS_CLASS = 30
108105

109106
# OPTIM_C = Adam(lr=0.0000002, beta_1=0.5)
110107
# OPTIM_C = SGD(lr=0.0001, momentum=0.9, nesterov=True)
@@ -122,14 +119,15 @@
122119
# return 0.000000001
123120

124121

125-
lr_schedule = [8, 15, 18] # epoch_step
126-
122+
lr_schedule = [7, 16, 30, 30] # epoch_step
127123

128124
def schedule(epoch_idx):
129-
if (epoch_idx + 1) < lr_schedule[0]:
125+
if (epoch_idx) <= lr_schedule[0]:
130126
return 0.00001
131-
elif (epoch_idx + 1) < lr_schedule[1]:
127+
elif (epoch_idx) <= lr_schedule[1]:
132128
return 0.000001 # lr_decay_ratio = 10
133-
elif (epoch_idx + 1) < lr_schedule[2]:
129+
elif (epoch_idx) <= lr_schedule[2]:
130+
return 0.0000001 # lr_decay_ratio = 10
131+
elif (epoch_idx) <= lr_schedule[3]:
134132
return 0.0000001
135133
return 0.0000001

code/autoencoder_model/scripts/gifimages.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def strip(image, img_height, img_width, vid_len, vid_num=1, rev=False):
4747

4848

4949
def gifmax(folder, rev=False):
50-
for i in range(880):
50+
for i in range(1257):
5151
im_pred = cv2.imread(folder+'/pred/' + str(i) + '_pred.png', cv2.IMREAD_COLOR)
5252
strip(im_pred, 128, 208, 32, i, rev=rev)
5353

@@ -78,7 +78,7 @@ def get_args():
7878

7979
args = get_args()
8080
if args.mode == 'gifmax':
81-
print ('going into gifmax')
81+
print ('going into gifmax!!!!')
8282
gifmax(args.folder, args.rev)
8383
else:
8484
try:

0 commit comments

Comments
 (0)