kinemotion 0.22.1__py3-none-any.whl → 0.23.0__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.
Potentially problematic release.
This version of kinemotion might be problematic. Click here for more details.
- kinemotion/dropjump/analysis.py +17 -7
- {kinemotion-0.22.1.dist-info → kinemotion-0.23.0.dist-info}/METADATA +1 -1
- {kinemotion-0.22.1.dist-info → kinemotion-0.23.0.dist-info}/RECORD +6 -6
- {kinemotion-0.22.1.dist-info → kinemotion-0.23.0.dist-info}/WHEEL +0 -0
- {kinemotion-0.22.1.dist-info → kinemotion-0.23.0.dist-info}/entry_points.txt +0 -0
- {kinemotion-0.22.1.dist-info → kinemotion-0.23.0.dist-info}/licenses/LICENSE +0 -0
kinemotion/dropjump/analysis.py
CHANGED
|
@@ -754,6 +754,22 @@ def compute_average_foot_position(
|
|
|
754
754
|
return (float(np.mean(x_positions)), float(np.mean(y_positions)))
|
|
755
755
|
|
|
756
756
|
|
|
757
|
+
def _calculate_average_visibility(
|
|
758
|
+
frame_landmarks: dict[str, tuple[float, float, float]],
|
|
759
|
+
) -> float:
|
|
760
|
+
"""Calculate average visibility of foot landmarks in a frame.
|
|
761
|
+
|
|
762
|
+
Args:
|
|
763
|
+
frame_landmarks: Landmark dictionary for a single frame
|
|
764
|
+
|
|
765
|
+
Returns:
|
|
766
|
+
Average visibility of foot landmarks (0.0 if none visible)
|
|
767
|
+
"""
|
|
768
|
+
foot_keys = ["left_ankle", "right_ankle", "left_heel", "right_heel"]
|
|
769
|
+
foot_vis = [frame_landmarks[key][2] for key in foot_keys if key in frame_landmarks]
|
|
770
|
+
return float(np.mean(foot_vis)) if foot_vis else 0.0
|
|
771
|
+
|
|
772
|
+
|
|
757
773
|
def extract_foot_positions_and_visibilities(
|
|
758
774
|
smoothed_landmarks: list[dict[str, tuple[float, float, float]] | None],
|
|
759
775
|
) -> tuple[np.ndarray, np.ndarray]:
|
|
@@ -775,13 +791,7 @@ def extract_foot_positions_and_visibilities(
|
|
|
775
791
|
if frame_landmarks:
|
|
776
792
|
_, foot_y = compute_average_foot_position(frame_landmarks)
|
|
777
793
|
position_list.append(foot_y)
|
|
778
|
-
|
|
779
|
-
# Average visibility of foot landmarks
|
|
780
|
-
foot_vis = []
|
|
781
|
-
for key in ["left_ankle", "right_ankle", "left_heel", "right_heel"]:
|
|
782
|
-
if key in frame_landmarks:
|
|
783
|
-
foot_vis.append(frame_landmarks[key][2])
|
|
784
|
-
visibilities_list.append(float(np.mean(foot_vis)) if foot_vis else 0.0)
|
|
794
|
+
visibilities_list.append(_calculate_average_visibility(frame_landmarks))
|
|
785
795
|
else:
|
|
786
796
|
# Fill missing frames with last known position or default
|
|
787
797
|
position_list.append(position_list[-1] if position_list else 0.5)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: kinemotion
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.23.0
|
|
4
4
|
Summary: Video-based kinematic analysis for athletic performance
|
|
5
5
|
Project-URL: Homepage, https://github.com/feniix/kinemotion
|
|
6
6
|
Project-URL: Repository, https://github.com/feniix/kinemotion
|
|
@@ -16,13 +16,13 @@ kinemotion/core/pose.py,sha256=ztemdZ_ysVVK3gbXabm8qS_dr1VfJX9KZjmcO-Z-iNE,8532
|
|
|
16
16
|
kinemotion/core/smoothing.py,sha256=x4o3BnG6k8OaV3emgpoJDF84CE9k5RYR7BeSYH_-8Es,14092
|
|
17
17
|
kinemotion/core/video_io.py,sha256=0bJTheYidEqxGP5Y2dSO2x6sbOrnBDBu2TEiV8gT23A,7285
|
|
18
18
|
kinemotion/dropjump/__init__.py,sha256=yc1XiZ9vfo5h_n7PKVSiX2TTgaIfGL7Y7SkQtiDZj_E,838
|
|
19
|
-
kinemotion/dropjump/analysis.py,sha256=
|
|
19
|
+
kinemotion/dropjump/analysis.py,sha256=1AsIsgWg5wuwJo7poFK7aMCFr93yHVms-fEvaOGQQWs,27448
|
|
20
20
|
kinemotion/dropjump/cli.py,sha256=J2F8ij-UcybY7YjK_bncQZiHNzrgS3Y7uTBkNo7y_L4,21328
|
|
21
21
|
kinemotion/dropjump/debug_overlay.py,sha256=LkPw6ucb7beoYWS4L-Lvjs1KLCm5wAWDAfiznUeV2IQ,5668
|
|
22
22
|
kinemotion/dropjump/kinematics.py,sha256=VZWdytkw58Vk9dsNe8U15sFB84kfZKLo4argvt0CTPM,16361
|
|
23
23
|
kinemotion/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
24
|
-
kinemotion-0.
|
|
25
|
-
kinemotion-0.
|
|
26
|
-
kinemotion-0.
|
|
27
|
-
kinemotion-0.
|
|
28
|
-
kinemotion-0.
|
|
24
|
+
kinemotion-0.23.0.dist-info/METADATA,sha256=wxbYVtKmpJrZAbkA_ThAyJGq8Cyyah8oahqtvD_E3Tg,20249
|
|
25
|
+
kinemotion-0.23.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
26
|
+
kinemotion-0.23.0.dist-info/entry_points.txt,sha256=zaqnAnjLvcdrk1Qvj5nvXZCZ2gp0prS7it1zTJygcIY,50
|
|
27
|
+
kinemotion-0.23.0.dist-info/licenses/LICENSE,sha256=KZajvqsHw0NoOHOi2q0FZ4NBe9HdV6oey-IPYAtHXfg,1088
|
|
28
|
+
kinemotion-0.23.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|