Keywords

1 Introduction

Cancer is considered to be the most problematic aspect for human life. Early identification and treatment of cancer is very crucial for the understanding of it because it has a high mortality rate compared to other diseases. Diagnosing the cancer and treating it is quite expensive with respect to the type of cancer [1]. According to the statistics from Ministry of Health, Stomach cancer is the second most common type of cancers in our country [2]. Gastric cancer is the fourth and seventh most common type of cancers to be found in men and women, respectively, across the world [3]. According to the data provide by the “GLOBOCAN”, Gastric cancer is the third leading cause for cancer deaths throughout the world, followed by lungs and colorectal cancer in overall mortality rate. Therefore, Early detection, diagnosis and treatment of Gastric cancer is essential, but there may be a possibility that the Early-stage Gastric cancer is overlooked by the Physicians and Doctors. Certain cases also have reported that the false negative rate for Gastrointestinal cancer with endoscopy is ranging from 4.6 to 25.8% [4].

Certain genetic alterations and specific environmental conditions merge together resulting in Gastric cancer. Recent studies have also concluded that tobacco smoking increases the threat of Gastric Cancer. In order to identify this life threatening disease, Endoscopy reports utilized with Artificial Intelligence (here CNN) results in early identification of Gastric Cancer. MRI and CT hugely benefit and also enhance from their respective value to the diagnostic process, which in turn allows for increase in the precision and affirmation. Finally, the actual pathological diagnosis has shown guarantee that it can be majorly benefited from AI [5, 6, 7].

Since, Endoscopy is the strongest tool for detecting and diagnosing of Gastric Cancer, the accuracy in terms of identifying the cancer also plays an important role and it depends on the endoscopists and is made complicated by various factors of the Gastrointestinal (GI) tract [8, 9, 10].

Hirasawa et al. [11] developed an AI-based diagnostic system that was trained by >13,000 images of EGD to detect early and advanced Gastric Cancer. The developed CNN model had an overall sensitivity of 92.2% and a positive predictive value (PPV) of 30.6%. Seventy out of 71 lesions were correctly detected [11].

Recently, Artificial Intelligence (AI) based on deep learning through convolutional neural networks (CNNs) has made ground-breaking progress in various fields of study, including medicine [8, 12, 13]. CNN is widely known for its ability of image classification and recognition. Thus, we can implement a computer-aided decision support system using CNN for guiding doctors which in turn reduces the false negative rate in detecting Gastric cancer through endoscopy. Detecting cancers using AI has shown significant results in predicting cancers with high fidelity [14]. As an AI algorithm that automatically learns features from the data, the utilization of CNN is primarily for image recognition [15]. Recently, AI has also being applied in the detection, localization and segmentation of colonic polyps [16].

2 Literature Survey

Convolutional neural networks (CNN) is one of the majorly used deep learning techniques for image recognition process. It is a popular deep learning method for image recognition proposed by Szegedy et al. [8].

The accuracy provided by the CNN system is far greater than what is done and achieved manually. When a CNN-based diagnostic system is implemented [17], trained (over 14,000 images) and tested on approximately 2300 endoscopic images of gastric cancer, it correctly diagnosed 71 out of 77 gastric cancer lesions within the span of less than a minute, completing the process with an overall sensitivity of approx. 93%. By this, it was concluded that, CNN could evaluate and process a vast number of images within a short span of time, put forward by Hirasawa et al. [14]. Training a deep convolutional neural network (CNN) system based on a single-shot multi box detector, using 5360WCE images of lesions, resulted in correctly detecting the area under the curve of lesions with a confidence interval of 95% and accuracy of CNN system is 90%. Thereby, this system helped reduce oversights and burden on the physicians Tsuboi et al. [18].

This deep learning technique, CNN, has been active in the medical field over the past few years, considering the technological growth. Gastric cancer is considered to be one of the dangerous health hazards at present time, and finding the cancer through image identification has been less accurate lately since the number of images that need to be studied are large in number. So, when tested the endoscopy reports using CNN and by endoscopists (manually), the accuracy produced in terms of sensitivity, PPV and NPV, CNN performed more precisely compared to the manual work done by the endoscopists, put forward by Yasar et al. [11].

It’s also been shown that Artificial Intelligence (AI) trained with endoscopic images could detect Gastric cancer accurately. CNN which is a deep learning method is used for learning optimum features from large amount of training datasets automatically.

Furthermore, the use of Graphical Processing Units (GPUs) has decreased the training time of deep learning methods. Three crucial characteristics make the convolutional neural networks different from other neural networks.

  1. 1.

    Sparse Connectivity

  2. 2.

    Shared Weights

  3. 3.

    Pooling (a form of down sampling)

Though there are other classified methods like SVM, ANN, etc., CNN produces more accurate results compared to these methodologies. The SVM classifier is also experimented with Linear, RBF and Polynomial Kernels. Even though the evaluation is done using three SVM types, CNN has higher overall accuracy, [19].

3 Methodology

3.1 Flow

The user interface is a website where the image in which cancer must be identified is uploaded and image uploaded is checked whether it is cancerous or not through CNN algorithm. Features are extracted from the image and lesions are identified and gastric cancer is detected. After the image is identified the output is shown in the webpage where the lesion is highlighted and cancerous area is identified, if any.

3.2 Detailed Architecture

3.2.1 Image Acquisition

The images are collected using endoscopic equipment at Vestre Viken Health trust (VV) in Norway. The VV consists of 4 hospitals and provides health care to 47,000 people. We have collected the images from Simula open datasets website [14]. The image data set is annotated and verified by medical doctors and specialized physicians. The images are with different resolutions ranging from 720 * 576 to 1920 * 1076 pixels. The image dataset consists of endoscopic reports both healthy persons and cancer affected patients [20, 21].

3.2.2 Image Preprocessing

As the images are of different resolution first the images are resized into a fixed resolution. As we need to extract the features such as lesion size, number of lesions from the images we need to have a fixed resolution. Hence the images are resized into 400 * 350 pixels.

The images are then converted into grayscale as it is easier to process the grayscale images as they have less complexity and are easier to process. The image is converted into grayscale by taking the average of the RGB values.

$${\text{Grayscale }} = R/3 + G/3 + B/3$$
(1)

We can take the combined average of RGB values but there is a chance that it may cause an overflow error, so we took the separate values and added them [11].

Then the median filter is applied on the images to reduce the noise. Median filter is effective because it reduces the noise without softening the image. Median filter is the most effective filter for reducing Salt and Pepper noise. We cannot use Gaussian filter because it blurs the image and we cannot identify the lesions as the image is blurred. Median filter is more effective because it reduces the noise while preserving the edges which is very essential for lesion recognition. The median filter considers every pixel value and checks whether it is a representative of its neighbors or not and replaces the value by median of the surrounding pixels. The median is calculated by sorting all the neighboring pixels and finding the center or middle value of the all values (if there are even number of neighbors average of middle values is considered) [19].

Example: Consider a 2-Dimensional image with pixel values as follows shown in Fig. 1, consider 3 * 3 matrix as neighbors (Figs. 2, 3, 4 and 5).

Fig. 1
figure 1

2-Dimensional pixel matrix

Fig. 2
figure 2

Original image

Fig. 3
figure 3

Resized image (400 * 350 pixels)

Fig. 4
figure 4

Grayscale image

Fig. 5
figure 5

Filtered image

3.2.3 Feature Extraction

We have extracted a total of 13 features from the image based on which the cancer is identified. The features extracted are:

Mean: Mean value is the average value of all the pixels in an image or can simply be said as the mean or average intensity of the image.

$${\text{Mean}} = {\text{Sum of all elements}}/{\text{no of elements}}.$$
(2)

Standard Deviation: Standard deviation is the measure of the amount of deviation of elements from the mean value of elements.

$$\sigma = \surd \, \left[ {\sum \left( {x - {\text{mean}}} \right)^{2} / \, N} \right]$$
(3)

Entropy: Entropy is a measure of the degree of randomness of an image.

$${\text{Entropy}} = {\text{sum}}\left( {{\text{p}}.*{\text{log2}}\left( {\text{p}} \right)} \right), \text{ where p is probability of each pixel}.$$
(4)

RMS: RMS stands for root mean square average. It is the arithmetic mean of the squares of all the values in the pixel matrix.

Variance: Variance is simply a measure of variability. It is calculated by taking the average of squared deviations from the mean. Variance is the square of standard deviation.

$${\text{Variance}} = \sum \left( {x - {\text{mean}}} \right)^{2} /N$$
(5)

Smoothness: Smoothness is a measure of uniformity over an area in an image. It is high for areas with uniform pixel values.

$${\text{Smoothness }} = 1 - \left( {1/\left( {1 + a} \right)} \right);$$
(6)
$${\text{a}} = {\text{sum}}\left( {{\text{double}}\left( {G\left( : \right)} \right)} \right), {\text{ where }} g {\text{ is the pixel matrix}}$$
(7)

Kurtosis: Kurtosis is a measure of whether a pixel or an area is peaked or flat when compared to the normal distribution.

Skewness: Skewness can be simply explained as a measure of symmetry. It is effectively the measure of lack of symmetry.

IDM: IDM stands for Inverse Difference Movement. It Measures the local Homogeneity of an image.

Contrast: Contrast is a measure of the intensity contrast between a pixel and its neighbor over the image. Contrast is also known as a variance.

Correlation: Correlation is a measure of how related a pixel is to its neighbor or how dependent a pixel is on its neighbor.

Energy: Energy returns the sum of squared elements in the GLCM. It is also known as uniformity.

Homogeneity: It is a measure of closeness of the distribution of elements in GLCM to the GLCM diagonal.

3.2.4 Lesion Recognition

We are then identifying the lesion or tumor using segmentation. The image is segmented and features are then extracted. We have trained our model using this labeled data and then the model can detect the lesion and identify whether the cancer is malignant (harm causing) or benign (harmless like an ulcer). Also, the features such as mean, skewness, standard deviation, smoothness, are calculated (Fig. 6).

Fig. 6
figure 6

Segmented image

4 Results

We have developed our Stomach cancer identification model. The accuracy of the model is about 90% which is better than the identification using Statistical Region Merging method which is 80–85%. We have found the accuracy of the model while using different kernels to identify cancer. The kernels used are Linear kernel, Quadratic kernel, Polynomial kernel, RBF kernel. We have observed that the Radical Bias Function kernel gives more accuracy than other kernels because RBF is more flexible than others so it can easily incorporate outliers and identify cancer correctly. We have calculated the accuracy by iterating the same image for 100 times and based on the results accuracy is calculated as no of times correctly identified/total no of iterations (Fig. 7).

Fig. 7
figure 7

Output screen

5 Conclusion

We have developed a Computerized Decision Support System (CDS) that can aid the physicians and doctors to easily and accurately detect the Gastric cancer at an early stage, which is proven to be very useful. This system is developed using CNN that can identify the lesions in the endoscopic images and can detect the Gastric cancer at an early stage. The accuracy of this model is improved with training and the final model is precise and reliable. We can say from the obtained results that this method can be very useful for endoscopic examination of cancers.

6 Future Scope

Currently our model is only limited to gastric cancer but in future we could develop this model such that all types of cancers can be detected using this Computerized Decision Support System (CDS) where the endoscopic reports are used to detect the cancers.