deep-image-prior icon indicating copy to clipboard operation
deep-image-prior copied to clipboard

inpainting must need mask?

Open mumuyanyan opened this issue 5 years ago • 3 comments

I only have the corrupted image, as follows: xf_3 but I don't have the mask of the image. should I have to get the mask of the image? In other words, I must acquire the mask of the corrupted before using the inpainting algorithm.

mumuyanyan avatar Dec 26 '19 07:12 mumuyanyan

You need a mask to indicate which pixels are missing. This is not blind inpainting (much difficult problem).

abhishekaich27 avatar Mar 24 '20 02:03 abhishekaich27

What you could do is, if the corrupted pixels are of value 255(near that range 250-255) and no other pixel in the image is as white as the corrupted pixel. Now convert the image to grayscale, obviously your corrupted pixels will be bright in grayscale. Threshold your grayscale image based on your corrupted pixel values and get the mask. I've tested inpainting using the above logic and it has worked. For your Image it will work since there are no white pixels like your corrupted pixel. send

AnirudhMaiya avatar Apr 20 '20 22:04 AnirudhMaiya

should we use any other color for mask image if white is already in image? and which function should we use in the colab file provided in readme. as there are 3 fucntions based on if-else. and where to set the value of our mask color?

AhmadManzoor avatar Dec 22 '20 14:12 AhmadManzoor