kinemotion 0.7.0__tar.gz → 0.8.0__tar.gz

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 (44) hide show
  1. kinemotion-0.8.0/.dockerignore +59 -0
  2. kinemotion-0.8.0/.github/workflows/release.yml +108 -0
  3. {kinemotion-0.7.0 → kinemotion-0.8.0}/.gitignore +0 -1
  4. {kinemotion-0.7.0 → kinemotion-0.8.0}/CHANGELOG.md +16 -0
  5. kinemotion-0.8.0/Dockerfile +96 -0
  6. {kinemotion-0.7.0 → kinemotion-0.8.0}/PKG-INFO +89 -138
  7. {kinemotion-0.7.0 → kinemotion-0.8.0}/README.md +88 -137
  8. kinemotion-0.8.0/docs/IMU_METADATA_PRESERVATION.md +267 -0
  9. {kinemotion-0.7.0 → kinemotion-0.8.0}/docs/PARAMETERS.md +39 -11
  10. {kinemotion-0.7.0 → kinemotion-0.8.0}/docs/VALIDATION_PLAN.md +9 -0
  11. {kinemotion-0.7.0 → kinemotion-0.8.0}/pyproject.toml +1 -1
  12. kinemotion-0.8.0/uv.lock +1678 -0
  13. kinemotion-0.7.0/.github/workflows/release.yml +0 -43
  14. kinemotion-0.7.0/docs/IMPLEMENTATION_PLAN.md +0 -795
  15. kinemotion-0.7.0/docs/IMU_METADATA_PRESERVATION.md +0 -124
  16. {kinemotion-0.7.0 → kinemotion-0.8.0}/.pre-commit-config.yaml +0 -0
  17. {kinemotion-0.7.0 → kinemotion-0.8.0}/.tool-versions +0 -0
  18. {kinemotion-0.7.0 → kinemotion-0.8.0}/CLAUDE.md +0 -0
  19. {kinemotion-0.7.0 → kinemotion-0.8.0}/GEMINI.md +0 -0
  20. {kinemotion-0.7.0 → kinemotion-0.8.0}/LICENSE +0 -0
  21. {kinemotion-0.7.0 → kinemotion-0.8.0}/docs/ERRORS_FINDINGS.md +0 -0
  22. {kinemotion-0.7.0 → kinemotion-0.8.0}/docs/FRAMERATE.md +0 -0
  23. {kinemotion-0.7.0 → kinemotion-0.8.0}/examples/programmatic_usage.py +0 -0
  24. {kinemotion-0.7.0 → kinemotion-0.8.0}/src/kinemotion/__init__.py +0 -0
  25. {kinemotion-0.7.0 → kinemotion-0.8.0}/src/kinemotion/cli.py +0 -0
  26. {kinemotion-0.7.0 → kinemotion-0.8.0}/src/kinemotion/core/__init__.py +0 -0
  27. {kinemotion-0.7.0 → kinemotion-0.8.0}/src/kinemotion/core/auto_tuning.py +0 -0
  28. {kinemotion-0.7.0 → kinemotion-0.8.0}/src/kinemotion/core/filtering.py +0 -0
  29. {kinemotion-0.7.0 → kinemotion-0.8.0}/src/kinemotion/core/pose.py +0 -0
  30. {kinemotion-0.7.0 → kinemotion-0.8.0}/src/kinemotion/core/smoothing.py +0 -0
  31. {kinemotion-0.7.0 → kinemotion-0.8.0}/src/kinemotion/core/video_io.py +0 -0
  32. {kinemotion-0.7.0 → kinemotion-0.8.0}/src/kinemotion/dropjump/__init__.py +0 -0
  33. {kinemotion-0.7.0 → kinemotion-0.8.0}/src/kinemotion/dropjump/analysis.py +0 -0
  34. {kinemotion-0.7.0 → kinemotion-0.8.0}/src/kinemotion/dropjump/cli.py +0 -0
  35. {kinemotion-0.7.0 → kinemotion-0.8.0}/src/kinemotion/dropjump/debug_overlay.py +0 -0
  36. {kinemotion-0.7.0 → kinemotion-0.8.0}/src/kinemotion/dropjump/kinematics.py +0 -0
  37. {kinemotion-0.7.0 → kinemotion-0.8.0}/tests/__init__.py +0 -0
  38. {kinemotion-0.7.0 → kinemotion-0.8.0}/tests/test_adaptive_threshold.py +0 -0
  39. {kinemotion-0.7.0 → kinemotion-0.8.0}/tests/test_aspect_ratio.py +0 -0
  40. {kinemotion-0.7.0 → kinemotion-0.8.0}/tests/test_com_estimation.py +0 -0
  41. {kinemotion-0.7.0 → kinemotion-0.8.0}/tests/test_contact_detection.py +0 -0
  42. {kinemotion-0.7.0 → kinemotion-0.8.0}/tests/test_filtering.py +0 -0
  43. {kinemotion-0.7.0 → kinemotion-0.8.0}/tests/test_kinematics.py +0 -0
  44. {kinemotion-0.7.0 → kinemotion-0.8.0}/tests/test_polyorder.py +0 -0
@@ -0,0 +1,59 @@
1
+ # Python
2
+ __pycache__
3
+ *.py[cod]
4
+ *$py.class
5
+ *.so
6
+ .Python
7
+ *.egg-info/
8
+ dist/
9
+ build/
10
+ .venv/
11
+ venv/
12
+ ENV/
13
+
14
+ # Testing
15
+ .pytest_cache/
16
+ .coverage
17
+ htmlcov/
18
+ .tox/
19
+
20
+ # IDEs
21
+ .vscode/
22
+ .idea/
23
+ *.swp
24
+ *.swo
25
+ *~
26
+
27
+ # Git
28
+ .git/
29
+ .gitignore
30
+ .gitattributes
31
+
32
+ # CI/CD
33
+ .github/
34
+ .pre-commit-config.yaml
35
+
36
+ # Documentation
37
+ docs/
38
+ CHANGELOG.md
39
+ CLAUDE.md
40
+ *.md
41
+ !README.md
42
+
43
+ # Sample files
44
+ samples/
45
+ examples/
46
+
47
+ # Development tools
48
+ .mypy_cache/
49
+ .ruff_cache/
50
+ .pytest_cache/
51
+
52
+ # OS
53
+ .DS_Store
54
+ Thumbs.db
55
+
56
+ # MCP and Claude
57
+ .mcp.json
58
+ .claude/
59
+ CLAUDE.md
@@ -0,0 +1,108 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+
8
+ jobs:
9
+ release:
10
+ name: Create Release
11
+ runs-on: ubuntu-latest
12
+ permissions:
13
+ contents: write
14
+ id-token: write
15
+ packages: write
16
+ outputs:
17
+ version: ${{ steps.get_version.outputs.version }}
18
+ released: ${{ steps.get_version.outputs.released }}
19
+ steps:
20
+ - name: Checkout repository
21
+ uses: actions/checkout@v4
22
+ with:
23
+ fetch-depth: 0
24
+
25
+ - name: Set up Python
26
+ uses: actions/setup-python@v5
27
+ with:
28
+ python-version: "3.12"
29
+
30
+ - name: Set up uv
31
+ uses: astral-sh/setup-uv@v5
32
+ with:
33
+ version: "0.8.17"
34
+
35
+ - name: Install dependencies
36
+ run: uv sync
37
+
38
+ - name: Create Release
39
+ env:
40
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41
+ run: |
42
+ git config user.name "github-actions"
43
+ git config user.email "github-actions@github.com"
44
+ uv run semantic-release version
45
+
46
+ - name: Get version from pyproject.toml
47
+ id: get_version
48
+ run: |
49
+ VERSION=$(grep '^version = ' pyproject.toml | cut -d'"' -f2)
50
+ echo "version=$VERSION" >> $GITHUB_OUTPUT
51
+ # Check if semantic-release created a new release by checking if there's a new tag
52
+ if git describe --exact-match --tags HEAD 2>/dev/null; then
53
+ echo "released=true" >> $GITHUB_OUTPUT
54
+ else
55
+ echo "released=false" >> $GITHUB_OUTPUT
56
+ fi
57
+
58
+ - name: Publish to PyPI
59
+ if: steps.get_version.outputs.released == 'true'
60
+ uses: pypa/gh-action-pypi-publish@release/v1
61
+
62
+ docker:
63
+ name: Build and Push Docker Image
64
+ needs: release
65
+ if: needs.release.outputs.released == 'true'
66
+ runs-on: ubuntu-latest
67
+ permissions:
68
+ contents: read
69
+ packages: write
70
+ steps:
71
+ - name: Checkout repository
72
+ uses: actions/checkout@v4
73
+ with:
74
+ ref: v${{ needs.release.outputs.version }}
75
+
76
+ - name: Set up Docker Buildx
77
+ uses: docker/setup-buildx-action@v3
78
+
79
+ - name: Log in to GitHub Container Registry
80
+ uses: docker/login-action@v3
81
+ with:
82
+ registry: ghcr.io
83
+ username: ${{ github.actor }}
84
+ password: ${{ secrets.GITHUB_TOKEN }}
85
+
86
+ - name: Extract metadata (tags, labels) for Docker
87
+ id: meta
88
+ uses: docker/metadata-action@v5
89
+ with:
90
+ images: ghcr.io/${{ github.repository }}
91
+ tags: |
92
+ type=semver,pattern={{version}},value=v${{ needs.release.outputs.version }}
93
+ type=semver,pattern={{major}}.{{minor}},value=v${{ needs.release.outputs.version }}
94
+ type=semver,pattern={{major}},value=v${{ needs.release.outputs.version }}
95
+ type=raw,value=latest
96
+
97
+ - name: Build and push Docker image
98
+ id: push
99
+ uses: docker/build-push-action@v6
100
+ with:
101
+ context: .
102
+ push: true
103
+ tags: ${{ steps.meta.outputs.tags }}
104
+ labels: ${{ steps.meta.outputs.labels }}
105
+ platforms: linux/amd64
106
+ # Multi-scope caching: Docker layers + uv cache
107
+ cache-from: type=gha
108
+ cache-to: type=gha,mode=max
@@ -28,7 +28,6 @@ env/
28
28
 
29
29
  # uv
30
30
  .uv/
31
- uv.lock
32
31
 
33
32
  # IDEs
34
33
  .vscode/
@@ -7,6 +7,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  <!-- version list -->
9
9
 
10
+ ## v0.8.0 (2025-11-02)
11
+
12
+ ### Features
13
+
14
+ - Add Docker support and GitHub Container Registry publishing
15
+ ([`249ca4c`](https://github.com/feniix/kinemotion/commit/249ca4c0c0ab40cda5acfebac012db8075b9694f))
16
+
17
+
18
+ ## v0.7.1 (2025-11-01)
19
+
20
+ ### Bug Fixes
21
+
22
+ - Update documentation for auto-tuning system
23
+ ([`6c1a135`](https://github.com/feniix/kinemotion/commit/6c1a135acf5cce7a627644dbc6393460277906ad))
24
+
25
+
10
26
  ## v0.7.0 (2025-11-01)
11
27
 
12
28
  ### Features
@@ -0,0 +1,96 @@
1
+ # Multi-stage Dockerfile for kinemotion
2
+ # Optimized for Python 3.12, uv, OpenCV, and MediaPipe
3
+ # Note: Only linux/amd64 platform supported (MediaPipe lacks ARM64 Linux wheels)
4
+
5
+ # ============================================================================
6
+ # Stage 1: Builder - Install dependencies with uv
7
+ # ============================================================================
8
+ FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim AS builder
9
+
10
+ # Optimization: Compile Python bytecode at build time for faster startup
11
+ # Optimization: Copy mode for dependencies to work across build stages
12
+ ENV UV_COMPILE_BYTECODE=1 \
13
+ UV_LINK_MODE=copy
14
+
15
+ WORKDIR /app
16
+
17
+ # Install dependencies FIRST (cached layer - only invalidated when dependencies change)
18
+ # Use bind mounts to avoid copying files into the image
19
+ # Use cache mount to reuse uv downloads across builds
20
+ RUN --mount=type=cache,target=/root/.cache/uv \
21
+ --mount=type=bind,source=uv.lock,target=uv.lock \
22
+ --mount=type=bind,source=pyproject.toml,target=pyproject.toml \
23
+ uv sync --frozen --no-install-project --no-dev
24
+
25
+ # Copy source code AFTER dependencies (source changes don't invalidate dependency cache)
26
+ COPY . /app
27
+
28
+ # Install the project itself as a non-editable package (fast since dependencies are already installed)
29
+ # --no-editable ensures the package is properly installed, not as editable
30
+ RUN --mount=type=cache,target=/root/.cache/uv \
31
+ uv sync --frozen --no-dev --no-editable
32
+
33
+ # ============================================================================
34
+ # Stage 2: Runtime - Minimal production image
35
+ # ============================================================================
36
+ FROM python:3.12-slim-bookworm AS runtime
37
+
38
+ # Install system dependencies required by OpenCV and MediaPipe
39
+ # - libgl1: OpenGL library for OpenCV
40
+ # - libglib2.0-0: GLib library for MediaPipe
41
+ # - libgomp1: GNU OpenMP library for multi-threading
42
+ # - ffmpeg: Video codec support for OpenCV
43
+ # hadolint ignore=DL3008
44
+ RUN apt-get update && apt-get install -y --no-install-recommends \
45
+ libgl1 \
46
+ libglib2.0-0 \
47
+ libgomp1 \
48
+ ffmpeg \
49
+ && apt-get clean \
50
+ && rm -rf /var/lib/apt/lists/*
51
+
52
+ WORKDIR /app
53
+
54
+ # Copy virtual environment from builder (contains installed package)
55
+ COPY --from=builder /app/.venv /app/.venv
56
+
57
+ # Set environment variables
58
+ # PATH: Use virtual environment binaries
59
+ # PYTHONUNBUFFERED: Force stdout/stderr to be unbuffered for real-time logging
60
+ # PYTHONDONTWRITEBYTECODE: Don't create .pyc files (saves space)
61
+ ENV PATH="/app/.venv/bin:$PATH" \
62
+ PYTHONUNBUFFERED=1 \
63
+ PYTHONDONTWRITEBYTECODE=1
64
+
65
+ # Create non-root user for security
66
+ RUN useradd -m -u 1000 kinemotion && \
67
+ chown -R kinemotion:kinemotion /app
68
+
69
+ USER kinemotion
70
+
71
+ # Verify installation
72
+ RUN python -c "import kinemotion; print('kinemotion installed successfully')"
73
+
74
+ # Set entrypoint to kinemotion CLI
75
+ ENTRYPOINT ["kinemotion"]
76
+
77
+ # Default command: show help
78
+ CMD ["--help"]
79
+
80
+ # ============================================================================
81
+ # Usage examples:
82
+ #
83
+ # Build:
84
+ # docker build -t kinemotion:latest .
85
+ #
86
+ # Run with help:
87
+ # docker run --rm kinemotion:latest --help
88
+ #
89
+ # Analyze video:
90
+ # docker run --rm -v $(pwd):/data kinemotion:latest \
91
+ # dropjump-analyze /data/video.mp4 --drop-height 0.40 \
92
+ # --output /data/debug.mp4 --json-output /data/metrics.json
93
+ #
94
+ # Interactive shell:
95
+ # docker run --rm -it --entrypoint /bin/bash kinemotion:latest
96
+ # ============================================================================
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: kinemotion
3
- Version: 0.7.0
3
+ Version: 0.8.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
@@ -100,18 +100,21 @@ This will install all dependencies and make the `kinemotion` command available.
100
100
 
101
101
  ## Usage
102
102
 
103
+ **NEW:** Kinemotion now features **intelligent auto-tuning**! Just specify your drop box height and the tool automatically optimizes all parameters based on video frame rate and tracking quality.
104
+
103
105
  ### Basic Analysis
104
106
 
105
- Analyze a video and output metrics to stdout as JSON:
107
+ Analyze a video with automatic parameter selection:
106
108
 
107
109
  ```bash
108
- kinemotion dropjump-analyze video.mp4
110
+ # Drop-height is REQUIRED for accurate calibration
111
+ kinemotion dropjump-analyze video.mp4 --drop-height 0.40
109
112
  ```
110
113
 
111
114
  ### Save Metrics to File
112
115
 
113
116
  ```bash
114
- kinemotion dropjump-analyze video.mp4 --json-output metrics.json
117
+ kinemotion dropjump-analyze video.mp4 --drop-height 0.40 --json-output metrics.json
115
118
  ```
116
119
 
117
120
  ### Generate Debug Video
@@ -119,156 +122,104 @@ kinemotion dropjump-analyze video.mp4 --json-output metrics.json
119
122
  Create an annotated video showing pose tracking and contact detection:
120
123
 
121
124
  ```bash
122
- kinemotion dropjump-analyze video.mp4 --output debug.mp4
125
+ kinemotion dropjump-analyze video.mp4 --drop-height 0.40 --output debug.mp4
123
126
  ```
124
127
 
125
- ### Calibrated Drop Jump Analysis
128
+ ### Complete Analysis
126
129
 
127
- For most accurate measurements, provide the drop box height in meters:
130
+ With all outputs:
128
131
 
129
132
  ```bash
130
- # 40cm drop box
131
- kinemotion dropjump-analyze drop-jump.mp4 --drop-height 0.40
132
-
133
- # 60cm drop box with full outputs
134
- kinemotion dropjump-analyze drop-jump.mp4 \
135
- --drop-height 0.60 \
136
- --json-output metrics.json \
137
- --output debug.mp4
133
+ kinemotion dropjump-analyze video.mp4 \
134
+ --drop-height 0.40 \
135
+ --output debug.mp4 \
136
+ --json-output results.json
138
137
  ```
139
138
 
140
- ### Full Example (Maximum Accuracy)
139
+ ### Quality Presets
140
+
141
+ Choose analysis quality (automatically adjusts all parameters):
141
142
 
142
143
  ```bash
143
- # With all accuracy improvements enabled
144
- kinemotion dropjump-analyze jump.mp4 \
145
- --outlier-rejection \
146
- --drop-height 0.40 \
147
- --output debug.mp4 \
148
- --json-output results.json \
149
- --smoothing-window 7 \
150
- --polyorder 3
144
+ # Fast analysis (quick, less precise - good for batch processing)
145
+ kinemotion dropjump-analyze video.mp4 --drop-height 0.40 --quality fast
151
146
 
152
- # Alternative: With experimental bilateral filter
153
- kinemotion dropjump-analyze jump.mp4 \
154
- --outlier-rejection \
155
- --bilateral-filter \
147
+ # Balanced (default - best for most use cases)
148
+ kinemotion dropjump-analyze video.mp4 --drop-height 0.40 --quality balanced
149
+
150
+ # Accurate (research-grade, slower - maximum precision)
151
+ kinemotion dropjump-analyze video.mp4 --drop-height 0.40 --quality accurate
152
+ ```
153
+
154
+ ### See Auto-Selected Parameters
155
+
156
+ View what parameters were automatically selected:
157
+
158
+ ```bash
159
+ kinemotion dropjump-analyze video.mp4 --drop-height 0.40 --verbose
160
+ ```
161
+
162
+ ### Expert Mode (Advanced Users)
163
+
164
+ Override auto-tuned parameters if needed:
165
+
166
+ ```bash
167
+ # Manual parameter override (rarely needed)
168
+ kinemotion dropjump-analyze video.mp4 \
156
169
  --drop-height 0.40 \
157
- --output debug.mp4 \
158
- --json-output results.json
170
+ --expert \
171
+ --smoothing-window 7 \
172
+ --velocity-threshold 0.015
159
173
  ```
160
174
 
161
175
  ## Configuration Options
162
176
 
163
- > **📖 For detailed explanations of all parameters, see [docs/PARAMETERS.md](docs/PARAMETERS.md)**
164
- >
165
- > This section provides a quick reference. The full guide includes:
166
- >
167
- > - How each parameter works internally
168
- > - When and why to adjust them
169
- > - Scenario-based recommendations
170
- > - Debugging workflows
171
- > - Parameter interaction effects
172
-
173
- ### Smoothing
174
-
175
- - `--smoothing-window <int>` (default: 5)
176
- - Window size for Savitzky-Golay smoothing filter
177
- - Must be odd and >= 3
178
- - Larger values = smoother trajectories but less responsive
179
- - **Tip**: Increase for noisy videos, decrease for high-quality stable footage
180
-
181
- - `--polyorder <int>` (default: 2)
182
- - Polynomial order for Savitzky-Golay smoothing filter
183
- - Must be < smoothing-window (typically 2 or 3)
184
- - 2 = quadratic fit (good for parabolic motion like jumps)
185
- - 3 = cubic fit (better for complex motion patterns)
186
- - Higher order captures more motion complexity but more sensitive to noise
187
- - **Tip**: Use 2 for most cases, try 3 for high-quality videos with complex motion
188
- - **Accuracy improvement**: +1-2% for complex motion patterns
189
-
190
- ### Advanced Filtering
191
-
192
- - `--outlier-rejection / --no-outlier-rejection` (default: --outlier-rejection)
193
- - Apply RANSAC and median-based outlier rejection to remove tracking glitches
194
- - **With outlier rejection** (`--outlier-rejection`): Detects and removes MediaPipe tracking errors
195
- - RANSAC-based polynomial fitting identifies positions that deviate from smooth trajectory
196
- - Median filtering catches spikes in otherwise smooth motion
197
- - Outliers replaced with interpolated values from neighboring valid points
198
- - Removes jumps, jitter, and temporary tracking losses
199
- - **Accuracy improvement**: +1-2% by eliminating tracking glitches
200
- - **Without outlier rejection** (`--no-outlier-rejection`): Uses raw tracked positions
201
- - Faster processing, relies entirely on MediaPipe quality
202
- - **Tip**: Keep enabled (default) unless debugging or working with perfect tracking
203
-
204
- - `--bilateral-filter / --no-bilateral-filter` (default: --no-bilateral-filter)
205
- - Use bilateral temporal filter for edge-preserving smoothing
206
- - **With bilateral filter** (`--bilateral-filter`): Preserves sharp transitions while smoothing noise
207
- - Weights each frame by temporal distance AND position similarity
208
- - Landing/takeoff transitions remain sharp (not smoothed away)
209
- - Noise in smooth regions (flight, ground contact) is reduced
210
- - Edge-preserving alternative to Savitzky-Golay smoothing
211
- - **Accuracy improvement**: +1-2% by preserving event timing precision
212
- - **Without bilateral filter** (`--no-bilateral-filter`): Uses standard Savitzky-Golay smoothing
213
- - Uniform smoothing across all frames
214
- - Well-tested baseline method
215
- - **Tip**: Experimental feature; enable for videos with rapid transitions or variable motion
216
- - **Note**: Cannot be used simultaneously with Savitzky-Golay; bilateral replaces it when enabled
217
-
218
- ### Contact Detection
219
-
220
- - `--velocity-threshold <float>` (default: 0.02)
221
- - Vertical velocity threshold for detecting stationary feet
222
- - In normalized coordinates (0-1 range)
223
- - Lower values = more sensitive (may detect false contacts)
224
- - Higher values = less sensitive (may miss brief contacts)
225
- - **Tip**: Start with default, decrease if missing contacts, increase if detecting false contacts
226
-
227
- - `--min-contact-frames <int>` (default: 3)
228
- - Minimum consecutive frames to confirm ground contact
229
- - Filters out momentary tracking glitches
230
- - **Tip**: Increase for noisy videos with jittery tracking
231
-
232
- ### Visibility
233
-
234
- - `--visibility-threshold <float>` (default: 0.5)
235
- - Minimum MediaPipe visibility score (0-1) to trust a landmark
236
- - Higher values require more confident tracking
237
- - **Tip**: Lower if landmarks are frequently obscured but tracking seems reasonable
238
-
239
- ### Pose Tracking
240
-
241
- - `--detection-confidence <float>` (default: 0.5)
242
- - MediaPipe pose detection confidence threshold
243
- - **Tip**: Increase if getting false pose detections
244
-
245
- - `--tracking-confidence <float>` (default: 0.5)
246
- - MediaPipe pose tracking confidence threshold
247
- - **Tip**: Increase if tracking is jumping between different people/objects
248
-
249
- ### Calibration
250
-
251
- - `--drop-height <float>` (optional)
177
+ ### Intelligent Auto-Tuning
178
+
179
+ Kinemotion automatically optimizes parameters based on your video:
180
+ - **FPS-based scaling**: 30fps, 60fps, 120fps videos use different thresholds automatically
181
+ - **Quality-based adjustments**: Adapts smoothing based on MediaPipe tracking confidence
182
+ - **Always enabled**: Outlier rejection, curvature analysis, drop start detection
183
+
184
+ ### Required Parameters
185
+
186
+ - `--drop-height <float>` **[REQUIRED]**
252
187
  - Height of drop box/platform in meters (e.g., 0.40 for 40cm)
253
- - Enables calibrated jump height measurement using known drop height
254
- - Theoretically improves accuracy (⚠️ unvalidated - requires empirical validation)
255
- - Only applicable for drop jumps (box → drop → landing → jump)
256
- - **Tip**: Measure your box height accurately for best results
257
-
258
- ### Trajectory Analysis
259
-
260
- - `--use-curvature / --no-curvature` (default: --use-curvature)
261
- - Enable/disable trajectory curvature analysis for refining transitions
262
- - **With curvature** (`--use-curvature`): Uses acceleration patterns to refine event timing
263
- - Landing detection: Finds acceleration spike from impact deceleration
264
- - Takeoff detection: Finds acceleration change as body transitions from static to upward motion
265
- - Blends curvature-based refinement (70%) with velocity-based estimate (30%)
266
- - Provides physics-based validation of velocity threshold crossings
267
- - **Accuracy improvement**: More precise timing, especially for rapid transitions
268
- - **Without curvature** (`--no-curvature`): Pure velocity-based detection with sub-frame interpolation
269
- - Simpler, faster algorithm
270
- - Still highly accurate with smooth velocity curves
271
- - **Tip**: Keep enabled (default) for best results; disable only for debugging or comparison
188
+ - Used for accurate calibration of jump height measurements
189
+ - Measure your box height accurately for best results
190
+
191
+ ### Optional Parameters
192
+
193
+ - `--quality [fast|balanced|accurate]` (default: balanced)
194
+ - **fast**: Quick analysis, less precise (~50% faster)
195
+ - **balanced**: Good accuracy/speed tradeoff (recommended)
196
+ - **accurate**: Research-grade analysis, slower (maximum precision)
197
+
198
+ - `--verbose` / `-v`
199
+ - Show auto-selected parameters and analysis details
200
+ - Useful for understanding what the tool is doing
201
+
202
+ - `--output <path>` / `-o`
203
+ - Generate annotated debug video with pose tracking visualization
204
+
205
+ - `--json-output <path>` / `-j`
206
+ - Save metrics to JSON file instead of stdout
207
+
208
+ ### Expert Overrides (Rarely Needed)
209
+
210
+ For advanced users who need manual control:
211
+
212
+ - `--drop-start-frame <int>`: Manually specify where drop begins (if auto-detection fails)
213
+ - `--smoothing-window <int>`: Override auto-tuned smoothing window
214
+ - `--velocity-threshold <float>`: Override auto-tuned velocity threshold
215
+ - `--min-contact-frames <int>`: Override auto-tuned minimum contact frames
216
+ - `--visibility-threshold <float>`: Override visibility threshold
217
+ - `--detection-confidence <float>`: Override MediaPipe detection confidence
218
+ - `--tracking-confidence <float>`: Override MediaPipe tracking confidence
219
+
220
+ > **📖 For detailed parameter explanations, see [docs/PARAMETERS.md](docs/PARAMETERS.md)**
221
+ >
222
+ > **Note:** Most users never need expert parameters - auto-tuning handles optimization automatically!
272
223
 
273
224
  ## Output Format
274
225