1 Introduction

Gastric cancer (GC) is among the most diagnosed cancers and the second most frequent cause of cancer-related death worldwide [1]. Geographically, the highest incidence of GC is in Asia, Latin America, and the Caribbean [2, 3]. In Colombia, GC is the first cause of cancer-related death, representing a 15% of all cancer deaths, with a high incidence in the Andean zone, especially in the departments of Nariño, Boyacá, and Cundinamarca. Currently, it is considered a major public health problem that has generated an expense of more than 47 million USD in five years [4].

GC comprises several kinds of lesions with different severity grades. From such lesions, adenocarcinoma is the most common, representing more than 90% of all GC [5]. Characterization and quantification of the adenocarcinoma might establish plausible chains of events that improve the disease understanding and reduce its mortality rates. Diagnosis is usually reached by an endoscopic biopsy of the stomach which is processed and analyzed by pathologists who determine the degree of malignancy [6]. One of the most common approaches to identify and grade gastric adenocarcinomas is by identifying and estimating the density of glands. Low-grade lesions are characterized by the presence of well/moderately differentiated glands (Fig. 1-a). In high-grade lesions, glands are highly irregular and poorly differentiated (Fig. 1-b) [5, 7]. Identification of glands plays an important role not only in diagnosis but also in establishing some prognosis [7]. An accurate quantification is therefore essential for both the decision making flow and the treatment planning. Unfortunately, this process has remained highly subjective and prone to error. In this context, automatic measures may contribute to identify tubular glands on GC samples.

Fig. 1.
figure 1

Representative images of Hematoxylin-Eosin stained tissue from gastric lesions. (a) Well-differentiated glands, (b) Poorly-differentiated glands.

This work introduces an automatic strategy that exploits nuclear local and contextual information to identify gland nuclei in fields of view (FoVs) extracted from gastric cancer whole slide images (WSIs). The present approach starts by automatically segmenting nuclei with a watershed-based algorithm [8]. Each nucleus is then characterized by two types of features: first, its own morphological properties (size, shape, color, texture, etc.), second, its neighbor nuclei features within a determined radius. Such features are used to train a Gradient-Boosted-Regression-Trees (GBRT) classifier to differentiate between gland-nuclei and non-gland-nuclei. Unlike other state-of-the-art methods, any feature in this approach exploits nuclei relative information, i.e., any nucleus information is always relative to how such feature is with respect to its surrounding nuclei. This strategy is compared with a Deep Learning (DL) model that was trained to identify gland-nuclei. This DL model receives as input patches from WSIs and outputs probability maps that are thresholded. A watershed-based algorithm segments then the binary output map and splits the connected/overlaid cases to set the final candidates.

2 Methodology

2.1 Preprocessing: Nuclei Segmentation

A watershed-based algorithm [8] is applied to segment nuclei, generating a mask with the position of each nucleus. Each detected nucleus is then assigned to the class either gland-nucleus or non-gland-nucleus (See Fig. 2).

Fig. 2.
figure 2

Description of the nuclei segmentation. (a) Original image, (b) gland-nuclei mask, (c) non-gland-nuclei mask

2.2 Nuclear Local and Contextual Information (NLCI)

In H&E images, tubular gland nuclei are generally distinguished from other cell nuclei by their orientation, color, oval shape, eosinophilic cytoplasm, and proximity to other similar nuclei. For this reason, after nuclei were segmented, a set of low-level features were extracted, including shape (nuclei structural area, ratio between axes, etc.), texture (Haralick, entropy, etc.), and color (mean intensity, mean red, etc.). Each nucleus was represented by this set of local features. Additionally, for each nucleus, a set of circles with incremental radii of \(k=dL\times 10, \, dL\times 20, \, dL\times 30\) pixels were placed at the nucleus center (begin \(dL=20\) pixels the averaged nuclei diameter), aiming to mimic a multi-scale representation. Finally, a set of regional features was computed within each circle and used to characterize each of the segmented nuclei. These features measure the neighborhood density and relative variations in color, shape, and texture.

A set of 57 local and contextual features were extracted from each image nuclei and the 33 most discriminating characteristics were selected by distribution analysis and Infinite Latent Feature Selection (ILFS) algorithm [9]. A GBRT classifier [10] was then trained to differentiate between the gland-nuclei and non-gland-nuclei classes. Specifically, we used an adapted GBRT framework [11] which emphasizes the minimization of the loss function.

2.3 Baseline

The baseline corresponded to a state-of-the-art deep learning approach known as Mask Region-based Convolutional Neural Network (R-CNN). This modification of the Fast R-CNN algorithm [12] has been used in the Kaggle 2018 Data Science Bowl challenge for identifying wider range of nuclei across varied conditions [13]. It uses a deep convolutional network with a single-stage training and a multi-scale object segmentation. Mask R-CNN outputs an object detection score and its corresponding mask [14].

The DL model was trained using a set of patches extracted from the FoVs. The positive class patches correspond to the area covered by the bounding box of each gland nucleus while the negative class patches were taken from the background, i.e., regions with non-gland nuclei. Aiming to increase the number of training samples, different transformations (e.g., rotation and mirroring) were applied to the patches. Model training was carried out using a total of 20 epoch cycles with 100 steps each.

Figure 3 presents the architecture of a trained DL model for the exploratory stage. A random extraction of a Region of Interest (RoI) is performed. This RoI is projected to a convolutional network that generates a feature map. These features are introduced to the RoI pooling layer for further processing. At the last stage, fully connected layers generate the desired outputs, including the gland nuclei candidate bounding box and mask.

Fig. 3.
figure 3

Figure extracted and adapted from [12]

Mask R-CNN work flow.

3 Experimentation

3.1 Dataset

The dataset consisted of 90 FoVs of \(1024 \times 1024\) pixels at \(40 \times \) extracted from a set of H&E WSIs taken from 5 patients who were diagnosed with GC. The WSIs were provided by the Pathology Department of Universidad Nacional de Colombia. A total of 45702 nuclei were manually annotated, being 12150 gland nuclei while the remaining 33552 corresponded to other structures (non-gland nuclei).

3.2 Experiments

Two experiments were carried out. The first attempted to classify between gland-nuclei and non-gland-nuclei using the NLCI approach. A Monte Carlo Cross validation method with 10 iterations was used. At each iteration, 70% of the whole set of FoVs was used to train the GBRT classifier and the remaining 30% was used to test the trained model. Finally, the measured performances along the 10 iterations were averaged.

The second experiment aimed to identify gland-nuclei using the DL model. For this purpose, 60 FoVs were used to train the model and the remaining 30 for testing. In this case, gland-nuclei detection was assessed based on the number of detected nuclei centroids that correctly overlapped with the ground truth nuclei, judged as correct when centroids were within one nuclear radius.

Fig. 4.
figure 4

Gland nuclei Segmentation showing, the ground-truth label (a), NLCI (b) and R-CNN with each gland nuclei candidate individually colored (c).

Table 1. Comparative measurements for both approaches.

3.3 Experimental Results

Table 1 presents different performance metrics for both assessed approaches. NLCI achieved an accuracy of 0.977 and an F-measure of 0.955, while R-CNN yielded corresponding accuracy and F-measures of 0.923 and 0.719, respectively. For the qualitative results, Fig. 4 shows the resulting gland nuclei segmentation from both approaches, where R-CNN generates its own masks of single gland nucleus presented by individual colors.

4 Concluding Remarks

In this article, two different approaches to automatically detect gland nuclei on gastric cancer images were presented and compared: a model based on nuclear local and contextual information and a DL model. Results demonstrate that local and contextual features are appropriate to describe the structural features of tubular gland nuclei. Despite the DL model presented good results, this approach requires a powerful/expensive infrastructure, long training times, and huge quantities of annotated data. Due to the lower precision of the model, it indicates the that only local information its taken into account. Future work includes quantification of glands to establish correlation with cancer grade and patient prognosis.