Upload README.md with huggingface_hub
Browse files
README.md
ADDED
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language: en
|
3 |
+
license: mit
|
4 |
+
tags:
|
5 |
+
- computer-vision
|
6 |
+
- fashion
|
7 |
+
- outfit-recommendation
|
8 |
+
- deep-learning
|
9 |
+
- resnet
|
10 |
+
- vision-transformer
|
11 |
+
---
|
12 |
+
|
13 |
+
# Dressify Outfit Recommendation Models
|
14 |
+
|
15 |
+
This repository contains the trained models for the Dressify outfit recommendation system.
|
16 |
+
|
17 |
+
## Models
|
18 |
+
|
19 |
+
### ResNet Item Embedder
|
20 |
+
- **Architecture**: ResNet50 with custom projection head
|
21 |
+
- **Purpose**: Generate 512-dimensional embeddings for fashion items
|
22 |
+
- **Training**: Triplet loss with semi-hard negative mining
|
23 |
+
- **Input**: Fashion item images (224x224)
|
24 |
+
- **Output**: L2-normalized 512D embeddings
|
25 |
+
|
26 |
+
### ViT Outfit Compatibility Model
|
27 |
+
- **Architecture**: Vision Transformer encoder
|
28 |
+
- **Purpose**: Score outfit compatibility from item embeddings
|
29 |
+
- **Training**: Triplet loss with cosine distance
|
30 |
+
- **Input**: Variable-length sequence of item embeddings
|
31 |
+
- **Output**: Compatibility score (0-1)
|
32 |
+
|
33 |
+
## Usage
|
34 |
+
|
35 |
+
```python
|
36 |
+
from huggingface_hub import hf_hub_download
|
37 |
+
import torch
|
38 |
+
|
39 |
+
# Download models
|
40 |
+
resnet_path = hf_hub_download(repo_id="Stylique/dressify-models", filename="resnet_item_embedder_best.pth")
|
41 |
+
vit_path = hf_hub_download(repo_id="Stylique/dressify-models", filename="vit_outfit_model_best.pth")
|
42 |
+
|
43 |
+
# Load models
|
44 |
+
resnet_model = torch.load(resnet_path)
|
45 |
+
vit_model = torch.load(vit_path)
|
46 |
+
```
|
47 |
+
|
48 |
+
## Training Details
|
49 |
+
|
50 |
+
- **Dataset**: Polyvore Outfits (Stylique/Polyvore)
|
51 |
+
- **Loss**: Triplet margin loss
|
52 |
+
- **Optimizer**: AdamW
|
53 |
+
- **Mixed Precision**: Enabled
|
54 |
+
- **Hardware**: NVIDIA GPU with CUDA
|
55 |
+
|
56 |
+
## Performance
|
57 |
+
|
58 |
+
- **ResNet**: ~25M parameters, fast inference
|
59 |
+
- **ViT**: ~12M parameters, efficient outfit scoring
|
60 |
+
- **Memory**: Optimized for deployment on Hugging Face Spaces
|
61 |
+
|
62 |
+
## Citation
|
63 |
+
|
64 |
+
If you use these models in your research, please cite:
|
65 |
+
|
66 |
+
```bibtex
|
67 |
+
@misc{dressify2024,
|
68 |
+
title={Dressify: Deep Learning for Fashion Outfit Recommendation},
|
69 |
+
author={Stylique},
|
70 |
+
year={2024},
|
71 |
+
url={https://huggingface.co/Stylique/dressify-models}
|
72 |
+
}
|
73 |
+
```
|