Skip to content

Commit 90a4212

Browse files
laszlovandenhoekshaydeciBloodAxe
authored andcommitted
Draw most likely bbox on top (Deci-AI#1061) (Deci-AI#1063)
Co-authored-by: Shay Aharon <[email protected]> Co-authored-by: Eugene Khvedchenya <[email protected]>
1 parent 035605b commit 90a4212

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/super_gradients/training/models/prediction_results.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def draw(self, box_thickness: int = 2, show_confidence: bool = True, color_mappi
6666
image = self.image.copy()
6767
color_mapping = color_mapping or generate_color_mapping(len(self.class_names))
6868

69-
for pred_i in range(len(self.prediction)):
69+
for pred_i in np.argsort(self.prediction.confidence):
7070

7171
class_id = int(self.prediction.labels[pred_i])
7272
score = "" if not show_confidence else str(round(self.prediction.confidence[pred_i], 2))

0 commit comments

Comments
 (0)