Introduction

The detectability of early gastric cancers has improved with the use of high-resolution video endoscopy and chromoendoscopy [1,2,3]. Magnifying endoscopy combined with image-enhanced endoscopy such as narrow-band imaging has also been reported to improve the qualitative diagnosability of gastric cancers [4,5,6]. However, previous assessment of the diagnosability of early gastric cancer using endoscopy was based on the endoscopist’s subjective judgment and thereby included some problems in its objectivity [7, 8]. Therefore, we used the three-dimensional vectors with RGB value, indicative of color differences between cancerous and non-cancerous areas. Then, objective assessment of the diagnosability per endoscopy technique was conducted by its discriminator generated following training of a support vector machine (SVM) [9].

Endoscopic diagnosis of early gastric cancer has carried out based on distinct differences in the surface color and properties between the lesion and the surrounding tissues. White light endoscopy (WL) is used for the screening of gastric cancer. Indigo carmine chromoendoscopy (Indigo) is simple and easy and is also thought to be useful for the diagnosis of cancer [7, 8]. Acetic acid-indigo carmine chromoendoscopy (AIM) is a method that is based on the difference in the level of mucus, which may be due to a defense reaction of the gastric mucosa against acetic acid, between cancerous and non-cancerous areas. It has been reported that the diagnosability of gastric cancer is high using AIM [10, 11].

There have been remarkable advances in the artificial intelligence field recently, and the application of this technology to the medical field is expected [12, 13]. However, there are few cases of its application to the endoscopic field except for the detection of dysplasia in patients with Barrett’s esophagus and diagnosis via capsule endoscopy [14, 15]. In the present study, by using a SVM, which is one of machine learning techniques available for high-precision discrimination, the diagnosability of gastric cancer using different endoscopy techniques was compared based on the color difference between the cancerous and non-cancerous areas.

Materials and Methods

Subjects

Eighteen patients underwent upper endoscopy and endoscopic resection or surgical resection at the Yamaguchi University Hospital, and 18 lesions that were diagnosed histopathologically as early gastric cancer were examined. Our 18 subjects were patients who were undergone endoscopic examination by WL, Indigo, and AIM from June 2014 to August 2016. In these cases, the images by WL, Indigo, and AIM were recorded as similar views. Clinicopathological features of cases of the early gastric carcinomas were shown in Table 1.

Table 1 Clinicopathological features of the early gastric carcinomas

This study was conducted after obtaining the approval of the ethics committee of the Yamaguchi University Hospital. All the 18 patients provided their informed consent before resection for images to be acquired.

Image Acquisition

The endoscope and the image processor used in our study were a GIF-H260Z and an EVIS LUCERA ELITE, respectively (both from Olympus, Tokyo, Japan). White light endoscopy was performed, and then 0.2% indigo carmine was dispersed. Following this, a solution consisting of 0.2% indigo carmine plus 2.1% acetic acid was dispersed, and the images were acquired 12 s later. The images of the same lesions were thus obtained in order through WL, Indigo, and AIM (Fig. 1).

Fig. 1
figure 1

Representative images of early gastric carcinoma from white light endoscopy (a), indigo carmine chromoendoscopy (b), and acetic acid-indigo carmine chromoendoscopy (c)

Determination of Tumor Boundary and Extraction of RGB Data

A total of 54 still images of the 18 lesions were evaluated. A specialist certified by the Japan Gastroenterological Endoscopy Society (JN) examined the endoscopic images along with the corresponding macroscopic and histopathology findings and then circled a cancerous area on the individual images (Fig. 2).

Fig. 2
figure 2

Determination of the tumor boundary. Whole specimens were obtained by endoscopic submucosal dissection or surgery. A pathologist and endoscopist made the pathological diagnosis, and then, the endoscopist made a stereoscopic microscopic diagnosis based on the pathological findings. Finally, the endoscopist created images by matching the cancerous area with the endoscopic image

Pixels were extracted randomly from both the cancerous and non-cancerous areas on the images. To exclude the difference in the luminance value of the targeted pixels, the luminance value of each pixel was calculated from the extracted RGB values [16]. Then, 2000 pixels with equivalent luminance values were chosen from each image of the cancerous and non-cancerous areas (4000 pixels in total) obtained using the three endoscopy techniques. Following this, a pixel represented as a three-dimensional vector with RGB values was defined as a sample (Fig. 3).

Fig. 3
figure 3

Extraction of RGB data. Two thousand pixel samples with equivalent intensity levels were randomly extracted from each image of cancerous and non-cancerous areas (4000 pixels in total). In the Mahalanobis distance method, the mean of RGB three-dimensional vectors from 4000 pixels was used for evaluation. In the SVM method, one hundred RGB three-dimensional vectors from the cancerous areas and one hundred vectors from the non-cancerous areas were used for training. The trained SVM diagnosed whether remaining 3800 RGB three-dimensional vectors were from cancerous or non-cancerous lesion individually

The Mahalanobis Distance

The mean vectors (μ1) and covariance matrix (Σ1) were estimated using 2000 samples in the cancerous area, and similarly, the mean vectors (μ2) and covariance matrix (Σ2) were estimated using 2000 samples in the non-cancerous area on the image (Fig. 3). The Mahalanobis distances, indicative of color differences between cancerous and non-cancerous areas, were obtained for WL, Indigo, and AIM, respectively [17]. Differences in the mean of Mahalanobis distances between WL and Indigo, WL and AIM, and Indigo and AIM were calculated respectively for each of the 18 lesions.

Machine Learning and F1 Measure

One hundred samples from the cancerous areas and 100 samples from the non-cancerous areas were used for training, and the remaining 3800 samples (1900 samples from the cancerous and 1900 samples from the non-cancerous areas) were used for testing (Fig. 3). The LIBSVM (Library for Support Vector Machines) [18] was trained using the training samples. Then, the SVM diagnosed whether the test samples were from cancerous areas or non-cancerous areas. Each diagnosability per endoscopy technique was assessed using the F1 measure, which was calculated as the harmonic mean of the sensitivity (reproducible rate) and the positive predictive value (precision), and this measure was used as the indicator of diagnosability [19]. The mean of the F1 measures in each of the 18 lesions was statistically compared for each endoscopy technique.

Subjective Assessment of the Images

Fifty-four still images with white light (WL), Indigo, and AIM of the 18 lesions were randomly sorted to prevent the influence of display order. Five endoscopists completely blinded to patient information including the pathological diagnosis and endoscopic images evaluated the 54 still images to determine whether gastric cancer could be diagnosed. Re-examination of previously examined images was strictly prohibited. The mean of the ratio of the images that the endoscopists could diagnose gastric cancer was statistically compared for each endoscopy technique.

Results

The means of the Mahalanobis distances with WL, Indigo, and AIM were 1.52, 1.32, and 2.53 respectively. The AIM images tend to be superior in color difference to WL and Indigo images. There were no significant differences in the three modalities (Fig. 4).

Fig. 4
figure 4

The means of the Mahalanobis distances with the white light (WL) endoscopy, indigo carmine (Indigo), and acetic acid-indigo carmine (AIM) chromoendoscopy were 1.52, 1.32, and 2.53 respectively. The AIM images tend to be superior to the WL and Indigo images. There are no significant differences

When we compared each diagnosability by using SVM, the means of the F1 measures with WL, Indigo, and AIM were 0.636, 0.618, and 0.687, respectively. These results indicated that the images from the AIM were suitable for the diagnosis of gastric cancer based on color differences (Fig. 5).

Fig. 5
figure 5

F1 measure of each endoscopic technique. F1 scores of the white light (WL) endoscopy, indigo carmine (Indigo), and acetic acid-indigo carmine (AIM) chromoendoscopy were 0.636, 0.618, and 0.687. The AIM images were superior to the WL and Indigo images

From the subjective assessment, the mean rates that the endoscopists could diagnose gastric cancer for WL, Indigo, and AIM were 50.0, 52.2, and 83.3%, respectively (Fig. 6). Compared with the results for the WL and Indigo images, the mean ratio of diagnosability was significantly higher for the AIM images.

Fig. 6
figure 6

The mean of the ratio of the images that the endoscopists could diagnose gastric cancer. The mean rates of diagnosability for WL, Indigo, and AIM were 50.0, 52.2, and 83.3%, respectively

Discussion

The usefulness of indigo carmine and AIM was generally assessed based on the endoscopist’s subjective assessment [7, 8]. Objective tests of each technique in the endoscopy field are rarely performed. The Mahalanobis distances and machine learning using the RGB values of the pixels extracted randomly from the endoscopic image were used to objectively assess the endoscopic technique based on color differences. We previously reported the diagnostic ability of optical enhancement system in early gastric cancer demarcation with the same method [16]. The means of the Mahalanobis distances with the three modalities were not significantly different while SVM worked well for discrimination of the utility of the three techniques.

Recently, machine learning has attracted attention as support for diagnostic tools in the medical field [12, 13]. The SVM used in our study is classified as a data-knowledge integration artificial intelligence and has excellent pattern discriminability. By setting a boundary line where the training sample can be distinguished at the maximum, the SVM can identify two classes with high precision [20, 21]. The F1 measure, which was used as the indicator of diagnosability, is considered an accurate indicator focusing not only on the sensitivity but also on the positive predictive value [19]. Van der Sommen et al. showed the usefulness of the SVM and the F1 measure for evaluating the endoscopic image of Barrett’s esophagus [14].

Endoscopic diagnosis of early gastric cancer has carried out based on distinct differences in the surface color and properties between the lesion and the surrounding tissues. The images obtained from AIM were the most suitable for diagnosis of gastric cancer based on color differences compared with the images from WL and Indigo. Kawahara et al. reported that the outcome of endoscopic resection was good in lesions in which the gastric tumor margin was determined using AIM [10, 11]. The usefulness of this type of chromoendoscopy might be based on the enhanced color difference.

When a classifier designed by machine learning is used for the endoscopic diagnosis of gastric cancer, it is desirable to use a versatile system for various lesions. However, in a previous examination, it was found that the color of the cancerous areas in each lesion or the gastric mucosa of the non-cancerous areas was different on the endoscopic images of each patient. The individual variation results in the difficulty of diagnosis. Consequently, it is necessary to examine the color differences between cancerous areas and non-cancerous areas as the reference in individual patients [22].

As limitations of this study, it was performed with a small number of patients in a single institution. In addition, gastric cancer with differentiated tumors, for which endoscopic treatment is indicated, accounted for most of the cases. In the future, we plan to perform another study with more patients from multiple institutions and with various histologic types of gastric cancer.

Conclusion

Objective assessment with a SVM showed AIM to be suitable technique for the diagnosis of early gastric cancer based on variances in color differences in the endoscopic images.