Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SelfLearningDrawingBot

Run on browser:

Click me

(Note: Audio component of app does not work on browser version. If you would like to hear the audio (It's just a robot talking), feel free to download the app)

Description

Given 3 categories, shapes, fruits, and vehicles, each of which contain 4 drawing options, the user must choose a category then draw as many of the 4 drawing objects. The drawing bot then predicts what the user tried to draw. If the prediction is correct, the drawing bot adds the drawings into its database and learns from this new data.

Structure

  1. The model is trained in python using sklearn's KNeighborsClassifier. (trainingmodel/model.py)
  2. The dataset used to train the model is from Googles Quickdraw game (trainingmodel/Data.txt)
  3. A web app is created using Flask. It preprocesses the drawings sent from the front-end into a form readable by the trained model, using opencv, and then sends the trained model's prediction back to the front end.
  4. The front-end is made using html, css and js. Html's canvas is used to draw and the drawings are converted into a datauri and sent to the flask server.

Demo

Short demonstartion

Using drawing bot

Installation

One must also have git lfs downloaded to properly run this app. Download it from this link. Then open command prompt and type "git lfs install", to install.

Go to the directory you want to save this project in, and type

git lfs clone https://github.com/stalhaali/SelfLearningDrawingBot.git

See (requirements.txt) for all the required libraries. Open command prompt and type "pip install -r requirements.txt" (for each requirement). Now you can run the app :)

How to run

Once in the directory,

python run.py

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages