chensong1995 / HybridPose

HybridPose: 6D Object Pose Estimation under Hybrid Representation (CVPR 2020)
MIT License
412 stars 64 forks source link

How to run a single input RGB image? #73

Open weidu3 opened 1 year ago

weidu3 commented 1 year ago

Thank you for disclosing such an excellent work. I have a question, how to load the pre-trained model and only input one RGB to get the predicted result? Looking forward to your reply.

chensong1995 commented 1 year ago

Hello weidu3,

Thank you for your interest in our work! My recommendation is to run:

LD_LIBRARY_PATH=lib/regressor:$LD_LIBRARY_PATH python src/train_core.py --load_dir saved_weights/linemod/ape/checkpoints/0.001/199 --object_name ape

Feel free to change --load_dir and --object_name as you wish. This command will skip the training (because the next epoch number 200 is the same as the total number of epochs) and invoke this line to evaluate on the testing split of the dataset. It is possible to create a new dataset class in this directory and use it in the evaluation. However, if your RGB image is very different from the training examples, you may have to re-train the network using your data to obtain a reasonable performance.

I hope this helps! Let me know if you have further concern.