Dataset Viewer
Auto-converted to Parquet Duplicate
Search is not available for this dataset
image
imagewidth (px)
140
500
End of preview. Expand in Data Studio

Waterbirds (OCCAM layout)

This repository hosts the Waterbirds image files used in the OCCAM codebase (arXiv), laid out for experiments on subpopulation / group shifts, foreground-only, and background-only evaluation.

Original data and credit

The images come from the Waterbirds benchmark introduced with group distributionally robust optimization in:

Shiori Sagawa, Pang Wei Koh, Tatsunori B. Hashimoto, Percy Liang, Distributionally Robust Neural Networks for Group Shifts: On the Importance of Regularization for Worst-Case Generalization, arXiv:1911.08731.

Please cite that work when using the original benchmark. Licensing and redistribution terms of the underlying images follow the original dataset / WILDS release; refer to the paper and official sources for details.

Folder layout (twelve subscenarios)

On the Hugging Face Files tab you should see twelve top-level folders (three per historical group_0group_3): the original scene, *_fg_only (foreground crop), and *_bg_only (background crop). Each triplet shares the same spurious-cue group:

Folder Description
landbird_on_land Original image (foreground + background); same spurious-cue group as historical group_0
landbird_on_water Original image (foreground + background); same spurious-cue group as historical group_1
waterbird_on_land Original image (foreground + background); same spurious-cue group as historical group_2
waterbird_on_water Original image (foreground + background); same spurious-cue group as historical group_3
landbird_on_land_fg_only Foreground-only crop for the same group as landbird_on_land
landbird_on_water_fg_only Foreground-only crop for the same group as landbird_on_water
waterbird_on_land_fg_only Foreground-only crop for the same group as waterbird_on_land
waterbird_on_water_fg_only Foreground-only crop for the same group as waterbird_on_water
landbird_on_land_bg_only Background-only crop for the same group as landbird_on_land
landbird_on_water_bg_only Background-only crop for the same group as landbird_on_water
waterbird_on_land_bg_only Background-only crop for the same group as waterbird_on_land
waterbird_on_water_bg_only Background-only crop for the same group as waterbird_on_water

Background-only crops are paired with fg+bg composites via metadata.csv at the dataset root (img_filenameplace_filename; same basename under *_bg_only as under the matching fg+bg subscenario). The upload script copies pixels from Places 256 (data/dataset/places/data_256_standard by default, configurable via --places-root) using place_filename (see sync_bg_only_subscenarios_from_metadata in occam/datasets/waterbirds_metadata.py).

Class labels inside 0/ and 1/

Each subscenario folder contains subfolders 0 and 1, which are the binary coarse bird-type labels used by OCCAM configs and ImageFolder-style loaders:

  • 1landbird
  • 0waterbird

(These are not the 200 fine-grained species names; they are the two high-level types for the Waterbirds classification head in this benchmark.)

Foreground-only crops follow the deep feature reweighting setting; extraction follows Kirichenko, Izmailov & Wilson, Last Layer Re-Training is Sufficient for Robustness to Spurious Correlations (arXiv:2204.02937; code).

Background-only crops use the same grouping as the original Waterbirds benchmark; they are distributed alongside the other subscenarios for analysis (e.g. background shift without the bird).

Hub Dataset Viewer (Subset = subscenario)

The dataset card YAML declares configs with one entry per subscenario. Each config sets data_dir to that folder so the Hub uses the built-in ImageFolder loader: one train split per subset, columns image and label (folder names 0 / 1; see above for bird-type meaning).

Example:

from datasets import load_dataset

ds = load_dataset("YOUR_ORG/waterbirds", "landbird_on_land_fg_only", split="train")

No trust_remote_code is required (datasets 4.x does not load Hub Python dataset scripts).

If the viewer still shows a single default subset after updating the card, delete any stale auto-generated data/ folder on the Hub Files tab (leftover from an older layout) and refresh the page.

metadata.csv

The repository includes metadata.csv at the root (WILDS-style columns: img_id, img_filename, y, split, place, place_filename). Use it to recover the original bird image path and background Places path for each composite. Under each Hub subscenario, image files are named from img_filename; the matching *_bg_only file uses the same basename so fg+bg and bg-only subsets stay aligned.

OCCAM codebase

Download scripts, configs, and full experiment documentation live in the OCCAM repo:

The canonical download path in the codebase is scripts/download_datasets_and_checkpoints.py, which fetches this dataset from the Hub after installing UrbanCars / CounterAnimals from the shared Google Drive archive.

Citation (OCCAM)

If you use this exact packaging together with OCCAM, please also cite the OCCAM paper (HF paper page, arXiv).

Downloads last month
2,273

Papers for arubique/waterbirds