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

Can not find predicted pose in ob_in_cam folder #59

Closed ZisongXu closed 1 month ago

ZisongXu commented 1 month ago

Thanks very much for the very nice work!

I ran into a couple of problems:

  1. I was able to successfully run the given example through the python run_demo.py program, and also successfully ran our own example and was able to visualise it: Screenshot from 2024-04-14 12-23-23 But a few days later when I re-run the examples I get the following error:
    
    No protocol specified
    qt.qpa.xcb: could not connect to display :1
    qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/opt/conda/envs/my/lib/python3.8/site-packages/cv2/qt/plugins" even though it was found.
    This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: xcb.

Aborted (core dumped)


Please note that I didn't change anything in the docker container or the configuration of the host and suddenly this error appeared. I found the solution in your answers like: `python run_demo.py --debug 0` or `python run_demo.py --debug 2` ( [https://github.com/NVlabs/FoundationPose/issues/38](https://github.com/NVlabs/FoundationPose/issues/38) and [https://github.com/NVlabs/FoundationPose/issues/57](https://github.com/NVlabs/FoundationPose/issues/57)), which allows you to save the image and then export it for viewing. But it doesn't make sense. Suddenly I can't visualise.

But that's ok and I'm ok with it because the images or 6D poses are saved in a folder. Then I had a second problem.

2. There is nothing in the `debug/ob_in_cam` and `debug/track_vis` after running the demo code:

... ... ... [predict()] self.cfg.use_normal:False [predict()] trans_normalizer:[0.019999999552965164, 0.019999999552965164, 0.05000000074505806], rot_normalizer:0.3490658503988659 [predict()] making cropped data [make_crop_data_batch()] Welcome make_crop_data_batch [make_crop_data_batch()] make tf_to_crops done [make_crop_data_batch()] render done [make_crop_data_batch()] warp done [make_crop_data_batch()] pose batch data done [predict()] forward start [predict()] forward done [predict()] making cropped data [make_crop_data_batch()] Welcome make_crop_data_batch [make_crop_data_batch()] make tf_to_crops done [make_crop_data_batch()] render done [make_crop_data_batch()] warp done [make_crop_data_batch()] pose batch data done [predict()] forward start [predict()] forward done [track_one()] pose done (my) root@serveradmin:~/FoundationPose# ls de debug/ demo_data/ (my) root@serveradmin:~/FoundationPose# ls de debug/ demo_data/ (my) root@serveradmin:~/FoundationPose# ls debug/ ob_in_cam/ track_vis/ (my) root@serveradmin:~/FoundationPose# ls debug/ob_in_cam (my) root@serveradmin:~/FoundationPose# ls debug ob_in_cam track_vis (my) root@serveradmin:~/FoundationPose#


Have you met this issue before?

Thanks a lot!

Best Regards
Zisong Xu
ZisongXu commented 1 month ago

visualization problems solved by building a new container. But still nothing in debug/ob_in_cam folder.

savidini commented 1 month ago

@ZisongXu When you use run_demo.py the output is not saved to the debug/track_vis and debug/track_vis folders, but to demo_data/DEMO_OBJECT/ob_in_cam and demo_data/DEMO_OBJECT/track_vis.

I had a look and the run_demo script and the debug folders are created but apparently only used when --debug 3, then the point cloud is saved there. Maybe this should be fixed in a PR to avoid any confusion.

Please let me know if this solves your problem.

GavinYang5 commented 1 month ago

@ZisongXu Regarding the first issue you mentioned, it is because after your PC shuts down and restarts, the Docker container cannot send the image to your local PC Please run xhost +local:root outside of the container, and then rerun run_demo.py.

ZisongXu commented 1 month ago

@GhYang0519 It works! Thanks a lot!

@savidini I found the ob_in_cam and track_vis! Thanks a lot!

wenbowen123 commented 1 month ago

you can mount your local disk to the docker container, so it will dump to your local disk and won't lose even if docker container is shut down. See -v options in https://github.com/NVlabs/FoundationPose/blob/main/docker/run_container.sh#L3

ZisongXu commented 1 month ago

@wenbowen123 Thanks a lot!!!

52THANOS commented 3 weeks ago

@ZisongXu When you use run_demo.py the output is not saved to the debug/track_vis and debug/track_vis folders, but to demo_data/DEMO_OBJECT/ob_in_cam and demo_data/DEMO_OBJECT/track_vis.

I had a look and the run_demo script and the debug folders are created but apparently only used when --debug 3, then the point cloud is saved there. Maybe this should be fixed in a PR to avoid any confusion.

Please let me know if this solves your problem.

i have the same issue . nothing saves in the folder. and i did not see demo_data/DEMO_OBJECT/ob_in_cam and demo_data/DEMO_OBJECT/track_vis anywhere

wenbowen123 commented 3 weeks ago

@ZisongXu When you use run_demo.py the output is not saved to the debug/track_vis and debug/track_vis folders, but to demo_data/DEMO_OBJECT/ob_in_cam and demo_data/DEMO_OBJECT/track_vis. I had a look and the run_demo script and the debug folders are created but apparently only used when --debug 3, then the point cloud is saved there. Maybe this should be fixed in a PR to avoid any confusion. Please let me know if this solves your problem.

i have the same issue . nothing saves in the folder. and i did not see demo_data/DEMO_OBJECT/ob_in_cam and demo_data/DEMO_OBJECT/track_vis anywhere

pushed a change, this should save in debug_folder now.