Skip to content

Conversation

@bernardev254
Copy link

Summary

This PR completes the implementation of bounding box transformation logic in the create_global_crops() function in hackathon/augmentations.py.

Changes

  • Applies random_resized_crop and random_horizontal_flip to images and bounding boxes.
  • Filters out invalid (fully cropped out) bounding boxes.
  • Extracts corresponding labels using valid indices.
  • Stores per-crop detection targets as dictionaries with "bboxes" and "labels" under crops_heatmaps.
  • Keeps the original output structure to avoid major changes in the data pipeline.

Motivation

Bounding box augmentation was previously unimplemented (NotImplementedError). This PR ensures that
global crops of images are now paired with appropriately transformed bounding boxes and class labels, enabling object detection models to learn from augmented data.
closes #2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement bounding box transformations in 'create_global_crops'

1 participant