IMPLabUniPr / movad

Memory-augmented Online Video Anomaly Detection
GNU General Public License v2.0
14 stars 2 forks source link

Incompatibility of Torchvision module , from torchvision.transform.functional. #2

Closed ByteWiizard closed 1 year ago

ByteWiizard commented 1 year ago

error i am facing is:

dota_conda) -bash-4.2$ python src/main.py --config cfgs/v4_2.yml --output output/v4_2/ --phase train --epochs 1000 --epoch -1 Traceback (most recent call last): File "src/main.py", line 11, in from dota import setup_dota, Dota File "/home/Yaman/mee/movad-main/src/dota.py", line 12, in from pytorchvideo import transforms as T File "/home/Yaman/yes/envs/dota_conda/lib/python3.8/site-packages/pytorchvideo/transforms/init.py", line 3, in from .augmix import AugMix # noqa File "/home/Yaman/yes/envs/dota_conda/lib/python3.8/site-packages/pytorchvideo/transforms/augmix.py", line 6, in from pytorchvideo.transforms.augmentations import ( File "/home/Yaman/yes/envs/dota_conda/lib/python3.8/site-packages/pytorchvideo/transforms/augmentations.py", line 10, in from torchvision.transforms.functional import InterpolationMode ImportError: cannot import name 'InterpolationMode' from 'torchvision.transforms.functional' (/home/Yaman/yes/envs/dota_conda/lib/python3.8/site-packages/torchvision/transforms/functional.py)

If anyone could help

hachreak commented 1 year ago

Hi @ByteWiizard sorry for the long delay for the reply. As mentioned here, I think you have this error because the library pytorchvideo requires at least torchvision>=0.9.0 If you look inside the code, this file contains the class InterpolationMode mentioned from the error.