https://github.com/04092000f/pushup-counter
pushup counter is an app which counts the total pushups of a person using mediapipe
https://github.com/04092000f/pushup-counter
computer-vision mediapipe opencv pose-estimation pushup-counter pushups python3
Last synced: about 2 months ago
JSON representation
pushup counter is an app which counts the total pushups of a person using mediapipe
- Host: GitHub
- URL: https://github.com/04092000f/pushup-counter
- Owner: 04092000f
- Created: 2025-06-11T07:21:39.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-06-11T07:42:47.000Z (about 1 year ago)
- Last Synced: 2025-06-11T08:36:05.588Z (about 1 year ago)
- Topics: computer-vision, mediapipe, opencv, pose-estimation, pushup-counter, pushups, python3
- Language: Python
- Homepage:
- Size: 14.8 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 💪 Push-Up Counter App using Streamlit
This Streamlit app automatically detects and counts push-ups from an uploaded video using **MediaPipe Pose estimation** and **OpenCV**. It also overlays angles and count information on the video and exports the result as an `.mp4` (H.264) file for download.
---
## 📦 Features
- 📤 Upload any push-up video (`.mp4`, `.mov`, `.avi`)
- 🧠 Detect push-up motion using elbow joint angles
- 🔁 Show real-time progress and estimated time remaining
- 📊 Overlay count and angle in top-right of video
- 🎥 Export processed video in **H.264 (.mp4)** format
- ⬇️ Download final video with overlays
---
## 📸 Example Output

---
## 🚀 Getting Started
### 1. Clone the Repo
```bash
git clone https://github.com/yourusername/pushup-counter-app.git
cd pushup-counter-app
```
### 2. Install Requirements
```bash
pip install -r requirements.txt
```
### 3. Run the App
```bash
streamlit run app.py
```
### 📁 File Structure
```bash
pushup-counter-app/
├── app.py # Main Streamlit app
├── requirements.txt # Dependencies
├── result.gif # Output GIF
└── README.md # Project readme
```
## ✅ Requirements
* Python 3.8+
* streamlit
* opencv-contrib-python
* mediapipe
* numpy
## ⚙️ How it Works
1. Extracts pose landmarks using `MediaPipe`.
2. Calculates elbow joint angle.
3. Detects push-up motion based on elbow angle range.
4. Overlays count and angle on each video frame.
5. Exports a final video using OpenCV's `VideoWriter`.
## 📥 Output
* `pushups_result.mp4` (available via download button in the app)