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.53k stars 532 forks source link

Train images with paired masks #151

Closed Meulen92 closed 4 years ago

Meulen92 commented 4 years ago

Hi,

First of all, thanks for the awesome work.

My question: Is it possible to train the models using images paired with masks. So, not random masks? Very much as in testing mode. My dataset consists of images and a mask file for each image.

Can I, for example, use mask type 6 in the config?

        if mask_type == 6:
            mask = imread(self.mask_data[index])
            mask = self.resize(mask, imgh, imgw, centerCrop=False)
            mask = rgb2gray(mask)
            mask = (mask > 0).astype(np.uint8) * 255
            return mask

Thanks in advance!

Meulen92 commented 4 years ago

Tried this and it seems to work fine. Thank you.