-
Notifications
You must be signed in to change notification settings - Fork 7.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AssertionError: A prediction has class=10, but the dataset only has 10 classes and predicted class id should be in [0, 9]. #5103
Comments
how can i contribute to this |
@mahilaMoghadami make sure you have set |
Hello, have you resolved this issue? How to solve it? thanks |
I also get the same problem despite setting ROI_HEADS. |
Had anyone solved this problem? |
File "train_fcos.py", line 89, in
launch(
File "/home/mahilamoghadami.mut/miniconda3/envs/CZDET/lib/python3.8/site-packages/detectron2/engine/launch.py", line 82, in launch
main_func(*args)
File "train_fcos.py", line 80, in main
return trainer.train()
File "/home/mahilamoghadami.mut/miniconda3/envs/CZDET/lib/python3.8/site-packages/detectron2/engine/defaults.py", line 484, in train
super().train(self.start_iter, self.max_iter)
File "/home/mahilamoghadami.mut/miniconda3/envs/CZDET/lib/python3.8/site-packages/detectron2/engine/train_loop.py", line 150, in train
self.after_step()
File "/home/mahilamoghadami.mut/miniconda3/envs/CZDET/lib/python3.8/site-packages/detectron2/engine/train_loop.py", line 180, in after_step
h.after_step()
File "/home/mahilamoghadami.mut/miniconda3/envs/CZDET/lib/python3.8/site-packages/detectron2/engine/hooks.py", line 552, in after_step
self._do_eval()
File "/home/mahilamoghadami.mut/miniconda3/envs/CZDET/lib/python3.8/site-packages/detectron2/engine/hooks.py", line 525, in _do_eval
results = self._func()
File "/home/mahilamoghadami.mut/CZDet/DroneDetectron2/croptrain/engine/trainer_fcos.py", line 234, in test_and_save_results
self._last_eval_results = self.test_crop(self.cfg, self.model, self.iter)
File "/home/mahilamoghadami.mut/CZDet/DroneDetectron2/croptrain/engine/trainer_fcos.py", line 278, in test_crop
results_i = inference_fcos.inference_with_crops(model, data_loader, evaluator, cfg, iter)
File "/home/mahilamoghadami.mut/CZDet/DroneDetectron2/croptrain/engine/inference_fcos.py", line 124, in inference_with_crops
results = evaluator.evaluate()
File "/home/mahilamoghadami.mut/miniconda3/envs/CZDET/lib/python3.8/site-packages/detectron2/evaluation/coco_evaluation.py", line 194, in evaluate
self._eval_predictions(predictions, img_ids=img_ids)
File "/home/mahilamoghadami.mut/miniconda3/envs/CZDET/lib/python3.8/site-packages/detectron2/evaluation/coco_evaluation.py", line 228, in _eval_predictions
assert category_id < num_classes, (
**AssertionError: A prediction has class=10, but the dataset only has 10 classes and predicted class id should be in [0, 9].
AssertionError: A prediction has class=10, but the dataset only has 10 classes and predicted class id should be in [0, 9].**
The text was updated successfully, but these errors were encountered: