JotaBravo / spacecraft-uda

Spacecraft Pose Estimation: Robust 2D and 3D-Structural Losses and Unsupervised Domain Adaptation by Inter-Model Consensus
https://ieeexplore.ieee.org/document/10225381
MIT License
19 stars 1 forks source link

How to run a test with the training weigths you have already provided #10

Closed Aryanjb closed 9 months ago

Aryanjb commented 9 months ago

Thank you for the work. I would like just to test this network with the training weights you have already provided and my test dataset would be small containing 20 images from lightbox images. Could you please explain how I can use your model just to test lightbox images and get output with pose-estimated images.

Thank you.

JotaBravo commented 9 months ago

Hi,

You can import the model and load the weights with .load_state_dict. Then feed the input images making sure they are in a tensor format.

It is a pretty standard operation in pytorch, so any basic tutorial should help you: e.g. https://discuss.pytorch.org/t/how-to-test-a-pytorch-model-to-processing-images-and-videos/91229