Trying to print correctly with bad docs.
Browse files
app.py
CHANGED
@@ -77,8 +77,11 @@ def detect_objects(model_name,url_input,image_input,threshold):
|
|
77 |
final_str_abv = ""
|
78 |
final_str_else = ""
|
79 |
|
80 |
-
for
|
81 |
-
|
|
|
|
|
|
|
82 |
# if r.boxes.conf >= threshold:
|
83 |
# final_str_abv += str(r.boxes) + "\n"
|
84 |
# else:
|
|
|
77 |
final_str_abv = ""
|
78 |
final_str_else = ""
|
79 |
|
80 |
+
for result in results:
|
81 |
+
boxes = result.boxes.cpu().numpy()
|
82 |
+
for i, box in enumerate(boxes):
|
83 |
+
# r = box.xyxy[0].astype(int)
|
84 |
+
final_str_abv += str(box.xyxy[0].astype(int)) + "__" + str(box.cls) + "__" + str(box.conf) + "\n"
|
85 |
# if r.boxes.conf >= threshold:
|
86 |
# final_str_abv += str(r.boxes) + "\n"
|
87 |
# else:
|