In this Tutorial, I will use YOLO v5 to detect the various Yoga Poses.
Using YOLO(You Only Look Once ) we will be making an object detector to detect yoga poses we will be using a Dataset I made using labelimg the labelled data set can be found on Kaggle. The Dataset, as well as the Notebook, can be found on Github.
Making the Dataset
I used the existing dataset I found on Kaggle. And then labelled the data using Bounding boxes using labelimg. If you like the dataset I made give an upvote to the original dataset I acquired the data from. This is time-consuming and I was not able to acquire sufficient data for all the classes. If anyone is up for collaboration for the completion of this project please contact me on LinkedIn.
Training the Model
Since it is recommended that a pretrained network is used I used the YOLO Version 5 pretrained models. I recommend using a GPU or an online notebook such as Kaggle or collab to run it. We order the dataset to be trained by the model. I used the small S model to run on my local machine and the larger X model to run on Kaggle using their GPU. Both the models ran in about five to ten minutes on the CPU and GPU respectively. To find out more about the model go to the official YOLO GitHub.
These were the results I obtained from the data.
As you can see the results were correctly able to identify certain classes and not others. This is due to class imbalance. The graph down below shows the classes and their relative occurrence
As you can see the classes Downdog and Goddess pose have far more instances in the dataset. Due to time constraints, I wasn’t able to label enough images of each class. The recommended amount for each class is 100–200 for five classes. Those who wish to collaborate with me to complete this project can contact me on LinkedIn