Skip to content

Commit 42506fc

Browse files
committed
- Default names for Halpe_26, coco_133, coco_17: body_with_feet, whole_body, body
- Optional manual selection of backend and device
1 parent 02a44ac commit 42506fc

File tree

4 files changed

+228
-199
lines changed

4 files changed

+228
-199
lines changed

Sports2D/Demo/Config_demo.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,14 @@ result_dir = '' # If empty, project dir is current dir
4848
slowmo_factor = 1 # 1 for normal speed. For a video recorded at 240 fps and exported to 30 fps, it would be 240/30 = 8
4949

5050
# Pose detection parameters
51-
pose_model = 'body_with_feet' # Only body_with_feet is available for now
51+
pose_model = 'Body_with_feet' # Only Body_with_feet is available for now
5252
mode = 'balanced' # 'lightweight', 'balanced', or 'performance'
5353
det_frequency = 1 # Run person detection only every N frames, and inbetween track previously detected bounding boxes (keypoint detection is still run on all frames).
5454
# Equal to or greater than 1, can be as high as you want in simple uncrowded cases. Much faster, but might be less accurate.
5555
tracking_mode = 'sports2d' # 'rtmlib' or 'sports2d'. 'sports2d' is generally much more accurate and comparable in speed
56+
device = 'auto' # 'auto', 'CPU', 'CUDA', 'MPS', 'ROCM'
57+
backend = 'auto' # 'auto', 'openvino', 'onnxruntime', 'opencv'
58+
5659

5760
# Processing parameters
5861
keypoint_likelihood_threshold = 0.3 # Keypoints whose likelihood is lower will not be taken into account

Sports2D/Sports2D.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,8 @@
143143
'pose_model': 'body_with_feet',
144144
'mode': 'balanced',
145145
'det_frequency': 4,
146+
'device': 'auto',
147+
'backend': 'auto',
146148
'tracking_mode': 'sports2d',
147149
'keypoint_likelihood_threshold': 0.3,
148150
'average_likelihood_threshold': 0.5,
@@ -231,6 +233,8 @@
231233
'mode': ["m", "light, balanced, or performance. balanced if not specified"],
232234
'det_frequency': ["f", "run person detection only every N frames, and inbetween track previously detected bounding boxes. keypoint detection is still run on all frames.\n\
233235
Equal to or greater than 1, can be as high as you want in simple uncrowded cases. Much faster, but might be less accurate. 1 if not specified: detection runs on all frames"],
236+
'backend': ["", "Backend for pose estimation can be 'auto', 'cpu', 'cuda', 'mps' (for MacOS), or 'rocm' (for AMD GPUs)"],
237+
'device': ["", "Device for pose estimatino can be 'auto', 'openvino', 'onnxruntime', 'opencv'"],
234238
'to_meters': ["M", "convert pixels to meters. true if not specified"],
235239
'calib_on_person_id': ["", "person ID to calibrate on. 0 if not specified"],
236240
'floor_angle': ["", "angle of the floor. 'auto' if not specified"],

0 commit comments

Comments
 (0)