Skip to content

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.

@raphael0202
Copy link

Any news on this? It would be really valuable to have albumentation integration to RF-DETR!

@panagiotamoraiti
Copy link
Author

@raphael0202 I think someone responsible will evaluate the pull request. Till then you may use the code from this branch.

@isaacrob-roboflow @SkalskiP Any news about this issue?

@mkrupczak3
Copy link

👀

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.

4 participants