kinemotion 0.71.0__py3-none-any.whl → 0.72.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.

Potentially problematic release.


This version of kinemotion might be problematic. Click here for more details.

Files changed (36) hide show
  1. kinemotion/__init__.py +1 -1
  2. kinemotion/api.py +2 -2
  3. kinemotion/cli.py +1 -1
  4. kinemotion/cmj/analysis.py +2 -4
  5. kinemotion/cmj/api.py +9 -7
  6. kinemotion/cmj/debug_overlay.py +154 -286
  7. kinemotion/cmj/joint_angles.py +96 -31
  8. kinemotion/cmj/metrics_validator.py +22 -29
  9. kinemotion/cmj/validation_bounds.py +1 -18
  10. kinemotion/core/__init__.py +0 -2
  11. kinemotion/core/auto_tuning.py +95 -100
  12. kinemotion/core/debug_overlay_utils.py +142 -15
  13. kinemotion/core/experimental.py +55 -51
  14. kinemotion/core/filtering.py +15 -11
  15. kinemotion/core/overlay_constants.py +61 -0
  16. kinemotion/core/pipeline_utils.py +1 -1
  17. kinemotion/core/pose.py +47 -98
  18. kinemotion/core/smoothing.py +65 -51
  19. kinemotion/core/types.py +15 -0
  20. kinemotion/core/validation.py +6 -7
  21. kinemotion/core/video_io.py +14 -9
  22. kinemotion/{dropjump → dj}/__init__.py +2 -2
  23. kinemotion/{dropjump → dj}/analysis.py +192 -75
  24. kinemotion/{dropjump → dj}/api.py +13 -17
  25. kinemotion/{dropjump → dj}/cli.py +62 -78
  26. kinemotion/dj/debug_overlay.py +241 -0
  27. kinemotion/{dropjump → dj}/kinematics.py +106 -44
  28. kinemotion/{dropjump → dj}/metrics_validator.py +1 -1
  29. kinemotion/{dropjump → dj}/validation_bounds.py +1 -1
  30. {kinemotion-0.71.0.dist-info → kinemotion-0.72.0.dist-info}/METADATA +1 -1
  31. kinemotion-0.72.0.dist-info/RECORD +50 -0
  32. kinemotion/dropjump/debug_overlay.py +0 -182
  33. kinemotion-0.71.0.dist-info/RECORD +0 -49
  34. {kinemotion-0.71.0.dist-info → kinemotion-0.72.0.dist-info}/WHEEL +0 -0
  35. {kinemotion-0.71.0.dist-info → kinemotion-0.72.0.dist-info}/entry_points.txt +0 -0
  36. {kinemotion-0.71.0.dist-info → kinemotion-0.72.0.dist-info}/licenses/LICENSE +0 -0
kinemotion/__init__.py CHANGED
@@ -14,7 +14,7 @@ from .api import (
14
14
  process_dropjump_videos_bulk,
15
15
  )
16
16
  from .cmj.kinematics import CMJMetrics
17
- from .dropjump.kinematics import DropJumpMetrics
17
+ from .dj.kinematics import DropJumpMetrics
18
18
 
19
19
  # Get version from package metadata (set in pyproject.toml)
20
20
  try:
kinemotion/api.py CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  This module provides a unified interface for both drop jump and CMJ video analysis.
4
4
  The actual implementations have been moved to their respective submodules:
5
- - Drop jump: kinemotion.dropjump.api
5
+ - Drop jump: kinemotion.dj.api
6
6
  - CMJ: kinemotion.cmj.api
7
7
 
8
8
  """
@@ -20,7 +20,7 @@ from .cmj.api import (
20
20
  from .cmj.kinematics import CMJMetrics
21
21
 
22
22
  # Drop jump API
23
- from .dropjump.api import (
23
+ from .dj.api import (
24
24
  AnalysisOverrides,
25
25
  DropJumpVideoConfig,
26
26
  DropJumpVideoResult,
kinemotion/cli.py CHANGED
@@ -3,7 +3,7 @@
3
3
  import click
4
4
 
5
5
  from .cmj.cli import cmj_analyze
6
- from .dropjump.cli import dropjump_analyze
6
+ from .dj.cli import dropjump_analyze
7
7
 
8
8
 
9
9
  @click.group()
@@ -8,7 +8,7 @@ from scipy.signal import savgol_filter
8
8
  from ..core.experimental import unused
9
9
  from ..core.smoothing import compute_acceleration_from_derivative
10
10
  from ..core.timing import NULL_TIMER, Timer
11
- from ..core.types import FloatArray
11
+ from ..core.types import HIP_KEYS, FloatArray
12
12
 
13
13
 
14
14
  def compute_signed_velocity(
@@ -503,12 +503,10 @@ def compute_average_hip_position(
503
503
  Returns:
504
504
  (x, y) average hip position in normalized coordinates
505
505
  """
506
- hip_keys = ["left_hip", "right_hip"]
507
-
508
506
  x_positions: list[float] = []
509
507
  y_positions: list[float] = []
510
508
 
511
- for key in hip_keys:
509
+ for key in HIP_KEYS:
512
510
  if key in landmarks:
513
511
  x, y, visibility = landmarks[key]
514
512
  if visibility > 0.5: # Only use visible landmarks
kinemotion/cmj/api.py CHANGED
@@ -262,13 +262,15 @@ def _get_tuned_parameters(
262
262
  with timer.measure("parameter_auto_tuning"):
263
263
  characteristics = analyze_video_sample(landmarks_sequence, video.fps, video.frame_count)
264
264
  params = auto_tune_parameters(characteristics, quality_preset)
265
- params = apply_expert_overrides(
266
- params,
267
- overrides.smoothing_window if overrides else None,
268
- overrides.velocity_threshold if overrides else None,
269
- overrides.min_contact_frames if overrides else None,
270
- overrides.visibility_threshold if overrides else None,
271
- )
265
+
266
+ if overrides:
267
+ params = apply_expert_overrides(
268
+ params,
269
+ overrides.smoothing_window,
270
+ overrides.velocity_threshold,
271
+ overrides.min_contact_frames,
272
+ overrides.visibility_threshold,
273
+ )
272
274
 
273
275
  if verbose:
274
276
  print_verbose_parameters(video, characteristics, quality_preset, params)