LJOVO / TranSalNet

TranSalNet: Towards perceptually relevant visual saliency prediction. Neurocomputing (2022)
https://doi.org/10.1016/j.neucom.2022.04.080
MIT License
51 stars 10 forks source link

importing_imagining error #7

Closed Vaishnavi-Na closed 2 months ago

Vaishnavi-Na commented 2 months ago

Hi there! Thank you for sharing your code. I was trying to run the testing notebook with all of dependencies installed and keep getting the following error: "ImportError: DLL load failed while importing _imaging: The specified module could not be found." while running this line "from torchvision import transforms, utils, models". Do you know why that might be? When I looked online, they suggested downgrading Pillow to 9.0.0 but that does not seem to work with the installation of torchvision this requires. Thank you again!

I've shared all of my installed libraries below:

Name Version Build Channel

blas 2.122 mkl conda-forge blas-devel 3.9.0 22_win64_mkl conda-forge bzip2 1.0.8 hcfcfb64_5 conda-forge ca-certificates 2024.6.2 h56e8100_0 conda-forge cudatoolkit 11.0.3 hd336c7a_13 conda-forge freetype 2.12.1 hdaf720e_2 conda-forge intel-openmp 2024.1.0 h57928b3_966 conda-forge jpeg 8d h8ffe710_1 conda-forge lerc 4.0.0 h63175ca_0 conda-forge libblas 3.9.0 22_win64_mkl conda-forge libcblas 3.9.0 22_win64_mkl conda-forge libdeflate 1.20 hcfcfb64_0 conda-forge libffi 3.4.2 h8ffe710_5 conda-forge libhwloc 2.10.0 default_h8125262_1001 conda-forge libiconv 1.17 hcfcfb64_2 conda-forge liblapack 3.9.0 22_win64_mkl conda-forge liblapacke 3.9.0 22_win64_mkl conda-forge libpng 1.6.43 h19919ed_0 conda-forge libsqlite 3.46.0 h2466b09_0 conda-forge libtiff 4.5.0 h8a3f274_0
libuv 1.48.0 hcfcfb64_0 conda-forge libwebp 1.4.0 h2466b09_0 conda-forge libwebp-base 1.4.0 hcfcfb64_0 conda-forge libxml2 2.12.7 h283a6d9_1 conda-forge libzlib 1.3.1 h2466b09_1 conda-forge m2w64-gcc-libgfortran 5.3.0 6 conda-forge m2w64-gcc-libs 5.3.0 7 conda-forge m2w64-gcc-libs-core 5.3.0 7 conda-forge m2w64-gmp 6.1.0 2 conda-forge m2w64-libwinpthread-git 5.0.0.4634.697f757 2 conda-forge mkl 2024.1.0 h66d3029_692 conda-forge mkl-devel 2024.1.0 h57928b3_692 conda-forge mkl-include 2024.1.0 h66d3029_692 conda-forge msys2-conda-epoch 20160418 1 conda-forge ninja 1.12.1 hc790b64_0 conda-forge numpy 1.24.4 py38h1d91fd2_0 conda-forge opencv-python 4.5.1.48 pypi_0 pypi openssl 3.3.1 h2466b09_0 conda-forge pillow 9.3.0 py38hdc2b20a_1 pip 24.0 pyhd8ed1ab_0 conda-forge pthreads-win32 2.9.1 hfa6e2cd_3 conda-forge python 3.8.19 h4de0772_0_cpython conda-forge python_abi 3.8 4_cp38 conda-forge pytorch 1.7.1 py3.8_cuda110_cudnn8_0 pytorch scipy 1.6.0 py38h5f893b4_0 conda-forge setuptools 70.0.0 pyhd8ed1ab_0 conda-forge sqlite 3.46.0 h2466b09_0 conda-forge tbb 2021.12.0 hc790b64_1 conda-forge tk 8.6.13 h5226925_1 conda-forge torchaudio 0.7.2 py38 pytorch torchvision 0.8.2 py38_cu110 pytorch tqdm 4.56.0 pyhd8ed1ab_0 conda-forge typing_extensions 4.12.2 pyha770c72_0 conda-forge ucrt 10.0.22621.0 h57928b3_0 conda-forge vc 14.3 h8a93ad2_20 conda-forge vc14_runtime 14.40.33810 ha82c5b3_20 conda-forge vs2015_runtime 14.40.33810 h3bf8584_20 conda-forge wheel 0.43.0 pyhd8ed1ab_1 conda-forge xz 5.2.6 h8d14728_0 conda-forge zlib 1.3.1 h2466b09_1 conda-forge zstd 1.5.6 h0ea2cb4_0 conda-forge

LJOVO commented 2 months ago

Hi,

Sorry, I haven't encountered this problem so I can't offer advice. I can confirm that the code can be run with both pillow ver 8.1.0 and ver 9.4.0.

Best

Vaishnavi-Na commented 2 months ago

Hmm, the code isn't working with either version of pillow for me. What specific version of python 3.8 do you recommend using?

LJOVO commented 2 months ago

Hmm, the code isn't working with either version of pillow for me. What specific version of python 3.8 do you recommend using?

I would recommend Python 3.8.5 + pillow 8.1.0.

Vaishnavi-Na commented 2 months ago

Thanks for your response and help! It looks like it was an error with my system and not the code itself!