Algolzw / image-restoration-sde

Image Restoration with Mean-Reverting Stochastic Differential Equations, ICML 2023. Winning solution of the NTIRE 2023 Image Shadow Removal Challenge.
https://algolzw.github.io/ir-sde/index.html
MIT License
580 stars 42 forks source link

如何推理 #98

Open LiJiajun000322 opened 3 months ago

LiJiajun000322 commented 3 months ago

作者您好,感谢提供代码! 我想请问一下如何输入一个LQ获得HQ呢?

Algolzw commented 3 months ago

你好,推理时直接将HQ设置为None就可以了。

LiJiajun000322 commented 2 months ago
assert os.path.isdir(path), '{:s} is not a valid directory'.format(path)

AssertionError: None is not a valid directory 我尝试将daclip-sde里的test.yml配置为如下: datasets: test1: name: Test mode: LQGT dataroot_GT: None dataroot_LQ: /home/daclip-uir-main/daclip-uir-main/scripts/datasets/universal/test/low-light/LQ 但是返回如上的报错

LiJiajun000322 commented 2 months ago

我在test.py里把need_GT 直接设置为False,但是还是没法直接推理。然后我设置need_GT为false,设置dataroot_GT和dataroot_LQ一样,但是却返回cuda out of memory..

Algolzw commented 2 months ago

这应该是图像太大了显存不够,你可以试试用小一点的图像呢或者resize到小尺寸推理后再resize回去。

LiJiajun000322 commented 2 months ago

好的!已经解决了,谢谢您。但是把need_GT设置为false以及dataroot_GT设置为None都没用,还是会报路径不能为None的问题

Algolzw commented 2 months ago

如果只想推理的话,可以参考这个inference代码哈