Download README.md from imagingforgood/OpenHotels2: direct link, hf CLI and curl.
- Browser
- Download file 5.3 kB
-
https://huggingface.co/datasets/imagingforgood/OpenHotels2/resolve/main/README.md
- Command line
-
hf download hf://datasets/imagingforgood/OpenHotels2/README.md
-
curl -L -H "Authorization: Bearer $HF_TOKEN" -o README.md https://huggingface.co/datasets/imagingforgood/OpenHotels2/resolve/main/README.md
license: cc0-1.0
pretty_name: OpenHotels2
task_categories:
- image-classification
- image-feature-extraction
- visual-document-retrieval
language:
- en
tags:
- hotel-identification
- visual-place-recognition
- bounding-boxes
size_categories:
- 100K<n<1M
viewer: false
extra_gated_prompt: >
By requesting access, you agree not to use OpenHotels-Updated or its
associated models to identify, locate, track, profile, or target specific
individuals; infer sensitive personal information; facilitate surveillance,
harassment, discrimination, exploitation, or other harm; reconstruct or expose
information that has been removed, obscured, or anonymized; or create
derivative resources that materially increase the risk of misuse without
appropriate ethical and safety review.
You also agree not to redistribute the resources or access credentials to
individuals who have not separately received access. You understand that
proposed uses in law enforcement, immigration enforcement, military,
intelligence, or commercial surveillance contexts warrant particular scrutiny
and should undergo appropriate independent ethical, legal, and institutional
review before proceeding.
extra_gated_fields:
I intend to use these resources for:
type: select
options:
- Research
- Education
- label: Other
value: other
Briefly describe your intended use: text
I have read these usage expectations and agree to use the resources consistently with them: checkbox
OpenHotels2
OpenHotels2 is a benchmark for identifying hotels from images. It contains 474,322 images from 40,974 hotels, with a gallery and one test set for single-image and multi-image retrieval. Each image includes room-type labels, object labels with bounding boxes, a timestamp, and hotel and visit membership.
| Split | Images | Hotels | Visits |
|---|---|---|---|
| gallery | 464,322 | 40,974 | 96,185 |
| test | 10,000 | 4,613 | 5,156 |
Every test hotel has images in the gallery, which also contains distractor hotels. There is no training split. The full download is approximately 254 GB in 257 TAR shards containing upright JPEG and PNG images.
Download and use
Request access on the dataset page, then install the dependencies and sign in:
pip install huggingface_hub Pillow
hf auth login
Download the release:
from huggingface_hub import snapshot_download
snapshot_download("imagingforgood/OpenHotels2", repo_type="dataset",
local_dir="OpenHotels2")
Run this from the downloaded OpenHotels2 directory:
from load_openhotels import OpenHotels2
dataset = OpenHotels2(".")
hotel_id, visit_id, path, annotation = next(dataset.iter_images("test"))
image = dataset.load_image(path) # returns a Pillow image
print(hotel_id, annotation["room_labels"], annotation["objects"])
# Use dataset.iter_images("gallery") to iterate the reference images.
The loader reads images directly from the TAR shards; extraction is unnecessary.
Loading the metadata and index requires several GB of RAM. To download only test
images and their metadata, add
allow_patterns=["*.json", "*.py", "README.md", "shards/test-*.tar"] to
snapshot_download. Retrieval evaluation requires the gallery as well.
Annotations and files
dataset.json: metadata grouped ashotels[hotel_id].visits[visit_id].images[image_path], including hotel names, coordinates, and image/visit counts.shards/: image archives;shard_index.jsonmaps image paths to their archive locations.load_openhotels.py: the Python loader used above (Python 3.10+).release_summary.json: dataset counts and label distributions. Additional manifests, checksums, and validation results describe the packaged files.
Each image has timestamp, width, height, room_labels, and objects.
objects maps each label to a list of [x_min, y_min, x_max, y_max] boxes in pixel
coordinates. Images are already upright, and dimensions and boxes refer to those
pixels. Multiple room labels are possible, including ambiguous.
Use the visit's split field for gallery/test membership; path names may contain
legacy split names. Observed room types are in room_labels.
Evaluation tasks
- Single-image hotel retrieval: use each test image as a query and rank gallery images. A result matches when its hotel ID equals the query's hotel ID. Report Recall@K: the fraction of queries with at least one matching image in the top K.
- Multi-image hotel retrieval: combine two or more test images from the same hotel or visit into a query set, then retrieve from the gallery. Report the grouping, query-set sizes, aggregation method, and set-level Recall@K.
- Performance by scene or object: break down retrieval results using
room_labelsand object labels to compare performance across image content.
Evaluate on the provided test split, and report the dataset revision and retrieval protocol. Bounding boxes support object-focused analysis, but annotations should not be assumed exhaustive for detection or instance-count evaluation.
License and access
Released under CC0-1.0. Access requires accepting the intended-use terms on the dataset page.