height=height, win_length=win_length, channels=channels, dset=dset, d_type=d_type, regularizer_list=regularizer_list, break_win=break_win, lambda_=lambda_) #----------------- #Load train data #----------------- ADL_videos = load_videos(dset='Thermal_track', vid_class='ADL', input_type='FRAME') if model_data_type == 'flow': load_optical_flow_dataset(vid_class='ADL', videos=ADL_videos) #load Gan trainer GAN3D = CAE_GAN3D(train_par=param, stride=stride) print("Creating wndows\n") if model_data_type == 'thermal': ADL_windows = GAN3D.create_windowed_data(ADL_videos, stride=stride, data_key='FRAME') print("Thermal windows shape") print(ADL_windows.shape) elif model_data_type == 'flow': ADL_flow_windows = GAN3D.create_windowed_data(ADL_videos, stride=1, data_key='FLOW') ADL_windows = ADL_flow_windows
dset=dset, d_type=d_type, regularizer_list=regularizer_list, break_win=break_win) param.thermal_lambda_S = lambdas[0] param.thermal_lambda_T = lambdas[1] param.flow_lambda = lambdas[2] #----------------- #Load train data #----------------- #load thermal frames Fall_videos = load_videos(dset='Thermal_track', vid_class='Fall', input_type='ROI_FRAME') #load flow frames load_optical_flow_dataset(vid_class='Fall', videos=Fall_videos) #----------------- #MODEL Initialization #----------------- TR, TR_name, _ = diff_ROI_C3D_AE_no_pool( img_width=param.width, img_height=param.height, win_length=param.win_length, regularizer_list=param.regularizer_list, channels=param.thermal_channels, lambda_S=param.thermal_lambda_S, lambda_T=param.thermal_lambda_T, d_type='thermal') FR, FR_name, _ = ROI_C3D_AE_no_pool(img_width=param.width, img_height=param.height, win_length=param.win_length - 1,