Praxis Motion Intelligence is an AI-assisted human movement analysis system for rehab, recovery, and movement-quality assessment. It combines pose estimation, classical kinematic analysis, dataset-derived reference profiles, a lightweight baseline classifier, and an additive spatio-temporal deep-learning model.
The system is designed around one core principle:
- UCF101 is the primary reference for normal movement
Everything else is layered on top of that baseline.
Praxis currently includes five major layers:
-
Pose Extraction
- MediaPipe extracts body landmarks from video
- Landmark JSON is also supported as a direct input path
-
Kinematic Analysis
- Joint angle computation
- Mobility, symmetry, and smoothness scoring
- Limitation detection and exercise guidance
-
Reference-Profile Interpretation
data/normal.jsonfrom UCF101data/injury.jsonfrom the sports injury CSV plus UCF/stroke anchorsdata/stroke.jsonfrom stroke threshold data
-
Baseline Model
- A lightweight nearest-centroid classifier built from the three reference profiles
- Used as an auxiliary prediction path
-
Deep Learning Add-On
- ST-GCN + LSTM hybrid
- Optional, additive, and demo-safe
- Predicts condition from pose sequences without replacing the explainable pipeline
- Accepts uploaded video, webcam recordings, or landmark JSON
- Extracts pose with MediaPipe when available
- Builds joint-angle series for elbows, shoulders, hips, and knees
- Scores movement using:
- mobility
- symmetry
- smoothness
- Compares movement against a UCF101-derived normal reference
- Interprets severity using injury and stroke profiles
- Produces:
- joint-level condition labels
- overall condition
- explainable feedback
- charts
- event timeline
- repetition summary
- session comparison
- overlay replay with a colored stickman
Praxis uses a UCF-first architecture.
data/normal.jsondefines how movement should ideally be performeddata/injury.jsonrepresents moderate limitationdata/stroke.jsonrepresents severe neurological limitation
Comparison logic:
- The user is always compared to the UCF101 normal profile first.
- Injury and stroke profiles are only used to interpret severity.
- The output remains explainable, even when the deep model is enabled.
This keeps the system clinically intuitive and consistent with the original design.
Praxis uses MediaPipe as the pretrained pose-estimation model.
Role:
- convert raw video into body landmarks
- produce a
PoseSequence
This is the only external pretrained vision model required for the core app.
This is the main reasoning layer of the current system.
Files:
src/praxis_ai/analysis.pysrc/praxis_ai/reference_data.pysrc/praxis_ai/rehab.py
Role:
- compute joint angles
- compute scores
- detect limitations
- compare against normal/injury/stroke profiles
- generate feedback and joint status
File:
src/praxis_ai/basic_model.py
Artifact:
data/basic_condition_model.json
Type:
- nearest-centroid profile classifier
Role:
- acts as a lightweight baseline model
- uses profile centroids from:
normal.jsoninjury.jsonstroke.json
- returns an auxiliary condition prediction
File:
src/praxis_ai/deep_learning.py
Training script:
scripts/train_stgcn_transformer.py
Checkpoint:
models/stgcn_transformer_demo.pt
Type:
- spatial graph modeling over joints
- temporal modeling over frame sequences
Role:
- predicts:
deep_model_predictiondeep_model_confidencedeep_joint_importance
- remains optional
- does not replace the main analysis pipeline
The deep-learning model treats human movement in two ways at once:
Each frame is represented as a graph:
- nodes = joints
- edges = body connections
This allows the model to learn joint-to-joint spatial relationships such as:
- shoulder to elbow coordination
- hip to knee alignment
- left-right structural asymmetry
The graph outputs are processed over time with an LSTM.
This allows the model to learn movement dynamics such as:
- hesitation
- rhythm
- compensation
- motion smoothness across frames
The deep model returns:
- condition class:
NormalInjury RecoverySevere Limitation
- confidence score
- joint importance weights
The deep model is intentionally not the only source of truth.
Runtime architecture:
Pose -> Feature Tensor -> Deep Model -> Condition Prediction -> Existing Feedback System
So:
- the model predicts
- the existing logic explains
- Frontend sends video, webcam clip, or landmark JSON to
POST /api/analyze - Backend extracts landmarks and builds a
PoseSequence - Joint-angle series are computed
- Core scores are computed:
- mobility
- symmetry
- smoothness
- Joint status is classified using:
normal.jsoninjury.jsonstroke.json
- Basic model prediction is computed
- Deep model prediction is computed if:
torchis installed- a checkpoint exists
- Existing feedback and rehab guidance are generated
- Stickman overlay is rendered with:
- severity colors
- optional deep-model importance emphasis
- Report is serialized and returned to the UI
- Upload a video file
- Record a webcam clip in the browser
- Paste landmark JSON directly
- Video upload
- Webcam recording
- Landmark JSON input
- Condition selector:
- Normal
- Injury Recovery
- Neurological Condition
- Overall movement scoring
- Joint-level condition labels
- Overall condition interpretation
- Basic model prediction display
- ST-GCN + LSTM prediction display
- Deep model attention panel
- Stickman replay overlay with:
- Green = Normal
- Yellow = Injury Recovery
- Red = Severe Limitation
- Event timeline
- Joint motion charts
- Repetition summary
- Session comparison
- Browser-print PDF export
Purpose:
- primary reference for normal movement
Artifact:
data/normal.json
Builder:
scripts/build_ucf_reference_stats.pyscripts/build_condition_profiles.py
Purpose:
- severe movement limitation reference
Artifacts:
data/stroke_thresholds.jsondata/stroke.json
Builder:
scripts/extract_stroke_thresholds.pyscripts/build_condition_profiles.py
File:
multimodal_sports_injury_dataset.csv
Purpose:
- calibrates moderate injury-recovery profile
Artifact:
data/injury.json
Builder:
scripts/build_condition_profiles.py
Reference artifacts:
data/normal.jsondata/injury.jsondata/stroke.json
Model artifacts:
data/basic_condition_model.jsonmodels/stgcn_transformer_demo.pt
Training summary:
data/deep_learning_training_summary.json
Diagram:
praxis_movement_intelligence_architecture.drawio
Pitch deck:
hackathon_pitch_deck.pdf
Backend entrypoint:
src/praxis_ai/server.py
Endpoints:
GET /api/healthPOST /api/analyze
Supported form fields:
video_filelandmarks_jsoncondition_profile
The analysis response can include:
overall_scoremobility_scoresymmetry_scoresmoothness_scoreoverall_conditionjoint_statusjoint_deviationjoint_summaryjoint_chartsannotationsrep_summaryfeedbacklimitationsexercisesmodel_predictionmodel_distancesdeep_model_predictiondeep_model_confidencedeep_joint_importancemetadataoverlay_video
uv sync
npm install
python scripts/build_condition_profiles.py
python scripts/build_basic_condition_model.py
UV_CACHE_DIR=.uv-cache uv add torch
UV_CACHE_DIR=.uv-cache uv run python scripts/train_stgcn_transformer.py
npm run build
UV_CACHE_DIR=.uv-cache uv run praxisThen open:
http://127.0.0.1:8000Train the ST-GCN + LSTM checkpoint with:
UV_CACHE_DIR=.uv-cache uv run python scripts/train_stgcn_transformer.pyCurrent behavior:
- if
torchis available, the script trains a lightweight demo checkpoint - if
torchis missing, it writes a summary file instead of breaking the repo
The deep-learning path now automatically selects:
cudaiftorch.cuda.is_available()is true- otherwise
cpu
That applies to:
- checkpoint loading
- inference
- training
The deep model is optional.
If the environment does not have:
torch, ormodels/stgcn_transformer_demo.pt
the rest of the system still works exactly as before.
main.py: CLI entrypoint exposed aspraxisapp.py: direct Python launch shimsrc/praxis_ai/server.py: HTTP server and request handlingsrc/praxis_ai/pose_estimation.py: MediaPipe extraction, probing, and overlay renderingsrc/praxis_ai/analysis.py: scoring, profile logic, feedback, and deep-model integrationsrc/praxis_ai/reference_data.py: profile and rule loadingsrc/praxis_ai/reporting.py: API serializationsrc/praxis_ai/rehab.py: limitation detection and exercise recommendationsrc/praxis_ai/basic_model.py: centroid-based baseline classifiersrc/praxis_ai/deep_learning.py: ST-GCN + Transformer modulefrontend/: React frontenddata/: checked-in calibration, profiles, and model summariesscripts/: offline profile generation and model-training utilitiesmodels/: MediaPipe assets and deep-learning checkpoints
Short version:
Praxis uses MediaPipe to extract pose, compares movement to a UCF101-derived normal baseline, uses injury and stroke references to interpret severity, and adds a graph-based deep-learning model with an LSTM temporal encoder to classify movement over time. The deep model predicts, and the existing pipeline explains.
If someone asks “do you have a model?”:
Yes. We use MediaPipe for pose estimation, a lightweight centroid baseline model for condition classification, and an additive ST-GCN + Transformer deep-learning model for spatio-temporal movement prediction.
STGCN_TRANSFORMER_EXPLAINER.mdHACKATHON_JUDGES_REFERENCE.mdpraxis_movement_intelligence_architecture.drawio
If pose landmarks cannot be extracted, the server fails clearly instead of substituting demo results. To proceed, provide:
- a supported video
- a
.pose.jsonsidecar file - or landmark JSON directly