kinemotion 0.15.2__py3-none-any.whl → 0.16.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.
- kinemotion/dropjump/cli.py +16 -10
- {kinemotion-0.15.2.dist-info → kinemotion-0.16.0.dist-info}/METADATA +1 -1
- {kinemotion-0.15.2.dist-info → kinemotion-0.16.0.dist-info}/RECORD +6 -6
- {kinemotion-0.15.2.dist-info → kinemotion-0.16.0.dist-info}/WHEEL +0 -0
- {kinemotion-0.15.2.dist-info → kinemotion-0.16.0.dist-info}/entry_points.txt +0 -0
- {kinemotion-0.15.2.dist-info → kinemotion-0.16.0.dist-info}/licenses/LICENSE +0 -0
kinemotion/dropjump/cli.py
CHANGED
|
@@ -11,7 +11,11 @@ from typing import Any
|
|
|
11
11
|
import click
|
|
12
12
|
import numpy as np
|
|
13
13
|
|
|
14
|
-
from ..api import
|
|
14
|
+
from ..api import (
|
|
15
|
+
DropJumpVideoConfig,
|
|
16
|
+
DropJumpVideoResult,
|
|
17
|
+
process_dropjump_videos_bulk,
|
|
18
|
+
)
|
|
15
19
|
from ..core.auto_tuning import (
|
|
16
20
|
QualityPreset,
|
|
17
21
|
analyze_video_sample,
|
|
@@ -446,7 +450,7 @@ def _create_video_configs(
|
|
|
446
450
|
output_dir: str | None,
|
|
447
451
|
json_output_dir: str | None,
|
|
448
452
|
expert_params: AnalysisParameters,
|
|
449
|
-
) -> list[
|
|
453
|
+
) -> list[DropJumpVideoConfig]:
|
|
450
454
|
"""Build configuration objects for each video.
|
|
451
455
|
|
|
452
456
|
Args:
|
|
@@ -457,9 +461,9 @@ def _create_video_configs(
|
|
|
457
461
|
expert_params: Expert parameter overrides
|
|
458
462
|
|
|
459
463
|
Returns:
|
|
460
|
-
List of
|
|
464
|
+
List of DropJumpVideoConfig objects
|
|
461
465
|
"""
|
|
462
|
-
configs: list[
|
|
466
|
+
configs: list[DropJumpVideoConfig] = []
|
|
463
467
|
for video_file in video_files:
|
|
464
468
|
video_name = Path(video_file).stem
|
|
465
469
|
|
|
@@ -471,7 +475,7 @@ def _create_video_configs(
|
|
|
471
475
|
if json_output_dir:
|
|
472
476
|
json_file = str(Path(json_output_dir) / f"{video_name}.json")
|
|
473
477
|
|
|
474
|
-
config =
|
|
478
|
+
config = DropJumpVideoConfig(
|
|
475
479
|
video_path=video_file,
|
|
476
480
|
quality=quality,
|
|
477
481
|
output_video=debug_video,
|
|
@@ -489,7 +493,7 @@ def _create_video_configs(
|
|
|
489
493
|
return configs
|
|
490
494
|
|
|
491
495
|
|
|
492
|
-
def _compute_batch_statistics(results: list[
|
|
496
|
+
def _compute_batch_statistics(results: list[DropJumpVideoResult]) -> None:
|
|
493
497
|
"""Compute and display batch processing statistics.
|
|
494
498
|
|
|
495
499
|
Args:
|
|
@@ -573,7 +577,7 @@ def _format_distance_metric(value: float | None) -> str:
|
|
|
573
577
|
return f"{value:.3f}" if value is not None else "N/A"
|
|
574
578
|
|
|
575
579
|
|
|
576
|
-
def _create_csv_row_from_result(result:
|
|
580
|
+
def _create_csv_row_from_result(result: DropJumpVideoResult) -> list[str]:
|
|
577
581
|
"""Create CSV row from video processing result.
|
|
578
582
|
|
|
579
583
|
Args:
|
|
@@ -606,7 +610,9 @@ def _create_csv_row_from_result(result: VideoResult) -> list[str]:
|
|
|
606
610
|
|
|
607
611
|
|
|
608
612
|
def _write_csv_summary(
|
|
609
|
-
csv_summary: str | None,
|
|
613
|
+
csv_summary: str | None,
|
|
614
|
+
results: list[DropJumpVideoResult],
|
|
615
|
+
successful: list[DropJumpVideoResult],
|
|
610
616
|
) -> None:
|
|
611
617
|
"""Write CSV summary of batch processing results.
|
|
612
618
|
|
|
@@ -669,7 +675,7 @@ def _process_batch(
|
|
|
669
675
|
# Progress callback
|
|
670
676
|
completed = 0
|
|
671
677
|
|
|
672
|
-
def show_progress(result:
|
|
678
|
+
def show_progress(result: DropJumpVideoResult) -> None:
|
|
673
679
|
nonlocal completed
|
|
674
680
|
completed += 1
|
|
675
681
|
status = "✓" if result.success else "✗"
|
|
@@ -684,7 +690,7 @@ def _process_batch(
|
|
|
684
690
|
|
|
685
691
|
# Process all videos
|
|
686
692
|
click.echo("\nProcessing videos...", err=True)
|
|
687
|
-
results =
|
|
693
|
+
results = process_dropjump_videos_bulk(
|
|
688
694
|
configs, max_workers=workers, progress_callback=show_progress
|
|
689
695
|
)
|
|
690
696
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: kinemotion
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.16.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
|
|
@@ -17,12 +17,12 @@ kinemotion/core/smoothing.py,sha256=C9GK3PAN16RpqJw2UWeVslSTJZEvALeVADjtnJnSF88,
|
|
|
17
17
|
kinemotion/core/video_io.py,sha256=kH5FYPx3y3lFZ3ybdgxaZfKPdHJ37eqxSeAaZjyQnJk,6817
|
|
18
18
|
kinemotion/dropjump/__init__.py,sha256=yc1XiZ9vfo5h_n7PKVSiX2TTgaIfGL7Y7SkQtiDZj_E,838
|
|
19
19
|
kinemotion/dropjump/analysis.py,sha256=xx5NWy6s0eb9BEyO_FByY1Ahunaoh3TyaTAxjlPrvxg,27153
|
|
20
|
-
kinemotion/dropjump/cli.py,sha256=
|
|
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=txDxpDti3VJVctWGbe3aIrlIx83UY8-ynzlX01TOvTA,15577
|
|
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.16.0.dist-info/METADATA,sha256=ycMbRWJpk7cyzijeu87mDcMaO3TMTN-c0pWKbfiw0yY,18986
|
|
25
|
+
kinemotion-0.16.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
26
|
+
kinemotion-0.16.0.dist-info/entry_points.txt,sha256=zaqnAnjLvcdrk1Qvj5nvXZCZ2gp0prS7it1zTJygcIY,50
|
|
27
|
+
kinemotion-0.16.0.dist-info/licenses/LICENSE,sha256=KZajvqsHw0NoOHOi2q0FZ4NBe9HdV6oey-IPYAtHXfg,1088
|
|
28
|
+
kinemotion-0.16.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|