Spaces:
Running
on
Zero
Running
on
Zero
vitpose-small
Browse files
app.py
CHANGED
@@ -36,8 +36,8 @@ def process_video(video_file, threshold_secs):
|
|
36 |
# Load ViTPose components from Hugging Face
|
37 |
# This model is used to refine detection by analyzing keypoints in the cropped person area.
|
38 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
39 |
-
image_processor = AutoImageProcessor.from_pretrained("usyd-community/vitpose-
|
40 |
-
vitpose_model = ViTPoseForPoseEstimation.from_pretrained("usyd-community/vitpose-
|
41 |
vitpose_model.eval()
|
42 |
|
43 |
# Dictionary to keep track of when a given track was first detected as "lying"
|
|
|
36 |
# Load ViTPose components from Hugging Face
|
37 |
# This model is used to refine detection by analyzing keypoints in the cropped person area.
|
38 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
39 |
+
image_processor = AutoImageProcessor.from_pretrained("usyd-community/vitpose-plus-small")
|
40 |
+
vitpose_model = ViTPoseForPoseEstimation.from_pretrained("usyd-community/vitpose-plus-small").to(device)
|
41 |
vitpose_model.eval()
|
42 |
|
43 |
# Dictionary to keep track of when a given track was first detected as "lying"
|