SpA-Former-shadow-removal icon indicating copy to clipboard operation
SpA-Former-shadow-removal copied to clipboard

predict.py is not running & Cannot access to pre-trained models.

Open ken-GenGenAI opened this issue 2 years ago • 10 comments

First of all thanks for your great work.

I`m interested in shadow removal and found your repository. I have problem with run this code.

1.https://github.com/zhangbaijin/SpA-Former-shadow-removal/blob/main/pretrained_models/RICE1 Cannot access 2. Download gen_model_epoch160.pth in https://drive.google.com/drive/folders/1pxwwAfwnGKkLj-GAlkVCevbEQM4basgR and run with this parameter error occured at gen.load_state_dict. image I think model was deprecated *.pth Could you upload lastest pre-trained model or if i have mistake could you guide my fault??

ken-GenGenAI avatar Jun 30 '22 05:06 ken-GenGenAI

  1. The pretrained model RICE1 is seems to gone. I will update it later.
  2. It seems that my network missing something, maybe i put the wrong code on it. I will check it, and can you try it after 10 minutes ?

zhangbaijin avatar Jun 30 '22 05:06 zhangbaijin

@zhangbaijin Thanks for your effort. one need to delete this line in SpA_former.py
from Dual_conv import PaddingConv2d

and run this code thank you

ken-GenGenAI avatar Jul 01 '22 04:07 ken-GenGenAI

Thanks for your kind remind. Best wishes

zhangbaijin avatar Jul 01 '22 05:07 zhangbaijin

I access the same problem,but can't solve it

yjdqk avatar Aug 05 '22 07:08 yjdqk

什么问题

zhangbaijin avatar Aug 05 '22 08:08 zhangbaijin

这行代码from Dual_conv import PaddingConv2d 已经从源码中删除了,运行时,还会报相同的问题。

yjdqk avatar Aug 05 '22 09:08 yjdqk

这行代码from Dual_conv import PaddingConv2d 已经从源码中删除了,运行时,还会报相同的问题。

yjdqk avatar Aug 05 '22 09:08 yjdqk

errors in loading state_dict for Generator

yjdqk avatar Aug 05 '22 09:08 yjdqk

你可以重新下载整个项目进行测试,代码错误应该是预训练模型没加载对

zhangbaijin avatar Aug 05 '22 09:08 zhangbaijin

ssim = SSIM(img1,img2)

File "/usr/local/lib/python3.8/dist-packages/skimage/metrics/_structural_similarity.py", line 194, in structural_similarity raise ValueError( ValueError: Since image dtype is floating point, you must specify the data_range parameter. Please read the documentation carefully (including the note). It is recommended that you always specify the data_range anyway. 作者您好 我用SSIM这个缺少一个data_range参数 按照您给的640 480 像素 这个参数值应该是写多少呢

wangchenxixixi avatar Nov 14 '23 08:11 wangchenxixixi