Skip to content

fix(bdd100k): update detection adapter for the pristine Berkeley raw … - #10

Merged
dronefreak merged 2 commits into
mainfrom
feat/bdd100k-pristine-adapter
Oct 25, 2026
Merged

dronefreak merged 2 commits into
mainfrom
feat/bdd100k-pristine-adapter

Conversation

@dronefreak

Copy link
Copy Markdown
Owner

…layout

The BDD100K HF mirror was rebuilt this cycle from Berkeley's own distribution server instead of the old third-party Kaggle mirror, in its raw as-provided format. This adapts the detection adapter to match:

  • Raw layout changed from images/100k/{train,val} + one combined bdd100k_labels_images_{train,val}.json per split, to images_100k/100k/{train,val,test} + one native per-image JSON per image under labels/100k/{train,val,test} (frames[0].objects, not a flat top-level "labels" list). Label "name" no longer includes the .jpg extension.
  • All three official splits now ship real labels, including test (20,000 images) -- verified directly against sample files, contrary to the commonly repeated claim that BDD100K withholds test labels. Official train/val/test now map directly onto canonical train/valid/test, instead of carving a seeded 15% validation slice out of train.
  • Recursive glob for both images and labels, since the HF mirror shards both into shard_NNN/ subdirectories per split.
  • Fixed a stale "no HF mirror" comment in configs/bdd100k_yolo.yaml and configs/bdd100k_rfdetr.yaml now that dronefreak/BDD100K exists.

Validated end-to-end at full scale (70,000/10,000/20,000 images, zero skipped) against the pristine raw data via the real CLI entrypoints (prepare-coco -> convert-coco-to-yolo), and with 1-epoch/batch-4 smoke training + val + test runs on both YOLO11n and RF-DETR-nano. Regenerated docs/datasets/bdd100k/README.md stats against the new layout.

Summary

Changes

Testing

  • Tests pass locally (python -m pytest tests/ -v)
  • Pre-commit hooks pass (pre-commit run --all-files)

Related Issues

…layout

The BDD100K HF mirror was rebuilt this cycle from Berkeley's own
distribution server instead of the old third-party Kaggle mirror, in its
raw as-provided format. This adapts the detection adapter to match:

- Raw layout changed from images/100k/{train,val} + one combined
  bdd100k_labels_images_{train,val}.json per split, to
  images_100k/100k/{train,val,test} + one native per-image JSON per image
  under labels/100k/{train,val,test} (frames[0].objects, not a flat
  top-level "labels" list). Label "name" no longer includes the .jpg
  extension.
- All three official splits now ship real labels, including test (20,000
  images) -- verified directly against sample files, contrary to the
  commonly repeated claim that BDD100K withholds test labels. Official
  train/val/test now map directly onto canonical train/valid/test, instead
  of carving a seeded 15% validation slice out of train.
- Recursive glob for both images and labels, since the HF mirror shards
  both into shard_NNN/ subdirectories per split.
- Fixed a stale "no HF mirror" comment in configs/bdd100k_yolo.yaml and
  configs/bdd100k_rfdetr.yaml now that dronefreak/BDD100K exists.

Validated end-to-end at full scale (70,000/10,000/20,000 images, zero
skipped) against the pristine raw data via the real CLI entrypoints
(prepare-coco -> convert-coco-to-yolo), and with 1-epoch/batch-4 smoke
training + val + test runs on both YOLO11n and RF-DETR-nano. Regenerated
docs/datasets/bdd100k/README.md stats against the new layout.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RkDKDnxxJGk3GGAYJerTHm
@dronefreak dronefreak self-assigned this Oct 25, 2026
@dronefreak dronefreak added bug Something isn't working documentation Improvements or additions to documentation dependencies Enable dependency graph labels Oct 25, 2026
…olation

pr-policy.yml interpolated \${{ github.event.pull_request.title }},
\${{ github.head_ref }}, and \${{ toJson(github.event.pull_request.labels) }}
directly into the run: script body. GitHub Actions substitutes these
textually before bash ever runs, so a quote/backtick/paren in any of those
values breaks the surrounding quoting -- e.g. a label with an apostrophe in
its name or description crashes label-check with a bash syntax error
("unexpected token `('") before it ever gets to count the labels, which
then reports as a failed required check that looks like "no label" even
when labels are present. This is also GitHub's documented #1 Actions
script-injection anti-pattern, since these values are attacker-controlled
on a PR.

Fixed by passing each value through env: instead, which GitHub Actions
delivers as a real environment variable rather than literal text
substitution -- immune to both the quoting bug and injection.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RkDKDnxxJGk3GGAYJerTHm
@dronefreak
dronefreak merged commit 18dc0ab into main Oct 25, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working dependencies Enable dependency graph documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant