68b9adef1a023a08097967527a81d1c2a6985317
shapeAI
Forked from @quentinbkk's shape ai
Shape AI is a web app utilizing a classifier model to identify user drawn geometric shapes. Currently, the model can identify drawn squares, rectangles, circles, and triangles.
Running the App 🏃
Docker 🐋
git clone https://github.com/craisined/shapeAI
cd shapeAI
docker build -t shapeAI .
docker run -p 3000:3000 shapeAI
Manually 🖥️
git clone https://github.com/craisined/shapeAI
cd shapeAI
python3 -m venv env
source env/bin/activate
cd app
pip install -r requirements.txt
gunicorn -b 0.0.0.0:3000 app:app
Model Training 💪
OpenCV is used to synthetically generate training data in training/generate_shapes.py.
Data is stored in training/data - add and modify the folder to add training cases.
Run training/train.py to train the model - exports to shape_model.keras.
Technical Overview 👨💻
Abilities
- High training accuracy - model consistently trains with accuracy > 99%
- Fast speed - model has sub 50ms response times
- Synthetic data and preproccessing - generates training data and sends user drawing from website to language model
Frameworks
- Model built with Tensorflow and Keras
- Image manipulation built using OpenCV and Pillow
- Backend built using Flask
- Frontend built using vanilla HTML, CSS, JS
Changes from original fork
- Web UI and Flask backend added
- Synthetic training data altered to produce a more human friendly model
WIP
- Low accuracy on certain cases - further improve synthetic shape generation
- Add confidence for classification - do not display a result if confidence is low
- Imporve mobile UI to further prevent scroll while drawing
- Expand dataset to various alphanumerical characters
Description
Languages
Python
53.9%
JavaScript
20.3%
HTML
12.1%
CSS
11.2%
Dockerfile
2.5%