Skip to content

A full-stack web application that uses webcam input to detect human posture in real time. Built with React (frontend) and Flask + MediaPipe + OpenCV (backend). Users can capture a frame, send it to the backend, and receive feedback like “Good Posture” or “Bad Posture” based on joint angles and alignment.

License

spati10/posture

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

posture-detection-app 🧍‍♂️ Posture Detection App A full-stack real-time and video-based posture detection system using React, Flask, MediaPipe, and OpenCV. It detects posture issues like:

🚫 Knee over toe

⚠️ Back angle < 150°

⚠️ Neck bend > 30°

📸 Features ✅ Real-time webcam posture capture.

🎥 Upload video for full session analysis.

📊 Instant feedback (Good/Bad posture).

🔁 Rule-based logic using MediaPipe landmarks.

📂 Project Structure

posture-detection-app/ ├── frontend/ # React frontend ├── backend/ # Flask API │ ├── app.py │ └── posture_analysis.py └── README.md

🛠️ Setup Instructions ⚙️ Backend (Flask) Navigate to backend:

cd backend python -m venv venv venv\Scripts\activate # On Windows pip install -r requirements.txt python app.py

🌐 Frontend (React) Navigate to frontend:

cd frontend npm install npm start

📡API Endpoints: POST /posture – Analyze a single webcam frame.

POST /analyze – Analyze a full video file.

🔍 Tech Stack: Frontend: React, react-webcam, Axios.

Backend: Flask, Flask-CORS, OpenCV, MediaPipe.

Video Analysis: MediaPipe Pose, NumPy, math.

📌 Deployment Frontend: Vercel / Netlify / Render

Backend: Render / Railway / Replit

🧠 Future Improvements: Real-time video streaming support.

Pose history & analytics.

User accounts for tracking progress.

About

A full-stack web application that uses webcam input to detect human posture in real time. Built with React (frontend) and Flask + MediaPipe + OpenCV (backend). Users can capture a frame, send it to the backend, and receive feedback like “Good Posture” or “Bad Posture” based on joint angles and alignment.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published