Closed eduardolagobatista closed 3 years ago
When you do inference with a Detectron2 trained model you do not need to convert .pth to .pkl, you can simply use model_final.pth for inference.
The error for evaluation is probably because you have not properly modified the meta data for your new dataset.
I see. Sorry to insist but just confirming, can you explain how to modify the meta data inside inside your project? I'm a bit confused on this part. Since I didnt modify the dataset structure in depth, I thought there would be no need to change it. Is it possible to use the model saved for inference anyways? Or is the meta data going to interfere as well? Thank you.
Please refer to this document: https://detectron2.readthedocs.io/en/latest/tutorials/datasets.html
Hello and thank you for allowing us to check the models.
I have been trying to train the model with fewer classes (car and person) through the detectron implementation. During training, everything works nice, but when the model tries to do the evaluation step it ends in this error:
Writing all panoptic predictions to /tmp/panoptic_evallc9wdcen ... return {'pq': pq / n, 'sq': sq / n, 'rq': rq / n, 'n': n}, per_class_results ZeroDivisionError: division by zero
Then I tried to use the model for inference, since it was saved successfully. However, when I try to use it for inference, using demo.py, I come across this error, and I cant seem to find a way to deal with it. [02/16 16:11:24 fvcore.common.checkpoint]: Loading checkpoint from /home/dmp/Desktop/pan/model_final.pkl [02/16 16:11:25 fvcore.common.checkpoint]: Reading a file from 'third_party' ... ValueError: Unsupported type found in checkpoint! model: <class 'collections.OrderedDict'>
I convert the .pth final model to .pkl, using the function provided, but so far I didnt get much success.
Is it possible for you to help me convert the model the right way? Thank you.