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

In task not appears defocus_deblurring #6

Open
ivaxsirc opened this issue May 28, 2022 · 3 comments
Open

In task not appears defocus_deblurring #6

ivaxsirc opened this issue May 28, 2022 · 3 comments

Comments

@ivaxsirc
Copy link

How can i test a task with defocus_deblurring?

Thanks

@swz30
Copy link
Owner

swz30 commented May 30, 2022

Hi @ivaxsirc

Here are the instructions to perform testing for defocus deblurring: https://github.com/swz30/MIRNetv2/tree/main/Defocus_Deblurring#evaluation

@ivaxsirc
Copy link
Author

Thanks for the quick answer

I've tried with two images one of your dataset and other an own image, when i used the script in results only appears your dataset image.

I put the two images in test/DPDD in the four folders inputC inputL inputR target

the anaconda prompt says:

(pytorch111) D:\restauracio\MIRNetv2\Defocus_Deblurring>python test_dual_pixel_defocus_deblur.py --save_images
Setting up [LPIPS] perceptual loss: trunk [alex], v[0.1], spatial [off]
Loading model from: C:\ProgramData\Anaconda3\envs\pytorch111\lib\site-packages\lpips\weights\v0.1\alex.pth
===>Testing using weights: ./pretrained_models/dual_pixel_defocus_deblurring.pth
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:09<00:00, 9.37s/it]
Traceback (most recent call last):
File "test_dual_pixel_defocus_deblur.py", line 100, in
psnr_indoor, mae_indoor, ssim_indoor, pips_indoor = psnr[indoor_labels-1], mae[indoor_labels-1], ssim[indoor_labels-1], pips[indoor_labels-1]
IndexError: index 8 is out of bounds for axis 0 with size 1

Any idea? Thanks in advance

@KKKLeouee
Copy link

感谢你及时的答复

我已经尝试使用两个图像,一个是您的数据集,另一个是自己的图像,当我在结果中使用脚本时,只会出现您的数据集图像。

我把两张图片放在 test/DPDD 的四个文件夹 inputC inputL inputR target

蟒蛇提示说:

(pytorch111) D:\restauracio\MIRNetv2\Defocus_Deblurring>python test_dual_pixel_defocus_deblur.py --save_images 设置 [LPIPS] 感知损失:trunk [alex], v[0.1], spatial [off] 从:C:\ProgramData\ 加载模型Anaconda3\envs\pytorch111\lib\site-packages\lpips\weights\v0.1\alex.pth ===>使用权重进行测试:./pretrained_models/dual_pixel_defocus_deblurring.pth 100%|█████████ ███████████████████████████████████████████████████ ███████████████████████████████████████████████████ ████████████████████████████| 1/1 [00:09<00:00, 9.37s/it] Traceback(最近一次调用最后): 文件“test_dual_pixel_defocus_deblur.py”,第 100 行,在 psnr_indoor, mae_indoor, ssim_indoor, pips_indoor = psnr[indoor_labels-1], mae[indoor_labels-1], ssim[indoor_labels-1], pips[indoor_labels-1] IndexError: index 8 is out of bounds for axis 0 with size 1

任何想法?提前致谢

Hello, I have encountered similar problems, and I would like to ask you how to solve them,thank you

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

3 participants