skip_frame = int(sys.argv[6]) # the foldername containing trained models if layers[0] > 0: cae_folder_name = sys.argv[7] else: cae_folder_name = None train_flag = int(sys.argv[8]) print('layers:', layers) print('layers_with_clusters:', layers_with_clusters) print('direction:', direction) print('cae_folder_name:', cae_folder_name) print('train_flag:', train_flag) params = ParamManager() # experiment parameters if train_flag == 0: train_str = 'train' elif train_flag == 1: train_str = 'all1' if skip_frame < 0: if data_str in ['Avenue', 'Avenue_sz240x360fr1', 'UCSDped1']: skip_frame = 2 else: skip_frame = 1 print('skip_frame = %d\n' % skip_frame) bshow = 1 bh5py = 1
if len(sys.argv) >= 6: cae_folder_name = sys.argv[5] else: cae_folder_name = None # the folder name of trained low-level GANs if len(sys.argv) >= 7: gan0_folder_name = sys.argv[6] else: gan0_folder_name = None else: raise ValueError("Please provide some arguments") mode_explain = ['FtoM', 'MtoF'] params = ParamManager() # experiment parameters data_range = [-1.0, 1.0] print('Mode: %d' % mode) print('layers: ', layers) print('layers_with_cluster', layers_with_cluster) print('cae_folder_name', cae_folder_name) print('gan0_folder_name', gan0_folder_name) train_str = 'train' test_str = 'test' bshow = 1 bsave = 1
else: mode = 0 data_str = 'UCSDped2' batch_size = 100 encoder_dims = [32, 16, 8] disp_freq = 10 save_freq = 10 num_epochs = 500 device = '/cpu:0' print('mode = %d' % mode) print('data_str = %s' % data_str) print('batch_size = %d' % batch_size) print('encoder_dims :', encoder_dims) params = ParamManager() train_str = 'train' bshow = 1 bh5py = 1 frame_step = 5 params.add('mode', mode, 'hvad_cae') params.add('data_str', data_str, 'hvad_cae') params.add('train_str', train_str, 'hvad_cae') params.add('bshow', bshow, 'hvad_cae') params.add('bh5py', bh5py, 'hvad_cae') params.add('frame_step', frame_step, 'hvad_cae') params.add('batch_size', batch_size, 'hvad_cae') params.add('encoder_dims', encoder_dims, 'hvad_cae')
# a file contains a list of testing videos test_str = sys.argv[4] else: raise ValueError("Please provide the arguments") gan_layer0_folder_name = 'hvad-gan-layer0-v5-brox' layer_ids = [int(s) for s in layer_id_str.split('-')] print('data_str=%s' % data_str) print('layer_ids=',layer_ids) print('cae_folder_name = %s' % cae_folder_name) print('test_str = %s' % test_str) print('use_gt = %d' % use_gt) print('gan_layer0_folder_name = %s' % gan_layer0_folder_name) params = ParamManager() # experiment parameters data_range = [-1.0, 1.0] net_str = cae_folder_name.split(sep='-lrelu') net_str = net_str[0] net_str = net_str.replace('hvad-', '') # layer = 0 layer_with_cluster = False bh5py = 1 resz = [256, 256] fr_rate_2obj = 0.1 # best for UCSDped1, UCSDped2 and Avenue thresh = 0.8