def exp_gen_and_label_hoi_cand(): args = parser.parse_args() not_specified_args = manage_required_args( args, parser, required_args=['subset'], optional_args=['gen_hoi_cand', 'label_hoi_cand']) if len(not_specified_args) > 0: return exp_name = 'hoi_candidates' exp_const = ExpConstants(exp_name=exp_name) exp_const.subset = args.subset data_const = HicoConstants() data_const.selected_dets_hdf5 = os.path.join( os.getcwd(), 'data_symlinks/hico_exp/select_confident_boxes_in_hico/' + \ 'selected_coco_cls_dets.hdf5') if args.gen_hoi_cand: print('Generating HOI candidates from Faster-RCNN dets...') hoi_candidates.generate(exp_const, data_const) if args.label_hoi_cand: print('Labelling HOI candidates from Faster-RCNN dets...') data_const.hoi_cand_hdf5 = os.path.join( exp_const.exp_dir, f'hoi_candidates_{exp_const.subset}.hdf5') label_hoi_candidates.assign(exp_const, data_const)
def exp_cache_box_feats(): args = parser.parse_args() not_specified_args = manage_required_args(args, parser, required_args=['subset']) exp_name = 'hoi_candidates' exp_const = ExpConstants(exp_name=exp_name) exp_const.subset = args.subset data_const = HicoConstants() data_const.hoi_cand_hdf5 = os.path.join( exp_const.exp_dir, f'hoi_candidates_{exp_const.subset}.hdf5') cache_box_features.main(exp_const, data_const)
def exp_assign_pose_to_human_cand(): args = parser.parse_args() not_specified_args = manage_required_args(args, parser, required_args=['subset']) exp_name = 'hoi_candidates' exp_const = ExpConstants(exp_name=exp_name) exp_const.subset = args.subset data_const = HicoConstants() data_const.hoi_cand_hdf5 = os.path.join( exp_const.exp_dir, f'hoi_candidates_{exp_const.subset}.hdf5') data_const.human_pose_dir = os.path.join(data_const.proc_dir, 'human_pose') data_const.num_keypoints = 18 assign_pose_to_human_candidates.main(exp_const, data_const)