add dataset card
Browse files123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687---pretty_name: Cubes Counting Databaselanguage: - ensize_categories: - n<1Ktags: - computer-vision - object-counting - benchmark - robustnessconfigs: - config_name: default data_files: - split: train path: data/*.parquet---
# Cubes Counting Database
A small, controlled image dataset for testing how well computer-vision models **count objects**as the number of objects, the amount of visual clutter and the capture conditions change.
Each photo shows red cubes (the primary thing to count) mixed with a controlled number of blackcubes (distractors that can also be counted). Every physical toss is photographed by two camerasat once: one looking straight down and one from the side.
## Collection design
- **Red cubes** per level: 1, 2, 3, 5, 7, 10, 13, 16, 20, 25, 35, 50 (12 levels, `level_index` 1-12).- **Noise ratio** 0, 0.5, 1, 2. The number of black cubes is `ceil(noise_ratio * n_red)`.- Three combinations are not collected: (1 red, 0.5), (35 red, 2) and (50 red, 2). That leaves **45 red/black combinations** per capture condition.- Each combination is tossed several times (`replicate`) and each toss is photographed by both cameras.- Cubes are tossed onto the surface (`arrangement = tossed`).- Cameras: two Logitech C920 webcams. Camera index 0 is the top-down (`nadir`) view, index 1 is the `side` view.- Lighting (`diffuse` or `hard`) is fixed for a whole collection session.
## Structure
One row is one image. One physical toss (`scene_id`) gives two rows: `nadir` and `side`.One red/black combination (`experiment_id`) groups all of its replicate tosses.
| Column | Type | Meaning ||---|---|---|| `image` | Image | The photo. || `n_red` | int32 | Red cubes physically present (1-50). Primary label. || `n_black` | int32 | Black cubes physically present. Second label: "count the black ones" is a valid task on the same image. || `camera_position` | string | `nadir` or `side`. || `lighting` | string | `diffuse` or `hard`. || `arrangement` | string | `tossed` or `placed`. This collection uses `tossed`. || `noise_ratio` | float32 | Nominal design value (0, 0.5, 1, 2). Metadata only: `n_black` is the ground truth. || `level_index` | int8 | Count stratum 1-12. Distinct from the count itself. || `scene_id` | string (ULID) | One physical toss. Shared by its nadir and side rows. || `experiment_id` | string (ULID) | One red/black combination. Shared by all of its replicate tosses. || `replicate` | int8 | Which toss of this combination (1, 2, 3, ...). || `camera_body` | string | Camera model (`C920`). || `captured_at` | timestamp[s, UTC] | Capture time. Detects time drift and recovers session order. || `human_annotator` | list of ClassLabel | Who counted, in order. Empty list means unlabeled. || `human_count_red` | list of int32 | Red count per annotator. Index i matches `human_annotator[i]`. || `human_count_black` | list of int32 | Black count per annotator, same alignment. |
The `human_*` columns are optional. Currently they are empty for every row.
## Usage
```pythonfrom datasets import load_dataset
ds = load_dataset("szymmon/cubes-counting-database", split="train")row = ds[0]print(row["n_red"], row["n_black"], row["camera_position"])row["image"] # PIL image```
Rows from the same toss share `scene_id`, so group or split on `scene_id` (or`experiment_id`) to avoid putting the same toss on both sides of a train/test split.
## Limitations
- Small, single-setup dataset: one table, one pair of cameras, a limited set of lighting conditions.- Ground-truth counts come from the experimental design (the cubes the collector prepared), not from annotation of the images (`n_red` and `n_black` are the cubes physically present).- No license has been chosen yet.README.mdAdded+87