CoolFace
Apppublic

issa-ennab/quickdraw-api

sourceHugging Facemitupdated 10mo agoView on Hugging Face
0likes
App README

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

bash
# 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

csharp
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