top of page

CELL CLASSIFICATION IN MACHINE LEARNING

Writer's picture: madrasresearchorgmadrasresearchorg

AUTHOR: JENEEFA T

The cell classification in machine learning is a challenging task in computer vision. This type of classification plays a significant role in bio-medical. In recent studies, several studies have been attempted to build an Artificial Intelligence based cell classification through training the microscopic images. These studies gave best results and classify different types of cell based on their physical and biological behavior. This article reveals deep about cell classification and also includes blood classification in detail in convolution neural network (CNN).
 

INTRODUCTION:

Machine Learning is a part of Artificial Intelligence. It is the study of computer algorithms that improve automatically by experience and by the use of data through predictions. The algorithms are widely used in variety of applications such as medicine, computer vision etc. Machine learning techniques such as deep learning enable the algorithm to make use of automatic feature learning based on datasets alone, so that the algorithm can able to combine multiple feature of input data into more abstract set of features from which to conduct further learning. Convolution Neural Network (CNN) is a class of deep neural network widely used for image processing and also inspired in biological process. Several studies revealed that in cell classification CNN performed well than human experts.




CELL CLASSIFICATION:

Cell Classification plays a vital role in medical science such as medical diagnosis, disease prevention and even in personalized treatment. But the challenging part is classifying different types of cell with high precision and accuracy. The accuracy of cell classification can reduced by some detrimental effects such as the variations in illumination, difference in shape and size and also due to impacts by external environment. Recently machine learning has been developed rapidly in the field of biology and medicine. It is also used to analysis tissue specimens, medical image analysis, and even in cell classification based on cell images. However this classification can be done based on bright-field microscopic image datasets and cannot able to reflect different types of cells.


CONVOLUTIONAL NEURAL NETWORK (CNN):

What is CNN:

Convolution Neural Network is a class of deep neural network and is most commonly applied to analyze visual imagery. They are the regularized versions of multilayer perceptions. These perceptions usually means fully connected networks , that is each neuron in one layer is connected to every neuron in next layer. CNN uses pre-processing techniques like other image processing algorithms

CNN Components:

CNN is made up of one input layer, with multiple hidden layers and an output layer. It allows greater extraction of features from the input images. Unlike the classical models, CNN take the input data train them and classify them automatically. The principal components of CNN are:

  • Convolutional layer

  • Activation layer

  • Pooling

  • Flattening

  • Fully Connection

CELL CLASSIFICATION IN CNN:

Figure 2: cell classification process in CNN

  • PREPROCESSING:

It is a preliminary processing of data for further analysis by extracting data from a larger set and filtering it for various reasons and combining these sets of data for further processing.

  • CONVOLUTIONAL:

The process is defined in the equation:


The convolution layer consists of input images and filter. Thus the input images are convolving by filter with padding, no of filter and stride. The filter called as spatial extent and the output image called as feature maps.


  • ACTIVATION FUNCTION:

The activation function is applied after every convolutional layer. It introduces non linearity function after the convolution. The commonly used activation layer is Rectified Linear Unit (ReLU).

  • POOLING LAYER:.

Because of more information convolution layer become redundant, so that it will produce similar values in the output. To avoid this, the output is passed to the pooling layer to reduce the size of the input data. It can be done by operations like max, sum and average.

  • FLATTENING:

It is between the convolutional and fully connected layer. It can transform a multi-dimensional matrix into the vector form.

  • FULLY CONNECTED LAYER:

This layer is used to do prediction of classes. Based on the training set it classifies input images into varies classes. For classification it uses an activation function like softmax or sigmoid.


BLOOD CELL CLASSIFICATION:

In medical science the traditional approach to classify blood cell is not an efficient process. The blood samples need to be stained on the glass slide with H and E (Haematoxylin and eosin state). This approach is widely used for several medical screening and diagnosis process. Microscopes are used to diagnosis the sample slides.

To make this process simple and before human verification deep learning technique used in the process of pre-screening of hundreds and thousands of slides and makes the process easy.

  • WHITE BLOOD CELLS CLASSIFICATION USING CNN:

Figure 3: Classification of White Blood Cells (WBC)

Here we will be classifying white blood cells using deep learning technique Convolutional Neural Network (CNN)

  • STEP 1:

Datasets:

For classification of white blood cells, here we will be using datasets contains 12,500 augmented images of blood cells. The cell types are Eosinophil, Lymphocyte, Monocyte, and Neutrophil.

  • STEP 2:

Mount drive and datasets:

from google.colab import drive
drive.mount('/content/gdrive')
  • STEP 3:

Import Libraries:

import numpy as np
import plotly.express as px
import matplotlib.pyplot as plt
import seaborn as sns
import   tensorflow as tf
from   keras.preprocessing import image
from   tensorflow.keras.preprocessing.image import ImageDataGenerator
from   sklearn.metrics import accuracy_score, classification_report

Here we will be using keras library for creating and training our model and for plotting and better visualising we will use matplot and seaborn.

  • STEP 4:

Image processing of train and test set

 
train = ImageDataGenerator(
 preprocessing_function=tf.keras.applications.mobilenet_v2.preprocess_input,
 validation_split=0.2
)

test   = ImageDataGenerator(
 preprocessing_function=tf.keras.applications.mobilenet_v2.preprocess_input)
 

The MobileNet v2 models of keras allows different width models to reduce the number of multiply-adds and thereby reduce inference cost on mobile devices.

After further processing output is like:

  • STEP 5:

Fitting the CNN model to the images:

Here we will set the epoch= 100 for better approximation.

history   = model.fit(
 trainset_data,
 validation_data=sub_data,
 epochs=100,
 callbacks=[
 tf.keras.callbacks.EarlyStopping(
 monitor='val_loss',
 patience=3,
 restore_best_weights=True
 )])

Output be like,

  • STEP 6:

Plot and Visualize test and train set:

Output be like,

Test accuracy: 51% Validation accuracy: 93%

Test Classification Report:

CONCLUSION:

Thus for cell classification CNN has high accuracy compared to other techniques, and it can handle variable sized input data. There are different types of ML techniques implemented in cell classification like blood cell classification, blood subtype detection, segmentation of cells, cancer cell detection. Researchers are still working on textual representation of image model all these could accelerate medical implementation using CNN among physicians.


GitHub link:

  1. https://github.com/JENEEFATHOMAS/White-Blood-Cell-Classification.git

REFERENCES:

  1. Datasets: https://www.kaggle.com/paultimothymooney/blood-cells

  2. https://www.tensorflow.org/api_docs/python/tf/keras/applications/mobilenet_v2

  3. https://blog.keras.io/building-powerful-image-classification-models-using-very-little-data.html

  4. https://en.wikipedia.org/wiki/Convolutional_neural_network

  5. https://www.superdatascience.com/blogs/the-ultimate-guide-to-convolutional-neural-networks-cnn

Recent Posts

See All

Comments


Madras Scientific  Research Foundation

About US

 

Contact

 

Blog

 

Internship

 

Join us 

Know How In Action 

bottom of page