pathak22 / context-encoder

[CVPR 2016] Unsupervised Feature Learning by Image Inpainting using GANs
https://www.cs.cmu.edu/~dpathak/context_encoder/
Other
885 stars 204 forks source link

Input already masked images instead of generating patches #16

Open cryptedp opened 7 years ago

cryptedp commented 7 years ago

Hi Is it possible to input already masked images instead of generating masks in the image first and inpaint them ? The problem is, that the masks in my images will not all be in the same relative locations so I should inpaint different image regions but I don't want to generate masks myself on the image. If it is possible, should the masks satisfy some constraints (like pixel values )? Thx in advance

maryam089 commented 7 years ago

Did you find the solution to the above problem ? @cryptedp

pathak22 commented 7 years ago

Yes, you can always modify the input code to do that. I only provided automatic masks for the convenience of code release and to avoid having to release masks file.

niloleart commented 6 years ago

Did you find the way to do that @cryptedp ? It will help me a lot :)

cryptedp commented 6 years ago

Yes, it was quite a hack actually. We detected the objects and modified the image, such that the object is in the middle and then we called inpaint_center to inpaint that region. Next we took the inpainted region back to its original position. It did not work that bad, however if we had multiple object instances it was quite messy and sometime the inpainting result was not that good @niloleart @maryam089

niloleart commented 6 years ago

Can you provide me more info about it? Or the code? :D Thanks, @cryptedp