Repository navigation
fix(bdd100k): update detection adapter for the pristine Berkeley raw … - #10
Merged
Merged
Conversation
…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
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…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:
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
python -m pytest tests/ -v)pre-commit run --all-files)Related Issues