A standalone HTTP web server that can recommend similar fashion outfits, based on the the Rent the Runway inventory.
Uses multiple neural networks (with a ResNet50 backbone) behind the scenes to classify inputs by {category, texture, fabric, parts, shape}. The resulting embeddings are then used to query a pre-built nearest neighbors index for similar outputs.
Use pip to install the requirements.
Note: This repo works on Linux environment only as fastai and Annoy are NOT supported on other OS as far as I know so far.
pip install -r requirements.txtTo run the web server, simply execute flask with the main recommender app:
FLASK_APP=recommender_app flask run
flask run --host=0.0.0.0
FLASK_APP=recommender_app flask run --host=148.181.168.85The main predictor can also be used independently of Flask, by calling get_recs:
from predict import Predict
fashion = Predict()
recs = fashion.get_recs(img_path)- fast.ai - Deep learning library used for CNN training
- Flask - Python HTTP server
- DeepFashion - Large-scale Fashion dataset used to train the classifiers
- Annoy - Efficient Approximate Nearest Neighbors library
- Outfits - Example images that can be used to test the recommendation system
- recommender_app.py - Spins up a Flask App to serve recommendations
- predict.py - Recommendation System
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.