Giter Site home page Giter Site logo

coffee-ai's Introduction

This is how you should structure your data models.

dataset/
    train/
        unripe/
            unripe_image1.jpg
            unripe_image2.jpg
            ...
        semi-ripe/
            semi_ripe_image1.jpg
            semi_ripe_image2.jpg
            ...
        ripe/
            ripe_image1.jpg
            ripe_image2.jpg
            ...
        overripe/
            overripe_image1.jpg
            overripe_image2.jpg
            ...
    test/
        unripe/
            unripe_image1.jpg
            unripe_image2.jpg
            ...
        semi-ripe/
            semi_ripe_image1.jpg
            semi_ripe_image2.jpg
            ...
        ripe/
            ripe_image1.jpg
            ripe_image2.jpg
            ...
        overripe/
            overripe_image1.jpg
            overripe_image2.jpg
            ...

This works best with NVIDIA GPUs that supports CUDA.

Installation

  • Install the required packages
    pip install -r requirements.txt
  • Install CUDA and cuDNN if you have an NVIDIA GPU

Usage

  • Inorder to get accurate results, run trainer.py and strucutre your dataset as shown above
  • To run the model on your own dataset, change the path in trainer.py to your dataset path
  • To use the trained model replace the model variable as below
      from keras.models import load_model
    
      # Load the saved model from the .h5 file
      model = load_model('path/to/model.h5')
    
      # Use the loaded model to make predictions
      predictions = model.predict(data)

Setup

  • Open a terminal inside the directory and run the python venv module to create a virtual environment
    python -m venv venv
    • Activate the virtual environment
      • Windows
        venv\Scripts\activate
      • Linux
        source venv/bin/activate
  • Install the required packages
    pip install -r requirements.txt
  • Install CUDA and cuDNN if you have an NVIDIA GPU (OPTIONAL)
  • Run the trainer.py file
    cd trainer && python trainer_gui.py
  • After training the models you can run the main file
    cd .. && python main.py

coffee-ai's People

Contributors

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