Open Feywell opened 4 years ago
It is because we assume that the number of background images is always larger than the foreground. If you have more foreground images, you can update
https://github.com/Yaoyi-Li/GCA-Matting/blob/5a999be4b00bb482658fa7013a74a2b8acddc78e/dataloader/data_generator.py#L533
to return len(self.fg)
and update
https://github.com/Yaoyi-Li/GCA-Matting/blob/5a999be4b00bb482658fa7013a74a2b8acddc78e/dataloader/data_generator.py#L486-L488
But I will always recommend that there should be enough background images for sample generation.
If bg_num < batch_size, there is a error like title. And it will always one image, when bg_num = 1, batch_size = 1.