def get_online_data(opt, spatial_transform, temporal_transform, target_transform): assert opt.dataset in ['egogesture', 'nv'] whole_path = opt.whole_path if opt.dataset == 'egogesture': online_data = EgoGestureOnline(opt.annotation_path, opt.video_path, opt.whole_path, opt.n_val_samples, spatial_transform, temporal_transform, target_transform, modality=opt.modality, stride_len=opt.stride_len, sample_duration=opt.sample_duration) if opt.dataset == 'nv': online_data = NVOnline(opt.annotation_path, opt.video_path, opt.whole_path, opt.n_val_samples, spatial_transform, temporal_transform, target_transform, modality=opt.modality, stride_len=opt.stride_len, sample_duration=opt.sample_duration) return online_data
def get_online_data(opt, spatial_transform, temporal_transform, target_transform, modality="RGB-D"): assert opt.dataset in [ 'egogesture', 'nv'] whole_path = opt.whole_path if opt.dataset == 'egogesture': if isinstance(spatial_transform, list): online_data = EgoGestureOnlineMultiTransform( opt.annotation_path, opt.video_path, opt.whole_path, opt.n_val_samples, spatial_transform, temporal_transform, target_transform, modality=modality, stride_len = opt.stride_len, sample_duration=opt.sample_duration) else: online_data = EgoGestureOnline( opt.annotation_path, opt.video_path, opt.whole_path, opt.n_val_samples, spatial_transform, temporal_transform, target_transform, modality=modality, stride_len = opt.stride_len, sample_duration=opt.sample_duration) if opt.dataset == 'nv': online_data = NVOnline( opt.annotation_path, opt.video_path, opt.whole_path, opt.n_val_samples, spatial_transform, temporal_transform, target_transform, modality=modality, stride_len = opt.stride_len, sample_duration=opt.sample_duration) return online_data
def get_online_data(opt, spatial_transform, temporal_transform, target_transform): assert opt.dataset in ['egogesture', 'nv', 'denso', 'AHG', 'ipn'] whole_path = opt.whole_path if opt.dataset == 'egogesture': online_data = EgoGestureOnline(opt.annotation_path, opt.video_path, opt.whole_path, opt.n_val_samples, spatial_transform, temporal_transform, target_transform, modality=opt.modality, stride_len=opt.stride_len, sample_duration=opt.sample_duration) if opt.dataset == 'nv': online_data = NVOnline(opt.annotation_path, opt.video_path, opt.whole_path, opt.n_val_samples, spatial_transform, temporal_transform, target_transform, modality=opt.modality, stride_len=opt.stride_len, sample_duration=opt.sample_duration) if opt.dataset == 'ipn': online_data = IPNOnline(opt.annotation_path, opt.video_path, opt.whole_path, opt.n_val_samples, spatial_transform, temporal_transform, target_transform, modality=opt.modality, stride_len=opt.stride_len, sample_duration=opt.sample_duration) if opt.dataset == 'AHG': fill_ = True if opt.model_clf == 'c3d' else False online_data = AHGOnline(opt.annotation_path, opt.video_path, opt.whole_path, opt.n_val_samples, spatial_transform, temporal_transform, target_transform, modality=opt.modality, stride_len=opt.stride_len, fill=fill_, sample_duration=opt.sample_duration) if opt.dataset == 'denso': fill_ = True if opt.model_clf == 'c3d' else False online_data = densOnline(opt.annotation_path, opt.video_path, opt.whole_path, opt.n_val_samples, spatial_transform, temporal_transform, target_transform, modality=opt.modality, stride_len=opt.stride_len, fill=fill_, no_subject_crop=opt.no_scrop, sample_duration=opt.sample_duration) return online_data