Skip to content

Add custom Augmentations - Albumentation Wrapper #263

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

panagiotamoraiti
Copy link

Description

This PR adds custom Albumentations wrappers and additional augmentation classes to the rf-detr repository, addressing issue #81. The changes enable seamless integration of Albumentations transforms with bounding box support, as well as custom resizing and cropping augmentations missing from torchvision. A RandomSelect wrapper is also introduced to probabilistically select between two augmentation pipelines, increasing augmentation diversity.

This enhancement improves flexibility and configurability of data augmentations for object detection training pipelines.

Dependencies:

  • Albumentations library

Type of change

Please delete options that are not relevant.

  • [Augmentations]New feature (non-breaking change which adds functionality)

How has this change been tested, please provide a testcase or example of how you tested the change?

Verified integration by running training with new augmentations enabled.
Additionally, original vs. augmented images were saved along with the bboxes for further inspection.

You can check an example below:

Screenshot from 2025-07-16 14-30-33

The augmentations are loaded from a config file.

@Akhp888
Copy link

Akhp888 commented Jul 29, 2025

Hello @panagiotamoraiti

Thanks for working on this PR , I agree this is a very important part missing in the current setup .
Said that based on your changes i would suggest to also add copy-paste and mosaic as well to the augmentation options.

Thank you

@panagiotamoraiti
Copy link
Author

@Akhp888 Nice suggestions! I can definitely add these additional augmentations.

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.

2 participants