How to implement multi-class semantic segmentation?

后端 未结 2 1740
误落风尘
误落风尘 2020-12-28 20:15

I\'m able to train a U-net with labeled images that have a binary classification.

But I\'m having a hard time figuring out how to configure the final layers in Kera

2条回答
  •  粉色の甜心
    2020-12-28 21:03

    Bit late but you should try

    mask_train = to_categorical(mask_train, num_classes=None)
    

    That will result in (634, 4, 64, 64) for mask_train.shape and a binary mask for each individual class (one-hot encoded).

    Last conv layer, activation and loss looks good for multiclass segmentation.

提交回复
热议问题