Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -25,7 +25,7 @@ MODEL = "./best.pt"
|
|
25 |
|
26 |
TARGET_VIDEO_PATH = "test.mp4"
|
27 |
|
28 |
-
CLASS_ID = [0,1,2,3]
|
29 |
|
30 |
video_examples = [['example.mp4']]
|
31 |
|
@@ -103,7 +103,7 @@ def ObjectDetection(video_path):
|
|
103 |
class_id=results[0].boxes.cls.cpu().numpy().astype(int)
|
104 |
)
|
105 |
# filtering out detections with unwanted classes
|
106 |
-
detections = detections[np.isin(detections.class_id,
|
107 |
# tracking detections
|
108 |
tracks = byte_tracker.update(
|
109 |
output_results=detections2boxes(detections = detections),
|
|
|
25 |
|
26 |
TARGET_VIDEO_PATH = "test.mp4"
|
27 |
|
28 |
+
CLASS_ID = [0,1,2,3,4,5,6]
|
29 |
|
30 |
video_examples = [['example.mp4']]
|
31 |
|
|
|
103 |
class_id=results[0].boxes.cls.cpu().numpy().astype(int)
|
104 |
)
|
105 |
# filtering out detections with unwanted classes
|
106 |
+
detections = detections[np.isin(detections.class_id, CLASS_ID)]
|
107 |
# tracking detections
|
108 |
tracks = byte_tracker.update(
|
109 |
output_results=detections2boxes(detections = detections),
|