Git Product home page Git Product logo

simplecnn_buttonstateclassifier's Introduction

Simple CNN Button On-Off Classifier

This project shows an example of how to use a Keras model to implement classification using a simple CNN for images.

Installation

  1. Pull the code
  2. Create a Python environment and activate it

e.g. virtualenv -p python3 .venv source .venv/bin/activate

  1. Install requirements

e.g. pip install -r requirements.txt

  1. There are 2 notebooks (main.ipynb, augment_button/augment_button.ipynb), one for the training process and the other one for the image augmentation process
  • The augmentation is done by using the Augmentor package
  1. To generate the images, run the generator notebook and copy the files from augment_button/images into dataset/

Value/class names are taken from the folder name in train, which maps the values of the variable MAP_CLASSES in main.ipynb e.g.

  1. main.ipynb expects images to be .jpg instead of .png resulting from the augmentation. You can use the following command:

e.g. mogrify -format jpg *.png

  1. Once images are augmented, you can manually create a train/test split as you want
  • The dataset/train folder has one folder for each class
  • The dataset/test folder has all the images dropped-in. Take into account that the class names for this images are taken from the image name
    • e.g. off_1.jpg, on_153.jpg

The classification predicts the state of the button e.g. Reference

Folder structure

simplecnn_buttonstateclassifier's People

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.