This project presents an end-to-end Yoga Pose Classification system that integrates Deep Learning (DenseNet121) with a Flask-based web application. Users can upload an image of a yoga pose and obtain the predicted pose along with confidence scores.
The project follows industry best practices, including modular code structure, clean separation of concerns, and deployment-ready architecture. It is suitable for portfolio presentation, internship submissions, and real-world AI application demos.
- Deep Learning / Transfer Learning: DenseNet121, TensorFlow, Keras
- Computer Vision: Image preprocessing, augmentation, classification
- Web Development: Flask, Jinja templating, HTML/CSS
- Data Handling & Analysis: NumPy, Pandas, visualization
- Deployment Readiness: Modular structure, model serialization, upload handling
This highlights transferable skills relevant to AI, ML, and full-stack roles.
- Dataset Name: Yoga Pose Classification Dataset
- Source: Kaggle
- Link: https://www.kaggle.com/datasets/ujjwalchowdhury/yoga-pose-classification
- Structure: Class-wise folders containing labeled images of yoga poses
- Architecture: DenseNet121 (transfer learning)
- Pre-trained on: ImageNet
- Input Size: 224 × 224 × 3
- Loss Function: Categorical Crossentropy
- Optimizer: Adam (Learning Rate: 1e-4)
- Evaluation Metrics: Accuracy, Precision, Recall, F1-score
The DenseNet base layers are frozen and a custom classification head is trained on the yoga pose dataset.
yoga-pose-classifier/
│
├── app.py # Main Flask application
├── requirements.txt # Project dependencies
├── notebook/ # Jupyter notebook containing
│ └── yoga_pose_classification.ipynb
│
├── model/
│ └── model_dense121.keras # Trained DenseNet121 model
│
├── utils/
│ ├── allowed_file.py # File extension validation
│ └── upload_file.py # Upload redirection helper
│
├── static/
│ ├── css/
│ │ └── style.css # styling
│ └── uploads/ # Uploaded images
│
├── templates/
│ └── index.html # Main UI template
└── README.md
- User uploads an image via the web interface.
- File is validated using
allowed_file(). - Image is saved to
static/uploads/. - Image is preprocessed for DenseNet121 input.
- Model predicts pose and confidence.
- Result displayed on UI.
allowed_file.py: Ensures only supported image formats are accepted.upload_file.py: Handles clean routing for uploaded images.
Modular utilities improve code readability and maintainability.
git clone https://github.com/batoolarifa/yoga-pose-classifier
cd yoga-pose-classifierpip install -r requirements.txtpython app.pyAccess the app at: http://localhost:8080
-
Upload a yoga pose image (JPG / PNG).
-
Model predicts one of the following poses:
- Downdog
- Goddess
- Plank
- Tree
- Warrior2
-
Confidence score displayed alongside prediction.
- Ready for deployment on platforms such as Hugging Face Spaces, Render, AWS EC2, or Docker environments.
- Model loaded once at startup for efficient inference.
- Supports easy class extension and integration into larger systems.
This project demonstrates:
- End-to-end ML application development
- Deep learning expertise
- Full-stack AI system implementation
- Reproducible and scalable code practices
- Skills aligned with AI/ML, Computer Vision, and Software Engineering roles
This section highlights the project’s alignment with industry standards and professional portfolios.
- Real-time webcam inference
- Pose correction feedback and tips
- REST API conversion (FastAPI)
- Enhanced UI accessibility and responsiveness
Syeda Arifa Batool
SE @ Karachi University | AI & ML Practitioner | Applying technology to create real-world value 📈
- LinkedIn: https://www.linkedin.com/in/arifa-batool/
- Kaggle: https://www.linkedin.com/in/arifa-batool/
- Email: [email protected]
⭐ If you find this project useful, feel free to star the repository!



