Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 |
-
|
|
|
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():
|