Acknowledge the terms to access this dataset

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Access is granted for non-commercial research and evaluation use only. By requesting access you agree not to redistribute this dataset or any derivative data, to cite Dhi Technologies in any publication or output that uses it, and to obtain a separate commercial license via dhi-tech.com before any commercial use. Access requests are reviewed manually by Dhi Technologies.

Log in or Sign Up to review the conditions and access this dataset content.

Amodal Counting Benchmark

Product: amodal-counting, "count what detectors can't see": visibility-corrected object counting through crowds, clutter, and occlusion, reported as a calibrated interval rather than a bare point estimate.

This dataset is the exact evaluation population the product's own amodal bench command scores against: procedurally generated scenes with known ground-truth occupancy, a simulated detector with a known detectability curve, and the naive-vs-corrected accuracy each scene produces. It ships so anyone can re-run the scoring, not just read a claimed number.

Synthetic data, real-data validation in progress

Every scene here is procedurally generated (ground-truth boxes, occluders, and a simulated detector with a known detectability curve). It is built so every claim the product makes can be checked against exact ground truth, not to resemble any specific real camera or crowd. The detectability curve for each crowding level is calibrated on 240 held-in synthetic worlds and scored fresh on the 160 held-out scenes shipped in scenes.jsonl for that crowding level and seed run, so the table below is not computed on data the calibration saw. This dataset itself contains no real-world imagery.

What's in this dataset

  • scenes.jsonl (6,000 rows, about 6.8 MB): 5 occlusion-density levels (crowding in {0.0, 0.2, 0.4, 0.6, 0.8}) times 3 independent generation seeds (seed_run in {10, 11, 12}), 400 scenes per (crowding, seed_run) pair, generated by the repo's own amodal.synth.generate_scenes. Within each 400-scene pair the first 240 rows (in generation order) are "split": "train" and the last 160 are "split": "eval", matching the train/eval counts used to produce bench_results.json below. Each row:
    {"crowding": 0.0, "image_size": [640, 480],
     "detections": [[x1, y1, x2, y2], ...],
     "occluders": [[x1, y1, x2, y2], ...],
     "true_count": 12, "detected_count": 10,
     "true_visibilities": [1.0, 1.0, ...], "seed": 1000000,
     "seed_run": 10, "split": "train"}
    
    detections are what a simulated detector reports (it misses occluded objects per a logistic detectability curve); true_count and true_visibilities are ground truth, not predictions. seed is the per-scene generator seed (seed_run * 100_000 + i); seed_run and split are new columns added for this enlarged corpus and are not present in earlier releases of this dataset.
  • bench_results.json (about 8.4 KB): output of three independent runs of amodal.bench.run_bench (one per seed_run in {10, 11, 12}), each with n_train_scenes=240, n_eval_scenes=160, and crowding_sweep=(0.0, 0.2, 0.4, 0.6, 0.8). The file has two top-level keys: "per_seed", a list of the three raw run_bench outputs, and "aggregate", the mean and standard deviation across those three seeds per crowding level (the source of the table below).

How to load it

Verified against the actual files in this repository (prints 6000 scenes, 0.0 12 10 10 train, and 2.3133 1.8067):

import json
from huggingface_hub import hf_hub_download

repo_id = "Dhi-Technologies/amodal-counting-benchmark"
scenes_path = hf_hub_download(repo_id, "scenes.jsonl", repo_type="dataset")
bench_path = hf_hub_download(repo_id, "bench_results.json", repo_type="dataset")

scenes = [json.loads(line) for line in open(scenes_path)]
bench = json.load(open(bench_path))

print(len(scenes), "scenes")
print(scenes[0]["crowding"], scenes[0]["true_count"], scenes[0]["detected_count"],
      scenes[0]["seed_run"], scenes[0]["split"])
print(bench["aggregate"]["0.0"]["naive_mae_mean"], bench["aggregate"]["0.0"]["corrected_mae_mean"])

No datasets library loader script ships here; this is plain JSON Lines and JSON, readable with the standard library once downloaded.

Measured result (from this repo, reproduced when this dataset was generated)

Naive count is the raw detector count. Corrected count is the visibility-corrected estimate. Coverage is how often the 90% calibrated interval actually contained the true count, over 160 held-out scenes at that crowding level, per seed. The table below is the mean (plus standard deviation) across three independent generation seeds (10, 11, 12), not a single-seed point estimate: each cell aggregates 3 runs of 160 held-out scenes (480 scenes per crowding level total).

crowding naive MAE (mean ± std) corrected MAE (mean ± std) 90% CI coverage (mean)
0.0 2.3133 ± 0.0473 1.8067 ± 0.0814 0.906
0.2 2.3700 ± 0.0361 2.0033 ± 0.0666 0.888
0.4 2.5167 ± 0.0751 1.9233 ± 0.0551 0.902
0.6 2.9000 ± 0.1000 2.1033 ± 0.0764 0.906
0.8 3.7000 ± 0.1300 2.6867 ± 0.1193 0.889

Reproduce with (three separate seeds, then average, exactly as scripts/generate_hf_benchmark.py does in the product repo):

PYTHONPATH=src .venv/bin/python -c "
from amodal.bench import run_bench
for s in (10, 11, 12):
    print(s, run_bench(crowding_sweep=(0.0,0.2,0.4,0.6,0.8), n_train_scenes=240, n_eval_scenes=160, seed=s))
"

Schema notes

  • Boxes are [x1, y1, x2, y2] in pixels, image origin top-left.
  • true_visibilities is the ground-truth fraction of each true object NOT covered by occluders, other objects, or the frame border: the quantity the estimator has to recover from detections alone.
  • seed_run (10, 11, 12) identifies which of the three independent generation seeds a row came from; seed is the per-scene seed derived from it (seed_run * 100_000 + row_index_in_pair).
  • split ("train" or "eval") marks which 240/160 partition of each (crowding, seed_run) block of 400 scenes a row belongs to. The "train" rows are the curve-fitting worlds actually used to produce bench_results.json; the "eval" rows are the held-out worlds actually scored. Earlier releases of this dataset shipped eval-only scenes with the calibration worlds generated on demand and not saved as static files; this release ships both splits so the exact scenes behind the headline table are reproducible from the file alone.

Real-world evidence (attributed to the product repo, not re-run for this card)

The synthetic table above demonstrates the method works when its own generative assumptions hold; it is not a claim about real camera behavior. The product repository separately documents a real-data re-test on CrowdHuman validation data (a public pedestrian-detection benchmark, SAHI tiled YOLOv8s detector, 270 images, 6,809 ground-truth boxes, run on external GPU hardware). These numbers are read from the repo's own evidence/a4_realdata/RESULTS.md, not independently reproduced for this card:

  • One-directional occlusion correction did not beat naive counting on that real dataset: naive MAE 11.767 versus corrected MAE 22.475 (single-feature curve) or 28.228 (multivariate curve), with interval coverage around 39 to 41% against a 90% target.
  • A two-sided estimator (adding a fitted precision model) is reported as the first variant to beat naive counting on that data: MAE 11.767 down to 11.031, coverage 90.67% against a 90% target.
  • On the 20 single densest real scenes (up to 227 true people from as few as 20 to 30 raw detections), naive counting remains better and the estimator's own coverage flag drops to 50%, correctly signaling extrapolation rather than silently failing.

Method card, no trained weights

This product is pure Python (numpy/scipy) math, not a trained model. There are no weights to download: the "detector" here is a simulated detectability curve, and the correction is Horvitz-Thompson estimation with conformal interval calibration. The honest finding worth flagging: uncapped correction can be worse than naive counting when a few near-zero-probability detections dominate the variance (measured per-scene MAE 2.89 vs 2.63 naive at crowding 0.6 with min_p=0.1), which is why the weight cap is set by measurement, not taste. See the calibration deep-dive post.

Limitations

  • Synthetic only in this dataset: no real camera footage or real crowd imagery ships here.
  • Three generation seeds (10, 11, 12), not a single seed: the headline table above is a mean plus standard deviation over 3 independent runs of 160 held-out scenes per crowding level (480 scenes total per level), which is still a small number of seeds, not a full distributional estimate.
  • Every scene still fixes n_objects=12 per scene and n_occluders=2; the sweep varies only the crowding placement-density knob, not object count or occluder count. The "detector" is still the same simulated logistic detectability curve (detector_k=10.0, detector_v0=0.35) used throughout the product repo, not a real learned model.
  • The visibility signal is pure box geometry (coverage by occluders and other detections); it carries no learned appearance model of occlusion.
  • The one real-world comparison available (CrowdHuman, above) shows the naive one-directional correction can make counting worse, not better, when the underlying detector's error is a two-sided mix of misses and duplicate/artifact overcounts.

Regeneration provenance

This corpus was regenerated on 2026-07-09 to enlarge the dataset from 160 to 6,000 scenes. Generated from the amodal-counting product repo at the commit tagged main on that date, using its own src/amodal/synth.py and src/amodal/bench.py unmodified, via:

PYTHONPATH=src .venv/bin/python scripts/generate_hf_benchmark.py --out-dir /tmp/hf_benchmark_out

which, for each crowding in (0.0, 0.2, 0.4, 0.6, 0.8) and each seed_run in (10, 11, 12), calls generate_scenes(400, seed=seed_run, crowding=crowding) (default n_objects=12, n_occluders=2, image_size=(640, 480), noise_px=1.5, detector_k=10.0, detector_v0=0.35) and splits the 400 resulting scenes into the first 240 as "train" and the last 160 as "eval" in generation order, and separately calls run_bench(crowding_sweep=(0.0,0.2,0.4,0.6,0.8), n_train_scenes=240, n_eval_scenes=160, seed=seed_run) for each seed_run, then aggregates the three runs' naive_mae, corrected_mae, and ci_coverage per crowding level into the mean and standard deviation reported above. All numbers in this card come directly from those runs; none were estimated or carried over from the prior 160-row release.

License

This dataset is released under CC BY-NC 4.0 (non-commercial). Access is gated and requires manual approval: it is provided for non-commercial research and evaluation only, redistribution is not permitted, and any publication or output using it should cite Dhi Technologies. Commercial use requires a separate agreement; contact dhi-tech.com.

Try it

Source & research context

Commercial licensing

Research and evaluation use is free. Production and commercial use is licensed self-serve with published prices.

Downloads last month
61

Space using Dhi-Technologies/amodal-counting-benchmark 1

Collections including Dhi-Technologies/amodal-counting-benchmark