kinemotion 0.7.0__py3-none-any.whl → 0.7.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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: kinemotion
3
- Version: 0.7.0
3
+ Version: 0.7.1
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
@@ -100,18 +100,21 @@ This will install all dependencies and make the `kinemotion` command available.
100
100
 
101
101
  ## Usage
102
102
 
103
+ **NEW:** Kinemotion now features **intelligent auto-tuning**! Just specify your drop box height and the tool automatically optimizes all parameters based on video frame rate and tracking quality.
104
+
103
105
  ### Basic Analysis
104
106
 
105
- Analyze a video and output metrics to stdout as JSON:
107
+ Analyze a video with automatic parameter selection:
106
108
 
107
109
  ```bash
108
- kinemotion dropjump-analyze video.mp4
110
+ # Drop-height is REQUIRED for accurate calibration
111
+ kinemotion dropjump-analyze video.mp4 --drop-height 0.40
109
112
  ```
110
113
 
111
114
  ### Save Metrics to File
112
115
 
113
116
  ```bash
114
- kinemotion dropjump-analyze video.mp4 --json-output metrics.json
117
+ kinemotion dropjump-analyze video.mp4 --drop-height 0.40 --json-output metrics.json
115
118
  ```
116
119
 
117
120
  ### Generate Debug Video
@@ -119,156 +122,104 @@ kinemotion dropjump-analyze video.mp4 --json-output metrics.json
119
122
  Create an annotated video showing pose tracking and contact detection:
120
123
 
121
124
  ```bash
122
- kinemotion dropjump-analyze video.mp4 --output debug.mp4
125
+ kinemotion dropjump-analyze video.mp4 --drop-height 0.40 --output debug.mp4
123
126
  ```
124
127
 
125
- ### Calibrated Drop Jump Analysis
128
+ ### Complete Analysis
126
129
 
127
- For most accurate measurements, provide the drop box height in meters:
130
+ With all outputs:
128
131
 
129
132
  ```bash
130
- # 40cm drop box
131
- kinemotion dropjump-analyze drop-jump.mp4 --drop-height 0.40
132
-
133
- # 60cm drop box with full outputs
134
- kinemotion dropjump-analyze drop-jump.mp4 \
135
- --drop-height 0.60 \
136
- --json-output metrics.json \
137
- --output debug.mp4
133
+ kinemotion dropjump-analyze video.mp4 \
134
+ --drop-height 0.40 \
135
+ --output debug.mp4 \
136
+ --json-output results.json
138
137
  ```
139
138
 
140
- ### Full Example (Maximum Accuracy)
139
+ ### Quality Presets
140
+
141
+ Choose analysis quality (automatically adjusts all parameters):
141
142
 
142
143
  ```bash
143
- # With all accuracy improvements enabled
144
- kinemotion dropjump-analyze jump.mp4 \
145
- --outlier-rejection \
146
- --drop-height 0.40 \
147
- --output debug.mp4 \
148
- --json-output results.json \
149
- --smoothing-window 7 \
150
- --polyorder 3
144
+ # Fast analysis (quick, less precise - good for batch processing)
145
+ kinemotion dropjump-analyze video.mp4 --drop-height 0.40 --quality fast
151
146
 
152
- # Alternative: With experimental bilateral filter
153
- kinemotion dropjump-analyze jump.mp4 \
154
- --outlier-rejection \
155
- --bilateral-filter \
147
+ # Balanced (default - best for most use cases)
148
+ kinemotion dropjump-analyze video.mp4 --drop-height 0.40 --quality balanced
149
+
150
+ # Accurate (research-grade, slower - maximum precision)
151
+ kinemotion dropjump-analyze video.mp4 --drop-height 0.40 --quality accurate
152
+ ```
153
+
154
+ ### See Auto-Selected Parameters
155
+
156
+ View what parameters were automatically selected:
157
+
158
+ ```bash
159
+ kinemotion dropjump-analyze video.mp4 --drop-height 0.40 --verbose
160
+ ```
161
+
162
+ ### Expert Mode (Advanced Users)
163
+
164
+ Override auto-tuned parameters if needed:
165
+
166
+ ```bash
167
+ # Manual parameter override (rarely needed)
168
+ kinemotion dropjump-analyze video.mp4 \
156
169
  --drop-height 0.40 \
157
- --output debug.mp4 \
158
- --json-output results.json
170
+ --expert \
171
+ --smoothing-window 7 \
172
+ --velocity-threshold 0.015
159
173
  ```
160
174
 
161
175
  ## Configuration Options
162
176
 
163
- > **📖 For detailed explanations of all parameters, see [docs/PARAMETERS.md](docs/PARAMETERS.md)**
164
- >
165
- > This section provides a quick reference. The full guide includes:
166
- >
167
- > - How each parameter works internally
168
- > - When and why to adjust them
169
- > - Scenario-based recommendations
170
- > - Debugging workflows
171
- > - Parameter interaction effects
172
-
173
- ### Smoothing
174
-
175
- - `--smoothing-window <int>` (default: 5)
176
- - Window size for Savitzky-Golay smoothing filter
177
- - Must be odd and >= 3
178
- - Larger values = smoother trajectories but less responsive
179
- - **Tip**: Increase for noisy videos, decrease for high-quality stable footage
180
-
181
- - `--polyorder <int>` (default: 2)
182
- - Polynomial order for Savitzky-Golay smoothing filter
183
- - Must be < smoothing-window (typically 2 or 3)
184
- - 2 = quadratic fit (good for parabolic motion like jumps)
185
- - 3 = cubic fit (better for complex motion patterns)
186
- - Higher order captures more motion complexity but more sensitive to noise
187
- - **Tip**: Use 2 for most cases, try 3 for high-quality videos with complex motion
188
- - **Accuracy improvement**: +1-2% for complex motion patterns
189
-
190
- ### Advanced Filtering
191
-
192
- - `--outlier-rejection / --no-outlier-rejection` (default: --outlier-rejection)
193
- - Apply RANSAC and median-based outlier rejection to remove tracking glitches
194
- - **With outlier rejection** (`--outlier-rejection`): Detects and removes MediaPipe tracking errors
195
- - RANSAC-based polynomial fitting identifies positions that deviate from smooth trajectory
196
- - Median filtering catches spikes in otherwise smooth motion
197
- - Outliers replaced with interpolated values from neighboring valid points
198
- - Removes jumps, jitter, and temporary tracking losses
199
- - **Accuracy improvement**: +1-2% by eliminating tracking glitches
200
- - **Without outlier rejection** (`--no-outlier-rejection`): Uses raw tracked positions
201
- - Faster processing, relies entirely on MediaPipe quality
202
- - **Tip**: Keep enabled (default) unless debugging or working with perfect tracking
203
-
204
- - `--bilateral-filter / --no-bilateral-filter` (default: --no-bilateral-filter)
205
- - Use bilateral temporal filter for edge-preserving smoothing
206
- - **With bilateral filter** (`--bilateral-filter`): Preserves sharp transitions while smoothing noise
207
- - Weights each frame by temporal distance AND position similarity
208
- - Landing/takeoff transitions remain sharp (not smoothed away)
209
- - Noise in smooth regions (flight, ground contact) is reduced
210
- - Edge-preserving alternative to Savitzky-Golay smoothing
211
- - **Accuracy improvement**: +1-2% by preserving event timing precision
212
- - **Without bilateral filter** (`--no-bilateral-filter`): Uses standard Savitzky-Golay smoothing
213
- - Uniform smoothing across all frames
214
- - Well-tested baseline method
215
- - **Tip**: Experimental feature; enable for videos with rapid transitions or variable motion
216
- - **Note**: Cannot be used simultaneously with Savitzky-Golay; bilateral replaces it when enabled
217
-
218
- ### Contact Detection
219
-
220
- - `--velocity-threshold <float>` (default: 0.02)
221
- - Vertical velocity threshold for detecting stationary feet
222
- - In normalized coordinates (0-1 range)
223
- - Lower values = more sensitive (may detect false contacts)
224
- - Higher values = less sensitive (may miss brief contacts)
225
- - **Tip**: Start with default, decrease if missing contacts, increase if detecting false contacts
226
-
227
- - `--min-contact-frames <int>` (default: 3)
228
- - Minimum consecutive frames to confirm ground contact
229
- - Filters out momentary tracking glitches
230
- - **Tip**: Increase for noisy videos with jittery tracking
231
-
232
- ### Visibility
233
-
234
- - `--visibility-threshold <float>` (default: 0.5)
235
- - Minimum MediaPipe visibility score (0-1) to trust a landmark
236
- - Higher values require more confident tracking
237
- - **Tip**: Lower if landmarks are frequently obscured but tracking seems reasonable
238
-
239
- ### Pose Tracking
240
-
241
- - `--detection-confidence <float>` (default: 0.5)
242
- - MediaPipe pose detection confidence threshold
243
- - **Tip**: Increase if getting false pose detections
244
-
245
- - `--tracking-confidence <float>` (default: 0.5)
246
- - MediaPipe pose tracking confidence threshold
247
- - **Tip**: Increase if tracking is jumping between different people/objects
248
-
249
- ### Calibration
250
-
251
- - `--drop-height <float>` (optional)
177
+ ### Intelligent Auto-Tuning
178
+
179
+ Kinemotion automatically optimizes parameters based on your video:
180
+ - **FPS-based scaling**: 30fps, 60fps, 120fps videos use different thresholds automatically
181
+ - **Quality-based adjustments**: Adapts smoothing based on MediaPipe tracking confidence
182
+ - **Always enabled**: Outlier rejection, curvature analysis, drop start detection
183
+
184
+ ### Required Parameters
185
+
186
+ - `--drop-height <float>` **[REQUIRED]**
252
187
  - Height of drop box/platform in meters (e.g., 0.40 for 40cm)
253
- - Enables calibrated jump height measurement using known drop height
254
- - Theoretically improves accuracy (⚠️ unvalidated - requires empirical validation)
255
- - Only applicable for drop jumps (box → drop → landing → jump)
256
- - **Tip**: Measure your box height accurately for best results
257
-
258
- ### Trajectory Analysis
259
-
260
- - `--use-curvature / --no-curvature` (default: --use-curvature)
261
- - Enable/disable trajectory curvature analysis for refining transitions
262
- - **With curvature** (`--use-curvature`): Uses acceleration patterns to refine event timing
263
- - Landing detection: Finds acceleration spike from impact deceleration
264
- - Takeoff detection: Finds acceleration change as body transitions from static to upward motion
265
- - Blends curvature-based refinement (70%) with velocity-based estimate (30%)
266
- - Provides physics-based validation of velocity threshold crossings
267
- - **Accuracy improvement**: More precise timing, especially for rapid transitions
268
- - **Without curvature** (`--no-curvature`): Pure velocity-based detection with sub-frame interpolation
269
- - Simpler, faster algorithm
270
- - Still highly accurate with smooth velocity curves
271
- - **Tip**: Keep enabled (default) for best results; disable only for debugging or comparison
188
+ - Used for accurate calibration of jump height measurements
189
+ - Measure your box height accurately for best results
190
+
191
+ ### Optional Parameters
192
+
193
+ - `--quality [fast|balanced|accurate]` (default: balanced)
194
+ - **fast**: Quick analysis, less precise (~50% faster)
195
+ - **balanced**: Good accuracy/speed tradeoff (recommended)
196
+ - **accurate**: Research-grade analysis, slower (maximum precision)
197
+
198
+ - `--verbose` / `-v`
199
+ - Show auto-selected parameters and analysis details
200
+ - Useful for understanding what the tool is doing
201
+
202
+ - `--output <path>` / `-o`
203
+ - Generate annotated debug video with pose tracking visualization
204
+
205
+ - `--json-output <path>` / `-j`
206
+ - Save metrics to JSON file instead of stdout
207
+
208
+ ### Expert Overrides (Rarely Needed)
209
+
210
+ For advanced users who need manual control:
211
+
212
+ - `--drop-start-frame <int>`: Manually specify where drop begins (if auto-detection fails)
213
+ - `--smoothing-window <int>`: Override auto-tuned smoothing window
214
+ - `--velocity-threshold <float>`: Override auto-tuned velocity threshold
215
+ - `--min-contact-frames <int>`: Override auto-tuned minimum contact frames
216
+ - `--visibility-threshold <float>`: Override visibility threshold
217
+ - `--detection-confidence <float>`: Override MediaPipe detection confidence
218
+ - `--tracking-confidence <float>`: Override MediaPipe tracking confidence
219
+
220
+ > **📖 For detailed parameter explanations, see [docs/PARAMETERS.md](docs/PARAMETERS.md)**
221
+ >
222
+ > **Note:** Most users never need expert parameters - auto-tuning handles optimization automatically!
272
223
 
273
224
  ## Output Format
274
225
 
@@ -11,8 +11,8 @@ kinemotion/dropjump/analysis.py,sha256=HfJt2t9IsMBiBUz7apIzdxbRH9QqzlFnDVVWcKhU3
11
11
  kinemotion/dropjump/cli.py,sha256=nhcqYClTx9R0XeTduJCNspltNgeaK4W8ZUT1ACB8GFI,15601
12
12
  kinemotion/dropjump/debug_overlay.py,sha256=hmEtadqYP8K-kGr_Q03KDQyl1152-YSPeRJzEXMyuhs,8687
13
13
  kinemotion/dropjump/kinematics.py,sha256=RceIH2HndpHQpcOQd56MmEdXQNEst-CWXfBKPJk2g3Y,17659
14
- kinemotion-0.7.0.dist-info/METADATA,sha256=D9N1JQN9MQpSDch4TdC-cz_SaBYXaaaj8kiEuLsacAk,19321
15
- kinemotion-0.7.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
16
- kinemotion-0.7.0.dist-info/entry_points.txt,sha256=zaqnAnjLvcdrk1Qvj5nvXZCZ2gp0prS7it1zTJygcIY,50
17
- kinemotion-0.7.0.dist-info/licenses/LICENSE,sha256=KZajvqsHw0NoOHOi2q0FZ4NBe9HdV6oey-IPYAtHXfg,1088
18
- kinemotion-0.7.0.dist-info/RECORD,,
14
+ kinemotion-0.7.1.dist-info/METADATA,sha256=19UeQyH5I1LCNhWRfJfJ9YGwDiyufB8f5olzBEQTN6w,16318
15
+ kinemotion-0.7.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
16
+ kinemotion-0.7.1.dist-info/entry_points.txt,sha256=zaqnAnjLvcdrk1Qvj5nvXZCZ2gp0prS7it1zTJygcIY,50
17
+ kinemotion-0.7.1.dist-info/licenses/LICENSE,sha256=KZajvqsHw0NoOHOi2q0FZ4NBe9HdV6oey-IPYAtHXfg,1088
18
+ kinemotion-0.7.1.dist-info/RECORD,,