Download README.md from szymmon/cubes-counting-database: direct link, hf CLI and curl.
- Browser
- Download file 4.12 kB
-
https://huggingface.co/datasets/szymmon/cubes-counting-database/resolve/main/README.md
- Command line
-
hf download hf://datasets/szymmon/cubes-counting-database/README.md
-
curl -L -o README.md https://huggingface.co/datasets/szymmon/cubes-counting-database/resolve/main/README.md
pretty_name: Cubes Counting Database
language:
- en
size_categories:
- n<1K
tags:
- computer-vision
- object-counting
- benchmark
- robustness
configs:
- 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 black cubes (distractors that can also be counted). Every physical toss is photographed by two cameras at 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_index1-12). - Noise ratio 0, 0.5, 1, 2. The number of black cubes is
ceil(noise_ratio * n_red). - Two combinations are not collected: (1 red, 0.5) and (50 red, 2). For 35 red at noise 2 the
design would need 70 black cubes, so 50 black cubes are used instead (
noise_ratiostays at its nominal 2,n_blackis the truth). That leaves 46 red/black combinations per capture condition. - Each combination is tossed three times (
replicate1-3), once perlayout: spread, clustered, stacked. 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 thesideview. - Lighting (
diffuseorhard) 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 or 3). |
layout |
string | How the cubes lie in the picture: spread (replicate 1), clustered (replicate 2) or stacked (replicate 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
from 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_redandn_blackare the cubes physically present). - No license has been chosen yet.