def get_filter_gt_annots(frm_ids,obj_ids): ##print '=========get_filter_gt_annots=================' ## need to interplate to make the bboxes be continious gt_dets=load_dets_new() gt_dets,row_indexes1=dets_filter_frms(gt_dets,frm_ids) gt_dets,row_indexes2=dets_filter_ids(gt_dets,obj_ids) return gt_dets
def parse_gt_annots(): gt_masks_tensor = load_masks_new() gt_dets = load_dets_new() ## parse dets gt_frm_ids = gt_dets[:, 0].astype(int) gt_obj_ids = gt_dets[:, 1].astype(int) gt_coords = gt_dets[:, 2:6] gt_boxes = coords_to_boxes(gt_coords) ## tight_gt_boxes return gt_frm_ids, gt_obj_ids, gt_boxes, gt_masks_tensor
def get_filter_gt_annots(frm_ids,obj_ids): print '=========get_filter_gt_annots=================' gt_dets=load_dets_new() gt_dets,row_indexes1=dets_filter_frms(gt_dets,frm_ids) gt_dets,row_indexes2=dets_filter_ids(gt_dets,obj_ids) gt_masks_tensor=load_masks_new() gt_masks=gt_masks_tensor[row_indexes1,:,:] gt_masks=gt_masks[row_indexes2,:,:] # print 'row_indexes1:', row_indexes1 # print 'row_indexes2:', row_indexes2 return gt_dets,gt_masks
import _init_paths from tud_crossing import load_dets_new from common.generate_util import interploate_dets import os debug_flag = True gt_annots_dir = '/mnt/phoenix_fastdir/dataset/TUD-Crossing/gt_new' ## main func if __name__ == '__main__': print '=================interpolate dets====================' gt_dets = load_dets_new() disc_dets_path = os.path.join(gt_annots_dir, 'dets.txt') cont_dets_path = os.path.join(gt_annots_dir, 'cont_dets.txt') interploate_dets(disc_dets_path, cont_dets_path) if debug_flag: print 'gt_dets:', gt_dets.shape