bowenc0221 / panoptic-deeplab

This is Pytorch re-implementation of our CVPR 2020 paper "Panoptic-DeepLab: A Simple, Strong, and Fast Baseline for Bottom-Up Panoptic Segmentation" (https://arxiv.org/abs/1911.10194)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problem with training/inference

eduardolagobatista opened this issue · comments

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.

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.