Upload folder using huggingface_hub
Browse files- README.md +70 -0
- best_model_v2.pt +3 -0
- product_embeddings.pkl +3 -0
- scene_embeddings.pkl +3 -0
README.md
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
tags:
|
| 4 |
+
- fashion
|
| 5 |
+
- recommendation
|
| 6 |
+
- pytorch
|
| 7 |
+
- image-to-image
|
| 8 |
+
datasets:
|
| 9 |
+
- shop-the-look
|
| 10 |
+
language:
|
| 11 |
+
- en
|
| 12 |
+
---
|
| 13 |
+
|
| 14 |
+
# complete the look - fashion compatibility model
|
| 15 |
+
|
| 16 |
+
scene-based complementary product recommendation model. given an outfit photo, find products that match the style.
|
| 17 |
+
|
| 18 |
+
## model description
|
| 19 |
+
|
| 20 |
+
trained on the [shop the look dataset](https://github.com/kang205/STL-Dataset) with fashion SigLIP embeddings.
|
| 21 |
+
|
| 22 |
+
### architecture
|
| 23 |
+
- **input**: fashion SigLIP embeddings (768-dim)
|
| 24 |
+
- **scene encoder**: MLP with residual blocks → 256-dim
|
| 25 |
+
- **product encoder**: MLP with category embeddings → 256-dim
|
| 26 |
+
- **training**: contrastive + triplet loss with hard negative mining
|
| 27 |
+
|
| 28 |
+
### performance
|
| 29 |
+
|
| 30 |
+
| metric | score |
|
| 31 |
+
|--------|-------|
|
| 32 |
+
| R@1 | 12.3% |
|
| 33 |
+
| R@5 | 28.6% |
|
| 34 |
+
| R@10 | 36.6% |
|
| 35 |
+
| MRR | 0.204 |
|
| 36 |
+
|
| 37 |
+
## files
|
| 38 |
+
|
| 39 |
+
- `best_model_v2.pt` - model weights (37MB)
|
| 40 |
+
- `product_embeddings.pkl` - pre-computed product embeddings (110MB, 36K products)
|
| 41 |
+
- `scene_embeddings.pkl` - pre-computed scene embeddings (87MB, 29K scenes)
|
| 42 |
+
|
| 43 |
+
## usage
|
| 44 |
+
|
| 45 |
+
```python
|
| 46 |
+
import torch
|
| 47 |
+
import pickle
|
| 48 |
+
|
| 49 |
+
checkpoint = torch.load("best_model_v2.pt", map_location="cpu", weights_only=False)
|
| 50 |
+
# see github repo for full code
|
| 51 |
+
|
| 52 |
+
with open("product_embeddings.pkl", "rb") as f:
|
| 53 |
+
product_embeddings = pickle.load(f)
|
| 54 |
+
```
|
| 55 |
+
|
| 56 |
+
## code
|
| 57 |
+
|
| 58 |
+
full training code and web demo: [github repo](https://github.com/USER/complete-the-look)
|
| 59 |
+
|
| 60 |
+
## citation
|
| 61 |
+
|
| 62 |
+
based on:
|
| 63 |
+
```bibtex
|
| 64 |
+
@inproceedings{kang2019complete,
|
| 65 |
+
title={Complete the Look: Scene-based Complementary Product Recommendation},
|
| 66 |
+
author={Kang, Wang-Cheng and Kim, Eric and Leskovec, Jure and Rosenberg, Charles and McAuley, Julian},
|
| 67 |
+
booktitle={CVPR},
|
| 68 |
+
year={2019}
|
| 69 |
+
}
|
| 70 |
+
```
|
best_model_v2.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f8ea650daf368ed2db9c0037b0eb06d9ac787780a969eb46e9fbdea76c062863
|
| 3 |
+
size 38396227
|
product_embeddings.pkl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6bb72fe85a731311957c081099317583e51b655a572dba5176daa95713c96e7a
|
| 3 |
+
size 115086425
|
scene_embeddings.pkl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fe1c7e1dc5d2a0e26af27703d93d9edda82b4837c47e1c4fdc95b2bce60fbd08
|
| 3 |
+
size 90445039
|