We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7a2bf29 commit 830638eCopy full SHA for 830638e
sahi/model.py
@@ -483,7 +483,7 @@ def _create_object_prediction_list_from_original_predictions(
483
bbox = [x1, y1, x2, y2]
484
score = prediction[4]
485
category_id = int(prediction[5])
486
- category_name = original_predictions.names[category_id]
+ category_name = self.category_mapping[str(category_id)]
487
488
# ignore invalid predictions
489
if bbox[0] > bbox[2] or bbox[1] > bbox[3] or bbox[0] < 0 or bbox[1] < 0 or bbox[2] < 0 or bbox[3] < 0:
0 commit comments