Built to order

Yoga Pose Classification CNN with Yoga-82 Dataset

This project builds a convolutional neural network that classifies yoga poses into 82 fine-grained classes, trained on the Yoga-82 dataset of over 28,400 web images (Verma et al., CVPR Workshops 2020). It uses transfer learning on a ResNet-50/DenseNet-121 backbone with a hierarchical classification head, and ships with a web demo that classifies uploaded photos or webcam frames with top-3 softmax confidences. Suitable for B.E./B.Tech final-year projects in Computer Science, AI & Machine Learning and related branches.

AI & Machine Learning Jupyter notebookPython 3scikit-learn metricsHTML · CSS · JavaScriptPyTorch · torchvisionOpenCV · PillowYoga-82 datasetFlask REST APISoftware
Yoga Pose Classification CNN with Yoga-82 Dataset — project thumbnail preview
More project photos (2)

The problem

Yoga poses are hard to recognize automatically because they are fine-grained: two poses can look nearly identical except for a hand or head position, bodies are frequently occluded, and the same pose looks different from every camera angle. Manual keypoint annotation breaks down on these complex postures, which is why the Yoga-82 authors reframed pose recognition as classification and built a dedicated 82-class dataset with a three-level label hierarchy. This project takes that dataset and trains a real transfer-learning CNN on it, so the student learns the full modern vision pipeline: working with a published academic dataset, fine-tuning a pre-trained backbone, evaluating with top-1/top-5 accuracy and per-class metrics, and deploying the trained model behind a web demo. The result is a defensible deep-learning project with a citable dataset, a documented training run, and a live classifier the examiner can try during the demo.

How it works

  1. The Yoga-82 dataset is downloaded from its official release: 21,009 training and 7,469 test images across 82 pose classes, each image carrying a 3-level hierarchical label.
  2. Images are resized to 224x224, normalized with ImageNet statistics, and augmented during training with random crops, horizontal flips, small rotations and color jitter.
  3. A pre-trained ResNet-50 (or DenseNet-121) backbone is first trained with frozen weights on the new 82-way head, then unfrozen for full fine-tuning with cross-entropy loss and Adam.
  4. The trained model is evaluated once on the held-out test set: top-1/top-5 accuracy, per-class precision/recall, and a confusion matrix are generated for the report.
  5. The best checkpoint is exported and loaded by a Flask REST API that accepts an image and returns the ranked 82-class softmax output.
  6. The web demo sends an uploaded photo or webcam frame to the API and renders the predicted pose, its Sanskrit name, group, description and top-3 confidence bars.

Tech stack:

  • Python 3, PyTorch (torchvision)
  • Yoga-82 dataset (official release)
  • Flask REST API (model serving)
  • OpenCV, Pillow (preprocessing)
  • scikit-learn (metrics)
  • Matplotlib, Seaborn (plots)
  • Jupyter Notebook (training & evaluation)
  • HTML, CSS, JavaScript (web demo)

Dataset & model details

  • Dataset: Yoga-82 — over 28,400 yoga pose images collected from the web via Bing, manually cleaned and annotated; official split 21,009 train / 7,469 test; 82 classes with 64 (min) to 1,133 (max) images per class (~347 average); three-level label hierarchy 6 -> 20 -> 82 (body position -> variation -> pose). Released with the paper "Yoga-82: A New Dataset for Fine-grained Classification of Human Poses" (Verma, Kumawat, Nakashima, Raman; CVPR Workshops 2020; arXiv:2004.10362).
  • Task: 82-class fine-grained image classification; input = 224x224x3 RGB image, output = probability distribution over the 82 pose classes (plus an auxiliary 6-way group prediction).
  • Model: Transfer-learning CNN — ResNet-50 or DenseNet-121 backbone (ImageNet pre-trained), global average pooling -> dropout -> 82-way softmax head, with an auxiliary 6-way hierarchical head; trained with cross-entropy loss, Adam optimizer, frozen-backbone warmup followed by fine-tuning.
  • Metrics: Top-1 and top-5 accuracy on the 7,469-image test set, per-class precision/recall/F1, confusion matrix. Design target: approximately 78% top-1 and 92% top-5 accuracy for the built-to-order training run. No accuracy is claimed as measured until the training run is executed for the order; the report documents the actual achieved figures.
Parameter Value
Input format 224 x 224 x 3 RGB, ImageNet-normalized
Classes 82 yoga poses (+ 6 top-level groups)
Training images 21,009 (official Yoga-82 split)
Test images 7,469 (official Yoga-82 split)
Backbone parameters Approximately 23.7M (ResNet-50) or 7.0M (DenseNet-121), per the Yoga-82 paper
Top-1 accuracy Design target: approximately 78%
Top-5 accuracy Design target: approximately 92%
Inference Approximately 40-80 ms per image on CPU (expected)
Training time Approximately 2-4 hours on a single GPU (expected)
Model file Approximately 90-100 MB (design target)
Demo Single-page web app + Flask API, runs offline after download

Project features

  • [82-class CNN classifier] A ResNet-50 (or DenseNet-121) backbone pre-trained on ImageNet, fine-tuned on Yoga-82's 82 pose classes with a 224x224 input and an 82-way softmax output.
  • [Hierarchical classification head] An auxiliary head predicts the 6 top-level body-position groups (standing, sitting, balancing, inverted, reclining, wheel), guiding the fine-grained classifier on easily confused pose pairs — the approach introduced in the Yoga-82 paper.
  • [Web inference demo] Upload a photo or capture a frame from the webcam; the app shows the predicted pose with its Sanskrit name, group, a short description, and top-3 predictions with animated confidence bars.
  • [82-class pose browser] A searchable label browser of all 82 classes organized by the 6 official top-level groups, with English and Sanskrit names for every pose.
  • [Full training notebook] Dataset loading and the 21,009/7,469 train/test split, augmentation (crop, flip, rotation, color jitter), frozen-backbone warmup, fine-tuning loop and checkpointing in one reproducible Jupyter notebook.
  • [Evaluation suite] Top-1 and top-5 accuracy, per-class precision and recall, and a confusion matrix highlighting which pose pairs the model confuses most — ready for the report and the viva.
  • [REST inference API] A Flask endpoint that loads the trained weights and returns ranked predictions as JSON, so the web demo and any client app share one serving layer.
  • [Pose-practice feedback mode] Optional customization: side-by-side comparison of the user's photo against a reference image of the predicted pose, with notes on common alignment mistakes. Not part of the base build; developed on request.

What is included

  • Complete training & evaluation Jupyter notebook (data pipeline, augmentation, training loop, metrics)
  • Trained CNN weights (.pth) with the preprocessing and label files
  • Flask REST inference API with request/response documentation
  • Web demo: upload/webcam classification, top-3 confidences, 82-class browser, dataset & model panel
  • Evaluation artifacts: accuracy numbers, per-class report, confusion matrix, training-curve plots
  • Project report PDF (background, dataset analysis, architecture rationale, methodology, results)
  • PPT presentation for final review
  • Viva Q&A preparation document (CNNs, transfer learning, softmax, overfitting, hierarchical labels)

Limitations & prerequisites

  • Fine-grained pairs (e.g. upward bow vs. up-facing two-foot staff) are genuinely hard; the confusion matrix will show misses and the report discusses them honestly.
  • ~78% top-1 is a design target for the training run, stated honestly — the report documents the actual achieved figure after training.
  • Per-class image counts vary widely (64 to 1,133), so rare poses classify less reliably than common ones.
  • Heavy occlusion, unusual camera angles and low light reduce accuracy; the model sees single-person photos, not crowded scenes.
  • The dataset's web images may not represent the student's own camera and room — a small custom validation set is recommended.
  • This is an academic prototype for pose recognition, not a substitute for a qualified yoga instructor's guidance on form and safety.

Frequently Asked Questions

Which dataset is used and why?

Yoga-82 — over 28,400 web images across 82 yoga pose classes with a 6 -> 20 -> 82 label hierarchy, released with a CVPR Workshops 2020 paper. It is the standard academic benchmark for this exact task, so every result is comparable against published literature.

Is the accuracy guaranteed?

No accuracy is guaranteed or claimed as measured. The design target for the training run is approximately 78% top-1 / 92% top-5; the report documents the actual figures the trained model achieves on the held-out test set.

Can new poses be added beyond the 82?

Yes, with retraining: new labeled images are added to the dataset, the classification head is extended, and the model is fine-tuned again. The notebook documents this extension path.

Can it work with a live camera?

Yes — the web demo includes webcam capture: grab a frame, and the API classifies it the same way as an uploaded photo. Continuous video tracking is listed as future scope.

Is this project suitable for a final-year project?

Yes — for Computer Science, IT and AI/ML programs. It demonstrates dataset handling, transfer learning, CNN fine-tuning, rigorous evaluation and a deployed web demo.

Components & software requirements
  • Python 3, PyTorch (torchvision)
  • Yoga-82 dataset (official release)
  • Flask REST API (model serving)
  • OpenCV, Pillow (preprocessing)
  • scikit-learn (metrics)
  • Matplotlib, Seaborn (plots)
  • Jupyter Notebook (training & evaluation)
  • HTML, CSS, JavaScript (web demo)

Dataset & model details

  • Dataset: Yoga-82 — over 28,400 yoga pose images collected from the web via Bing, manually cleaned and annotated; official split 21,009 train / 7,469 test; 82 classes with 64 (min) to 1,133 (max) images per class (~347 average); three-level label hierarchy 6 -> 20 -> 82 (body position -> variation -> pose). Released with the paper "Yoga-82: A New Dataset for Fine-grained Classification of Human Poses" (Verma, Kumawat, Nakashima, Raman; CVPR Workshops 2020; arXiv:2004.10362).
  • Task: 82-class fine-grained image classification; input = 224x224x3 RGB image, output = probability distribution over the 82 pose classes (plus an auxiliary 6-way group prediction).
  • Model: Transfer-learning CNN — ResNet-50 or DenseNet-121 backbone (ImageNet pre-trained), global average pooling -> dropout -> 82-way softmax head, with an auxiliary 6-way hierarchical head; trained with cross-entropy loss, Adam optimizer, frozen-backbone warmup followed by fine-tuning.
  • Metrics: Top-1 and top-5 accuracy on the 7,469-image test set, per-class precision/recall/F1, confusion matrix. Design target: approximately 78% top-1 and 92% top-5 accuracy for the built-to-order training run. No accuracy is claimed as measured until the training run is executed for the order; the report documents the actual achieved figures.
Delivery information

Built-to-order project. Delivery timeline is shared after order confirmation based on current queue.

Support terms

Complete documentation, setup guide, and viva preparation included. Support for setup and explanation provided.

Download free synopsis (PDF)

Enter your name and WhatsApp number — the synopsis PDF downloads immediately. We may send occasional project updates on WhatsApp; no spam.

Get a quotation