(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)
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.
- The model is trained in python using sklearn's KNeighborsClassifier. (trainingmodel/model.py)
- The dataset used to train the model is from Googles Quickdraw game (trainingmodel/Data.txt)
- 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.
- 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.
Short demonstartion
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.gitSee (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 :)
Once in the directory,
python run.py