jingyuanli001 / RFR-Inpainting

The source code for CVPR 2020 accepted paper "Recurrent Feature Reasoning for Image Inpainting"
MIT License
354 stars 76 forks source link

Test #60

Open 01SHENyankun opened 2 years ago

01SHENyankun commented 2 years ago

I have finished training, but I have encountered problems during the test. I would like to ask what to input at the terminal for test.

01SHENyankun commented 2 years ago

I tested it according to the command of readme and got the following results 20211119143933 Then, it is modified according to the above error report, and the following results appear 20211119143959

jingyuanli001 commented 2 years ago

can you try to make the mask a single channel image?

01SHENyankun commented 2 years ago

can you try to make the mask a single channel image?

Hello, can you give me a contact information, my qq2635505974

01SHENyankun commented 2 years ago

I have some questions for you

su161021 commented 2 years ago

Hello, may I ask how this problem was finally solved? I also met the same problem, thank you!

lgl1227 commented 2 years ago

I have the same question. I want to slove this problem. Traceback (most recent call last): File "run.py", line 38, in run() File "run.py", line 30, in run model.test(dataloader, args.result_save_path) File "E:\PycharmProject\RFR-Inpainting\model.py", line 90, in test fake_B, mask = self.G(masked_images, masks) File "E:\Anaconda3\lib\site-packages\torch\nn\modules\module.py", line 1110, in _call_impl return forward_call(*input, *kwargs) File "E:\PycharmProject\RFR-Inpainting\modules\RFRNet.py", line 146, in forward x1, m1 = self.Pconv1(in_image, mask) File "E:\Anaconda3\lib\site-packages\torch\nn\modules\module.py", line 1110, in _call_impl return forward_call(input, **kwargs) File "E:\PycharmProject\RFR-Inpainting\modules\partialconv2d.py", line 55, in forward self.update_mask = F.conv2d(mask, self.weight_maskUpdater, bias=None, stride=self.stride, padding=self.padding, dilation=self.dilation, groups=1) RuntimeError: Given groups=1, weight of size [64, 3, 7, 7], expected input[1, 9, 256, 256] to have 3 channels, but got 9 channels instead

lgl1227 commented 2 years ago

I understand. Because the bit depth of these mask images is not consistent, some are 8 bits, some are 24 bits

lgl1227 commented 2 years ago

image × image

01SHENyankun commented 2 years ago

图片× 图片

你好,请问您这个代码,你进行测试了嘛,有测试指标嘛

lgl1227 commented 2 years ago

这个代码我只是跑通了,训练出了模型,但没有进行进一步的测试,没有测试指标。

From: 01SHENyankun Date: 2022-04-15 11:03 To: jingyuanli001/RFR-Inpainting CC: Alex Valentine; Comment Subject: Re: [jingyuanli001/RFR-Inpainting] Test (Issue #60) × √ 你好,请问您这个代码,你进行测试了嘛,有测试指标嘛 ― Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

Jamie-61 commented 2 years ago

你好,请问你这个问题解决了嘛 ![Uploading image.png…]() 我遇到了同样的问题,可不可以请教一下

lgl1227 commented 2 years ago

不好意思,你的图片看不到

Jamie-61 commented 2 years ago

/home/qsh/anaconda3/bin/python3.7 /home/qsh/ccc/RFR-Inpainting-master/run.py Model moved to cuda

测试代码中mask只能是外部加载的mask数据集吗(mask_mode只能为2吗),如果mask_mode使用0或1,就会出现上述错误

lgl1227 commented 2 years ago

我的理解是mask_mode的0或者1模式 不是用于测试的吧。

Jamie-61 commented 2 years ago

嗯嗯!谢谢啦!

R1ckLou commented 2 years ago

I have the same question. I want to slove this problem. Traceback (most recent call last): File "run.py", line 38, in run() File "run.py", line 30, in run model.test(dataloader, args.result_save_path) File "E:\PycharmProject\RFR-Inpainting\model.py", line 90, in test fake_B, mask = self.G(masked_images, masks) File "E:\Anaconda3\lib\site-packages\torch\nn\modules\module.py", line 1110, in _call_impl return forward_call(*input, *kwargs) File "E:\PycharmProject\RFR-Inpainting\modules\RFRNet.py", line 146, in forward x1, m1 = self.Pconv1(in_image, mask) File "E:\Anaconda3\lib\site-packages\torch\nn\modules\module.py", line 1110, in _call_impl return forward_call(input, **kwargs) File "E:\PycharmProject\RFR-Inpainting\modules\partialconv2d.py", line 55, in forward self.update_mask = F.conv2d(mask, self.weight_maskUpdater, bias=None, stride=self.stride, padding=self.padding, dilation=self.dilation, groups=1) RuntimeError: Given groups=1, weight of size [64, 3, 7, 7], expected input[1, 9, 256, 256] to have 3 channels, but got 9 channels instead

我也是遇到这个问题,请问怎么解决? 我的mask图片位深度都是相同的8

youarenotaloneor commented 2 years ago

RuntimeError: Given groups=1, weight of size [64, 3, 7, 7], expected input[1, 9, 256, 256] to have 3 channels, but got 9 channels instead @jingyuanli001 :I have the above errors in the test. How can I solve them?

xiaoyanghuha commented 1 year ago

It is necessary to use a mask image with a bit depth of 1. I successfully solved this problem and tested the results,If you also want to solve this problem, please contact me “xiaoyanghuha@163.com”

xiximelon commented 10 months ago

comment this line! # masks = torch.cat([masks]*3, dim = 1)