Spaces:
Sleeping
Sleeping
Rename app_v2.py to app.py
Browse files- app_v2.py → app.py +1 -1
app_v2.py → app.py
RENAMED
@@ -16,7 +16,7 @@ def draw_detections(image, detections):
|
|
16 |
# Extract scores, labels, and bounding boxes properly
|
17 |
score = detection['score']
|
18 |
label = detection['label']
|
19 |
-
box = detection['
|
20 |
x_min, y_min, x_max, y_max = map(int, [box[0], box[1], box[2], box[3]])
|
21 |
|
22 |
cv2.rectangle(np_image, (x_min, y_min), (x_max, y_max), (0, 255, 0), 2)
|
|
|
16 |
# Extract scores, labels, and bounding boxes properly
|
17 |
score = detection['score']
|
18 |
label = detection['label']
|
19 |
+
box = detection['box'] # Make sure 'boxes' data structure matches expected in terms of naming and indexing
|
20 |
x_min, y_min, x_max, y_max = map(int, [box[0], box[1], box[2], box[3]])
|
21 |
|
22 |
cv2.rectangle(np_image, (x_min, y_min), (x_max, y_max), (0, 255, 0), 2)
|