Skip to content

Creates a dataset, learns to classify shapes using the generated dataset and a GUI app that uses the trained Shape Classifier Model

License

Notifications You must be signed in to change notification settings

CSjianbel/Shape-Classifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Shape-Classifier

Machine Learning Model that accurately classifies shapes such as circles, triangles, squares and rectangles.

Clone

git clone "https://github.com/CSjianbel/Shape-Classifier.git"

Project Overview

  1. Generate the Data
    • Generate n random images of shapes
  2. Create and train a Convolutional Neural Network
    • Load in the dataset
    • Feed into the CNN
    • Make Tweaks on CNN model to improve accuracy/performance
  3. Python Application that utilizes the shape classifier model
    • 3 Modes:
      1. User provides image to be classified
      2. GUI application that let's the user draw shapes and the model classifies the drawing
      3. Webcam, the user can turn on their camera and show hand-drawn shapes to the camera for the model to classify

Setup

pip install -r requirements.txt

Generate Images Data

python generate_shape_images.py

Train and Save a CNN model

python shape_classifier_model.py

python shape_classifier_model.py [model.h5]

Use the CNN model

Default model will be in Models/shape_classifier_model.h5.

python shape_classifier.py

python shape_classifier.py --webcam

python shape_classifier.py [path to image]

python shape_classifer.py -m [path to model]

Supported Shapes

  • Circles
  • Triangles
  • Squares
  • Rectangles

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT

A Project by Jiankarlo A. Belarmino

About

Creates a dataset, learns to classify shapes using the generated dataset and a GUI app that uses the trained Shape Classifier Model

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages