ianhajra commited on
Commit
1be864e
·
verified ·
1 Parent(s): dce2bb1

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +91 -0
README.md ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: en
3
+ tags:
4
+ - image-retrieval
5
+ - oxford5k
6
+ - paris6k
7
+ - revisitop1m
8
+ ---
9
+
10
+ # Dataset Card for RevisitOP (Oxford5k, Paris6k, RevisitOP1M)
11
+
12
+ ## Dataset Description
13
+
14
+ **RevisitOP** provides popular benchmark datasets for large-scale image retrieval research:
15
+
16
+ - **roxford5k**: Oxford 5k buildings dataset containing ~5,000 images.
17
+ - **rparis6k**: Paris 6k buildings dataset with ~6,000 images.
18
+ - **revisitop1m**: RevisitOP 1M distractor dataset with ~1 million distractor images.
19
+ - **oxfordparis**: Combination of Oxford 5k and Paris 6k datasets.
20
+
21
+ These datasets are widely used for evaluating image retrieval algorithms and contain real-world building photographs and distractors.
22
+
23
+ ## Dataset Features
24
+
25
+ Each example contains:
26
+ - `image` (`Image`): An image file (JPEG or PNG).
27
+ - `filename` (`string`): The original filename of the image.
28
+ - `dataset` (`string`): The source dataset the image belongs to (`roxford5k`, `rparis6k`, or `revisitop1m`).
29
+
30
+ ## Dataset Versions
31
+
32
+ - Version 1.0.0
33
+
34
+ ## Example Usage
35
+
36
+ Use the Hugging Face `datasets` library to load one of the configs:
37
+
38
+ ```python
39
+ import datasets
40
+ from aiohttp import ClientTimeout
41
+
42
+ dataset_name = "randall-lab/revisitop"
43
+ timeout_period = 500000 # very long timeout to prevent timeouts
44
+ storage_options = {"client_kwargs": {"timeout": ClientTimeout(total=timeout_period)}}
45
+
46
+ # These are the config names defined in the script
47
+ dataset_configs = ["roxford5k", "rparis6k", "oxfordparis"] # "revisitop1m" is large and may take a long time to load
48
+
49
+ # test all of the dataset_configs specified above
50
+ for i, config_name in enumerate(dataset_configs, start=1):
51
+ dataset = datasets.load_dataset(
52
+ path="revisitop.py", # use local dataset script
53
+ name=config_name,
54
+ split="train",
55
+ trust_remote_code=True,
56
+ storage_options=storage_options,
57
+ )
58
+
59
+ example = dataset[243] # Get first example
60
+ image = example["image"]
61
+ filename = example["filename"]
62
+ dataset_name = example["dataset"]
63
+ print(
64
+ f"[{i}] Loaded config '{config_name}' - example file: {filename}, dataset: {dataset_name}"
65
+ )
66
+ image.save(f"output_image_{i}.jpg", format="JPEG")
67
+ ```
68
+
69
+ ## Dataset Structure
70
+
71
+ - The datasets consist of images downloaded and extracted from official URLs hosted by the Oxford Visual Geometry Group and the RevisitOP project.
72
+ - The `roxford5k` and `rparis6k` datasets come from `.tgz` archives.
73
+ - The `revisitop1m` dataset consists of 100 `.tar.gz` archives with JPEG images as distractors.
74
+ - The combined `oxfordparis` dataset merges the Oxford and Paris sets.
75
+
76
+ ## Dataset Citation
77
+
78
+ If you use this dataset, please cite the original paper:
79
+
80
+ ```bibtex
81
+ @inproceedings{Radenovic2018RevisitingOP,
82
+ title={Revisiting Oxford and Paris: Large-Scale Image Retrieval Benchmarking},
83
+ author={Filip Radenovic and Ahmet Iscen and Giorgos Tolias and Yannis Avrithis and Ondrej Chum},
84
+ year={2018}
85
+ }
86
+ ```
87
+
88
+ ## Dataset Homepage
89
+
90
+ [RevisitOP project page](http://cmp.felk.cvut.cz/revisitop/)
91
+