kinemotion 0.22.1__py3-none-any.whl → 0.24.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.
@@ -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.22.1
3
+ Version: 0.24.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
@@ -103,15 +103,24 @@ For clinical, research, or performance assessment requiring validated accuracy,
103
103
 
104
104
  #### Windows
105
105
 
106
- No additional system dependencies required.
106
+ **Required system dependencies:**
107
+
108
+ - [Microsoft Visual C++ 2022 Redistributable](https://visualstudio.microsoft.com/visual-cpp-build-tools/) - Runtime libraries for OpenCV/MediaPipe
109
+ - Python 3.10-3.12 (64-bit) - MediaPipe requires 64-bit Python
107
110
 
108
111
  **Recommended for mobile video support:**
109
112
 
110
- - [FFmpeg](https://ffmpeg.org/download.html) - Download and add to PATH
113
+ - [FFmpeg](https://ffmpeg.org/download.html) - Download and add to PATH for full video codec support
111
114
 
112
115
  #### macOS
113
116
 
114
- No additional system dependencies required.
117
+ **Required system dependencies:**
118
+
119
+ - Xcode Command Line Tools - Provides compilers and system frameworks
120
+
121
+ ```bash
122
+ xcode-select --install
123
+ ```
115
124
 
116
125
  **Recommended for mobile video support:**
117
126
 
@@ -126,9 +135,10 @@ brew install ffmpeg
126
135
  ```bash
127
136
  sudo apt-get update
128
137
  sudo apt-get install -y \
129
- libgl1-mesa-glx \
130
- libglib2.0-0 \
131
- ffmpeg
138
+ libgl1 \ # OpenGL library for OpenCV
139
+ libglib2.0-0 \ # GLib library for MediaPipe
140
+ libgomp1 \ # OpenMP library for multi-threading
141
+ ffmpeg # Video codec support and metadata extraction
132
142
  ```
133
143
 
134
144
  **Note:** `ffmpeg` provides the `ffprobe` tool for video metadata extraction (rotation, aspect ratio). Kinemotion works without it, but mobile/rotated videos may not process correctly. A warning will be shown if `ffprobe` is not available.
@@ -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=xx5NWy6s0eb9BEyO_FByY1Ahunaoh3TyaTAxjlPrvxg,27153
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.22.1.dist-info/METADATA,sha256=EQIW0y1JMyzRkmnig1MhMCNt7dzCjdZxc5jOueLtdD4,20249
25
- kinemotion-0.22.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
26
- kinemotion-0.22.1.dist-info/entry_points.txt,sha256=zaqnAnjLvcdrk1Qvj5nvXZCZ2gp0prS7it1zTJygcIY,50
27
- kinemotion-0.22.1.dist-info/licenses/LICENSE,sha256=KZajvqsHw0NoOHOi2q0FZ4NBe9HdV6oey-IPYAtHXfg,1088
28
- kinemotion-0.22.1.dist-info/RECORD,,
24
+ kinemotion-0.24.0.dist-info/METADATA,sha256=q-Zj983PFHne1aGTqC7JU90XxUC6g0c_SFT1p1HPGXQ,20762
25
+ kinemotion-0.24.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
26
+ kinemotion-0.24.0.dist-info/entry_points.txt,sha256=zaqnAnjLvcdrk1Qvj5nvXZCZ2gp0prS7it1zTJygcIY,50
27
+ kinemotion-0.24.0.dist-info/licenses/LICENSE,sha256=KZajvqsHw0NoOHOi2q0FZ4NBe9HdV6oey-IPYAtHXfg,1088
28
+ kinemotion-0.24.0.dist-info/RECORD,,