pierrexsq commited on
Commit
91de6a0
·
verified ·
1 Parent(s): 9b4607d

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +143 -1
README.md CHANGED
@@ -5,4 +5,146 @@ language:
5
  base_model:
6
  - facebook/dinov3-vitl16-pretrain-lvd1689m
7
  pipeline_tag: image-feature-extraction
8
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  base_model:
6
  - facebook/dinov3-vitl16-pretrain-lvd1689m
7
  pipeline_tag: image-feature-extraction
8
+ ---
9
+
10
+
11
+
12
+
13
+ # GR-Lite: Fashion Image Retrieval Model
14
+
15
+ GR-Lite is a lightweight fashion image retrieval model fine-tuned from [DINOv3-ViT-L/16](https://huggingface.co/facebook/dinov3-vitl16-pretrain-lvd1689m). It extracts 1024-dimensional embeddings optimized for fashion product search and retrieval tasks.
16
+
17
+ GR-Lite achieves state-of-the-art (SOTA) performance on LookBench and other fashion retrieval benchmarks.See the [paper]((https://arxiv.org/abs/2601.14706)) for detailed performance metrics and comparisons.
18
+
19
+
20
+ ## Resources
21
+
22
+ - 🌐 **Project Site**: [LookBench-Web](https://serendipityoneinc.github.io/look-bench-page/)
23
+ - 📄 **Paper**: [LookBench: A Comprehensive Benchmark for Fashion Image Retrieval](https://arxiv.org/abs/2601.14706)
24
+ - 🗃️ **Benchmark Dataset**: [LookBench on Hugging Face](https://huggingface.co/datasets/srpone/look-bench)
25
+ - 💻 **Code & Examples**: [look-bench Code](https://github.com/SerendipityOneInc/look-bench)
26
+
27
+ ## Usage
28
+
29
+ ### Installation
30
+
31
+ ```bash
32
+ pip install torch huggingface_hub
33
+ ```
34
+
35
+ For full benchmarking capabilities:
36
+ ```bash
37
+ pip install look-bench
38
+ ```
39
+
40
+ ### Loading the Model
41
+
42
+ ```python
43
+ import torch
44
+ from huggingface_hub import hf_hub_download
45
+ from PIL import Image
46
+
47
+ # Download the model checkpoint
48
+ model_path = hf_hub_download(
49
+ repo_id="srpone/gr-lite",
50
+ filename="gr_lite.pt"
51
+ )
52
+
53
+ # Load the model
54
+ device = "cuda" if torch.cuda.is_available() else "cpu"
55
+ model = torch.load(model_path, map_location=device)
56
+ model.eval()
57
+
58
+ print(f"Model loaded successfully on {device}")
59
+ ```
60
+
61
+ ### Feature Extraction
62
+
63
+ ```python
64
+ # Load an image
65
+ image = Image.open("path/to/your/image.jpg").convert("RGB")
66
+
67
+ # Extract features using the model's search method
68
+ with torch.no_grad():
69
+ _, embeddings = model.search(image_paths=[image], feature_dim=1024)
70
+
71
+ # Convert to numpy if needed
72
+ if isinstance(embeddings, torch.Tensor):
73
+ embeddings = embeddings.cpu().numpy()
74
+
75
+ print(f"Feature shape: {embeddings.shape}") # (1, 1024)
76
+ ```
77
+
78
+
79
+ ### Using with LookBench Dataset
80
+
81
+ ```python
82
+ from datasets import load_dataset
83
+
84
+ # Load LookBench dataset
85
+ dataset = load_dataset("srpone/look-bench", "real_studio_flat")
86
+
87
+ # Get query and gallery images
88
+ query_image = dataset['query'][0]['image']
89
+ gallery_image = dataset['gallery'][0]['image']
90
+
91
+ # Extract features
92
+ with torch.no_grad():
93
+ _, query_feat = model.search(image_paths=[query_image], feature_dim=256)
94
+ _, gallery_feat = model.search(image_paths=[gallery_image], feature_dim=256)
95
+
96
+ # Compute similarity
97
+ import numpy as np
98
+ query_norm = query_feat / np.linalg.norm(query_feat)
99
+ gallery_norm = gallery_feat / np.linalg.norm(gallery_feat)
100
+ similarity = np.dot(query_norm, gallery_norm.T)
101
+ print(f"Similarity: {similarity[0][0]:.4f}")
102
+ ```
103
+
104
+ ## Benchmark Performance
105
+
106
+ GR-Lite is evaluated on the **LookBench** benchmark, which includes:
107
+
108
+ - **Real Studio Flat**: Flat-lay product photos (Easy difficulty)
109
+ - **AI-Gen Studio**: AI-generated lifestyle images (Medium difficulty)
110
+ - **Real Streetlook**: Street fashion photos (Hard difficulty)
111
+ - **AI-Gen Streetlook**: AI-generated street outfits (Hard difficulty)
112
+
113
+ For detailed performance metrics, please refer to:
114
+ - Paper: https://arxiv.org/abs/2601.14706
115
+ - Benchmark: https://huggingface.co/datasets/srpone/look-bench
116
+
117
+ ## Evaluation
118
+
119
+ Use the `look-bench` package to evaluate on LookBench:
120
+
121
+ ```python
122
+ from look_bench import evaluate_model
123
+
124
+ # Evaluate on all configs
125
+ results = evaluate_model(
126
+ model=model,
127
+ model_name="gr-lite",
128
+ dataset_configs=["real_studio_flat", "aigen_studio", "real_streetlook", "aigen_streetlook"]
129
+ )
130
+
131
+ print(results)
132
+ ```
133
+
134
+ ## Model Card Authors
135
+
136
+ Gensmo AI Team
137
+
138
+ ## Citation
139
+
140
+ If you use this model in your research, please cite:
141
+
142
+ ```bibtex
143
+ @article{gao2026lookbench,
144
+ title={LookBench: A Live and Holistic Open Benchmark for Fashion Image Retrieval},
145
+ author={Chao Gao and Siqiao Xue and Yimin Peng and Jiwen Fu and Tingyi Gu and Shanshan Li and Fan Zhou},
146
+ year={2026},
147
+ url={https://arxiv.org/abs/2601.14706},
148
+ journal= {arXiv preprint arXiv:2601.14706},
149
+ }
150
+ ```