NVlabs / FoundationPose

[CVPR 2024 Highlight] FoundationPose: Unified 6D Pose Estimation and Tracking of Novel Objects
https://nvlabs.github.io/FoundationPose/
Other
955 stars 99 forks source link

How to convert YCB Dataset to making compatible with run_ycb_video.py #62

Closed ysdagar closed 2 weeks ago

ysdagar commented 1 month ago

I download ycb dataset and merged data1, data2 and data3 directory to form a single data directory with all 92 videos in it. My dataset directory looks as follows:


YCB-Video-Base
├── cameras
├── data
├── image_sets
├── keyframes
├── LICENSE
├── models
├── pairs
├── poses
└── README

I see below error while running the benchmark:

pthon3 run_ycb_video.py --use_reconstructed_mesh 0
Warp 1.0.2 initialized:
   CUDA Toolkit 11.5, Driver 12.4
   Devices:
     "cpu"      : "x86_64"
     "cuda:0"   : "NVIDIA GeForce RTX 3060" (12 GiB, sm_86, mempool enabled)
   Kernel cache:
     /home/yashwant/.cache/warp/1.0.2
Module warp.utils load on device 'cuda:0' took 2.29 ms
Module Utils load on device 'cuda:0' took 2.95 ms
Traceback (most recent call last):
  File "/mnt/sda4/foundationpose/FoundationPose/run_ycb_video.py", line 150, in <module>
    run_pose_estimation()
  File "/mnt/sda4/foundationpose/FoundationPose/run_ycb_video.py", line 92, in run_pose_estimation
    reader_tmp = YcbVideoReader(video_dirs[0])
  File "/mnt/sda4/foundationpose/FoundationPose/datareader.py", line 435, in __init__
    super().__init__(base_dir, zfar=zfar)
  File "/mnt/sda4/foundationpose/FoundationPose/datareader.py", line 166, in __init__
    with open(f'{self.base_dir}/scene_camera.json','r') as ff:

On manual inspection, i couldn't find scene_camera.json file anywhere? Is this something I am supposed to create on my own?

Is there any script (to restructure the dataset) which needs to be run prior to running run_ycb_video.py? if possible, please share.

Any suggestion here would be of great help.

Thanks

wenbowen123 commented 1 month ago

Hi, you should download from the BOP page https://bop.felk.cvut.cz/datasets/

ysdagar commented 1 month ago

I am able to run it with the BOP Version of ycbv dataset. Thank you so much @wenbowen123 .

However I have a followup question now, How do we get the accuracy numbers on the same dataset? I couldn't find any benchmarking/accuracy measurement even after successful run on the full YCB Dataset. Is there anything addition needs to be done?

wenbowen123 commented 3 weeks ago

All the pose results will be saved after your run. For YCB-V, you can compute the ADD and ADD-S error using the functions here https://github.com/NVlabs/FoundationPose/blob/8395bd84adb0bfc3209cb9409e475cd1b51fc17b/Utils.py#L232

cheny110 commented 1 week ago

@ysdagar Hi, I encounted the same problem, can you explain how to process the ycb dataset download from https://bop.felk.cvut.cz/datasets/ , Any feedback would be appreciated.