Created By: Leah Nagy
- Presentation Slides
- Data Preprocessing
- Baseline Model: Logistic Regression
- Baseline Model: Convolutional Neural Network
- Transfer Learning with VGG16
- Transfer Learning with TensorFlow's MoveNet Model
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.
The dataset comprises 1,549 images depicting five different yoga poses:
- Warrior2
- Downward Dog
- Tree
- Goddess
- 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.
Logistic Regression Baseline Model:
- Converted images into an array of vectors with uniform dimensions (224x224) and three color channels.
- Divided data into train/validation/test sets.
- Applied Principal Component Analysis (PCA) for dimensionality reduction.
- Trained and fitted a logistic regression model using the training data.
- Evaluated model performance on the validation set.
Convolutional Neural Network
- Preprocessed the images.
- Constructed a baseline convolutional neural network.
- Introduced dropout layers to mitigate overfitting.
- Applied early stopping to prevent overtraining.
- Implemented transfer learning using VGG16 & MoveNet models.
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
- Numpy and Pandas for data manipulation
- Scikit-learn for modeling
- Keras and TensorFlow for deep learning modeling
- Matplotlib and Seaborn for plotting