Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -53,7 +53,7 @@ def yolov8_img_inference(
|
|
53 |
# obj_id = list(names)[list(names.values()).index('hop_dln','hop_jn','hop_vtg','hop_ytv','lo_kids', 'lo_ytv','loc_dln','loc_jn','loc_kids','loc_ytv')]
|
54 |
# obj_id = list(names)[list(names.values()).index([0])]
|
55 |
# count 'car' objects in the results
|
56 |
-
count_result = results[0].boxes.cls
|
57 |
# count_result = results.pandas().xyxy[0].value_counts('name')
|
58 |
return render, count_result
|
59 |
|
|
|
53 |
# obj_id = list(names)[list(names.values()).index('hop_dln','hop_jn','hop_vtg','hop_ytv','lo_kids', 'lo_ytv','loc_dln','loc_jn','loc_kids','loc_ytv')]
|
54 |
# obj_id = list(names)[list(names.values()).index([0])]
|
55 |
# count 'car' objects in the results
|
56 |
+
count_result = results[0].boxes.cls.item()
|
57 |
# count_result = results.pandas().xyxy[0].value_counts('name')
|
58 |
return render, count_result
|
59 |
|