OpenHotels-Updated / README.md
astylianou's picture
Match dataset card to original OpenHotels
0fd7763 verified
|
Raw History Blame Contribute Delete
10.3 kB
metadata
license: cc0-1.0
task_categories:
  - image-classification
  - image-feature-extraction
  - visual-document-retrieval
language:
  - en
tags:
  - hotel-identification
  - image-retrieval
  - visual-place-recognition
  - object-centric-retrieval
pretty_name: OpenHotels-Updated
size_categories:
  - 100K<n<1M
configs:
  - config_name: image_metadata
    default: true
    data_files:
      - split: gallery
        path: metadata_gallery.json
      - split: test_room
        path: metadata_test_room.json
      - split: test_object
        path: metadata_test_object.json
  - config_name: hotel_metadata
    data_files: metadata_hotels.json
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

OpenHotels-Updated

OpenHotels-Updated is a large-scale hotel image retrieval benchmark built from hotel-room imagery and associated hotel metadata. The dataset is designed for hotel-scale retrieval: given a query image, a system must retrieve the matching hotel from a large gallery containing both true matching classes and many distractor hotel classes.

Dataset Structure

The release contains tar-sharded image files under shards/ and four metadata files:

shards/
  gallery-00000.tar
  ...
  test_room-00000.tar
  ...
  test_object-00000.tar
  ...
metadata_gallery.json
metadata_test_room.json
metadata_test_object.json
metadata_hotels.json
croissant.json

The benchmark has three image subsets:

  • gallery: searchable reference images for all hotel classes, including distractor-only hotels.
  • test_room: held-out room-view query images.
  • test_object: held-out object-centric query images.

Statistics

Subset Hotels Images
Gallery 41,047 390,519
Test Room 15,658 60,153
Test Object 4,781 51,546

The gallery contains 293,132 room-view images and 97,387 object-centric images. Across both test subsets there are 16,019 unique hotel classes; the gallery includes 25,028 distractor hotel classes that do not appear in either test subset.

Metadata

The dataset includes the following metadata fields.

Image Metadata

All image metadata rows include:

  • path: image member name inside the tar file listed in shard.
  • shard: relative path to the tar shard containing the image.
  • hotel_id: stable anonymized hotel class identifier.
  • room: room identifier associated with the image upload when available. This is not the semantic room/view label.
  • timestamp: upload timestamp associated with the image.

Gallery rows additionally include:

  • is_object: whether the gallery image is object-centric.
  • view_type: room-level view category for room-view gallery images.
  • object_type: localized object category for object-centric gallery images.

Test Room rows additionally include:

  • view_type: room-level view category for the query image.

Test Object rows additionally include:

  • object_type: localized object category for the query image.

view_type describes the room-level view depicted in a room image. Possible values are: bedroom, bathroom, living area, hallway, kitchen, closet, and balcony.

object_type describes the localized hotel-room object depicted in an object-centric image. Possible values are: bed, lamp, artwork, window/curtains, toilet, nightstand, sink, seating, office desk, shower/bathtub, tv, wardrobe, door, chest, mirror, kitchen appliances, flooring, and sign.

Example gallery row:

{
  "path": "images/gallery/00/00003/0000.jpg",
  "shard": "shards/gallery-00000.tar",
  "hotel_id": "00003",
  "room": "2116",
  "timestamp": "2018-10-29T00:33:41",
  "is_object": false,
  "view_type": "bedroom"
}

Example Test Room row:

{
  "path": "images/test_room/00/000000.jpg",
  "shard": "shards/test_room-00000.tar",
  "hotel_id": "00003",
  "room": "2124",
  "timestamp": "2018-10-31T17:38:53",
  "view_type": "bedroom"
}

Example Test Object row:

{
  "path": "images/test_object/00/000000.jpg",
  "shard": "shards/test_object-00000.tar",
  "hotel_id": "00003",
  "room": "1215",
  "timestamp": "2022-08-19T19:29:49",
  "object_type": "bed"
}

Hotel Metadata

Each row in metadata_hotels.json describes one hotel class:

  • hotel_id: stable anonymized hotel class identifier.
  • name: hotel name.
  • lat: hotel latitude in decimal degrees.
  • lng: hotel longitude in decimal degrees.
  • date_added: timestamp when the hotel record was added.
  • in_gallery: whether the hotel appears in the gallery subset.
  • in_test_room: whether the hotel appears in the Test Room subset.
  • in_test_object: whether the hotel appears in the Test Object subset.
{
  "hotel_id": "00000",
  "name": "Extended Stay America - Fairbanks - Old Airport Way",
  "lat": 64.83538,
  "lng": -147.8233,
  "date_added": "2015-06-25T21:34:48",
  "in_gallery": true,
  "in_test_room": false,
  "in_test_object": false
}

Loading Images from Shards

The same helper can load gallery images and both query subsets. The metadata row tells the loader which tar shard contains the image and which member path to read from that shard.

import json
import tarfile
from io import BytesIO
from PIL import Image

def load_image(row):
    """Load one OpenHotels-Updated image from its tar shard."""
    with tarfile.open(row["shard"], "r") as tar:
        image_file = tar.extractfile(row["path"])
        return Image.open(BytesIO(image_file.read())).convert("RGB")

def load_metadata(path):
    with open(path) as f:
        return json.load(f)

Load a gallery image. Gallery rows contain is_object; room-view gallery rows include view_type, and object-centric gallery rows include object_type.

gallery = load_metadata("metadata_gallery.json")
gallery_row = gallery[0]
gallery_image = load_image(gallery_row)

print(gallery_row["hotel_id"], gallery_row["path"])
if gallery_row["is_object"]:
    print("object type:", gallery_row["object_type"])
else:
    print("view type:", gallery_row["view_type"])

Load a Test Room query image and inspect its room-level view label.

test_room = load_metadata("metadata_test_room.json")
room_row = test_room[0]
room_image = load_image(room_row)

print(room_row["hotel_id"], room_row["path"])
print("view type:", room_row["view_type"])

Load a Test Object query image and inspect its object label.

test_object = load_metadata("metadata_test_object.json")
object_row = test_object[0]
object_image = load_image(object_row)

print(object_row["hotel_id"], object_row["path"])
print("object type:", object_row["object_type"])

Evaluation Protocol

Use the gallery as the retrieval database. Evaluate the two query subsets separately:

  • Test Room evaluates retrieval from room-level query images.
  • Test Object evaluates retrieval from object-centric query images.

For each query, rank gallery images or aggregate ranked images to hotel-level predictions, then score retrieval against the query hotel_id. The standard metrics are Recall@K for K in {1, 5, 10, 100}.

Usage

OpenHotels-Updated and its associated models are provided to support research and educational work on visual recognition, retrieval, representation learning, and related areas. Because visual datasets and models can be used in contexts beyond those anticipated by their creators, access to OpenHotels-Updated and its associated models is gated to support thoughtful, responsible use and to make these usage expectations visible to prospective users.

These resources should not be used:

  • to identify, locate, track, profile, or target specific individuals;
  • in ways that facilitate surveillance, harassment, discrimination, exploitation, or other harm;
  • to infer sensitive personal information about individuals;
  • in law-enforcement, immigration-enforcement, military, intelligence, or commercial-surveillance applications without first consulting the maintainers;
  • to reconstruct, re-identify, or expose information that has been removed, obscured, or anonymized;
  • to redistribute the dataset, model weights, or access credentials to individuals who have not separately received access; or
  • to create or release derivative resources that materially increase the risk of misuse without appropriate ethical and safety review.

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.

Users are responsible for determining whether their proposed work requires review by an institutional review board, ethics committee, data-protection office, or other relevant authority. Access to these resources should not be understood as ethical, legal, institutional, or regulatory approval for a particular project.

We encourage users to describe the limitations and foreseeable risks of these resources in resulting publications and other outputs, consider the people and communities who could be affected by their use, and avoid claims or demonstrations that encourage harmful or inappropriate deployment.