Classifying Biological Images Using Pre-trained CNNs

(Aditi) Singh
WomeninAI
Published in
3 min readAug 28, 2017

Since the past decade, deep learning has rephrased the state of art in various fields, natural language processing, optical character recognition, speech recognition, artificial intelligent, image analysis.

I have been working with medical images for sometime. One of the problems to use deep learning techniques in this domain, is the lack of good quality labelled data.

The introduction of internet-based crowd-sourcing marketplace, in the past decade, has made it easier to get bulky human intelligence tasks like data collection, image tagging and transcription, usability tests, website feedback to be finished, at minimal time and costs. Since image annotation in this domain require significant expertise, crowd-sourcing this task might not be a good idea.

Coming to the dataset, I used the Breast Cancer Histopathological Image Classification (BreakHis) dataset, which is composed of 9,109 microscopic images of breast tumor tissue collected from 82 patients using different magnifying factors (40X, 100X, 200X, and 400X). To date, it contains 2,480 benign and 5,429 malignant samples (700 X 460 pixels, 3-channel RGB, 8-bit depth in each channel, PNG format).

Benign tumors grow locally, cannot invade its surrounding tissue or spread around the body, thus being non-cancerous in nature. These are classified into Adenosis, Fibroadenoma, Phyllodes Tumor, and Tubular Adenoma. Malignant tumors are the cancerous ones, and may invade its surrounding tissue. These can be categorized into Carcinoma, Lobular Carcinoma, Mucinous Carcinoma and Papillary Carcinoma.

Samples at 400X magnification

The two things we look to achieve here, are:

  1. Classifying into Benign and Malignant
  2. Classifying into Subcategories

Separating benign and malignant tumors, would help identifying cancerous condition, which subcategorical classification would allow to carry out treatment well.

We used a pre-trained VGG16 network to extract features for classification. This network is trained on the ImageNet dataset(1.2 million images, 1000 classes, consisting of birds, animals, house, automobiled etc.)

Since the network is trained on an entirely different kind of images, than the tumor images, the features extracted will not be performing very well.

VGG-16 Network Macroarchitecture

The last fully connected layer is removed, and the resulting network acts as a feature extractor, giving a 4096 dimensional feature vector for every input image. This way of using a network trained on one kind of images to classify or generate features for another dataset (generally similar), is called Transfer Learning.

Once getting the features, random forests are used for classification.

Using the transfer learning approach to classify images as malignant and benign was ~89% accurate. When using the same method to classify images into the 8 subclasses, the approach fails miserably, with 49% accuracy.

Pre-training with network trained on natural images, gives satisfactory results for biological images. But once the complexity of the task increases, the performance worsens.

Depth is a critical parameter in the performance of a deep network. VGG-16 Network has 140 million parameters(weights, bias for each layer) for training, which might not be possible with the available data. Thus we train an Alexnet(~60 million parameters), which is possible through image augmentation techniques.

Training an Alexnet to classify into type of benign or malignant tumor,works well with an accuracy of ~87%, considering the small amount of data available.

Original Alexnet architecture

Though these results are not good enough to be implemented in a real life diagnostic situation, but provide some idea about using transfer learning approach in different domain.

Transfer learning might not be a universal solution for classification task, with less number of images available. Factors like type of images, similarity to original training set, task complexity, need to be kept in mind. If significant training data is available, it might be better to train a network from scratch.

Citation:

https://doi.org/10.1109/TBME.2015.2496264

--

--

(Aditi) Singh
WomeninAI

Machine learning enthusiast, Member of Women in AI Community