kinemotion 0.45.1__py3-none-any.whl → 0.47.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.
- kinemotion/api.py +14 -42
- kinemotion/cmj/analysis.py +46 -32
- kinemotion/core/__init__.py +13 -1
- kinemotion/core/debug_overlay_utils.py +6 -18
- kinemotion/core/pipeline_utils.py +30 -16
- kinemotion/core/pose.py +31 -32
- kinemotion/core/smoothing.py +33 -26
- kinemotion/core/timing.py +355 -22
- kinemotion/core/video_io.py +6 -20
- kinemotion/dropjump/analysis.py +10 -4
- kinemotion/dropjump/debug_overlay.py +2 -8
- kinemotion/dropjump/kinematics.py +33 -25
- {kinemotion-0.45.1.dist-info → kinemotion-0.47.0.dist-info}/METADATA +1 -1
- {kinemotion-0.45.1.dist-info → kinemotion-0.47.0.dist-info}/RECORD +17 -17
- {kinemotion-0.45.1.dist-info → kinemotion-0.47.0.dist-info}/WHEEL +0 -0
- {kinemotion-0.45.1.dist-info → kinemotion-0.47.0.dist-info}/entry_points.txt +0 -0
- {kinemotion-0.45.1.dist-info → kinemotion-0.47.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -7,6 +7,7 @@ from numpy.typing import NDArray
|
|
|
7
7
|
|
|
8
8
|
from ..core.formatting import format_float_metric, format_int_metric
|
|
9
9
|
from ..core.smoothing import compute_acceleration_from_derivative
|
|
10
|
+
from ..core.timing import NULL_TIMER, Timer
|
|
10
11
|
from .analysis import (
|
|
11
12
|
ContactState,
|
|
12
13
|
detect_drop_start,
|
|
@@ -433,6 +434,7 @@ def calculate_drop_jump_metrics(
|
|
|
433
434
|
smoothing_window: int = 5,
|
|
434
435
|
polyorder: int = 2,
|
|
435
436
|
use_curvature: bool = True,
|
|
437
|
+
timer: Timer | None = None,
|
|
436
438
|
) -> DropJumpMetrics:
|
|
437
439
|
"""
|
|
438
440
|
Calculate drop-jump metrics from contact states and positions.
|
|
@@ -450,16 +452,19 @@ def calculate_drop_jump_metrics(
|
|
|
450
452
|
(must be odd)
|
|
451
453
|
polyorder: Polynomial order for Savitzky-Golay filter (default: 2)
|
|
452
454
|
use_curvature: Whether to use curvature analysis for refining transitions
|
|
455
|
+
timer: Optional Timer for measuring operations
|
|
453
456
|
|
|
454
457
|
Returns:
|
|
455
458
|
DropJumpMetrics object with calculated values
|
|
456
459
|
"""
|
|
460
|
+
timer = timer or NULL_TIMER
|
|
457
461
|
metrics = DropJumpMetrics()
|
|
458
462
|
|
|
459
463
|
# Determine drop start frame
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
464
|
+
with timer.measure("dj_detect_drop_start"):
|
|
465
|
+
drop_start_frame_value = _determine_drop_start_frame(
|
|
466
|
+
drop_start_frame, foot_y_positions, fps, smoothing_window
|
|
467
|
+
)
|
|
463
468
|
|
|
464
469
|
# Store drop start frame in metrics
|
|
465
470
|
metrics.drop_start_frame = (
|
|
@@ -467,15 +472,16 @@ def calculate_drop_jump_metrics(
|
|
|
467
472
|
)
|
|
468
473
|
|
|
469
474
|
# Find contact phases
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
475
|
+
with timer.measure("dj_find_phases"):
|
|
476
|
+
phases = find_contact_phases(contact_states)
|
|
477
|
+
interpolated_phases = find_interpolated_phase_transitions_with_curvature(
|
|
478
|
+
foot_y_positions,
|
|
479
|
+
contact_states,
|
|
480
|
+
velocity_threshold,
|
|
481
|
+
smoothing_window,
|
|
482
|
+
polyorder,
|
|
483
|
+
use_curvature,
|
|
484
|
+
)
|
|
479
485
|
|
|
480
486
|
if not phases:
|
|
481
487
|
return metrics
|
|
@@ -504,9 +510,10 @@ def calculate_drop_jump_metrics(
|
|
|
504
510
|
return metrics
|
|
505
511
|
|
|
506
512
|
# Identify main contact phase
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
513
|
+
with timer.measure("dj_identify_contact"):
|
|
514
|
+
contact_start, contact_end, _ = _identify_main_contact_phase(
|
|
515
|
+
phases, ground_phases, air_phases_indexed, foot_y_positions
|
|
516
|
+
)
|
|
510
517
|
|
|
511
518
|
# Store integer frame indices
|
|
512
519
|
metrics.contact_start_frame = contact_start
|
|
@@ -524,15 +531,16 @@ def calculate_drop_jump_metrics(
|
|
|
524
531
|
metrics.contact_end_frame_precise = contact_end_frac
|
|
525
532
|
|
|
526
533
|
# Analyze flight phase and calculate jump height
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
534
|
+
with timer.measure("dj_analyze_flight"):
|
|
535
|
+
_analyze_flight_phase(
|
|
536
|
+
metrics,
|
|
537
|
+
phases,
|
|
538
|
+
interpolated_phases,
|
|
539
|
+
contact_end,
|
|
540
|
+
foot_y_positions,
|
|
541
|
+
fps,
|
|
542
|
+
smoothing_window,
|
|
543
|
+
polyorder,
|
|
544
|
+
)
|
|
537
545
|
|
|
538
546
|
return metrics
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: kinemotion
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.47.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
|
|
@@ -1,40 +1,40 @@
|
|
|
1
1
|
kinemotion/__init__.py,sha256=wPItmyGJUOFM6GPRVhAEvRz0-ErI7e2qiUREYJ9EfPQ,943
|
|
2
|
-
kinemotion/api.py,sha256=
|
|
2
|
+
kinemotion/api.py,sha256=K3E5kEQQyPZrEWYaIczJNxxWREWfclIvQYjXcX--9-k,31185
|
|
3
3
|
kinemotion/cli.py,sha256=cqYV_7URH0JUDy1VQ_EDLv63FmNO4Ns20m6s1XAjiP4,464
|
|
4
4
|
kinemotion/cmj/__init__.py,sha256=Ynv0-Oco4I3Y1Ubj25m3h9h2XFqeNwpAewXmAYOmwfU,127
|
|
5
|
-
kinemotion/cmj/analysis.py,sha256=
|
|
5
|
+
kinemotion/cmj/analysis.py,sha256=YDj7HpSCzrsw6mPtE3phDfYuAWQV0w-CCiLiQjkh3Mg,22196
|
|
6
6
|
kinemotion/cmj/cli.py,sha256=HpZgLWoLjcgsfOZu6EQ_26tg6QwTgFjR-Ly8WCBg24c,9904
|
|
7
7
|
kinemotion/cmj/debug_overlay.py,sha256=fXmWoHhqMLGo4vTtB6Ezs3yLUDOLw63zLIgU2gFlJQU,15892
|
|
8
8
|
kinemotion/cmj/joint_angles.py,sha256=HmheIEiKcQz39cRezk4h-htorOhGNPsqKIR9RsAEKts,9960
|
|
9
9
|
kinemotion/cmj/kinematics.py,sha256=Lq9m9MNQxnXv31VhKmXVrlM7rRkhi8PxW50N_CC8_8Y,11860
|
|
10
10
|
kinemotion/cmj/metrics_validator.py,sha256=V_fmlczYH06SBtwqESv-IfGi3wDsIy3RQbd7VwOyNo0,31359
|
|
11
11
|
kinemotion/cmj/validation_bounds.py,sha256=9ZTo68fl3ooyWjXXyTMRLpK9tFANa_rQf3oHhq7iQGE,11995
|
|
12
|
-
kinemotion/core/__init__.py,sha256=
|
|
12
|
+
kinemotion/core/__init__.py,sha256=rBIEx9sW6E-nyVdWmoVGJYhfPikLukoDp7lxKri7RTQ,1543
|
|
13
13
|
kinemotion/core/auto_tuning.py,sha256=wtCUMOhBChVJNXfEeku3GCMW4qED6MF-O_mv2sPTiVQ,11324
|
|
14
14
|
kinemotion/core/cli_utils.py,sha256=sQPbT6XWWau-sm9yuN5c3eS5xNzoQGGXwSz6hQXtRvM,1859
|
|
15
|
-
kinemotion/core/debug_overlay_utils.py,sha256
|
|
15
|
+
kinemotion/core/debug_overlay_utils.py,sha256=-goE3w4gBij99y1U4ckU5iaQPS0SupcHplT04DDWzUo,8579
|
|
16
16
|
kinemotion/core/determinism.py,sha256=NwVrHqJiVxxFHTBPVy8aDBJH2SLIcYIpdGFp7glblB8,2515
|
|
17
17
|
kinemotion/core/experimental.py,sha256=IK05AF4aZS15ke85hF3TWCqRIXU1AlD_XKzFz735Ua8,3640
|
|
18
18
|
kinemotion/core/filtering.py,sha256=GsC9BB71V07LJJHgS2lsaxUAtJsupcUiwtZFDgODh8c,11417
|
|
19
19
|
kinemotion/core/formatting.py,sha256=G_3eqgOtym9RFOZVEwCxye4A2cyrmgvtQ214vIshowU,2480
|
|
20
20
|
kinemotion/core/metadata.py,sha256=bJAVa4nym__zx1hNowSZduMGKBSGOPxTbBQkjm6N0D0,7207
|
|
21
|
-
kinemotion/core/pipeline_utils.py,sha256=
|
|
22
|
-
kinemotion/core/pose.py,sha256=
|
|
21
|
+
kinemotion/core/pipeline_utils.py,sha256=0u7o-UFZX6cOu3NaWpFmEy5ejS0WUKggZ1HSdeZXhoA,14964
|
|
22
|
+
kinemotion/core/pose.py,sha256=z1OGuwnc-NdK6Aoc9UYCyPBzomw4eInexOWonZbsEoA,9057
|
|
23
23
|
kinemotion/core/quality.py,sha256=dPGQp08y8DdEUbUdjTThnUOUsALgF0D2sdz50cm6wLI,13098
|
|
24
|
-
kinemotion/core/smoothing.py,sha256=
|
|
25
|
-
kinemotion/core/timing.py,sha256=
|
|
24
|
+
kinemotion/core/smoothing.py,sha256=FZmv3rumn0mYKU2y3JPKz46EvD8TVmQ6_GsN_Vp3BdU,15650
|
|
25
|
+
kinemotion/core/timing.py,sha256=mXwFTEYcB2cfAqQZAlucPN8cqPbVs7as2qjVMPToBdw,12024
|
|
26
26
|
kinemotion/core/validation.py,sha256=LmKfSl4Ayw3DgwKD9IrhsPdzp5ia4drLsHA2UuU1SCM,6310
|
|
27
|
-
kinemotion/core/video_io.py,sha256=
|
|
27
|
+
kinemotion/core/video_io.py,sha256=vCwpWnlW2y29l48dFXokdehQn42w_IQvayxbVTjpXqQ,7863
|
|
28
28
|
kinemotion/dropjump/__init__.py,sha256=tC3H3BrCg8Oj-db-Vrtx4PH_llR1Ppkd5jwaOjhQcLg,862
|
|
29
|
-
kinemotion/dropjump/analysis.py,sha256=
|
|
29
|
+
kinemotion/dropjump/analysis.py,sha256=p7nnCe7V6vnhQKZVYk--_nhsTvVa_WY-A3zXmyplsew,28211
|
|
30
30
|
kinemotion/dropjump/cli.py,sha256=eLIA0rnx60vqD__PinB1-5nQ8_xQUhCGplwsB0u9MgU,15824
|
|
31
|
-
kinemotion/dropjump/debug_overlay.py,sha256=
|
|
32
|
-
kinemotion/dropjump/kinematics.py,sha256=
|
|
31
|
+
kinemotion/dropjump/debug_overlay.py,sha256=8XVuDyZ3nuNoCYkxcUWC7wyEoHyBxx77Sb--B1KiYWw,5974
|
|
32
|
+
kinemotion/dropjump/kinematics.py,sha256=PATlGaClutGKJslL-LRIXHmTsvb-xEB8PUIMScU_K4c,19849
|
|
33
33
|
kinemotion/dropjump/metrics_validator.py,sha256=CrTlGup8q2kyPXtA6HNwm7_yq0AsBaDllG7RVZdXmYA,9342
|
|
34
34
|
kinemotion/dropjump/validation_bounds.py,sha256=5b4I3CKPybuvrbn-nP5yCcGF_sH4Vtyw3a5AWWvWnBk,4645
|
|
35
35
|
kinemotion/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
36
|
-
kinemotion-0.
|
|
37
|
-
kinemotion-0.
|
|
38
|
-
kinemotion-0.
|
|
39
|
-
kinemotion-0.
|
|
40
|
-
kinemotion-0.
|
|
36
|
+
kinemotion-0.47.0.dist-info/METADATA,sha256=Kz7ptLupptK9uFRaatqfcVBvsaN_N6vqf0zKFitX1-o,26020
|
|
37
|
+
kinemotion-0.47.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
38
|
+
kinemotion-0.47.0.dist-info/entry_points.txt,sha256=zaqnAnjLvcdrk1Qvj5nvXZCZ2gp0prS7it1zTJygcIY,50
|
|
39
|
+
kinemotion-0.47.0.dist-info/licenses/LICENSE,sha256=KZajvqsHw0NoOHOi2q0FZ4NBe9HdV6oey-IPYAtHXfg,1088
|
|
40
|
+
kinemotion-0.47.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|