The aim of this study was to build a CNN model specific for the analysis of the squash smear cytology of the brain tumor tissue and to check the validity of such AI Agents in detecting high-grade vs low-grade gliomas.
After preparing the dataset from smear cytology slides, a deep learning CNN Model designed specifically for handling such medical images was developed. Various steps in the process are described below.
Image Acquisition and Data Collection
Approval from Institutional Ethics Committee was obtained before collecting the data. Intraoperatively prepared squash smears slide of gliomas were acquired for surgeries done for 18 months period from June 2017 to December 2018 of gliomas from Department of Neuropathology. Of 500 slides scanned, an average of 20 representative images were obtained from each of the smear slides. Only non-overlapping uniformly spread, single cell layer parts and well stained areas in the slide were selected for imaging by expert neuropathologist. These images have to be selected this way for training purposes as in neural network training input data has to be labelled correctly. The ground truth was acquired from the final histopathology report.
These slide images were then converted into digital format by digital microscope (Olympus® Bz53, DP27 Camera). The data collected for the study were images of the squash smear slides whose final histopathology diagnosis was glioma. Images obtained were then divided into three sets, a training set, validation set and testing dataset (Figure 1). Images in the training set were only used to train the network and the rest of the images were only used for validation/testing. Of the total 10,000 images collected, 6,000 belonged to High Grade Glioma and 4,000 belonged to Low Grade Glioma. Amongst them, 3,200 were used for training and rest for testing/validation. Only high- and low-grade glioma were taken into consideration for this initial project as on squash smear or frozen section many times even by expert neuropathologist this much granularity can be obtained for gliomas and immuhistochemistry has to be done later during final histopathology reporting.
Image Preprocessing
The images acquired were of height of 480 pixels and a width of 612 pixels, coded in RGB Standard Code, and coded in 3 channels (612 x 480 x 3). The first image resolution was reduced to (150 x 150 x 3) for computing. After that image was vectorized into linear arrays on each channel. The arrays are then normalized with Min-Max Scaler Normalization and used as inputs. The input of the images was then processed through the Image Data Generator, to add randomness, noise, rotations, and other parameters for making data more generalized. Figure 2 demonstrates image before pre-processing (a) and after (b) pre-processing.
Building of CNN Model
Convolutional Neural Network (CNN) are standard deep learning methods to work with image data. CNN uses a convolution function mentioned below was employed:
Yk = f(Wk ∗ x)
This formula is an oversimplification of the actual convolution formula7, but in scope of this article, we consider it to fulfill its purpose. Here, the inputs are denoted by x, the filter for the kth feature map is denoted by Wk. The f (.)function denotes the Convolutional function and the Yk denotes the output of the function given the input x at the kth position. Convolution itself is a linear operator at its core.
A CNN model was built based on VGG197 with added layers at the end which were specially curated to handle these processed images (Figure 3). Models were built in Python language with Keras library with TensorFlow as backend which all are open source packages. As can be seen in the below mentioned figure, the input is in the shape of (150x150x3) formation. The layers were later built as alternate layers of Convolutional function, as mentioned previously, with Pooling layers which are connected with each other via Dense connecting layers. Once the architecture of the model is built; on the top of the model another set of ANN is built and connected and the final 5 layers of the network are formed. These layers were specifically built considering the input and nature of data. Model is finally compiled with “Stochastic Gradient Descent (SDG)” with loss of function as “binary cross-entropy” and metrics of accuracy as “accuracy” and a total of 28,939,329 trainable parameters.
The final output layer was considered as only binary output and labelled as either ‘1’ for high-grade glioma or ‘0’ for low-grade gliomas. This layer has the activation function of “sigmoid”, which gives output probabilities between 0 and 1. This would provide the confidence in the probability of high-grade glioma or low-grade tumors in the CNN network’s prediction.
Training of Model
Afterward, the CNN Model was trained on a workstation with 16 GB RAM, the process augmentation was done with NVIDIA® RTX 2060 6 GB Graphic Processor, on Intel® Architecture which took 121.02 minutes to train in a batch of 32 images with 100 epochs. One should note that all of the training is done without any feature extraction and no human intervention whatsoever, also for actual reporting purposes much lower configuration of the computer system should suffice.
Validation and Statistics
The artificial neural network was trained using these images on the training set and the accuracies and cross-validation matrices were built. This would help in validating the fitness of the model for the generalized use and for practice in the real world. Statistical analysis was done by Scikit-Learn Library, which is integrated with Keras library.