mmsegmentation
mmsegmentation copied to clipboard
Fix Albu Transform in transforms.py
Directly using the Albu class in transforms.py for data augmentation will result in an error. After debugging point by point, I found that it was because redundant key-value pairs were passed into self.aug, so I made this modification.
Motivation
- Added a new variable albumentations_results in the transform function to remove redundant keys from results, preventing errors in self.aug.
Modification
- Introduced the albumentations_results variable in the transform function to store and process the image and mask keys.
- Removed redundant keys from results to ensure self.aug works correctly.
Notes for Reviewers
- Please review the implementation of albumentations_results to confirm it effectively removes redundant keys and works as expected.