fix bug 4
Browse files
app.py
CHANGED
@@ -68,11 +68,13 @@ def process_inference_result(result, class_colors):
|
|
68 |
|
69 |
return img, label_counts
|
70 |
|
71 |
-
def get_detection_count_display(classes):
|
72 |
-
|
|
|
|
|
73 |
disp_str = "[Aircraft detected] "
|
74 |
-
for
|
75 |
-
disp_str +=
|
76 |
else:
|
77 |
disp_str = "[No aircraft detected]"
|
78 |
return disp_str
|
|
|
68 |
|
69 |
return img, label_counts
|
70 |
|
71 |
+
def get_detection_count_display(classes):
|
72 |
+
class_names = classes["class"]
|
73 |
+
counts = classes["count"]
|
74 |
+
if(len(classes)):
|
75 |
disp_str = "[Aircraft detected] "
|
76 |
+
for i, c in enumerate(class_names):
|
77 |
+
disp_str += c + ": " + str(counts[i]) + " "
|
78 |
else:
|
79 |
disp_str = "[No aircraft detected]"
|
80 |
return disp_str
|