mmsegmentation icon indicating copy to clipboard operation
mmsegmentation copied to clipboard

Fix Albu Transform in transforms.py

Open RanFeng2 opened this issue 1 year ago • 1 comments

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.

RanFeng2 avatar Sep 11 '24 12:09 RanFeng2

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Sep 11 '24 12:09 CLAassistant