DoodleAI: sketch recognition API
A CNN that recognises hand-drawn sketches in 120 categories, served as an API. 92% top-1 accuracy. It powers the AI Playground on this site.
- Python
- Flask
- ONNX Runtime
- TensorFlow / Keras
- Docker
- GitHub Actions
- Hugging Face Spaces
- Kaggle
About the project
DoodleAI is a REST API that recognises hand-drawn sketches. A convolutional neural network trained on Google's Quick, Draw! dataset classifies a drawing into one of 120 categories and returns the top three guesses.
It powers the AI Playground on this site. The browser crops and redraws your sketch to match the training data, and the site's API routes call DoodleAI server-side, so credentials never reach the browser.
The model was trained on a free Kaggle GPU (T4 x2) and is served with ONNX Runtime from a Flask app in Docker, deployed to Hugging Face Spaces by GitHub Actions.
Highlights
- 92.09% top-1 and 98.41% top-3 accuracy on 120,000 held-out drawings (1,000 per class).
- Probability calibration cut the expected calibration error from 0.0656 to 0.0194.
- A training pipeline with experiment records and a gate that decides which model reaches production.
- Authentication and per-IP rate limiting on every endpoint except the public health probe.