Add New Data Augmentation Technique: OA-Mix #11916
Open
+1,037
−442
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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