This repo is a server I create to support my thesis project, Magical Pencil, in NYU ITP.
My game will send the picture that the user draws to this server, and acquire a prediction.
It runs a Keras model trained with Google Quick Draw dataset and ImageNet.
The accuracy of the prediction is 0.89.
Make sure you have installed docker. ref
docker-compose up
After starting the server, visiting the sketch, click run and draw something:
https://editor.p5js.org/yangyang/sketches/DgHa-bMDT
Before install, it's suggested to create a venv with your favorite tool
make install
make start
Post the Base64 encoded image to this API within the form[data
]. The API will return the prediction in a JSON array.
The other APIs are designed for my game, so I'll skip documenting them.