sports2d 0.5.5__py3-none-any.whl → 0.6.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- Sports2D/Demo/Config_demo.toml +111 -6
- Sports2D/Sports2D.py +18 -9
- Sports2D/Utilities/common.py +291 -0
- Sports2D/Utilities/skeletons.py +654 -143
- Sports2D/Utilities/tests.py +12 -5
- Sports2D/process.py +223 -310
- {sports2d-0.5.5.dist-info → sports2d-0.6.1.dist-info}/METADATA +102 -10
- sports2d-0.6.1.dist-info/RECORD +16 -0
- {sports2d-0.5.5.dist-info → sports2d-0.6.1.dist-info}/WHEEL +1 -1
- sports2d-0.5.5.dist-info/RECORD +0 -16
- {sports2d-0.5.5.dist-info → sports2d-0.6.1.dist-info}/LICENSE +0 -0
- {sports2d-0.5.5.dist-info → sports2d-0.6.1.dist-info}/entry_points.txt +0 -0
- {sports2d-0.5.5.dist-info → sports2d-0.6.1.dist-info}/top_level.txt +0 -0
Sports2D/Utilities/tests.py
CHANGED
|
@@ -35,7 +35,11 @@ def test_workflow():
|
|
|
35
35
|
Test the workflow of Sports2D.
|
|
36
36
|
'''
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
#############################
|
|
39
|
+
## From Python ##
|
|
40
|
+
#############################
|
|
41
|
+
|
|
42
|
+
# Default
|
|
39
43
|
config_path = Path.cwd().parent / 'Demo' / 'Config_demo.toml'
|
|
40
44
|
config_dict = toml.load(config_path)
|
|
41
45
|
config_dict.get("project").update({"video_dir":'../Demo'})
|
|
@@ -46,17 +50,20 @@ def test_workflow():
|
|
|
46
50
|
Sports2D.process(config_dict)
|
|
47
51
|
|
|
48
52
|
|
|
49
|
-
|
|
53
|
+
#############################
|
|
54
|
+
## From command line (CLI) ##
|
|
55
|
+
#############################
|
|
56
|
+
|
|
50
57
|
# Default
|
|
51
58
|
demo_cmd = ["sports2d", "--show_realtime_results", "False", "--show_graphs", "False"]
|
|
52
59
|
subprocess.run(demo_cmd, check=True, capture_output=True, text=True)
|
|
53
60
|
|
|
54
|
-
# With
|
|
61
|
+
# With no pixels to meters conversion, no multiperson, lightweight mode, detection frequency, time range and slowmo factor
|
|
55
62
|
demo_cmd2 = ["sports2d", "--to_meters", "False", "--multiperson", "False", "--mode", "lightweight", "--det_frequency", "50", "--time_range", "1.2", "2.7", "--slowmo_factor", "4", "--show_realtime_results", "False", "--show_graphs", "False"]
|
|
56
63
|
subprocess.run(demo_cmd2, check=True, capture_output=True, text=True)
|
|
57
64
|
|
|
58
|
-
# With inverse kinematics
|
|
59
|
-
# demo_cmd3 = ["sports2d", "--do_ik", "--person_orientation", "front none left", "--show_realtime_results", "False", "--show_graphs", "False"]
|
|
65
|
+
# With inverse kinematics, body pose_model and custom RTMO mode
|
|
66
|
+
# demo_cmd3 = ["sports2d", "--do_ik", "--person_orientation", "front none left", "--pose_model", "body", "--mode", "{'pose_class':'RTMO', 'pose_model':'https://download.openmmlab.com/mmpose/v1/projects/rtmo/onnx_sdk/rtmo-m_16xb16-600e_body7-640x640-39e78cc4_20231211.zip', 'pose_input_size':[640, 640]}", "--show_realtime_results", "False", "--show_graphs", "False"]
|
|
60
67
|
# subprocess.run(demo_cmd3, check=True, capture_output=True, text=True)
|
|
61
68
|
|
|
62
69
|
# From config file
|