Skip to content

leahnagy/yoga_pose_classifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 

Repository files navigation

Deep Learning & Neural Networks Project

Yoga Pose Classifier

Created By: Leah Nagy

Contents:

  1. Presentation Slides
  2. Data Preprocessing
  3. Baseline Model: Logistic Regression
  4. Baseline Model: Convolutional Neural Network
  5. Transfer Learning with VGG16
  6. Transfer Learning with TensorFlow's MoveNet Model

Project Description

In the wake of the Covid-19 pandemic, the demand for AI-integrated fitness applications has surged. These applications, leveraging computer vision and deep learning, offer real-time feedback for users, thereby improving their yoga pose alignment. This project forms the initial phase of research directed at developing such a tool, specifically focusing on classifying five distinct yoga poses using neural networks. The most successful model was developed employing transfer learning.

Dataset

The dataset comprises 1,549 images depicting five different yoga poses:

  1. Warrior2
  2. Downward Dog
  3. Tree
  4. Goddess
  5. Plank

All images were preprocessed to a uniform size of (224, 224, 3) for compatibility with neural networks. The original dataset is hosted on Kaggle.

Methodology

Logistic Regression Baseline Model:

  1. Converted images into an array of vectors with uniform dimensions (224x224) and three color channels.
  2. Divided data into train/validation/test sets.
  3. Applied Principal Component Analysis (PCA) for dimensionality reduction.
  4. Trained and fitted a logistic regression model using the training data.
  5. Evaluated model performance on the validation set.

Convolutional Neural Network

  1. Preprocessed the images.
  2. Constructed a baseline convolutional neural network.
  3. Introduced dropout layers to mitigate overfitting.
  4. Applied early stopping to prevent overtraining.
  5. Implemented transfer learning using VGG16 & MoveNet models.

Results

Logistic regression proved inadequate for accurate image classification due to the high dimensional feature space (pixels). Despite applying dimensionality reduction techniques, the performance was subpar. Convolutional neural networks demonstrated superior performance for this task.

Although the baseline convolutional neural network outperformed logistic regression, overfitting was still a concern and could be mitigated by employing a larger dataset. Transfer learning combined with convolutional neural networks offered the highest accuracy. TensorFlow's MoveNet model, designed to identify 17 body keypoints, excelled in classifying different body positions, making it the best performer.

Final Model Performance (CNN using TensorFlow's MoveNet model):

  • Training Accuracy: 0.9167
  • Validation Accuracy: 0.9394
  • Testing Accuracy: 0.9680

Tools Utilized

  • Numpy and Pandas for data manipulation
  • Scikit-learn for modeling
  • Keras and TensorFlow for deep learning modeling
  • Matplotlib and Seaborn for plotting

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published