Datasets:
Update README.md
Browse files
README.md
CHANGED
|
@@ -8,7 +8,108 @@ pretty_name: icir
|
|
| 8 |
size_categories:
|
| 9 |
- 100K<n<1M
|
| 10 |
---
|
|
|
|
| 11 |
|
| 12 |
<p align="center">
|
| 13 |
<img width="75%" alt="i-CIR illustration" src="https://github.com/billpsomas/icir/raw/main/.github/dataset.png">
|
| 14 |
-
</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
size_categories:
|
| 9 |
- 100K<n<1M
|
| 10 |
---
|
| 11 |
+
## i-CIR Dataset (Hugging Face)
|
| 12 |
|
| 13 |
<p align="center">
|
| 14 |
<img width="75%" alt="i-CIR illustration" src="https://github.com/billpsomas/icir/raw/main/.github/dataset.png">
|
| 15 |
+
</p>
|
| 16 |
+
|
| 17 |
+
### About
|
| 18 |
+
**i-CIR (Instance-Level Composed Image Retrieval)** is a curated benchmark for **composed image retrieval** where each *instance* corresponds to a specific, visually indistinguishable object (e.g., a particular landmark). Each query combines an **image of the instance** with a **text modification**, and retrieval is evaluated against a database containing **rich hard negatives** (visual / textual / compositional).
|
| 19 |
+
|
| 20 |
+
**Key stats**
|
| 21 |
+
- **Instances:** 202
|
| 22 |
+
- **Total images:** ~750K
|
| 23 |
+
- **Composed queries:** 1,883
|
| 24 |
+
- **Avg database size / query:** ~3.7K images
|
| 25 |
+
- Includes challenging hard negatives per instance.
|
| 26 |
+
|
| 27 |
+
---
|
| 28 |
+
|
| 29 |
+
### Dataset Structure
|
| 30 |
+
On Hugging Face, i-CIR is hosted as **WebDataset shards** for scalable/robust downloads and streaming.
|
| 31 |
+
|
| 32 |
+
```text
|
| 33 |
+
icir/
|
| 34 |
+
βββ webdataset/
|
| 35 |
+
β βββ query/
|
| 36 |
+
β β βββ query-000000.tar
|
| 37 |
+
β β βββ query-000001.tar
|
| 38 |
+
β β βββ ...
|
| 39 |
+
β βββ database/
|
| 40 |
+
β βββ database-000000.tar
|
| 41 |
+
β βββ database-000001.tar
|
| 42 |
+
β βββ ...
|
| 43 |
+
βββ annotations/
|
| 44 |
+
β βββ query_files.csv
|
| 45 |
+
β βββ database_files.csv
|
| 46 |
+
βββ VERSION.txt
|
| 47 |
+
βββ LICENSE
|
| 48 |
+
```
|
| 49 |
+
|
| 50 |
+
---
|
| 51 |
+
|
| 52 |
+
### Annotations format
|
| 53 |
+
|
| 54 |
+
- query_files.csv: each row is (image_path, text_query, instance_id)
|
| 55 |
+
- database_files.csv: each row is (image_path, text_query, instance_id) (the text field may be unused for database features depending on the pipeline)
|
| 56 |
+
|
| 57 |
+
Inside each WebDataset sample, we store:
|
| 58 |
+
- an image (.jpg/.png/...)
|
| 59 |
+
- a json payload with: img_path, text, instance
|
| 60 |
+
|
| 61 |
+
---
|
| 62 |
+
|
| 63 |
+
### Download
|
| 64 |
+
|
| 65 |
+
One-liner download (recommended):
|
| 66 |
+
|
| 67 |
+
```bash
|
| 68 |
+
pip install -U huggingface_hub
|
| 69 |
+
huggingface-cli download billpsomas/icir --repo-type dataset --local-dir ./data/icir --revision main
|
| 70 |
+
```
|
| 71 |
+
|
| 72 |
+
Python (equivalent):
|
| 73 |
+
|
| 74 |
+
```python
|
| 75 |
+
from huggingface_hub import snapshot_download
|
| 76 |
+
snapshot_download(repo_id="billpsomas/icir", repo_type="dataset", local_dir="./data/icir", revision="main")
|
| 77 |
+
```
|
| 78 |
+
|
| 79 |
+
---
|
| 80 |
+
|
| 81 |
+
### Using the dataset (feature extraction)
|
| 82 |
+
|
| 83 |
+
You can extract features directly from the WebDataset shards (no image folder extraction needed):
|
| 84 |
+
|
| 85 |
+
```bash
|
| 86 |
+
python3 create_features.py \
|
| 87 |
+
--dataset icir \
|
| 88 |
+
--icir_source wds \
|
| 89 |
+
--icir_wds_root ./data/icir \
|
| 90 |
+
--backbone clip \
|
| 91 |
+
--batch 512 \
|
| 92 |
+
--gpu 0
|
| 93 |
+
```
|
| 94 |
+
|
| 95 |
+
---
|
| 96 |
+
|
| 97 |
+
### License
|
| 98 |
+
|
| 99 |
+
The dataset is released under CC BY-NC-SA 4.0. Please see LICENSE for details.
|
| 100 |
+
|
| 101 |
+
---
|
| 102 |
+
|
| 103 |
+
### Citation
|
| 104 |
+
|
| 105 |
+
If you use i-CIR in your research, please cite:
|
| 106 |
+
|
| 107 |
+
```
|
| 108 |
+
@inproceedings{
|
| 109 |
+
psomas2025instancelevel,
|
| 110 |
+
title={Instance-Level Composed Image Retrieval},
|
| 111 |
+
author={Bill Psomas and George Retsinas and Nikos Efthymiadis and Panagiotis Filntisis and Yannis Avrithis and Petros Maragos and Ondrej Chum and Giorgos Tolias},
|
| 112 |
+
booktitle={The Thirty-ninth Annual Conference on Neural Information Processing Systems},
|
| 113 |
+
year={2025}
|
| 114 |
+
}
|
| 115 |
+
```
|