champ icon indicating copy to clipboard operation
champ copied to clipboard

how to get human_bbox.json

Open xianrui-luo opened this issue 6 months ago • 1 comments

Hi, I wonder how can we get "human_bbox.json" as the one used in image_dataset.py

if self.bbox_crop: human_bbox_json_path = video_dir / "human_bbox.json" with open(human_bbox_json_path) as bbox_fp: human_bboxes = json.load(bbox_fp) resize_scale = random.uniform(*self.bbox_resize_ratio) ref_W, ref_H = ref_img_pil.size ref_bbox = process_bbox(human_bboxes[ref_img_idx], ref_H, ref_W, resize_scale) ref_img_pil = crop_bbox(ref_img_pil, ref_bbox) tgt_bbox = process_bbox(human_bboxes[tgt_img_idx], ref_H, ref_W, resize_scale) tgt_img_pil = crop_bbox(tgt_img_pil, tgt_bbox) tgt_guid_pil_lst = [crop_bbox(guid_pil, tgt_bbox) for guid_pil in tgt_guid_pil_lst]

xianrui-luo avatar Jul 28 '24 07:07 xianrui-luo