MathiasGruber / PConv-Keras

Unofficial implementation of "Image Inpainting for Irregular Holes Using Partial Convolutions". Try at: www.fixmyphoto.ai
MIT License
903 stars 253 forks source link

Over-fitting with data generation #42

Open diff7 opened 5 years ago

diff7 commented 5 years ago

Hi, thank you for sharing this code. It is rather a general question than an issue.

Do not you think you over-fit if you randomly generate masks on the same images and it happens that with future iterations the net eventually will see the whole image?

I am just curios how you dealt with this problem.

burhr2 commented 4 years ago

Hi, it's a good question, it will be great to see other peoples view, But I am also thinking if you use the same mask for each image during training doesn't that also expose the network to overfitting and poor generalization as it will limit in learning those mask used only.

From your question- Training with a different mask for the image in each iteration is some sort of data augmentation hence the network generalize better when testing with a new image. I have used this option and my testing performance is around 0.95ssim. train - 800+ images val - 100+ images test - 200 - images

A comparison and a reported on performance will help understand it better

diff7 commented 4 years ago

Recently I was dealing with other related problem. Now I start to think if it is one mask per image per epoch + some random augmentation that should be fine.

I can close the issue or if you want we wait and see other opinions on that, I am curios what ppl say.

burhr2 commented 4 years ago

Recently I was dealing with other related problem. Now I start to think if it is one mask per image per epoch + some random augmentation that should be fine.

I can close the issue or if you want we wait and see other opinions on that, I am curious what ppl say.

Let's wait and see what others say

sfwyly commented 4 years ago

Hi, In my experiment, the use of random mask+ random image training resulted in the difficulty of convergence. Maybe I did not have enough training time, but I was considering whether batch image + one random mask training could achieve the balance between the fitting effect and the time during the training.