kinemotion 0.10.6__py3-none-any.whl → 0.10.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/dropjump/cli.py +84 -20
- {kinemotion-0.10.6.dist-info → kinemotion-0.10.7.dist-info}/METADATA +1 -1
- {kinemotion-0.10.6.dist-info → kinemotion-0.10.7.dist-info}/RECORD +6 -6
- {kinemotion-0.10.6.dist-info → kinemotion-0.10.7.dist-info}/WHEEL +0 -0
- {kinemotion-0.10.6.dist-info → kinemotion-0.10.7.dist-info}/entry_points.txt +0 -0
- {kinemotion-0.10.6.dist-info → kinemotion-0.10.7.dist-info}/licenses/LICENSE +0 -0
kinemotion/dropjump/cli.py
CHANGED
|
@@ -46,6 +46,25 @@ class AnalysisParameters:
|
|
|
46
46
|
tracking_confidence: float | None = None
|
|
47
47
|
|
|
48
48
|
|
|
49
|
+
@dataclass
|
|
50
|
+
class BatchOptions:
|
|
51
|
+
"""Batch processing configuration."""
|
|
52
|
+
|
|
53
|
+
batch: bool
|
|
54
|
+
workers: int
|
|
55
|
+
output_dir: str | None
|
|
56
|
+
json_output_dir: str | None
|
|
57
|
+
csv_summary: str | None
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
@dataclass
|
|
61
|
+
class OutputOptions:
|
|
62
|
+
"""Output configuration for single video processing."""
|
|
63
|
+
|
|
64
|
+
output: str | None
|
|
65
|
+
json_output: str | None
|
|
66
|
+
|
|
67
|
+
|
|
49
68
|
@click.command(name="dropjump-analyze")
|
|
50
69
|
@click.argument("video_path", nargs=-1, type=click.Path(exists=False), required=True)
|
|
51
70
|
@click.option(
|
|
@@ -202,6 +221,62 @@ def dropjump_analyze(
|
|
|
202
221
|
kinemotion dropjump-analyze videos/*.mp4 --batch --drop-height 0.40 \\
|
|
203
222
|
--json-output-dir results/ --csv-summary summary.csv
|
|
204
223
|
"""
|
|
224
|
+
# Group parameters into dataclasses
|
|
225
|
+
batch_opts = BatchOptions(
|
|
226
|
+
batch=batch,
|
|
227
|
+
workers=workers,
|
|
228
|
+
output_dir=output_dir,
|
|
229
|
+
json_output_dir=json_output_dir,
|
|
230
|
+
csv_summary=csv_summary,
|
|
231
|
+
)
|
|
232
|
+
|
|
233
|
+
output_opts = OutputOptions(
|
|
234
|
+
output=output,
|
|
235
|
+
json_output=json_output,
|
|
236
|
+
)
|
|
237
|
+
|
|
238
|
+
expert_params = AnalysisParameters(
|
|
239
|
+
drop_start_frame=drop_start_frame,
|
|
240
|
+
smoothing_window=smoothing_window,
|
|
241
|
+
velocity_threshold=velocity_threshold,
|
|
242
|
+
min_contact_frames=min_contact_frames,
|
|
243
|
+
visibility_threshold=visibility_threshold,
|
|
244
|
+
detection_confidence=detection_confidence,
|
|
245
|
+
tracking_confidence=tracking_confidence,
|
|
246
|
+
)
|
|
247
|
+
|
|
248
|
+
# Execute analysis with grouped parameters
|
|
249
|
+
_execute_analysis(
|
|
250
|
+
video_path,
|
|
251
|
+
drop_height,
|
|
252
|
+
quality,
|
|
253
|
+
verbose,
|
|
254
|
+
batch_opts,
|
|
255
|
+
output_opts,
|
|
256
|
+
expert_params,
|
|
257
|
+
)
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
def _execute_analysis(
|
|
261
|
+
video_path: tuple[str, ...],
|
|
262
|
+
drop_height: float,
|
|
263
|
+
quality: str,
|
|
264
|
+
verbose: bool,
|
|
265
|
+
batch_opts: BatchOptions,
|
|
266
|
+
output_opts: OutputOptions,
|
|
267
|
+
expert_params: AnalysisParameters,
|
|
268
|
+
) -> None:
|
|
269
|
+
"""Execute drop jump analysis with grouped parameters.
|
|
270
|
+
|
|
271
|
+
Args:
|
|
272
|
+
video_path: Tuple of video path patterns
|
|
273
|
+
drop_height: Drop height in meters
|
|
274
|
+
quality: Quality preset string
|
|
275
|
+
verbose: Verbose output flag
|
|
276
|
+
batch_opts: Batch processing options
|
|
277
|
+
output_opts: Output file options
|
|
278
|
+
expert_params: Expert parameter overrides
|
|
279
|
+
"""
|
|
205
280
|
# Expand glob patterns and collect all video files
|
|
206
281
|
video_files: list[str] = []
|
|
207
282
|
for pattern in video_path:
|
|
@@ -219,40 +294,29 @@ def dropjump_analyze(
|
|
|
219
294
|
sys.exit(1)
|
|
220
295
|
|
|
221
296
|
# Determine if batch mode should be used
|
|
222
|
-
use_batch = batch or len(video_files) > 1
|
|
223
|
-
|
|
224
|
-
# Group expert parameters
|
|
225
|
-
params = AnalysisParameters(
|
|
226
|
-
drop_start_frame=drop_start_frame,
|
|
227
|
-
smoothing_window=smoothing_window,
|
|
228
|
-
velocity_threshold=velocity_threshold,
|
|
229
|
-
min_contact_frames=min_contact_frames,
|
|
230
|
-
visibility_threshold=visibility_threshold,
|
|
231
|
-
detection_confidence=detection_confidence,
|
|
232
|
-
tracking_confidence=tracking_confidence,
|
|
233
|
-
)
|
|
297
|
+
use_batch = batch_opts.batch or len(video_files) > 1
|
|
234
298
|
|
|
235
299
|
if use_batch:
|
|
236
300
|
_process_batch(
|
|
237
301
|
video_files,
|
|
238
302
|
drop_height,
|
|
239
303
|
quality,
|
|
240
|
-
workers,
|
|
241
|
-
output_dir,
|
|
242
|
-
json_output_dir,
|
|
243
|
-
csv_summary,
|
|
244
|
-
|
|
304
|
+
batch_opts.workers,
|
|
305
|
+
batch_opts.output_dir,
|
|
306
|
+
batch_opts.json_output_dir,
|
|
307
|
+
batch_opts.csv_summary,
|
|
308
|
+
expert_params,
|
|
245
309
|
)
|
|
246
310
|
else:
|
|
247
311
|
# Single video mode (original behavior)
|
|
248
312
|
_process_single(
|
|
249
313
|
video_files[0],
|
|
250
|
-
output,
|
|
251
|
-
json_output,
|
|
314
|
+
output_opts.output,
|
|
315
|
+
output_opts.json_output,
|
|
252
316
|
drop_height,
|
|
253
317
|
quality,
|
|
254
318
|
verbose,
|
|
255
|
-
|
|
319
|
+
expert_params,
|
|
256
320
|
)
|
|
257
321
|
|
|
258
322
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: kinemotion
|
|
3
|
-
Version: 0.10.
|
|
3
|
+
Version: 0.10.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
|
|
@@ -9,12 +9,12 @@ kinemotion/core/smoothing.py,sha256=FON4qKtsSp1-03GnJrDkEUAePaACn4QPMJF0eTIYqR0,
|
|
|
9
9
|
kinemotion/core/video_io.py,sha256=z8Z0qbNaKbcdB40KnbNOBMzab3BbgnhBxp-mUBYeXgM,6577
|
|
10
10
|
kinemotion/dropjump/__init__.py,sha256=yc1XiZ9vfo5h_n7PKVSiX2TTgaIfGL7Y7SkQtiDZj_E,838
|
|
11
11
|
kinemotion/dropjump/analysis.py,sha256=HfJt2t9IsMBiBUz7apIzdxbRH9QqzlFnDVVWcKhU3ow,23291
|
|
12
|
-
kinemotion/dropjump/cli.py,sha256=
|
|
12
|
+
kinemotion/dropjump/cli.py,sha256=THFJqVLFdFIXgrKSHw2MVc5DuOsqHKJQVT_x_C7l_18,29443
|
|
13
13
|
kinemotion/dropjump/debug_overlay.py,sha256=GMo-jCl5OPIv82uPxDbBVI7CsAMwATTvxZMeWfs8k8M,8701
|
|
14
14
|
kinemotion/dropjump/kinematics.py,sha256=RM_O8Kdc6aEiPIu_99N4cu-4EhYSQxtBGASJF_dmQaU,19081
|
|
15
15
|
kinemotion/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
16
|
-
kinemotion-0.10.
|
|
17
|
-
kinemotion-0.10.
|
|
18
|
-
kinemotion-0.10.
|
|
19
|
-
kinemotion-0.10.
|
|
20
|
-
kinemotion-0.10.
|
|
16
|
+
kinemotion-0.10.7.dist-info/METADATA,sha256=HDg72JCd-k5WKdgm8o7YfXj2Pdtu-DW_cs-KvGHm_xc,20333
|
|
17
|
+
kinemotion-0.10.7.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
18
|
+
kinemotion-0.10.7.dist-info/entry_points.txt,sha256=zaqnAnjLvcdrk1Qvj5nvXZCZ2gp0prS7it1zTJygcIY,50
|
|
19
|
+
kinemotion-0.10.7.dist-info/licenses/LICENSE,sha256=KZajvqsHw0NoOHOi2q0FZ4NBe9HdV6oey-IPYAtHXfg,1088
|
|
20
|
+
kinemotion-0.10.7.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|