Closed ekorudiawan closed 4 years ago
I had a similar problem, it turned out that the IDs of my categories started at 1 and not as expected at 0. So if you have 4 classes, your category ID range might go 1-4, while the range of the name array with 4 entries goes from 0-3.
If this is the case, you can map your category IDs to the proper range by following instructions at
https://detectron2.readthedocs.io/tutorials/datasets.html
for setting
thing_dataset_id_to_contiguous_id
in the metadata of your dataset.
You have not updated the config properly for RetinaNet. Please see https://detectron2.readthedocs.io/tutorials/datasets.html#update-the-config-for-new-datasets.
I am trying to train custom dataset with RetinaNet model but got an error when trying to visualize output from the predictor. I have trying an example with ballon dataset and mask RCNN without any problem. The problem look like fail to get class name when calling function draw_instance_predictions
Here is the code for loading dataset
Until this step, there is no problem, then test to visualize the output
Error in line
Test get classes from metadata
got
Environment