**3. Material and evaluation methods**

#### **3.1 Image dataset acquisition**

We evaluated the proposed detector on real IHC dataset images. Dataset images were acquired from the institute of cancer therapeutics at University of Bradford, United Kingdom. The authors have obtained ethical approval for publication. The images were obtained by immunohistochemistry staining on colorectal cancer adenocarcinoma of human clinical specimens. GLUT-1 and ALDH7A1 prepared the immunohistochemistry staining on HT-29 Tissue Microarray (TMA). The TMA clinical sample slide holds 150 cores and has the number G063 (Biomax.us). These cores represent the whole side of the clinical sample and give a total of 50 cases of colorectal cancer in each whole TMA slide. Whereas 100 cores are colorectal tissues, and 50 cores were either malignant, adjacent tissue to the cancer tissue or normal tissues. The clinical samples were collected from colorectal cancer patients (male and female) in July and August 2019. The IHC images were scanned using an Aperio Digital Pathology Slide Scanners (Aperio AT2) and then captured with 20 magnification and 200 *μm* diameter. The whole cores and examples of GLUT-1 expression of IHC colon adenocarcinoma images are shown in **Figures 1** and **2**, respectively.

#### **3.2 Pre-processing of dataset images**

In a pre-processing step, there are procedures will be applied to the dataset images as follows;

*Deep Learning-Based Segmentation of Cellular Membranes in Colorectal Immunohistochemical… DOI: http://dx.doi.org/10.5772/intechopen.108589*

#### **Figure 2.**

*Examples of GLUT-1 expression at different stages of IHC colon adenocarcinoma images; magnification of upper panel is 5 and bottom panel is 20.*

#### *3.2.1 Derivation of dataset images*

We derived dataset images by hand-picking the ROI from TMA cores that comprised the most representative cells membrane stained. At first, we ran Aperio AT2 program and then selected the ROI regions at a (5 magnification) low resolution. We captured the images from the ROI regions with 20 magnification. A total of 400 IHC images were extracted with size 512 512 pixel and then stored in jpeg compression format.

#### *3.2.2 Annotation of dataset images*

Two trained pathologists manually annotated the cellular membranes of IHC images according to the proportion of Glut-1 and ALDH7A1 staining. The ground truth images are generated in MATLAB R2020a environment.

#### *3.2.3 Stain normalisation of dataset images*

In order to highlight the diaminobenzidine (DAB) stain regions of reactive membranes in the IHC images, we utilised a colour normalisation method described in [24].

#### *3.2.4 Partition of dataset images*

We split the dataset images randomly into 80% training set (320 images) and 20% testing set (80 images). The testing set does not utilise for training our proposed detector.

#### *3.2.5 Augmentation of dataset images*

Data augmentation is an essential step to generate additional artificial training images by using some transformations for increasing the deep network performance [25, 26]. In this work, we augmented the training images and their ground truth images of our IHC dataset by rotating them with angles of 90, 180 and 270 degrees and then flipping in the horizontal and vertical direction. We chose the rotate and flip transformations to enlarge the training images without affecting the quality of input images [27] and thus avoid the features poorly generalisation and over-fitting problems [28].

#### **3.3 The evaluation index**

The segmentation performance of the proposed detector was assessed by using the popular four evaluation criteria. These criteria use the following metrics; TP, FP, FN and TN denote respectively the number of true positive, false positive, false negative and true negative from all images in the dataset. True positive (TP) is counted as the intersection of a segmented cell membrane with its ground truth; otherwise, it is counted as false positive (FP). False negative (FN) is calculated as the missed parts of the ground truth, and true negative (TN), parts of the image beyond the union segmentation plus ground truth.

#### *3.3.1 Network accuracy metric*

This criterion is used to measure a network's ability to segment. It indicates correctly predicted observations against total observations and it is calculated as follows:

$$Accuracy = \frac{TP + TN}{TP + FP + FN + TN} \tag{1}$$

#### *3.3.2 Detection accuracy metric*

This criterion is used F1-score metric to measure the detection accuracy of individual cellular membranes. The F1-score is defined by both Precision and Recall metrics. Precision metric indicates the correctly predicted positive observations against total predicted positive observations, whilst Recall metric indicates correctly predicted positive observations against total actual positive observations. F1-score is calculated as follows:

$$F\_1Score = \frac{2.Precision.Recall}{Precision + Recall} = \frac{2TP}{2TP + FN + FP} \tag{2}$$

where

$$Precision = \frac{TP}{TP + FP}$$

and

$$Recall = \frac{TP}{TP + FN}$$

#### *3.3.3 Shape similarity metric*

This criterion is used Intersection over Union (IoU) also known as Jaccard Similarity Coefficient to compare similarities between segmented cell membranes and their ground truth. The Jaccard index is calculated as follows:

$$\text{Jaccard}(\text{IoU}) = \frac{\text{TP}}{\text{TP} + \text{FP} + \text{FN}} \tag{3}$$

*Deep Learning-Based Segmentation of Cellular Membranes in Colorectal Immunohistochemical… DOI: http://dx.doi.org/10.5772/intechopen.108589*

#### *3.3.4 Dice coefficient score*

This criterion is used to measure the agreement among segmented cell membranes and their ground truth at object level. The Dice score metric is used the ground set (G) and segment set (S). G; a group of pixels belonging to a ground truth object, and S; a group of pixels belonging to a segmented object. It is utilised to measure similarity between G and S and produces scores between 0 and 1, where 1 indicates perfect segmentation. It is calculated as follows:

$$\operatorname{Dice}(\mathbf{G}, \mathbf{S}) = \frac{\mathbf{2}|\mathbf{G} \cap \mathbf{S}|}{\mathbf{2}|\mathbf{G} \cap \mathbf{S}| + |\mathbf{G}| + |\mathbf{S}|} \tag{4}$$

#### **3.4 Proposed methodology**

We propose a semantic level segmentation of celluar membranes using an end-to-end trainable CNN based on integrates three modules; an encoder, an ASPP, and a decoder. We adapt the ResNet-50 [22] pre-trained on ImageNet [23] as the backbone for encoder module. The inputs are first passed through an extended ResNet50 network, followed by an ASPP module for multi-scale image processing and a decoder module to resize the images to the original input dimensions and produce sharp segmentation results. **Figure 3** shows our architecture and its three main modules. In the following section, there is a brief description of each module:

#### **Figure 3.**

*Show the proposed network architecture, "CONV" represents the convolution blocks that followed by rectified linear unit activation layer (ReLU) and batch normalisation layer (BN); "ASC" represents the atrous separable convolution blocks; "#F" represents the output number of filters for block; "S" represents the stride of all convolutions; P is padding.*

#### *3.4.1 Encoder module*

It acts as a feature extractor that uses several residual units to reduce the size of an input image. It contains the following blocks;

