For Flipkart Grid 5.0, it's the biggest edition yet, for the Software Development Track A standalone HTTP web server that can recommend similar fashion outfits.
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 neighbours index for similar outputs.
Use pip to install the requirements.
pip install -r requirements.txt
To run the web server, simply execute flask with the main recommender app:
FLASK_APP=recommender_app flask run
The 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
- Notebooks_CNNs - Source code (.ipynb) for training CNNs
- Notebooks_Recommender - Source code (.ipynb) for building Annoy index and recommendations
- 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