apple / ml-4m

4M: Massively Multimodal Masked Modeling
https://4m.epfl.ch
Apache License 2.0
1.62k stars 97 forks source link

AttributeError: module 'albumentations' has no attribute 'bbox_crop' #28

Closed gurbee closed 1 month ago

gurbee commented 1 month ago

Thank you all for your hard work, I have encountered function not exist issue as follows, really looking forward to implement it! Function not exist in import package, bbox_crop function is not found.

file: fourm/data/modality_transfroms.py/DetectionTransform/bboxes_crop_resize/modality_transforms.py code: line 689 package version:

# Name                    Version                   Build  Channel
albumentations            1.4.12                   pypi_0    pypi

image

import albumentations as A

bboxes = [tuple(A.bbox_crop(bbox[:4], x_min=xmin, y_min=ymin, x_max=xmax, y_max=ymax, rows=orig_height, cols=orig_width)) + tuple(bbox[4:]) for bbox in bboxes]
sumedh7 commented 1 month ago

I found the following to work: pip install albumentations==1.4.0

gurbee commented 1 month ago

I solved this problem by reinstalling albumentations to old version too.