OSError Preventing Deepcolor Function?
See original GitHub issueDear Devs,
Thank you for providing this unique demo program!
Based on the video, I am attempting to use your code to ‘restore’ old family images in preparation for Father’s Day.
However, as a novice coder, I have been running into a lot of brick walls.
After seemingly beating dependency hell using the pip
installation instructions from @mabdelhack, I have run into OSError: [WinError 126] The specified module could not be found
, which I have not been able to solve.
Can I ask any help beating this OSError?
The command I am running is python ideepcolor.py --gpu 0 --backend pytorch
, which results in the following error message:
[win_size] = 512
[image_file] = test_imgs/mortar_pestle.jpg
[gpu] = 0
[cpu_mode] = True
[color_prototxt] = ./models/reference_model/deploy_nodist.prototxt
[color_caffemodel] = ./models/reference_model/model.caffemodel
[dist_prototxt] = ./models/reference_model/deploy_nopred.prototxt
[dist_caffemodel] = ./models/reference_model/model.caffemodel
[color_model] = ./models/pytorch/caffemodel.pth
[backend] = pytorch
[pytorch_maskcent] = False
[load_size] = 256
ColorizeImageTorch instantiated
Traceback (most recent call last):
File “ideepcolor.py”, line 69, in <module>
colorModel.prep_net(path=args.color_model)
File “C:\Users\StevenJobs\Documents\2 - WashU Sophomore\2 - WashU Sophomore SP20\CSE204 Code Repository\cse204\interactive-deep-colorization\data\colorize_image.py”, line 217, in prep_net
import torch
File "C:\Users\StevenJobs\miniconda3\envs\finaldeep\lib\site-packages\torch_init.py", line 81, in <module>
ctypes.CDLL(dll)
File “C:\Users\StevenJobs\miniconda3\envs\finaldeep\lib\ctypes_init_.py”, line 364, in init
self._handle = _dlopen(self.name, mode)
OSError: [WinError 126] The specified module could not be found
I am on a Windows 10 operating system, and my virtual environment is as follows:
Dependencies:
blas 1.0 mkl ca-certificates 2020.1.1 0 certifi 2020.4.5.2 py37_0 cudatoolkit 10.2.89 h74a9793_1 cycler 0.10.0 pypi_0 pypi decorator 4.4.2 pypi_0 pypi freetype 2.9.1 ha9979f8_1 helpdev 0.7.1 pypi_0 pypi icc_rt 2019.0.0 h0cc432a_1 imageio 2.8.0 pypi_0 pypi importlib-metadata 1.6.1 pypi_0 pypi intel-openmp 2020.1 216 joblib 0.15.1 pypi_0 pypi jpeg 9b hb83a4c4_2 kiwisolver 1.2.0 pypi_0 pypi libpng 1.6.37 h2a8f88b_0 libtiff 4.1.0 h56a325e_1 lz4-c 1.9.2 h62dcd97_0 matplotlib 3.2.1 pypi_0 pypi mkl 2020.1 216 mkl-service 2.3.0 py37hb782905_0 mkl_fft 1.0.15 py37h14836fe_0 mkl_random 1.1.1 py37h47e9c7a_0 networkx 2.4 pypi_0 pypi ninja 1.9.0 py37h74a9793_0 numpy 1.18.1 py37h93ca92e_0 numpy-base 1.18.1 py37hc3f5095_1 olefile 0.46 py37_0 opencv-python 4.2.0.34 pypi_0 pypi openssl 1.1.1g he774522_0 pillow 7.1.2 py37hcc1f983_0 pip 20.1.1 py37_1 pyparsing 2.4.7 pypi_0 pypi pyqt4 4.11.4 pypi_0 pypi python 3.7.7 h81c818b_4 python-dateutil 2.8.1 pypi_0 pypi pytorch 1.5.0 py3.7_cuda102_cudnn7_0 pytorch pywavelets 1.1.1 pypi_0 pypi qdarkstyle 2.8.1 pypi_0 pypi qtpy 1.9.0 pypi_0 pypi scikit-image 0.17.2 pypi_0 pypi scikit-learn 0.23.1 pypi_0 pypi scipy 1.4.1 pypi_0 pypi setuptools 47.3.0 py37_0 six 1.15.0 py_0 sqlite 3.31.1 h2a8f88b_1 threadpoolctl 2.1.0 pypi_0 pypi tifffile 2020.6.3 pypi_0 pypi tk 8.6.8 hfa6e2cd_0 torchvision 0.6.0 py37_cu102 pytorch vc 14.1 h0510ff6_4 vs2015_runtime 14.16.27012 hf0eaf9b_2 wheel 0.34.2 py37_0 wincertstore 0.2 py37_0 xz 5.2.5 h62dcd97_0 zipp 3.1.0 pypi_0 pypi zlib 1.2.11 h62dcd97_4 zstd 1.4.4 ha9fde0e_3`
Issue Analytics
- State:
- Created 3 years ago
- Comments:7
Top GitHub Comments
Dear @mabdelhack and @elmeto7,
I made the changes you recommended, and the program now works as intended. Thank you kindly for all of your assistance; the Father’s Day gift went smashingly.
Thanks, sangtuaco
@sangtuaco,
Try (gui_draw.py", line 48) self.read_image(image_file) instead of self.read_image(image_file.encode(‘utf-8’))
It fixed the issue for me, however GUI never starts now and doesn’t report any errors. I’ve tried GPU and CPU modes.
Please let me know if it works for you!