Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如何推理 #98

Open
LiJiajun000322 opened this issue Aug 15, 2024 · 6 comments
Open

如何推理 #98

LiJiajun000322 opened this issue Aug 15, 2024 · 6 comments

Comments

@LiJiajun000322
Copy link

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

@Algolzw
Copy link
Owner

Algolzw commented Aug 24, 2024

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

@LiJiajun000322
Copy link
Author

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
Copy link
Author

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

@Algolzw
Copy link
Owner

Algolzw commented Aug 28, 2024

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

@LiJiajun000322
Copy link
Author

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

@Algolzw
Copy link
Owner

Algolzw commented Sep 1, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants