vinthony / ghost-free-shadow-removal

[AAAI 2020] Towards Ghost-free Shadow Removal via Dual Hierarchical Aggregation Network and Shadow Matting GAN

Home Page:https://arxiv.org/abs/1911.08718

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

error in train_sr.py when testing

pjwwx opened this issue · comments

commented

Traceback (most recent call last):
File "train_sr.py", line 52, in
shadow_free_image,predicted_mask=build_aggasatt_joint(input,channel,vgg_19_path=vgg_19_path)
File "/public/wuwenxuan/projects/ghost-free-shadow-removal-master/networks.py", line 143, in build_aggasatt_joint
vgg19_features=build_vgg19(input[:,:,:,0:3]*255.0,vgg_19_path)
File "/public/wuwenxuan/projects/ghost-free-shadow-removal-master/networks.py", line 78, in build_vgg19
vgg_path=scipy.io.loadmat(vgg_path)
File "/public/wuwenxuan/anaconda3/envs/shadow/lib/python3.6/site-packages/scipy/io/matlab/mio.py", line 222, in loadmat
with _open_file_context(file_name, appendmat) as f:
File "/public/wuwenxuan/anaconda3/envs/shadow/lib/python3.6/contextlib.py", line 81, in enter
return next(self.gen)
File "/public/wuwenxuan/anaconda3/envs/shadow/lib/python3.6/site-packages/scipy/io/matlab/mio.py", line 17, in _open_file_context
f, opened = _open_file(file_like, appendmat, mode)
File "/public/wuwenxuan/anaconda3/envs/shadow/lib/python3.6/site-packages/scipy/io/matlab/mio.py", line 39, in _open_file
return open(file_like, mode), True
TypeError: expected str, bytes or os.PathLike object, not dict

Hi, thanks for your attention to our work.

This error often occurs when the path of VGG19 is not correct.

Please config it in the right place:

vgg_19_path = scipy.io.loadmat('./Models/imagenet-vgg-verydeep-19.mat')

Or you can try to run the demo from the command line via the introduction here:
https://github.com/vinthony/ghost-free-shadow-removal#3-demo-from-command-line-thanks-aliericcantona