Skip to content
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

Draw most likely bbox on top (#1061) #1063

Merged
merged 3 commits into from
May 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/super_gradients/training/models/prediction_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def draw(self, box_thickness: int = 2, show_confidence: bool = True, color_mappi
image = self.image.copy()
color_mapping = color_mapping or generate_color_mapping(len(self.class_names))

for pred_i in range(len(self.prediction)):
for pred_i in np.argsort(self.prediction.confidence):

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