2222else :
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
3232PRETRAINED_C3D = '/home/pratik/git_projects/c3d-keras/models/sports1M_weights_tf.json'
3333PRETRAINED_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+
3537MODEL_DIR = './../' + path_var + 'models'
3638if not os .path .exists (MODEL_DIR ):
3739 os .mkdir (MODEL_DIR )
4850if 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-
5553LOG_DIR = './../' + path_var + 'logs'
5654if not os .path .exists (LOG_DIR ):
5755 os .mkdir (LOG_DIR )
6462if 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/ '
6866if not os .path .exists (TEST_RESULTS_DIR ):
6967 os .mkdir (TEST_RESULTS_DIR )
7068
9088ZOOM_MAX = 0.2
9189BRIGHT_RANGE_L = 0.5
9290BRIGHT_RANGE_H = 1.5
93- KL_COEFF = 0
94- ATTN_COEFF = 10
9591
9692ped_actions = ['slow down' , 'standing' , 'walking' , 'speed up' , 'nod' , 'unknown' ,
9793 'clear path' , 'handwave' , 'crossing' , 'looking' , 'no ped' ]
104100print ("Config file: " + str (__name__ ))
105101
106102BATCH_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)
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
128124def 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
0 commit comments