Possible use of machine learning for blob comparison

Possible use of machine learning for blob comparison

I currently work on a project in which I want to check images of blobs and tell if blob is OK, or NOK.

Dataset:

• ~200 8bit grayscale images with same size, unlabelled
• Each picture contains one black blob shape on white background.

Features that I currently have:

• contour shape
• contour volume

Problem:

Classify if blob picture is OK, or NOK. Dataset is unlabelled, but I am able to manually label total OK and total NOK. But most of the blobs are somewhere close between NOK/OK. Labeling this ones will bring subjective error.

Also I want to be able to change threshold value for OK/NOK classification.

Possible solution:

• Anomaly detection:

I did an Andrew Ng ML course on coursera. And I tried to implement anomaly detection with multivariate gaussian distribution. With change of epsilon threshold I was able to change number of classified OK/NOK blobs.

• Use convolutional NN (didn't try yet):

Train it on total OK/NOK blobs and implement possible threshold changer in classification layer. Is there any way how I can reuse trained NN, and only change classification layer? Do you know about any trained model, that can be used for this? Can you pinpoint some good material on this topic?

• Other possible approach?

What is other possible approach without convolutional NNs. I think I can get more features from data.

I would suggest to use CNN's.

Pros:

1. No need manual feature extraction
2. Faster experimentation with different networks

Cons:

1. Manual labelling of dataset

In Keras framework, there are many pre-trained CNN's available for use:

Ex:

Xception
VGG16
VGG19
ResNet50
InceptionV3
InceptionResNetV2
MobileNet


https://gogul09.github.io/software/flower-recognition-deep-learning

You can use any of the above mentioned networks and fine tune for your dataset. There are many blogs that explains how to use pre-trained networks to do transfer learning & fine tuning.