3
$\begingroup$

I have multi-label data for semantic segmentation. For semantic segmentation for one class I get a high accuracy but I can't do it for multi-class segmentation.

I have 6 class labels so my Y train matrix is equal [78,480,480,6] ('channel last'), where 78 - number of images 480,480 -image size, 6-number of masks and X train matrix [78, 480, 480, 1]

The last lines of my CNN model:

l = Conv2D(filters=64, kernel_size=(1,1), activation='relu')(l)
output_layer = Conv2D(filters=6, kernel_size=(1,1), activation='sigmoid')(l)

model = Model(input_layer, output_layer)
model.compile(optimizer=Adam(2e-4), loss='categorical_crossentropy', metrics=['accuracy'])

I don't know what I hove done wrong that my multi-label semantic segmentation model doesn't have proper results.

Image and masks:

Image and Masks

$\endgroup$
1
$\begingroup$

Two things that stand out is that you are using sigmoid as activation which is used for binary classification (it just squash values between 0 and 1). The other is that your learning rate is 5x lower than the default value.

Also because you are classifying images, I think the title is misleading; semantics is associated with "meaning" i.e. with language.

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.