fudan-generative-vision / champ

Champ: Controllable and Consistent Human Image Animation with 3D Parametric Guidance
https://fudan-generative-vision.github.io/champ/
MIT License
4.75k stars 598 forks source link

how to get human_bbox.json #148

Open xianrui-luo opened 3 months ago

xianrui-luo commented 3 months ago

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]

yuchenli-sony commented 2 months ago

me too, but I found the author doesn't use it in train, but it is wired, I don't in actual, whether they use bbox or not