Movement Assessment Methodology

How our clinical deep squat assessment works: rule-based scoring, research-backed thresholds, and dual-angle analysis.

Open Source Architecture

Full transparency — here's exactly how the assessment pipeline is structured. Our codebase is open source and available on GitHub.

dynalytics/
├── src/                            # Core pose analysis engine
│   ├── core/
│   │   ├── landmark.py             # Landmark class (x, y, z, visibility)
│   │   └── angle.py                # Angle calculation (3 points → degrees)
│   ├── pose/
│   │   └── estimator.py            # PoseEstimator (wraps MediaPipe)
│   ├── analysis/
│   │   ├── joint_analyzer.py       # 12 joint angle calculations
│   │   ├── velocity.py             # Speed + velocity tracking
│   │   └── frame_data.py           # FrameData container
│   ├── export/
│   │   └── csv_exporter.py         # CSV export (raw, minimal, landmarks)
│   └── config/
│       └── settings.py             # Angle definitions & thresholds

├── fms/                            # Movement scoring engine
│   ├── scoring/
│   │   ├── deep_squat.py           # Rule engine: CSV → score 0-3
│   │   ├── dual_angle.py           # Front + side → merged score
│   │   └── thresholds.py           # Research-backed angle thresholds
│   ├── reporting/
│   │   ├── report_generator.py     # Clinical report generation
│   │   └── templates.py            # Report prompt templates
│   ├── billing/
│   │   └── cpt_codes.py            # Billing categories + CPT suggestions
│   ├── ehr/                        # EHR integration layer
│   │   ├── payload.py              # AssessmentPayload schema
│   │   ├── adapter.py              # Abstract gateway interface
│   │   ├── medstatix.py            # MedStatix gateway
│   │   ├── events.py               # Webhook event types
│   │   ├── clinic_codes.py         # Clinic billing code cache
│   │   └── approval.py             # Provider approval workflow
│   ├── disclaimer.py               # Clinical + billing disclaimers
│   ├── integration.py              # FastAPI hooks
│   └── pipeline.py                 # CLI: CSV → score + report + billing

├── data_collection/
│   ├── backend/                    # FastAPI server
│   │   ├── src/
│   │   │   ├── labeling/           # Video, Assessment, FrameTag models
│   │   │   ├── auth/               # Supabase auth (JWT, roles, tokens)
│   │   │   └── web/
│   │   │       └── api.py          # REST endpoints
│   │   └── migrations/
│   │       └── 001_initial_schema.sql
│   └── frontend/                   # React assessment app
│       └── src/
│           ├── components/
│           │   ├── AssessmentUpload.jsx     # Two-slot upload (front + side)
│           │   ├── AssessmentProcessing.jsx # Loading state
│           │   ├── AssessmentResults.jsx    # Score + criteria display
│           │   ├── VideoPlayer.jsx          # Video playback
│           │   └── SkeletonOverlay.jsx      # Pose overlay on video
│           ├── lib/
│           │   └── supabase.js
│           ├── services/
│           │   └── PoseExtractor.js         # Client-side MediaPipe JS
│           └── store/
│               ├── useStore.js
│               └── useAuthStore.js

├── main.py                         # CLI pose extraction
└── requirements.txt

src/ is the core pose analysis engine — it handles pose estimation via MediaPipe, calculates 12 joint angles per frame, tracks speed and velocity, and exports raw data to CSV.

fms/ is the movement scoring engine — it takes the pose data and runs it through a rule-based scoring system with research-backed thresholds, generates clinical reports, maps billing categories, and handles the EHR integration layer.

data_collection/ is the web application — a React frontend where patients upload video and a FastAPI backend that orchestrates the pipeline.

Video never leaves the browser. MediaPipe JS runs pose extraction entirely client-side — no video is uploaded to any server.

Clinical Research Behind the Scoring

Our scoring engine is rule-based, not a black box. Every threshold has a published source, and every score is explainable.

Scoring Scale

The deep squat is scored 0–3 following standard Functional Movement Screening protocol:

3

Perfect

Performs movement correctly without compensation

2

Compensation

Completes with compensations (heels rise, excessive forward lean)

1

Cannot Complete

Unable to complete the movement pattern

0

Pain

Pain reported during any part of the movement

5 Biomechanical Criteria

1

Squat Depth

Measured by knee flexion angle. Score 3 requires >120° of knee flexion at the deepest point.

2

Torso-Tibia Alignment

The angle of the trunk relative to the tibia. Excessive forward lean indicates compensation.

3

Knee-Over-Foot Alignment

Detected from the front view. Identifies knee valgus (inward collapse) or varus (outward drift).

4

Heel Position

Measured by ankle dorsiflexion angle. Heels rising off the ground is a common compensation pattern indicating limited ankle mobility.

5

Lumbar Flexion Control

Trunk angle change from standing to the deepest point of the squat. Excessive lumbar flexion ("butt wink") indicates poor core or hip mobility.

Research-Backed Thresholds

These angle thresholds are derived from peer-reviewed biomechanics research:

Butler et al. (2010)

Established normative joint angle ranges for FMS deep squat scoring across score levels 1–3. This study measured actual joint angles across a large sample of participants scored by certified FMS practitioners.

Heredia et al. (2021)

Validated biomechanical criteria for computer vision–based movement screening, confirming that pose estimation can reliably replicate manual FMS scoring.

MeasurementScore 1Score 2Score 3
Knee flexion~84.7°~110°>120°
Hip flexion~88.1°~117.5°
Ankle dorsiflexion (heel rise)<140°≥140°

The system also computes bilateral asymmetry — comparing left vs. right joint angles frame-by-frame and flagging significant differences. This supports clinical identification of compensatory movement patterns that may not be visible to the naked eye.

References

  1. 1. Butler RJ, Plisky PJ, Southers C, Scoma C, Kiesel KB. Biomechanical analysis of the deep overhead squat for assessment of functional movement. Clin Biomech. 2010;25(10):1044-1049.
  2. 2. Heredia-Jimenez J, Orantes-Gonzalez E, Soto-Hermoso VM. Assessing the deep squat using inertial sensors: A biomechanical analysis. J Biomech. 2021;116:110237.

Dual-Angle Assessment

A single camera angle can't capture all movement faults. Our system uses two views — front and side — scored independently and merged at the criterion level.

Front View

Patient films from FRONT

MediaPipe extracts pose

(client-side, in browser)

Front-view scoring:

  • • Knee valgus/varus
  • • Bilateral asymmetry

Side View

Patient films from SIDE

MediaPipe extracts pose

(client-side, in browser)

Side-view scoring:

  • • Squat depth (knee flexion)
  • • Torso-tibia alignment
  • • Heel position
  • • Lumbar flexion control

Criterion-level merge

(each criterion scored by its optimal view)

Final score 0–3+ detailed findings+ clinical report

Key Points

Privacy by design

Video never leaves the browser. MediaPipe JS runs pose extraction entirely client-side. No video is uploaded to any server, ever.

Each view captures what it's best at

The front view detects knee alignment (valgus/varus) and bilateral asymmetry. The side view measures squat depth, torso position, heel rise, and lumbar control. Neither view alone can see everything.

Criterion-level merge, not averaging

The system doesn't average the two views or pick the "better" one. It selects the optimal view for each specific biomechanical criterion and merges results at that level. Front view data is authoritative for knee alignment; side view data is authoritative for depth.

Provider always reviews

The automated score lands as a "draft" in the provider's dashboard. A licensed provider reviews the findings, can override any criterion, and approves the assessment before it reaches the patient chart. This keeps the system compliant with FDA Clinical Decision Support guidelines — the tool informs, the clinician decides.

Ready to see it in action?

Try the movement assessment yourself and see how the dual-angle system scores a deep squat in real time.

Try the assessment yourself