# Deep Learning Classification of Colorectal Lesions Based on Whole Slide Images
## 2 Materials and Methods  
### WSIs Database  
When labeling the images, we used the diagnostic criteria of the current edition (fifth) of the WHO classification of gastrointestinal tract tumors [32]. Three GI pathologists, with at least 7 years of work experience, were responsible for performing the image segmentations on a commercial basis. Each pathologist was engaged in the segmentation of his set of WSIs. Upon completion, the head of the group of pathologists ([PERSON]) checked the markup and corrected the labels he considered incorrect classification. In the case of any other pathologist discordance, he fixed the segmentation issues, being the most qualified specialist.  
We selected the criteria describing the morphological structures characteristic of all types of benign and malignant tumors of the colon, according to WHO recommendations. A systematization of histological slides was conducted, with a discussion of various pathological processes. The classes of histological categories involved in the histological conclusion were formed, namely:  
* structures of normal colon glands (NG);
* structures of serrated lesions (SDL);
* structures of serrated lesions with dysplasia (SDH);
* structures of hyperplastic polyp, microvesicular type (HPM);
* structures of hyperplastic polyp, goblet-cell type (HPG);
* structures of adenomatous polyp, low-grade dysplasia (APL);
* structures of adenomatous polyp, high-grade dysplasia (APH);structures of tubular adenoma (TA);
* structures of villous adenoma (VA);
* structures of glandular intraepithelial neoplasia, low-grade (INL);
* structures of glandular intraepithelial neoplasia, high-grade (INH);
* structures of well differentiated adenocarcinoma (AKG1);
* structures of moderate differentiated adenocarcinoma (AKG2);
* structures of poorly differentiated adenocarcinoma (AKG3);
* structures of mucinous adenocarcinoma (MAK);
* structures of signet-ring cell carcinoma (SRC);
* structures of medullary adenocarcinoma (MC);
* structures of undifferentiated carcinoma (AKG4);
* Granulation tissue (GT).  
Histological samples from endoscopic colon biopsies were digitized (.svs) with a Leica Aperio AT2 scanning microscope, with a resolution of 0.50 um/pixel. The scanned images were divided equally between 3 specialists. Each specialist labelled the histological structures with the ASAP software. Several representative examples are shown in Figure 1.  
Figure 1: Examples of labelled hematoxylin- and eosin (H and E)-stained colorectal tissue slides stained with the labelled hematoxylin and eosin (H and E) of different classes: (**a**) tubular adenoma (TA); (**b**) villous adenoma (VA); (**c**) well-differentiated adenocarcinoma (AKG1); (**d**) poorly differentiated adenocarcinoma (AKG3).  
Each labelled area was outlined with its own color. The pathologists tried to avoid fibrous tissue, artifacts from histological slides, and the white background falling into the labelled area. The borders of the labelled areas were not allowed to intersect.  
Some classes of histological categories are based on the presence of several morphological structures, for example, tubulovillous adenoma. We did not consider mixed structures as separate classes because such mixtures were already identified in the output of machine learning classification. When the ML algorithm returned significant probabilities for several classes, the output was treated as a mixture of structure types.  
We used the WHO classification of the gastrointestinal tract, 5 th edition, but did not aim to train the algorithm to make a diagnosis. The main purpose of the study was implementing the automatic segmentation system so that pathologists can perform diagnoses faster. All slides were collected and processed at the National Medical Research Center of Oncology, Rostov-on-Don. The total number of WSIs was 1785.