Open ArupSankarRoy opened 6 months ago
AttributeError Traceback (most recent call last) in <cell line: 5>() 3 image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB) 4 ----> 5 resized_image = F.resize(image, height=256, width=256) 6 padded_image = F.pad(image, min_height=512, min_width=512) 7 padded_constant_image = F.pad(image, min_height=512, min_width=512, border_mode=cv2.BORDER_CONSTANT)
AttributeError: module 'albumentations.augmentations.functional' has no attribute 'resize'
What is the source of this code, i.e. what notebook?
this worked for me: from albumentations.augmentations.geometric import functional as F
from albumentations.augmentations.geometric import functional as F
I'm using albumentations version 1.3.1
AttributeError Traceback (most recent call last) in <cell line: 5>()
3 image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
4
----> 5 resized_image = F.resize(image, height=256, width=256)
6 padded_image = F.pad(image, min_height=512, min_width=512)
7 padded_constant_image = F.pad(image, min_height=512, min_width=512, border_mode=cv2.BORDER_CONSTANT)
AttributeError: module 'albumentations.augmentations.functional' has no attribute 'resize'