facebookresearch / nougat

Implementation of Nougat Neural Optical Understanding for Academic Documents
https://facebookresearch.github.io/nougat/
MIT License
8.98k stars 567 forks source link

albumentations conflict #88

Open pythonlearner1025 opened 1 year ago

pythonlearner1025 commented 1 year ago

Device: M1 Mac Python: 3.9

Issue

  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/nougat/transforms.py", line 123, in <module>
    alb.Affine(shear={"x": (0, 3), "y": (-3, 0)}, cval=(255, 255, 255), p=0.03),
AttributeError: module 'albumentations' has no attribute 'Affine'. Did you mean: 'IAAAffine'?

Fix Updating setup.py to specify albumentations==1.0.3 worked for me. Looks like an albumentations issue. Curious why nobody else has run into this problem, considering albumentations's latest version release was in Jun 10.

lukas-blecher commented 1 year ago

Maybe you already had an old version installed? Because the current version works, right? I'll fix the version number in my release Also, related #12

pythonlearner1025 commented 1 year ago

No, I was using its latest version, 1.3.1. Downgrading to 1.0.1 solved the issue.

lukas-blecher commented 1 year ago

It's working for me with 1.3.1, and apparently with everybody else as well. The error you described happens only for versions <0.5.6 I think