Git Product home page Git Product logo

mushroom-classifier-wrapper's Introduction

Mushroom Classifier

Introduction:

Embarking on a college project, I found inspiration in a mushroom image dataset while exploring public Kaggle datasets. The challenge was intriguing: to classify mushrooms using machine learning. Armed with Google Colab Premium's robust GPU support, including Tesla T4 and NVIDIA A100, I aimed to expedite the training process for my models, which proved to be immensely beneficial.

Dataset Exploration:

The dataset, comprising around 7000 labeled images, initially posed a challenge as it was formatted for object detection. To make it suitable for training classification models, I wrote a python script that used the COCO-formatted JSON to create subdirectories for each class and put the images in them accordingly. After converting it to the correct format, I resplit them so that 80% of the images would be used for training purposes, leaving 20% for validation or testing.

Model Training Attempts:

With minimal machine learning knowledge, I delved into object detection and classification. My first attempt involved building a custom model using TensorFlow. Although the process was straightforward, the model's output yielded only a 40% accuracy on the validation dataset, far from satisfactory for this project's standards.

Shift to Existing Models:

Undeterred, I shifted my focus to existing classification models. Detectron2, an initial choice, faced dependency version conflicts on Colab, prompting me to explore alternatives. The contenders were EfficientNetV2 and YOLOv8. While EfficientNetV2 reached a 70% accuracy, YOLOv8 outperformed it with a top1 accuracy of 90% and a top5 accuracy exceeding 98% on the validation dataset.

Model Implementation and Backend Development:

Having chosen YOLOv8 for its superior performance, the next step was implementing the trained model. I opted for Flask, a Python-based backend technology, to set up an HTTP endpoint. This endpoint receives image inputs from a frontend, runs predictions using the model, and sends the results back to the client. The backend's simplicity and compatibility made it an ideal choice for seamless integration.

Frontend Development:

To complement the backend, I designed a mobile app for user convenience. Leveraging my prior experience, I chose Flutter for its cross-platform capabilities. Utilizing BLoC state management, I crafted a clean and sophisticated user interface. The mobile app enables users to capture images, sending them to the backend for predictions through the trained model.

Conclusion:

In summary, the mushroom classifier project has reached its conclusion with the integration of the Flutter app. Users can easily capture images through the mobile app and receive accurate-enough predictions from the trained model. Although not intended for production use, the attained accuracy makes it able to see the goal of the project.

Subproject-repositories:

Resources:

mushroom-classifier-wrapper's People

Contributors

ger0nymo 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.