diff --git a/happypose/pose_estimators/cosypose/cosypose/scripts/preprocess_bop_dataset.py b/happypose/pose_estimators/cosypose/cosypose/scripts/preprocess_bop_dataset.py deleted file mode 100644 index 80dc6533..00000000 --- a/happypose/pose_estimators/cosypose/cosypose/scripts/preprocess_bop_dataset.py +++ /dev/null @@ -1,22 +0,0 @@ -from PIL import Image -from tqdm import tqdm - -from happypose.pose_estimators.cosypose.cosypose.datasets.datasets_cfg import ( - make_scene_dataset, -) - -if __name__ == "__main__": - ds_name = "itodd.pbr" - - scene_ds = make_scene_dataset(ds_name) - for n in tqdm(range(len(scene_ds))): - rgb, mask, state = scene_ds[n] - row = state["frame_info"] - scene_id, view_id = row["scene_id"], row["view_id"] - view_id = int(view_id) - view_id_str = f"{view_id:06d}" - scene_id_str = f"{int(scene_id):06d}" - - scene_dir = scene_ds.base_dir / scene_id_str - p = scene_dir / "mask_visib" / f"{view_id_str}_all.png" - Image.fromarray(mask.numpy()).save(p)