From ffbce3858ae3d0d1d0978a5927daa2d4f94e55b6 Mon Sep 17 00:00:00 2001 From: HighMans <42877729+HighMans@users.noreply.github.com> Date: Fri, 26 Aug 2022 19:39:11 -0400 Subject: [PATCH] Fix confidence threshold for ClearML debug images (#9174) * Fix confidence threshold The confidence is converted to a percentage on line 144, but it is being compared to a default conf_threshold value of a decimal value instead of percent value. Signed-off-by: HighMans <42877729+HighMans@users.noreply.github.com> * Revert "Fix confidence threshold" This reverts commit f84a09967f83d70626ca8dfe7625dce60fb0102e. * Fix confidence comparison Fix the confidence percentage is being compared to a decimal value. Signed-off-by: HighMans <42877729+HighMans@users.noreply.github.com> --- utils/loggers/clearml/clearml_utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/utils/loggers/clearml/clearml_utils.py b/utils/loggers/clearml/clearml_utils.py index 52320c090..1e1369073 100644 --- a/utils/loggers/clearml/clearml_utils.py +++ b/utils/loggers/clearml/clearml_utils.py @@ -141,10 +141,10 @@ class ClearmlLogger: color = colors(i) class_name = class_names[int(class_nr)] - confidence = round(float(conf) * 100, 2) - label = f"{class_name}: {confidence}%" + confidence_percentage = round(float(conf) * 100, 2) + label = f"{class_name}: {confidence_percentage}%" - if confidence > conf_threshold: + if conf > conf_threshold: annotator.rectangle(box.cpu().numpy(), outline=color) annotator.box_label(box.cpu().numpy(), label=label, color=color)