Fashion Recommendation System
PrototypeA visual similarity search engine for fashion products: it turns catalog images into ResNet50 embeddings and returns the most visually similar items with nearest-neighbor search, wrapped in a Streamlit app.
- Python
- TensorFlow
- ResNet50
- scikit-learn
- Streamlit
A visual similarity search engine for fashion products. Instead of matching on tags or keywords, it looks at the image itself: each product photo is passed through a ResNet50 network to produce an embedding, and a nearest-neighbor search returns the items that look most alike. The whole thing is served through a Streamlit app so you can upload or pick an item and see similar products back.
What it does
You upload a photo of a product, like a shirt, a watch, or a backpack, and the app returns the 5 most visually similar items from a catalog of 44,000+ product images (the Kaggle Fashion Product Images dataset). No tags, no keywords, just what the item looks like.
How it works
- Feature extraction: every catalog image goes through a ResNet50 network (pretrained on ImageNet, classifier head removed) followed by Global Max Pooling. Each image becomes a 2048-dimensional embedding that captures color, texture, shape, and pattern.
- Normalization: embeddings are L2-normalized so Euclidean distance works as a measure of visual similarity.
- Indexing: all embeddings go into a scikit-learn
NearestNeighborsindex. Extraction runs in batches with NumPy so the full catalog can be processed in one go. - Query: the uploaded image is embedded the same way, and the index returns its nearest neighbors, shown back in the Streamlit app.
What I learned
Pretrained models go a long way. I didn’t train anything from scratch, and the results are still good because ResNet50 already knows what visual features matter. The real work was the pipeline around it: batching extraction over tens of thousands of images, keeping filenames aligned with embeddings, and making the lookup fast enough to feel instant in the app.
Next I’d swap brute-force search for an approximate index like FAISS and add filters for category and color.