Build a real-time martial-arts style recognition app
INPUT: two swappable sources, toggle-able from the UI with no code changes —
1) live laptop webcam (USB/UVC camera device)
2) local video file (I'll drop in movie clips for testing)
CORE PIPELINE (cascade):
1. Pose estimation stage — use the pretrained YOLO26-Pose model from the
Model Zoo as-is, 17 keypoints, no retraining.
2. TrackTrack for persistent per-person IDs so labels don't flicker.
3. Per tracked ID, maintain a rolling ~20-30 frame buffer of biomechanical
features: stance width (ankle-to-ankle, normalized to hip width), guard
height (wrist-to-shoulder offset), elbow angle, hip rotation delta
between frames, weight-distribution proxy.
4. Add anatomical plausibility filtering on the raw pose output: clip/reject
joint angles outside normal human range of motion (e.g. elbow flexion
0-150°, realistic shoulder rotation limits) before they hit the buffer.
This doubles as free noise reduction.
5. Cascade the feature buffer into a style classifier limited to exactly
3 classes: Karate, Boxing, Wing Chun. V1 = rule-based, using known
signatures (karate: deep linear stance, chambered strikes at hip;
boxing: bladed stance, high guard near chin, bouncing footwork;
wing chun: narrow stance, centerline elbows-down guard, short rapid
strikes). No training data needed. Structure the code so this heuristic
can later be swapped for a trained classifier without touching the rest
of the pipeline — but don't build that upgrade path yet, just leave the
seam.
6. Smooth the label + confidence score over the buffer window so it
doesn't jitter frame to frame.
FRONTEND:
- Live video with pose skeleton overlay, color-coded by detected style
(e.g. red=boxing, blue=karate, green=wing chun)
- HUD panel: detected style name, confidence bar, and the specific "tell"
that triggered it (e.g. "high guard + bounce detected")
- Webcam / Load Video File toggle switch
- Single-page lightweight web view, no heavy frameworks — fast to compile
BUILD ORDER: get the pose+tracking cascade running live on camera first
and confirm it works. Only then wire in the heuristic classifier. Only
then polish the UI.
