Flower Classifier App is an image recognition app written in Python using Flask and PyTorch.
The network state can be loaded from checkpoints saved after training using my network training repo.
- Python: 3.5.2
- gunicorn: 19.9.0
- flask: 1.0.2
- flask-uploads: 0.2.1
- pytorch: 0.4.0
- torchvision: 0.2.1
- Install dependencies from
requirements.txt
into your environment. - Create a model state dict that your network will load on startup.
- You can train a network using my network training repo here.
- Save a checkpoint (model state dict only) after training.
- Then update your local
app.py
(if needed) to instantiate your network using the same hyperparameters used when training your network.
- You can train a network using my network training repo here.
- Copy
app_config_template.ini
toapp_config.ini
and fill in properties for your env (see descriptions below).
Name | Description | Required |
---|---|---|
state.dict.file.path | The file path to the model state dict to load on startup. | Yes |
state.dict.download.url | The URL where the application can download a model state dict to use for the network. It will be downloaded to state.dict.file.path. | No (as long as the checkpoint file exists in the path specified in state.dict.file.path) |
- Execute
python app.py
See ops/README.md for instructions on how to serve this application using Gunicorn and Nginx on Ubuntu 16.04.
- Add asychronous calling of classifier & graph loading after initial page load to test images page
- Improve C3 graph style