Spaces:
Configuration error
Configuration error
Commit
·
bd4b238
1
Parent(s):
09453c6
Update app
Browse files
app.py
CHANGED
@@ -66,8 +66,8 @@ def preprocess_video(path, result_folder, padding=20):
|
|
66 |
all_frames = np.asarray(all_frames)
|
67 |
print("Extracted the frames for pre-processing")
|
68 |
|
69 |
-
# Load
|
70 |
-
yolo_model = YOLO("
|
71 |
print("Loaded the YOLO model")
|
72 |
|
73 |
if frame_count < 25:
|
@@ -77,6 +77,7 @@ def preprocess_video(path, result_folder, padding=20):
|
|
77 |
person_videos = {}
|
78 |
person_tracks = {}
|
79 |
|
|
|
80 |
for frame_idx in tqdm(range(frame_count)):
|
81 |
|
82 |
frame = all_frames[frame_idx]
|
|
|
66 |
all_frames = np.asarray(all_frames)
|
67 |
print("Extracted the frames for pre-processing")
|
68 |
|
69 |
+
# Load YOLOv9 model (pre-trained on COCO dataset)
|
70 |
+
yolo_model = YOLO("yolov9s.pt")
|
71 |
print("Loaded the YOLO model")
|
72 |
|
73 |
if frame_count < 25:
|
|
|
77 |
person_videos = {}
|
78 |
person_tracks = {}
|
79 |
|
80 |
+
print("Processing the frames...")
|
81 |
for frame_idx in tqdm(range(frame_count)):
|
82 |
|
83 |
frame = all_frames[frame_idx]
|