knazeri / edge-connect

EdgeConnect: Structure Guided Image Inpainting using Edge Prediction, ICCV 2019 https://arxiv.org/abs/1901.00212
http://openaccess.thecvf.com/content_ICCVW_2019/html/AIM/Nazeri_EdgeConnect_Structure_Guided_Image_Inpainting_using_Edge_Prediction_ICCVW_2019_paper.html
Other
2.52k stars 532 forks source link

Test with damaged image #69

Open purple7seven opened 5 years ago

purple7seven commented 5 years ago

Thanks for your code! There is a problem that when i test the model with damaged images, i can't get the generated edge information through the edge generator. Same things as this, i can't get a inpainted image through the image inpainting network. But when i input a no damaged image and mask image, the picture can be inpainted. If i want to input a damaged image directly to test the network, what should i do?

knazeri commented 5 years ago

@purple7seven For the damaged images, how do you provide the mask? Did you create a mask for the damaged image?

purple7seven commented 5 years ago

Yes. I input the damaged image and corresponding mask image into the edge generator. The edge generator generate the masked edge but not the repaired edge. For example, if i input a damaged image with rounded mask region and corresponding mask image, the output of edge generator is a edge image with a rounded edge in the masked region.

knazeri commented 5 years ago

@purple7seven Can you post your damaged image and the mask here?

purple7seven commented 5 years ago

@purple7seven Can you post your damaged image and the mask here?

My damaged image is:

2

My mask image is:

2

I obtain the output image with the edge generator is:

2_output

But when i input the image:

2_full

2

I obtain the generated edge information with same edge generator:

2_full_output

knazeri commented 5 years ago

@purple7seven Ok now, make sure the damaged area is also colored white because this was how the training dataset was provided. But there are two problems with your mask:

You can read a similar issue here: https://github.com/knazeri/edge-connect/issues/38