lopesdri commited on
Commit
04f0358
·
1 Parent(s): 150f8c5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -24,7 +24,8 @@ def detect(img):
24
  scores = predictions[:, 4]
25
  categories = predictions[:, 5]
26
  dfResults = results.pandas().xyxy[0]
27
- return drawRectangles(img, dfResults[['xmin', 'ymin', 'xmax','ymax']].astype(int))
 
28
 
29
  def drawRectangles(image, dfResults):
30
  for index, row in dfResults.iterrows():
 
24
  scores = predictions[:, 4]
25
  categories = predictions[:, 5]
26
  dfResults = results.pandas().xyxy[0]
27
+ for i, box in enumerate(boxes):
28
+ cv2.rectangle(img, tuple(box[:2]), tuple(box[2:]), (0, 255, 0), 2)
29
 
30
  def drawRectangles(image, dfResults):
31
  for index, row in dfResults.iterrows():