-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
Add New Data Augmentation Technique: OA-Mix #11916
base: main
Are you sure you want to change the base?
Conversation
Hi @jbwang1997, I just wanted to kindly remind you to review this pull request when you get a chance. Your feedback would be greatly appreciated. 😊 Thanks in advance! |
Hi @ShanjayM, thanks you for approving the PR! Could someone confirm if this can be merged as is, or if there’s anything I need to address before we proceed? Thanks! |
@ShanjayM , could you confirm our PR? Thanks for your effort in advance. |
Motivation
This pull request introduces OA-Mix, a key component of the OA-DG (Object-Aware Domain Generalization) framework, designed to improve domain generalization in object detection. The goal is to enhance the model's robustness against domain shifts by generating diverse multi-domain data without compromising object annotations.
OA-Mix was first introduced in the paper titled "Object-Aware Domain Generalization for Object Detection," which was presented as an oral session at AAAI 2024. The method has shown state-of-the-art performance on domain generalization benchmarks for object detection.
Modification
This PR implements the following:
level_to_mag()
function to prevent the level from being divided into only two steps when min_mag=0.0 and max_mag=0.1 in translation transformations by changinground(*, 1)
toround(*, 2)
.BC-breaking (Optional)
The proposed modification is backward-compatible. OA-Mix is introduced as an optional augmentation technique, and the update to
level_to_mag()
only improves the precision of existing transformations, without breaking previous usage.If you want to use OAMix, simply modify the
train_pipeline
in the configuration file as shown below:Use cases (Optional)
OA-Mix is particularly useful for:
Below is a performance comparison between a baseline object detection model and the same model with OA-Mix applied:
The model was evaluated using the robust detection benchmark, which can be run using the test_robustness.py script provided by mmdetection.
Checklist