|
|
--- |
|
|
language: en |
|
|
license: mit |
|
|
tags: |
|
|
- computer-vision |
|
|
- fashion |
|
|
- outfit-recommendation |
|
|
- deep-learning |
|
|
- resnet |
|
|
- vision-transformer |
|
|
--- |
|
|
|
|
|
# Dressify Outfit Recommendation Models |
|
|
|
|
|
This repository contains the trained models for the Dressify outfit recommendation system. |
|
|
|
|
|
## Models |
|
|
|
|
|
### ResNet Item Embedder |
|
|
- **Architecture**: ResNet50 with custom projection head |
|
|
- **Purpose**: Generate 512-dimensional embeddings for fashion items |
|
|
- **Training**: Triplet loss with semi-hard negative mining |
|
|
- **Input**: Fashion item images (224x224) |
|
|
- **Output**: L2-normalized 512D embeddings |
|
|
|
|
|
### ViT Outfit Compatibility Model |
|
|
- **Architecture**: Vision Transformer encoder |
|
|
- **Purpose**: Score outfit compatibility from item embeddings |
|
|
- **Training**: Triplet loss with cosine distance |
|
|
- **Input**: Variable-length sequence of item embeddings |
|
|
- **Output**: Compatibility score (0-1) |
|
|
|
|
|
## Usage |
|
|
|
|
|
```python |
|
|
from huggingface_hub import hf_hub_download |
|
|
import torch |
|
|
|
|
|
# Download models |
|
|
resnet_path = hf_hub_download(repo_id="Stylique/dressify-models", filename="resnet_item_embedder_best.pth") |
|
|
vit_path = hf_hub_download(repo_id="Stylique/dressify-models", filename="vit_outfit_model_best.pth") |
|
|
|
|
|
# Load models |
|
|
resnet_model = torch.load(resnet_path) |
|
|
vit_model = torch.load(vit_path) |
|
|
``` |
|
|
|
|
|
## Training Details |
|
|
|
|
|
- **Dataset**: Polyvore Outfits (Stylique/Polyvore) |
|
|
- **Loss**: Triplet margin loss |
|
|
- **Optimizer**: AdamW |
|
|
- **Mixed Precision**: Enabled |
|
|
- **Hardware**: NVIDIA GPU with CUDA |
|
|
|
|
|
## Performance |
|
|
|
|
|
- **ResNet**: ~25M parameters, fast inference |
|
|
- **ViT**: ~12M parameters, efficient outfit scoring |
|
|
- **Memory**: Optimized for deployment on Hugging Face Spaces |
|
|
|
|
|
## Citation |
|
|
|
|
|
If you use these models in your research, please cite: |
|
|
|
|
|
```bibtex |
|
|
@misc{dressify2024, |
|
|
title={Dressify: Deep Learning for Fashion Outfit Recommendation}, |
|
|
author={Stylique}, |
|
|
year={2024}, |
|
|
url={https://huggingface.co/Stylique/dressify-models} |
|
|
} |
|
|
``` |
|
|
|