JihongJu/keras-fcn

Model always predicts the dominant class

Opened this issue · 2 comments

Did not configure the model at all, simply ran

> from keras_fcn import FCN
> fcn_vgg19 = FCN_VGG19(input_shape=(500, 500, 3), classes=21,  
>                       weights='imagenet', trainable_encoder=True)
> fcn_vgg19.compile(optimizer='rmsprop',
>                   loss='categorical_crossentropy',
>                   metrics=['accuracy'])
> fcn_vgg19.fit(X_train, y_train, batch_size=8, epochs=20)

on the BDD dataset of 20 classes.

input size: (batch_size, width, height, channels)
output size: (batch_size, width, height, n_classes)

Assuming data is correct, is the model for certain bug-free?

I met with the same problem. At first, I thought it was due to imbalanced data. Maybe you should try Unet other than this architecture.

I'll give that a try, thanks! What did you do to resolve the problem?