This project is a Flask App that loads a Keras model that classifies images, trained at Teachable Machine, so the project can be used as a reference for other projects.
- Pull the code
- Create a Python environment and activate it
e.g.
virtualenv -p python3 .venv
source .venv/bin/activate
- Install requirements
e.g.
pip install -r requirements.txt
- Run the server
e.g.
python server.py
The server accepts an image via POST, adding the image as form-data with the key imagefile e.g.
In the models folder, there is a keras model .h5
and a script that converts it to .pb
If you intend to use the model inside Unity, remember to rename the .pb
file to .bytes