quickdraw-api / README.md
issaennab
Deploy QuickDraw API with trained model and comprehensive logging
d2a2955
metadata
title: QuickDraw Sketch Recognition API
emoji: ๐ŸŽจ
colorFrom: blue
colorTo: purple
sdk: docker
pinned: false
license: mit

QuickDraw Sketch Recognition API

Real-time sketch recognition API for VR/AR applications. Recognizes 46 different hand-drawn objects using a CNN trained on Google's QuickDraw dataset.

๐ŸŽฏ Try It Out

Once the Space is running, you can:

Test via Swagger UI

Visit the API docs at: https://issa-ennab-quickdraw-api.hf.space/docs

Test via cURL

# Health check
curl https://issa-ennab-quickdraw-api.hf.space/health

# Get supported classes
curl https://issa-ennab-quickdraw-api.hf.space/classes

# Make a prediction (replace with your base64 image)
curl -X POST https://issa-ennab-quickdraw-api.hf.space/predict/base64 \
  -H "Content-Type: application/json" \
  -d '{"image_base64": "YOUR_BASE64_IMAGE", "top_k": 3}'

Unity/VR Integration

private string apiUrl = "https://issa-ennab-quickdraw-api.hf.space/predict/base64";

๐Ÿ“‹ Supported Classes (46 total)

Animals: cat, dog, bird, fish, bear, butterfly, spider
Buildings: house, castle, barn, bridge, lighthouse, church
Transportation: car, airplane, bicycle, truck, train
Nature: tree, flower, sun, moon, cloud, mountain
Objects: apple, banana, book, chair, table, cup, umbrella
Body Parts: face, eye, hand, foot
Shapes: circle, triangle, square, star
Tools: sword, axe, hammer, key, crown
Music: guitar, piano

๐Ÿ”ง API Endpoints

  • GET / - API information
  • GET /health - Health check
  • GET /classes - List all supported classes
  • POST /predict - Upload image file for prediction
  • POST /predict/base64 - Send base64 encoded image (recommended for VR)

๐ŸŽฎ Perfect For

  • VR/AR drawing applications
  • Educational games
  • Real-time sketch recognition
  • Interactive art tools

๐Ÿ“Š Model Performance

  • Accuracy: 84.89% on validation set
  • Inference Time: ~50-80ms on CPU
  • Model Size: 2.9 MB
  • Input: 28x28 grayscale images

๐Ÿ“– Full Documentation

GitHub Repository

๐Ÿš€ Built With

  • FastAPI for the REST API
  • TensorFlow/Keras for the CNN model
  • Google QuickDraw dataset
  • Docker for deployment