Machine Learning CS460 : Group 12

Course Instructor : Dr. Subhankar Mishra


Group Contributers

Group Repository : Link


Title of the project :
Multiclass classification of White blood cells using Convolutional Neural Network (CNN)


Biological Background of the project

WBCs (White Blood cells) also known as leukocytes are the cells of immune system that are involved in protecting the body against both infectious invadors and foreign diseases.
Depending upon the presence of small structures known as granules, WBCs are classified into two different types:

Depending upon the type of nucleus, Granulocytes and Agranulocytes are furthur divided into different types

Granulocytes:
Agranulocytes:

Motivation and plans :

There is a need to quickly identify blood cells at bulk in the medical field. We propose using a CNN to build a machine which can classify the stained cells to the type of WBCs. The reason we use CNN is because it is known for its high accuracy when it comes to image recognition.

We plan to first get the RGB info on each pixel of the image. The stained cells are of a different colour from the other cells so it would be easier to identify the pixels which contain the WBC under inspection. Then we will use a CNN and train it to get a model which will be able to classify an image containing a stained WBC.

KYD : Know Your Dataset

The dataset we will using is WBC Classification dataset uploaded on Kaggle by Paul Mooney.
The database consists of about 10,000 images of White blood cells, divided into 4 different classes. Each class have about 2500 RGB images of dimention 320 x 240.


Midway plans and Work Division :

Our Midway plans are follows Post midway, we will be exploring methods and layers to make our algorithm and model better in terms of accuracy.
Work Division :

Midway Works :


Up till now we have done the following:


What is a NN and CNN?

Neural Network
Neural Network (NN) also known as Artificial Neural Network (ANN), as the name suggests is a network of neurons or nodes and forms the basis of Machine Learning and heart of the deep learning algorithms.
It mimics a network of biological neurons. All the different neurons or nodes are connected to each other by weights giving a layer liked structure. A positive weight corresponds to excitory connection and a negative weight corresponds to inhibitory connections.
These weights can be found out or calculated during the traning of the machine learning model.
The first layer of a NN is known as input layer, the last layer is known as output layer. The layers in between both, are hidden layers. The number of hidden layers is decided considering the dataset and complexity of the model.
Backpropagation is an important algorithm by which a neural network learns from its own mistakes.

There are various types of Neural networks like Artificial neural network (ANN), Convolutional Neural Network (CNN), Recurrent Neural Network (RNN), Long short term memory neural network (LSTM) etc. Each type of Neural network have its own uses.

Neural Network that is frequently used for image classification is Convolutional Neural network (CNN). CNN is a type of NN containing a layer known as "convolution layer".
A convolution layer has multiple filters, each filter tries to find a particular pattern. Lets say we are trying to classify an image into birds. A convolution layer will have multiple filters, like a beak filter which detect pattern in beaks of the bird, or a eye filter which detects eye of a bird. These filters or nodes will activate nodes of another convolution layer which might have a head filter or a body filter. When all the required filters or nodes get activated, the output layer will gives us the type of bird we are trying to classify bases on the input of the hidden layers.
Filters

We will be using Sequencial method from the Keras API in tensorflow library to build our model. We will also be using other functions and methods for preprocessing of the image and further tweaking of the model.

The CNN model we have, has different Conv2D layers, pooling layers and Dense layers. The number of each of these layers is a hyperparameter we can tune and test. Our basic CNN is illustrated by the image below
Basic CNN Model


Some Analysis of the papers


Paper 1


Various experiments we have done. Link to the codes

 Experiment No. Dataset Model  Optimiser   Activation Function  Training Accuracy Testing Accuracy
 1 Mnist  NN Single Layered  Adam  Sigmoid  98 %  93 %
 2 Mnist  NN Multi Layered Adam   Sigmoid  99 %  98%
 3 Cifar10  NN Multi Layered SGD  Sigmoid   99 %  55 %
 4 Cifar10  NN Multi Layered Adam  Softmax   98 %  48 %
 5 Cifar10  NN Multi Layered  SGD Softmax   98%  56 %
 6 Cifar10  CNN Multi layered Adam  Softmax   93 %  68%
 7 WBC CNN Multilayered  Adam  Softmax  100 %   48%

Future ideas and comments on the current experiments


Final Works


Till now we have been able to do the following:


Image Augmentation

Image augmentation is a technique to produce more data from an existing dataset. This helps the model to train on a wider range of Dataset and hence train more efficiently.
For the Image augmentation we have used Image Data Generator function from the Keras API in Tensorflow Library. The augmentation parameters are as given below
Augmentation function
The function driving this generator, gets the image, turns it into an array, applies the augmentations and saves the image to a given directory using .flow function in the Image Data generator.


Image Segmentation

As we observed earlier, the original image dataset didnt give us good results so we went with segmentation. Our aim was to extract the image of the nucleus and/or cell, and train our model on the same.
We explored 2 image segmentation techniques, known as cell segmentation and nucleus segmentation.

Regularisation

Apart from augmentation and segmentation, another technique used for solving the overfitting problem is a technique called Regularisation.
There are different types of regularisations known as L1 regularisation, L2 regularisation, Dropout regularisation etc. For CNN models, Dropout regularisation is widely used.

Dropout Regularisation

Dropout Reg

As the name suggests, dropout regularisation layer "drops out" or ignores a given percentage of nodes in a layer while training an epoch or it can be said that it temporarily removes those particular nodes from the network. The nodes are randomly selected in each iteration. The dropping percentage is again a hyperparameter that can be tuned, although in many papers it is said that, ideal dropout parameter for a hidden layer is between 0.5 to 0.8.


Experimentations and different models : Link to the codes



Problems so far and possible fixes


Relevant Paper and Sources: