kinemotion 0.11.6__py3-none-any.whl → 0.11.7__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/cmj/cli.py CHANGED
@@ -17,6 +17,7 @@ from ..core.auto_tuning import (
17
17
  )
18
18
  from ..core.cli_utils import (
19
19
  apply_expert_param_overrides,
20
+ common_output_options,
20
21
  determine_initial_confidence,
21
22
  print_auto_tuned_params,
22
23
  smooth_landmark_sequence,
@@ -102,18 +103,7 @@ def _process_batch_videos(
102
103
 
103
104
  @click.command(name="cmj-analyze")
104
105
  @click.argument("video_path", nargs=-1, type=click.Path(exists=False), required=True)
105
- @click.option(
106
- "--output",
107
- "-o",
108
- type=click.Path(),
109
- help="Path for debug video output (optional)",
110
- )
111
- @click.option(
112
- "--json-output",
113
- "-j",
114
- type=click.Path(),
115
- help="Path for JSON metrics output (default: stdout)",
116
- )
106
+ @common_output_options
117
107
  @click.option(
118
108
  "--quality",
119
109
  type=click.Choice(["fast", "balanced", "accurate"], case_sensitive=False),
@@ -1,5 +1,6 @@
1
1
  """Shared CLI utilities for drop jump and CMJ analysis."""
2
2
 
3
+ from collections.abc import Callable
3
4
  from typing import Any, Protocol
4
5
 
5
6
  import click
@@ -190,3 +191,116 @@ def smooth_landmark_sequence(landmarks_sequence: list, params: AutoTunedParams)
190
191
  window_length=params.smoothing_window,
191
192
  polyorder=params.polyorder,
192
193
  )
194
+
195
+
196
+ def common_output_options(func: Callable) -> Callable: # type: ignore[type-arg]
197
+ """Add common output options to CLI command."""
198
+ func = click.option(
199
+ "--output",
200
+ "-o",
201
+ type=click.Path(),
202
+ help="Path for debug video output (optional)",
203
+ )(func)
204
+ func = click.option(
205
+ "--json-output",
206
+ "-j",
207
+ type=click.Path(),
208
+ help="Path for JSON metrics output (default: stdout)",
209
+ )(func)
210
+ return func
211
+
212
+
213
+ def common_quality_options(func: Callable) -> Callable: # type: ignore[type-arg]
214
+ """Add quality and verbose options to CLI command."""
215
+ func = click.option(
216
+ "--quality",
217
+ type=click.Choice(["fast", "balanced", "accurate"], case_sensitive=False),
218
+ default="balanced",
219
+ help=(
220
+ "Analysis quality preset: "
221
+ "fast (quick, less precise), "
222
+ "balanced (default, good for most cases), "
223
+ "accurate (research-grade, slower)"
224
+ ),
225
+ show_default=True,
226
+ )(func)
227
+ func = click.option(
228
+ "--verbose",
229
+ "-v",
230
+ is_flag=True,
231
+ help="Show auto-selected parameters and analysis details",
232
+ )(func)
233
+ return func
234
+
235
+
236
+ def common_batch_options(func: Callable) -> Callable: # type: ignore[type-arg]
237
+ """Add batch processing options to CLI command."""
238
+ func = click.option(
239
+ "--batch",
240
+ is_flag=True,
241
+ help="Enable batch processing mode for multiple videos",
242
+ )(func)
243
+ func = click.option(
244
+ "--workers",
245
+ type=int,
246
+ default=4,
247
+ help="Number of parallel workers for batch processing (default: 4)",
248
+ show_default=True,
249
+ )(func)
250
+ func = click.option(
251
+ "--output-dir",
252
+ type=click.Path(),
253
+ help="Directory for debug video outputs (batch mode only)",
254
+ )(func)
255
+ func = click.option(
256
+ "--json-output-dir",
257
+ type=click.Path(),
258
+ help="Directory for JSON metrics outputs (batch mode only)",
259
+ )(func)
260
+ func = click.option(
261
+ "--csv-summary",
262
+ type=click.Path(),
263
+ help="Path for CSV summary export (batch mode only)",
264
+ )(func)
265
+ return func
266
+
267
+
268
+ def common_expert_options(func: Callable) -> Callable: # type: ignore[type-arg]
269
+ """Add expert parameter options to CLI command."""
270
+ func = click.option(
271
+ "--smoothing-window",
272
+ type=int,
273
+ default=None,
274
+ help="[EXPERT] Override auto-tuned smoothing window size",
275
+ )(func)
276
+ func = click.option(
277
+ "--velocity-threshold",
278
+ type=float,
279
+ default=None,
280
+ help="[EXPERT] Override auto-tuned velocity threshold",
281
+ )(func)
282
+ func = click.option(
283
+ "--min-contact-frames",
284
+ type=int,
285
+ default=None,
286
+ help="[EXPERT] Override auto-tuned minimum contact frames",
287
+ )(func)
288
+ func = click.option(
289
+ "--visibility-threshold",
290
+ type=float,
291
+ default=None,
292
+ help="[EXPERT] Override visibility threshold for landmarks",
293
+ )(func)
294
+ func = click.option(
295
+ "--detection-confidence",
296
+ type=float,
297
+ default=None,
298
+ help="[EXPERT] Override MediaPipe detection confidence (0.0-1.0)",
299
+ )(func)
300
+ func = click.option(
301
+ "--tracking-confidence",
302
+ type=float,
303
+ default=None,
304
+ help="[EXPERT] Override MediaPipe tracking confidence (0.0-1.0)",
305
+ )(func)
306
+ return func
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: kinemotion
3
- Version: 0.11.6
3
+ Version: 0.11.7
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
@@ -3,13 +3,13 @@ kinemotion/api.py,sha256=M6KqzdspOvtJ9Wl555HGe3ITzvRFhPK4xeqcX7IA98s,31463
3
3
  kinemotion/cli.py,sha256=cqYV_7URH0JUDy1VQ_EDLv63FmNO4Ns20m6s1XAjiP4,464
4
4
  kinemotion/cmj/__init__.py,sha256=Ynv0-Oco4I3Y1Ubj25m3h9h2XFqeNwpAewXmAYOmwfU,127
5
5
  kinemotion/cmj/analysis.py,sha256=4HYGn4VDIB6oExAees-VcPfpNgWOltpgwjyNTU7YAb4,18263
6
- kinemotion/cmj/cli.py,sha256=3CQPJOC3N00dFz_mrEgSHq9pIA-RyOynZoNUIk8RzD0,17040
6
+ kinemotion/cmj/cli.py,sha256=bmDvNvL7cu65-R8YkRIZYKD0nuTA0IJnWLcLlH_kFm0,16843
7
7
  kinemotion/cmj/debug_overlay.py,sha256=5Uwtyx9FP-tKhQyUvFW2t_ULVBV7oMCvzcLzf4hFcUg,15910
8
8
  kinemotion/cmj/joint_angles.py,sha256=8ucpDGPvbt4iX3tx9eVxJEUv0laTm2Y58_--VzJCogE,9113
9
9
  kinemotion/cmj/kinematics.py,sha256=Xl_PlC2OqMoA-zOc3SRB_GqI0AgLlJol5FTPe5J_qLc,7573
10
10
  kinemotion/core/__init__.py,sha256=3yzDhb5PekDNjydqrs8aWGneUGJBt-lB0SoB_Y2FXqU,1010
11
11
  kinemotion/core/auto_tuning.py,sha256=cvmxUI-CbahpOJQtR2r5jOx4Q6yKPe3DO1o15hOQIdw,10508
12
- kinemotion/core/cli_utils.py,sha256=iI1bHZxgbzxW5-2X3tTHEy2mqR49o3oIlwFptZ6gCco,6726
12
+ kinemotion/core/cli_utils.py,sha256=Pmg8z0nGhkYJm0o-y3jyvzeRy9yvol14ddaHrp6f7cw,10161
13
13
  kinemotion/core/debug_overlay_utils.py,sha256=E3krJ0SeIhSl6AM5WYiGuaONKsLNKL93P3aHqMgStY8,5235
14
14
  kinemotion/core/filtering.py,sha256=f-m-aA59e4WqE6u-9MA51wssu7rI-Y_7n1cG8IWdeRQ,11241
15
15
  kinemotion/core/pose.py,sha256=Wfd1RR-2ZznYpWeQUbySwcV3mvReqn8n3XO6S7pGq4M,8390
@@ -21,8 +21,8 @@ kinemotion/dropjump/cli.py,sha256=-iBgHNwW_dijHe6_JIEGSBUzvFb6tZV0aopbPd-9jC8,22
21
21
  kinemotion/dropjump/debug_overlay.py,sha256=2L4VAZwWFnaOQ7LAF3ALXCjEaVNzkfpLT5-h0qKL_6g,5707
22
22
  kinemotion/dropjump/kinematics.py,sha256=RM_O8Kdc6aEiPIu_99N4cu-4EhYSQxtBGASJF_dmQaU,19081
23
23
  kinemotion/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
24
- kinemotion-0.11.6.dist-info/METADATA,sha256=UsgmtoeTQaucbGCimul6F5wuGllK2cHFw-QUUo4WWUs,18990
25
- kinemotion-0.11.6.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
26
- kinemotion-0.11.6.dist-info/entry_points.txt,sha256=zaqnAnjLvcdrk1Qvj5nvXZCZ2gp0prS7it1zTJygcIY,50
27
- kinemotion-0.11.6.dist-info/licenses/LICENSE,sha256=KZajvqsHw0NoOHOi2q0FZ4NBe9HdV6oey-IPYAtHXfg,1088
28
- kinemotion-0.11.6.dist-info/RECORD,,
24
+ kinemotion-0.11.7.dist-info/METADATA,sha256=7z0ZpUWjjZXDq-fe3006Pgy7CCZTucZ_cCRh9lbLjkU,18990
25
+ kinemotion-0.11.7.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
26
+ kinemotion-0.11.7.dist-info/entry_points.txt,sha256=zaqnAnjLvcdrk1Qvj5nvXZCZ2gp0prS7it1zTJygcIY,50
27
+ kinemotion-0.11.7.dist-info/licenses/LICENSE,sha256=KZajvqsHw0NoOHOi2q0FZ4NBe9HdV6oey-IPYAtHXfg,1088
28
+ kinemotion-0.11.7.dist-info/RECORD,,