pierrexsq commited on
Commit
c303684
·
verified ·
1 Parent(s): 8b1a308

Upload LookBench v20251201

Browse files
README.md CHANGED
@@ -1,3 +1,194 @@
1
- ---
2
- license: apache-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ task_categories:
4
+ - image-feature-extraction
5
+ - zero-shot-image-classification
6
+ language:
7
+ - en
8
+ tags:
9
+ - fashion
10
+ - image-retrieval
11
+ - benchmark
12
+ - e-commerce
13
+ - visual-search
14
+ pretty_name: LookBench
15
+ size_categories:
16
+ - 10K<n<100K
17
+ configs:
18
+ - config_name: aigen_streetlook
19
+ data_files:
20
+ - split: query
21
+ path: "v20251201/aigen_streetlook/query.parquet"
22
+ - split: gallery
23
+ path: "v20251201/aigen_streetlook/gallery.parquet"
24
+ - config_name: aigen_studio
25
+ data_files:
26
+ - split: query
27
+ path: "v20251201/aigen_studio/query.parquet"
28
+ - split: gallery
29
+ path: "v20251201/aigen_studio/gallery.parquet"
30
+ - config_name: real_streetlook
31
+ data_files:
32
+ - split: query
33
+ path: "v20251201/real_streetlook/query.parquet"
34
+ - split: gallery
35
+ path: "v20251201/real_streetlook/gallery.parquet"
36
+ - config_name: real_studio_flat
37
+ data_files:
38
+ - split: query
39
+ path: "v20251201/real_studio_flat/query.parquet"
40
+ - split: gallery
41
+ path: "v20251201/real_studio_flat/gallery.parquet"
42
+ - config_name: noise
43
+ data_files:
44
+ - split: gallery
45
+ path: "v20251201/noise/*.parquet"
46
+ dataset_info:
47
+ features:
48
+ - name: image
49
+ dtype: image
50
+ - name: category
51
+ dtype: string
52
+ - name: main_attribute
53
+ dtype: string
54
+ - name: other_attributes
55
+ dtype: string
56
+ - name: bbox
57
+ dtype: string
58
+ - name: item_ID
59
+ dtype: string
60
+ - name: task
61
+ dtype: string
62
+ - name: difficulty
63
+ dtype: string
64
+ ---
65
+
66
+ # LookBench: Fashion Image Retrieval Benchmark
67
+
68
+ <div align="center">
69
+ <img src="assets/lookbench_banner.png" alt="LookBench Banner" width="800"/>
70
+ </div>
71
+
72
+ ## 📋 Overview
73
+
74
+ **LookBench** is a comprehensive benchmark for evaluating fashion image retrieval models. It provides a standardized evaluation framework with multiple difficulty levels and evaluation dimensions.
75
+
76
+ ### Key Features
77
+
78
+ - 🎨 **Multi-task Evaluation**: 4 distinct retrieval tasks across different scenarios
79
+ - 📊 **Three Evaluation Dimensions**: Coarse Recall, Fine Recall, and Graded NDCG
80
+ - 🔊 **Noise Injection**: Large-scale distractor gallery for realistic evaluation
81
+ - 🏷️ **Rich Metadata**: Category, attributes, bounding boxes, and difficulty levels
82
+
83
+ ## 📁 Dataset Structure
84
+
85
+ ```
86
+ LookBench/
87
+ ├── v20251201/ # Version: December 2024
88
+ │ ├── aigen_streetlook/ # AI-generated street-style images
89
+ │ │ ├── query.parquet
90
+ │ │ └── gallery.parquet
91
+ │ ├── aigen_studio/ # AI-generated studio images
92
+ │ │ ├── query.parquet
93
+ │ │ └── gallery.parquet
94
+ │ ├── real_streetlook/ # Real street-style photos
95
+ │ │ ├── query.parquet
96
+ │ │ └── gallery.parquet
97
+ │ ├── real_studio_flat/ # Real studio flat-lay images
98
+ │ │ ├── query.parquet
99
+ │ │ └── gallery.parquet
100
+ │ └── noise/ # Distractor images
101
+ │ └── noise_*.parquet
102
+ └── README.md
103
+ ```
104
+
105
+ ## 🔢 Data Schema
106
+
107
+ | Column | Type | Description |
108
+ |--------|------|-------------|
109
+ | `image` | Image | Fashion product image |
110
+ | `category` | string | Product category (e.g., "bag", "dress", "shoes") |
111
+ | `main_attribute` | string | Primary visual attribute (e.g., "crocodile", "striped") |
112
+ | `other_attributes` | string | Additional attributes (comma-separated) |
113
+ | `bbox` | string | Bounding box coordinates [x1, y1, x2, y2] |
114
+ | `item_ID` | string | Unique item identifier |
115
+ | `task` | string | Task name |
116
+ | `difficulty` | string | Difficulty level: "easy", "medium", "hard" |
117
+
118
+ ## 📊 Dataset Statistics
119
+
120
+ | Task | Query | Gallery | Difficulty Distribution |
121
+ |------|-------|---------|------------------------|
122
+ | AIGen-StreetLook | 160 | 571 | Easy: 30%, Medium: 40%, Hard: 30% |
123
+ | AIGen-Studio | 150 | 520 | Easy: 35%, Medium: 35%, Hard: 30% |
124
+ | Real-StreetLook | 200 | 680 | Easy: 25%, Medium: 45%, Hard: 30% |
125
+ | Real-StudioFlat | 180 | 610 | Easy: 30%, Medium: 40%, Hard: 30% |
126
+ | **Noise** | - | ~57,000 | - |
127
+
128
+ ## 📏 Evaluation Metrics
129
+
130
+ ### 1. Coarse Recall@K
131
+ Category-level matching. Returns 1 if any top-K result has the same category.
132
+
133
+ ### 2. Fine Recall@K
134
+ Category + Main Attribute matching. Stricter criterion requiring both to match.
135
+
136
+ ### 3. Graded NDCG@K
137
+ Full attribute scoring with graded relevance:
138
+ - Base score (1.0) for category + main_attribute match
139
+ - Bonus for each matching `other_attribute`
140
+
141
+ ## 🚀 Quick Start
142
+
143
+ ```python
144
+ from datasets import load_dataset
145
+
146
+ # Load a specific task
147
+ dataset = load_dataset("your-org/LookBench", "aigen_streetlook")
148
+
149
+ # Access query and gallery splits
150
+ query_data = dataset["query"]
151
+ gallery_data = dataset["gallery"]
152
+
153
+ # View a sample
154
+ print(query_data[0])
155
+ ```
156
+
157
+ ## 📈 Leaderboard
158
+
159
+ | Rank | Model | Coarse@10 | Fine@10 | NDCG@10 | Avg |
160
+ |------|-------|-----------|---------|---------|-----|
161
+ | 1 | Model A | 85.2 | 72.1 | 68.5 | 75.3 |
162
+ | 2 | Model B | 83.1 | 70.5 | 66.2 | 73.3 |
163
+ | 3 | Model C | 81.5 | 68.2 | 64.1 | 71.3 |
164
+
165
+ *Submit your results to be included in the leaderboard!*
166
+
167
+ ## 📖 Citation
168
+
169
+ ```bibtex
170
+ @dataset{lookbench2024,
171
+ title={LookBench: A Comprehensive Benchmark for Fashion Image Retrieval},
172
+ author={Your Team},
173
+ year={2024},
174
+ publisher={Hugging Face},
175
+ url={https://huggingface.co/datasets/your-org/LookBench}
176
+ }
177
+ ```
178
+
179
+ ## 📜 License
180
+
181
+ This dataset is released under the [Apache 2.0 License](LICENSE).
182
+
183
+ ## 🔗 Links
184
+
185
+ - [GitHub Repository](https://github.com/your-org/look-bench)
186
+ - [Evaluation Code](https://github.com/your-org/look-bench)
187
+ - [Paper (coming soon)]()
188
+
189
+ ---
190
+
191
+ <div align="center">
192
+ <b>Version:</b> v20251201 | <b>Last Updated:</b> December 2024
193
+ </div>
194
+
RELEASE_GUIDE.md ADDED
@@ -0,0 +1,182 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # LookBench HuggingFace Release Guide
2
+
3
+ This guide explains how to prepare and upload the LookBench dataset to Hugging Face.
4
+
5
+ ## Directory Structure
6
+
7
+ ```
8
+ huggingface_release/
9
+ ├── README.md # Dataset card (displayed on HF)
10
+ ├── LookBench.py # Custom dataset loading script
11
+ ├── prepare_release.py # Convert parquet to HF format
12
+ ├── upload_to_hf.py # Upload to HuggingFace Hub
13
+ ├── create_sample_images.py # Generate preview images
14
+ ├── assets/ # Images for dataset card
15
+ │ ├── lookbench_banner.png
16
+ │ ├── evaluation_dimensions.png
17
+ │ └── samples_*.png
18
+ └── v20251201/ # Versioned data
19
+ ├── aigen_streetlook/
20
+ │ ├── query.parquet
21
+ │ └── gallery.parquet
22
+ ├── aigen_studio/
23
+ │ ├── query.parquet
24
+ │ └── gallery.parquet
25
+ ├── real_streetlook/
26
+ │ ├── query.parquet
27
+ │ └── gallery.parquet
28
+ ├── real_studio_flat/
29
+ │ ├── query.parquet
30
+ │ └── gallery.parquet
31
+ ├── noise/
32
+ │ └── noise_*.parquet
33
+ └── version_info.json
34
+ ```
35
+
36
+ ## Release Steps
37
+
38
+ ### Step 1: Prepare the Data
39
+
40
+ ```bash
41
+ cd huggingface_release
42
+
43
+ # Convert existing parquet files to HF format
44
+ python prepare_release.py \
45
+ --input_dir ../scripts/data/parquet_files_v5 \
46
+ --output_dir v20251201 \
47
+ --version v20251201
48
+ ```
49
+
50
+ ### Step 2: Create Assets
51
+
52
+ ```bash
53
+ # Generate banner and sample images
54
+ python create_sample_images.py \
55
+ --input_dir ../scripts/data/parquet_files_v5 \
56
+ --output_dir assets
57
+ ```
58
+
59
+ ### Step 3: Upload to HuggingFace
60
+
61
+ ```bash
62
+ # Set your HuggingFace token
63
+ export HF_TOKEN="your_token_here"
64
+
65
+ # Upload using folder method (preserves structure)
66
+ python upload_to_hf.py \
67
+ --repo_id your-org/LookBench \
68
+ --data_dir v20251201 \
69
+ --method api
70
+
71
+ # Or upload using datasets library (creates proper configs)
72
+ python upload_to_hf.py \
73
+ --repo_id your-org/LookBench \
74
+ --data_dir v20251201 \
75
+ --method datasets
76
+ ```
77
+
78
+ ## Versioning Strategy
79
+
80
+ LookBench uses date-based versioning: `vYYYYMMDD`
81
+
82
+ | Version | Date | Changes |
83
+ |---------|------|---------|
84
+ | v20251201 | Dec 2024 | Initial release |
85
+ | v20250301 | Mar 2025 | (future) Updated gallery |
86
+
87
+ To add a new version:
88
+ 1. Create a new versioned directory (e.g., `v20250301/`)
89
+ 2. Update `README.md` with new version info
90
+ 3. Add new config entries in the YAML frontmatter
91
+ 4. Keep old versions for reproducibility
92
+
93
+ ## Dataset Card (README.md)
94
+
95
+ The README.md serves as the dataset card displayed on HuggingFace. Key sections:
96
+
97
+ 1. **YAML Frontmatter**: Metadata, configs, features
98
+ 2. **Overview**: Description and key features
99
+ 3. **Dataset Structure**: File organization
100
+ 4. **Data Schema**: Column descriptions
101
+ 5. **Statistics**: Sample counts and distributions
102
+ 6. **Evaluation Metrics**: How to evaluate
103
+ 7. **Leaderboard**: Model rankings
104
+ 8. **Citation**: BibTeX entry
105
+
106
+ ## Image Display on HuggingFace
107
+
108
+ For images to display in the HuggingFace viewer:
109
+
110
+ 1. **Parquet format**: Store images as `{'bytes': image_bytes, 'path': None}`
111
+ 2. **Features definition**: Use `Image()` type in the schema
112
+ 3. **Dataset card images**: Reference with `![alt](assets/image.png)`
113
+
114
+ ### Parquet Image Format
115
+
116
+ ```python
117
+ # Correct format for HF image display
118
+ record = {
119
+ 'image': {'bytes': image_bytes, 'path': None},
120
+ 'category': 'bag',
121
+ ...
122
+ }
123
+ ```
124
+
125
+ ### Dataset Card Images
126
+
127
+ ```markdown
128
+ <!-- In README.md -->
129
+ ![Banner](assets/lookbench_banner.png)
130
+ ![Samples](assets/samples_aigen_streetlook.png)
131
+ ```
132
+
133
+ ## Loading the Dataset
134
+
135
+ After upload, users can load the dataset:
136
+
137
+ ```python
138
+ from datasets import load_dataset
139
+
140
+ # Load a specific task
141
+ ds = load_dataset("your-org/LookBench", "aigen_streetlook")
142
+
143
+ # Access splits
144
+ query = ds["query"]
145
+ gallery = ds["gallery"]
146
+
147
+ # View sample
148
+ print(query[0])
149
+ query[0]["image"] # Returns PIL Image
150
+ ```
151
+
152
+ ## Updating the Leaderboard
153
+
154
+ To update the leaderboard:
155
+
156
+ 1. Run evaluation on your model
157
+ 2. Submit results via GitHub issue or PR
158
+ 3. Update the leaderboard table in README.md
159
+
160
+ ## Troubleshooting
161
+
162
+ ### Images not displaying
163
+ - Ensure images are in `{'bytes': ..., 'path': ...}` format
164
+ - Check that Features specifies `Image()` type
165
+ - Verify parquet was saved with correct schema
166
+
167
+ ### Upload fails
168
+ - Check HF_TOKEN is valid and has write access
169
+ - Ensure repo exists and you have permissions
170
+ - Try uploading in smaller batches
171
+
172
+ ### Dataset won't load
173
+ - Verify parquet files are valid: `pd.read_parquet(file)`
174
+ - Check config names match directory structure
175
+ - Ensure all required columns are present
176
+
177
+ ## Contact
178
+
179
+ For issues or questions:
180
+ - GitHub: https://github.com/your-org/look-bench
181
+ - HuggingFace: https://huggingface.co/datasets/your-org/LookBench
182
+
v20251201/aigen_streetlook/gallery.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3a216a5f8439f9df437c66cec0763ccf53ba295b874cc3ebd6a302ad430bf081
3
+ size 2432918
v20251201/aigen_streetlook/query.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:75eb347ad05f2bf83ebe114375c7d7e25c07062c4c6266d32d3f527437ca447e
3
+ size 12946
v20251201/aigen_studio/gallery.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:48fa3ee46be363813976874e92a4abb04041d85762ff456629c44ac37641c5e1
3
+ size 4343641
v20251201/aigen_studio/query.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:afa10a70baac8a035688b775f04777d4a33009ff24ed8d4ed3d16913770defc4
3
+ size 600
v20251201/noise/noise_00000.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3db703367a4d08fd97899e1e709c59cc96c1825dc1c57926712dd1b2a9a62b2a
3
+ size 152461313
v20251201/noise/noise_00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8b0767ba2da7ea333ef9de2730823a9644b4af3d253bba02a8df9d5fe910f992
3
+ size 153502246
v20251201/noise/noise_00002.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:23a8688783b3f3d2914afe3da84607aa688602adf70cb0d0215d25eda2da3eb3
3
+ size 138073565
v20251201/noise/noise_00003.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b3e66e11e8f869303771335c957e520f60c1361bce56fb8f6b3158608c4246bd
3
+ size 111873044
v20251201/noise/noise_00004.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9640fe9e30af8648f5d0d140b1dce148e39351b7a1656f64cf620cea6680aea1
3
+ size 95035611
v20251201/noise/noise_00005.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3c0ae8c1c348007bdc099f61f820fec2381e5cdb1e2a983f6cd6bf769de0869d
3
+ size 181324854
v20251201/noise/noise_00006.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:65edea341f0ed34f4687aff05f7b1332bc78c521c4f5fa358455fad25f5d552e
3
+ size 204503584
v20251201/noise/noise_00007.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3e7a65b44a23818b50ae764367a6aae2be4a72b6be0e48f6035be5ba8a8410ab
3
+ size 204920425
v20251201/noise/noise_00008.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7cf54619b4f6f9d9ffeed05c6f64a249505b613e9c13505dc500aafb95dedb4b
3
+ size 163159466
v20251201/real_streetlook/gallery.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9379991a8a607771571e2c9b245ba9813747aa88371c88b6bcf3ee254662bbf5
3
+ size 19647442
v20251201/real_streetlook/query.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:838db2199a217142425209329f352d9955c2c68417686ad942478d897b5c86af
3
+ size 3466647
v20251201/real_studio_flat/gallery.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d9918584999fb9de06d13ad79d720490a672a3a642f0784f8522fe166c6a604c
3
+ size 30371576
v20251201/real_studio_flat/query.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c6189792aa40991a096ac295ea07962be7dde4d2c2ef421276b405ffd5031ce9
3
+ size 177085
v20251201/version_info.json ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "version": "v20251201",
3
+ "created_at": "2025-12-10T15:28:37.912666",
4
+ "tasks": [
5
+ "aigen_streetlook",
6
+ "aigen_studio",
7
+ "real_streetlook",
8
+ "real_studio_flat"
9
+ ],
10
+ "includes_noise": true
11
+ }