Skip to content

Pass bboxes key to Albumentations transforms#395

Open
dtronmans wants to merge 1 commit intomainfrom
fix/bbox-key
Open

Pass bboxes key to Albumentations transforms#395
dtronmans wants to merge 1 commit intomainfrom
fix/bbox-key

Conversation

@dtronmans
Copy link
Contributor

Purpose

Albumentations engine reads data["bboxes"], so augmentations that read bounding boxes (in this example this concerned AtLeastOneBBoxRandomCrop) would not actually resort to the bounding boxes.

Specification

Dependencies & Potential Impact

Deployment Plan

Testing & Validation

Before this fix, using the following config on inspecting the crack instance segmentation dataset:

- name: AtLeastOneBBoxRandomCrop
  params:
    height: 40
    width: 40
    erosion_factor: 0.0
    p: 1.0

Would lead to some images with crops not actually containing bounding boxes, even though this augmentation should guarantee a bounding box per image crop. For example:

wrong_before

With this fix, even with a small crop size (40x40), every resulting image contains a bounding box:

correct_now

@dtronmans dtronmans requested a review from a team as a code owner February 25, 2026 13:46
@dtronmans dtronmans requested review from conorsim, klemen1999, kozlov721 and tersekmatija and removed request for a team February 25, 2026 13:46
@github-actions github-actions bot added the fix Fixing a bug label Feb 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix Fixing a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant