fenglinglwb / MAT

MAT: Mask-Aware Transformer for Large Hole Image Inpainting
Other
776 stars 87 forks source link

Question about customizing the code #66

Open vichi06 opened 1 year ago

vichi06 commented 1 year ago

Hi,

I would like to train the network to remove a spider from an image. To do that, I am wondering what method is the best. Should I input images with no spiders, and masks of spiders?

2 2

What about the images with spider? because fake_init.png shows target image with colorful mask on it, not spider color.

2

Thanks for your help and expertise.

newprogrammer2022 commented 1 year ago

HI, I am also working with the network, and I think you can input images with no spiders, and masks of spiders. And may I ask how do you use the mask by your own? Because the dataloader contain a random mask generator , and I don't find how to change it.

vichi06 commented 1 year ago

Hi @newprogrammer2022, you have to go into the corresponding dataloader (for me it is the file datasets/dataset_256.py) and change the getitem function of the ImageFolderMaskDataset class. Here are the changes that I made to fit my custom masks.

Screenshot from 2023-02-16 10-59-53

newprogrammer2022 commented 1 year ago

Thank you so much! Can I ask more question? As follow:

img_v2_53283f3d-e116-4f6c-94eb-88168366580g I changed code ,but it says the index out of range? Did this happen to you?