Open yuliwu opened 4 years ago
I have the same problem. I was looking into the code and it seems the processing of the mask is the same as the image. So it would be necessary to distinguish between mask and image in order to apply the interpolation. And it's set to bicubic, but for the mask, it should be set to NN. Anyways you can do a workaround with morphological operations, binarization does the trick.
@yuliwu @nanoxas I faced the same problem for a multiclass segmentation. inspired by the multi mask augmentation functionality, I onehot encoded my masks, concatenate the obtained binary masks with the source image and augment at once then apply an argmax on the augmented masks to yield one mask with the multi class labels.
So, did the author has deal this issue? I also find that all my masks has been disrupted by operation just like rotate, zoom_random, flip_top_bottom, random_distortion..., I don't know which operation make such a influence. Is there any way to choose the method of interpolation?
One thing I noticed while augmenting is that the ground-truth labels had noises at the boundaries after being zoomed in. It might be caused, if the interpolation was set to bilinear or similar, while it should be set as nearest neighbours to avoid creating new labels.