hushell / pmf_cvpr22

181 stars 23 forks source link

Depreciated augmentation Scale in favour of Resize #28

Closed W-XuWX closed 3 months ago

W-XuWX commented 1 year ago

HI there,

Encounted error: https://github.com/pytorch/vision/issues/5927 while testing cross-domain fine-tuning.

Fix approach: under CropDisease_few_shot.py (and other datasets)

def parse_transform(..):
# replace Scale with Resize:
        elif transform_type=='Resize':
            return method([int(self.image_size*1.15), int(self.image_size*1.15)])
...

def get_composed_transform(...):
# replace Scale with Resize
else:
    transform_list = ["Resize", ... ]