JiahuiYu / generative_inpainting

DeepFill v1/v2 with Contextual Attention and Gated Convolution, CVPR 2018, and ICCV 2019 Oral
http://jiahuiyu.com/deepfill/
Other
3.27k stars 787 forks source link

Non- random masks #457

Closed Efrat-Taig closed 4 years ago

Efrat-Taig commented 4 years ago

Dear JiahuiYu

Thank you very much for this great work and codes

We are aiming at training the inpainting method to re-construct specific objects. e,g, we aim to train the network to inpaint only birds. Thus we want to use a data set of 10000 images that contains birds, (with view in backround - trees, sky, etc ) mark and label the pixels with the birds, and than create masks only for the birds location in the images. since the code in the git create random masks in batches, we are wondering whether it possible in the code to associate each mask to a specific image in the data set, where the location of the mask is paired with the location of the bird in the image, thus the coupling of image-mask is not random.

We were also wondering how can we utilise the image2edge function (located at inpaint_ops) if we want to integrate our own sketch masks in the code (for example, add the contour of the birds as sketch input)

Thanks in advance, Efrat

JiahuiYu commented 4 years ago

Hey sorry for the late reply. Regrading random masks, please refer to #85 #227 .

To use image2edge, I think you can use any edge detector (I am not sure if our image2edge function has been fully released for use...).