setting NUM_CLASSES
See original GitHub issuein the beginning i would like to give others some notice: even though you’ve install pytorch via anaconda with cudatoolkit. But still. it is just for the pytorch. not for detectron2. pls consider using cuda package locally or use a docker.
question 1: train_log_init.txt
I’ve found out you’ve noticed, that we should change MODEL.ROI_HEADS.NUM_CLASSES
and MODEL.RETINANET.NUM_CLASSES
. I’ve changed them in detectron2/config/defaults.py
Or tried to add the params in all.sh
via adding MODEL.ROI_HEADS.NUM_CLASSES 2, MODEL.FCOS.NUM_CLASSES 2, MODEL.RETINANET.NUM_CLASSES 2
for my 2 classes (background not included). but none of them helps…
The error:
AssertionError: A prediction has category_id=62, which is not available in the dataset.
question 2:
the training seems stop immediately.
i’ve changed the MAX_ITER
in yaml file, but it was not helped…
I think the both problems could be relevant, because the model is not trained for 2 classes. the log file is attached. many thanks for your help!
Issue Analytics
- State:
- Created 2 years ago
- Comments:13 (6 by maintainers)
Top GitHub Comments
hmm. it came something new. new errors… train_log_init.txt
I also encountered the same problem as you. How did you convert the json file to remove the background? Do you have a conversion script file?