How goutambarve23/ai-sports-injury-risk-detection works
This repository is an in-progress sports injury risk analysis platform. Its implemented backend supports account registration/login, athlete profiles, and video upload; a separate video-processing module estimates poses and derives biomechanical warnings, risk, predictions, and recommendations. The README also lists performance dashboards and corrective guidance as goals, but the sampled frontend is still a Vite starter, and no connection from upload to video processing is shown. The graph reflects these limits rather than implying a complete end-to-end workflow.
Main entry points: db.py SQLAlchemy Store · pose_detector.py Pose Processing · app.py Flask API · auth.py Authentication
Components 20
Backend API
- Flask API
backend/app.py - Authentication
backend/routes/auth.py - Athlete Profiles
backend/routes/athlete.py - Video Upload
backend/routes/video.py - Analysis Routes
backend/routes/analysis.py - Upload Routes
backend/routes/upload.py
User Records
- SQLAlchemy Store
backend/database/db.py - User Record
backend/models/user.py - Athlete Record
backend/models/athlete.py - Video Record
backend/models/video.py - Analysis Record
backend/models/analysis.py
Video Analysis
- Pose Processing
backend/ai/pose_detector.py - Angle Calculation
backend/ai/angle_calculator.py - Injury Detection
backend/ai/injury_detector.py - Risk Scoring
backend/ai/risk_engine.py - Injury Prediction
backend/ai/prediction_engine.py - Recommendations
backend/ai/recommendation.py - Report Generation
backend/ai/report_generator.py
Web Client
- Starter Web UI
frontend/src/App.jsx
Other components
- Athlete
Connections 19
- Athlete → Flask API: uses API
backend/app.py - Flask API → Authentication: registers
backend/app.py - Flask API → Athlete Profiles: registers
backend/app.py - Flask API → Video Upload: registers
backend/app.py - Authentication → User Record: queries and saves
backend/routes/auth.py - Authentication → SQLAlchemy Store: commits
backend/routes/auth.py - Athlete Profiles → Athlete Record: queries and saves
backend/routes/athlete.py - Athlete Profiles → SQLAlchemy Store: commits
backend/routes/athlete.py - Video Upload → Video Record: creates record
backend/routes/video.py - Video Upload → SQLAlchemy Store: commits
backend/routes/video.py - User Record → SQLAlchemy Store: uses ORM
backend/models/user.py - Athlete Record → SQLAlchemy Store: uses ORM
backend/models/athlete.py - Video Record → SQLAlchemy Store: uses ORM
backend/models/video.py - Analysis Record → SQLAlchemy Store: uses ORM
backend/models/analysis.py - Pose Processing → Angle Calculation: calculates angles
backend/ai/pose_detector.py - Pose Processing → Injury Detection: detects warnings
backend/ai/pose_detector.py - Pose Processing → Risk Scoring: scores risk
backend/ai/pose_detector.py - Pose Processing → Injury Prediction: predicts injuries
backend/ai/pose_detector.py - Pose Processing → Recommendations: gets guidance
backend/ai/pose_detector.py