I am training a NN for blobs vs non-blobs recognition.

Blobs example: blobs example

Non-blobs: non-blobs example

Keras architecture is:

model = Sequential() activation = "relu" model = Sequential([
    Convolution2D(8,(3,3), activation='relu', input_shape=input_shape),
    Convolution2D(8,(3,3), activation='relu'),
    Convolution2D(16,(3,3), activation='relu'),
    Convolution2D(16,(3,3), activation='relu'),
    Dense(1024, activation='relu'),
    Dense(128, activation='relu'),
    Dense(16, activation='relu'),
    Dense(1, activation='sigmoid')   ]) opt = SGD(lr=0.01) model.compile(loss="binary_crossentropy", optimizer=opt, metrics=["accuracy"])

Although training accuracy is about 96-97%, there are 25-30% of false-positive cases.

Tried different things, like add more convolution layers, change number of filters, add dense layers - no difference, the mentioned model is pretty much the best.

I appreciate any advice to improve the recognition.

  • $\begingroup$ Hi and welcome. Can you please put your main question in the title? "Need advice" is not a question and you should not ask for advice but for possible solutions. You should be able to summarise your main question in one line. $\endgroup$ – nbro Jun 25 at 16:33
  • $\begingroup$ Changed, thank you $\endgroup$ – TPRLab Jun 25 at 16:50
  • $\begingroup$ Use softmax as the output layer activation. I haven't tried myself, but I don't think you should be using sigmoid with cross-entropy loss. $\endgroup$ – Recessive Jun 26 at 3:26

Your Answer

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

Browse other questions tagged or ask your own question.