edge-connect icon indicating copy to clipboard operation
edge-connect copied to clipboard

Test with damaged image

Open purple7seven opened this issue 5 years ago • 5 comments

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?

purple7seven avatar Apr 08 '19 09:04 purple7seven

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

knazeri avatar Apr 12 '19 02:04 knazeri

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.

purple7seven avatar Apr 12 '19 02:04 purple7seven

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

knazeri avatar Apr 12 '19 02:04 knazeri

@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

purple7seven avatar Apr 12 '19 11:04 purple7seven

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

  • It does not entirely cover the damaged area! Please make sure the mask covers the entire region. Sometimes it's even better to expand the mask such that it covers even a few pixels outside of the damaged area!
  • The mask is not a binary mask! Your mask has shades of gray! It looks like an image which was saved as a .jpg file and then converted to .png. Please make sure your mask is constructed only with zeros and ones (binary).

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

knazeri avatar Apr 12 '19 13:04 knazeri