Total of 3364 images of 19 different types of sports ball has been scraped. data folder contains the datapath.
An image classification model from data collection, cleaning, model training, deployment and API integration.
The goal of this project is to classify 19 different types of Sports Ball are played in different sports all over the world.
The types are following:
- Soccer Ball
- American Football
- Tennis Ball
- Base Ball
- Volleyball
- Bowling Ball
- Golf Ball
- Beach Ball
- Pool Ball
- Hockey Puck
- Badminton
- Water Polo
- Squash
- Wiffleball
- Cricket Ball
- Sepak Takraw
- Table Tennis Ball
- taqiyah cap
- Basket Ball
- Lawn Bowls
Clone the repo
git clone https://github.com/Roy72/Sportsball_recognizer.git
Data Collection: Downloaded from DuckDuckGo using term name
DataLoader: Used fastai DataBlock API to set up the DataLoader.
Data Augmentation: fastai provides default data augmentation which operates in GPU.
Details can be found in notebooks\README.md
, where data_prep.ipynb
can be found.
Training: Fine-tuned a resnet34 model for 5 epochs (1 time) & 2 epochs (2 times) and got upto ~98% accuracy.
Data Cleaning: This part took the highest time. Since I collected data from browser, there were many noises. Also, there were images that contained. I cleaned and updated data using fastai ImageClassifierCleaner. I cleaned the data each time after training or finetuning, except for the last time which was the final iteration of the model.
Confusion Matrix: This matrix shows the how much the model can accurately predict the images. After training the final model confusion matrix seems fine.
Deatils can be found in notebooks\README.md
,where training_and_data_cleaning.ipynb
can be found.
I deployed to model to HuggingFace Spaces Gradio App. The implementation can be found in deployment
folder or here.
The deployed model API is integrated here in GitHub Pages Website. Implementation and other details can be found in docs
folder.
Thanks for observing my project on SprotsBall Recognizer. For any kind of query and suggestion contact with my mail address : anik.roya11@gmail.com