Giter Site home page Giter Site logo

ball-recognizer's Introduction

Sports Ball Recognizer

Project Objective:

The objective of the project is to develop an image classification model that accurately classifies 20 different types of sports balls, including Soccer Ball, Cricket Ball, Basketball Ball, Field Hockey Ball, Volleyball, Tennis Ball, Rugby Ball, Baseball, Table Tennis Ball (Ping Pong), American Football, Golf Ball, Handball, Pool Ball, Water Polo Ball, Softball, Bocce Ball, Bowling Ball, Squash Ball, Lacrosse Ball, and Wiffleball.
The model should cover the entire process, from data collection, cleaning, training, deployment, and API integration, and provide a comprehensive solution for sports ball classification. The goal is to achieve a high level of accuracy in classifying sports balls, making it useful for various applications such as ball recognition in sports events, product identification in retail, and sports equipment classification.

Data Preparation:

Dataset Preparation is a crucial step in the development of any image classification model. Great care is taken to ensure the highest quality of data for training and testing the model.

Data Collection: The dataset is collected by downloading images from DuckDuckGo using the sport ball's name as the search term.
DataLoader: To set up the DataLoader, the fastai DataBlock API is used which is a powerful and flexible library for loading and preprocessing data.
Data Augmentation: To further improve the model's performance, built-in data augmentation techniques from fastai which operate on the GPU for faster processing is utilized.
For more details on the dataset preparation process, please refer to the notebook notebooks/data_prep.ipynb which provides a step-by-step guide and in-depth explanations of the techniques used.

Model Optimization and Data Processing

Training: A resnet34 model was fine-tuned for 5 epochs, repeated 3 times resulting in an accuracy of approximately 95%.
Data Cleaning: Data cleaning was an integral and time-consuming aspect of the model development process. Since the data was collected from the internet, there were many irrelevant and noisy images. Furthermore, some images contained errors. The fastai ImageClassifierCleaner was used to clean and update the data after each training or fine-tuning iteration, except for the final iteration which was used to train the final model.

Model Deployment:

The model was deployed to the HuggingFace Spaces Gradio App, where it can be accessed and tested by users. The implementation details and code can be found in the deployment folder or by this link.

Deployment of API on GitHub Pages Website

The deployed model API has been integrated into this GitHub Pages Website, allowing users to easily access and test the model's capabilities. The implementation details, usage instructions, and other relevant information can be found in the docs folder for reference.

ball-recognizer's People

Contributors

naosher98 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.