imgaug icon indicating copy to clipboard operation
imgaug copied to clipboard

how to perform augmentation when segmentation mask has 4 channels

Open ai1361720220000 opened this issue 4 years ago • 1 comments

when it comes to segmentation task, the mask usually has 1 channels. but if the mask has 4 channels in my task, and i find it gets wrong as following code: the shape of image is (w, h, 3), the shape of mask is (w, h ,4)

segmap = np.zeros((128, 128, 4), dtype=np.int32)
segmap = SegmentationMapsOnImage(segmap , shape=image.shape)

please give me some advice, thanks!!

ai1361720220000 avatar Apr 23 '21 03:04 ai1361720220000

split into 4 maps

half-potato avatar May 06 '21 23:05 half-potato