Simple Django app for predicting image with trained Fashion MNIST data model
Assuming python3, github already installed on your computer, and pip3 is active
# installing virtualenv for isolated environment
pip3 install virtualenv
# cloning from github to your development folder
git clone https://github.com/ntgai/django-tensorflow-fashion.git
# virtualenv activation
cd django-tensorflow-fashion
source bin/activate
# installing requirements
cd tensor
pip3 install -r requirements.txt
# migrate to dbsqlite
python3 manage.py migrate
# running on localserver
python3 manage.py runserver
127.0.0.1 - confirms tensorflow installed and shows version
127.0.0.1:8000/predict - simple form, where you enter real picture object and url from web, and it predicts with pretrained model.
Fashion MNIST
Real: Ankle Boot - https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQANW2BEM-EtuoCnbSJY1E5OXnVF3W78vFaRT3E8UKOyo5F4eMx&s
Predicted: Ankle Boot
Real: Pullover - https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTEcUX7z4NKVR2xR8ndWZXf0ajJIzX7enrF9tvIBoQRH85TRfnl&s
Predicted: Pullover
Public
Real: Trousers - https://cdn.shopify.com/s/files/1/1407/1106/products/craghoppers-short-trousers.jpg?v=1556544776
Predicted: Bag
As noted in academic papers, this model is not great for the public picture which is outside in fashion mnist dataset. This is a future task to be able to convert any picture to fashion mnist shape and form.