RFR-Inpainting icon indicating copy to clipboard operation
RFR-Inpainting copied to clipboard

Test

Open 01SHENyankun opened this issue 3 years ago • 19 comments

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 avatar Nov 19 '21 01:11 01SHENyankun

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

01SHENyankun avatar Nov 19 '21 06:11 01SHENyankun

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

jingyuanli001 avatar Nov 20 '21 04:11 jingyuanli001

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

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

01SHENyankun avatar Nov 20 '21 13:11 01SHENyankun

I have some questions for you

01SHENyankun avatar Nov 20 '21 13:11 01SHENyankun

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

su161021 avatar Dec 23 '21 08:12 su161021

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 avatar Mar 31 '22 05:03 lgl1227

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

lgl1227 avatar Mar 31 '22 06:03 lgl1227

image × image

lgl1227 avatar Mar 31 '22 06:03 lgl1227

图片× 图片

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

01SHENyankun avatar Apr 15 '22 03:04 01SHENyankun

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

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: @.***>

lgl1227 avatar Apr 15 '22 03:04 lgl1227

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

Jamie-61 avatar Apr 20 '22 01:04 Jamie-61

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

lgl1227 avatar Apr 20 '22 01:04 lgl1227

/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,就会出现上述错误

Jamie-61 avatar Apr 20 '22 02:04 Jamie-61

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

lgl1227 avatar Apr 20 '22 02:04 lgl1227

嗯嗯!谢谢啦!

Jamie-61 avatar Apr 20 '22 02:04 Jamie-61

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

R1ckLou avatar Apr 24 '22 02:04 R1ckLou

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?

youarenotaloneor avatar May 11 '22 10:05 youarenotaloneor

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 “[email protected]

xiaoyanghuha avatar Nov 16 '22 07:11 xiaoyanghuha

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

xiximelon avatar Oct 10 '23 02:10 xiximelon