gatesla commited on
Commit
96e21ac
1 Parent(s): 85bef98

Trying to print correctly with bad docs.

Browse files
Files changed (1) hide show
  1. app.py +5 -2
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 r in results:
81
- final_str_abv += str(r.boxes) + "__" + str(r.boxes.xyxy) + "__" + str(r.boxes.conf) + "\n"
 
 
 
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: