albumentations-team / albumentations_examples

Augmentations usage examples for albumentations library
MIT License
419 stars 98 forks source link

resized_image = F.resize(image, height=256, width=256) #27

Open ArupSankarRoy opened 6 months ago

ArupSankarRoy commented 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'

ternaus commented 2 months ago

What is the source of this code, i.e. what notebook?

tanmay4269 commented 1 week ago

this worked for me: from albumentations.augmentations.geometric import functional as F

I'm using albumentations version 1.3.1