| | --- |
| | language: en |
| | tags: |
| | - image-retrieval |
| | - oxford5k |
| | - paris6k |
| | - revisitop1m |
| | --- |
| | |
| | # Dataset Card for RevisitOP (Oxford5k, Paris6k, RevisitOP1M) |
| |
|
| | ## Dataset Description |
| |
|
| | **RevisitOP** provides popular benchmark datasets for large-scale image retrieval research: |
| |
|
| | - **roxford5k**: Oxford 5k buildings dataset containing ~5,000 images. |
| | - **rparis6k**: Paris 6k buildings dataset with ~6,000 images. |
| | - **revisitop1m**: RevisitOP 1M distractor dataset with ~1 million distractor images. |
| | - **oxfordparis**: Combination of Oxford 5k and Paris 6k datasets. |
| |
|
| | These datasets are widely used for evaluating image retrieval algorithms and contain real-world building photographs and distractors. |
| |
|
| | ## Dataset Features |
| |
|
| | Each example contains: |
| |
|
| | - `image` (`Image`): An image file (JPEG or PNG). |
| | - `filename` (`string`): The original filename of the image. |
| | - `dataset` (`string`): The source dataset the image belongs to (`roxford5k`, `rparis6k`, or `revisitop1m`). |
| | - `query_id` (`int32`): Query ID for query images (-1 for database images). |
| | - `bbx` (`Sequence[float32]`): Bounding box coordinates [x1, y1, x2, y2] for query images. |
| | - `easy` (`Sequence[int32]`): Easy relevant images for queries. |
| | - `hard` (`Sequence[int32]`): Hard relevant images for queries. |
| | - `junk` (`Sequence[int32]`): Junk images for queries. |
| |
|
| | ## Dataset Splits |
| |
|
| | - **qimlist**: Query images with ground truth annotations (bounding boxes and relevance labels). |
| | - **imlist**: Database images for retrieval. |
| |
|
| | ## Dataset Versions |
| |
|
| | - Version 1.0.0 |
| |
|
| | ## Example Usage |
| |
|
| | Use the Hugging Face `datasets` library to load one of the configs: |
| |
|
| | ```python |
| | import datasets |
| | from aiohttp import ClientTimeout |
| | |
| | dataset_name = "randall-lab/revisitop" |
| | timeout_period = 500000 # very long timeout to prevent timeouts |
| | storage_options = {"client_kwargs": {"timeout": ClientTimeout(total=timeout_period)}} |
| | |
| | # These are the config names defined in the script |
| | dataset_configs = ["roxford5k", "rparis6k", "oxfordparis"] # "revisitop1m" is large and may take a long time to load |
| | |
| | # Load query split for evaluation |
| | for i, config_name in enumerate(dataset_configs, start=1): |
| | # Load query images |
| | query_dataset = datasets.load_dataset( |
| | path=dataset_name, |
| | name=config_name, |
| | split="qimlist", |
| | trust_remote_code=True, |
| | storage_options=storage_options, |
| | ) |
| | |
| | # Load database images |
| | db_dataset = datasets.load_dataset( |
| | path=dataset_name, |
| | name=config_name, |
| | split="imlist", |
| | trust_remote_code=True, |
| | storage_options=storage_options, |
| | ) |
| | |
| | |
| | # Example query image |
| | query_example = query_dataset[0] |
| | ``` |
| |
|
| | ## Dataset Structure |
| |
|
| | - The datasets consist of images downloaded and extracted from official URLs hosted by the Oxford Visual Geometry Group and the RevisitOP project. |
| | - The `roxford5k` and `rparis6k` datasets come from `.tgz` archives with corresponding `.pkl` ground truth files. |
| | - The `revisitop1m` dataset consists of 100 `.tar.gz` archives with JPEG images as distractors. |
| | - The combined `oxfordparis` dataset merges the Oxford and Paris sets. |
| | - Ground truth files contain query lists, database lists, and annotations (bounding boxes, easy/hard/junk labels). |
| |
|
| | ## Dataset Citation |
| |
|
| | If you use this dataset, please cite the original paper: |
| |
|
| | ```bibtex |
| | @inproceedings{Radenovic2018RevisitingOP, |
| | title={Revisiting Oxford and Paris: Large-Scale Image Retrieval Benchmarking}, |
| | author={Filip Radenovic and Ahmet Iscen and Giorgos Tolias and Yannis Avrithis and Ondrej Chum}, |
| | year={2018} |
| | } |
| | ``` |
| |
|
| | ## Dataset Homepage |
| |
|
| | [RevisitOP project page](http://cmp.felk.cvut.cz/revisitop/) |
| |
|