cheng-hust commited on
Commit
e87ccec
·
verified ·
1 Parent(s): 4fb77db

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -86,9 +86,9 @@ def detect(img,thr=0.2):
86
  box = boxes[i][scr > thrh]
87
 
88
 
89
- for b in box:
90
  draw.rectangle(list(b), outline='red', )
91
- draw.text((b[0], b[1]), text=str(lab[i]), fill='blue', )
92
 
93
  #save_path = Path('./output') / img_path.name
94
  return img
 
86
  box = boxes[i][scr > thrh]
87
 
88
 
89
+ for idx,b in enumerate(box):
90
  draw.rectangle(list(b), outline='red', )
91
+ draw.text((b[0], b[1]), text=str(lab[idx]), fill='blue', )
92
 
93
  #save_path = Path('./output') / img_path.name
94
  return img