## 2 Materials and Methods
### PICCOLO Dataset
#### 2.1.3 PICCOLO Dataset Details  
Lesions were recorded between October 2017 and December 2019 at Hospital Universitario Basurto (Bilbao, Spain) using Olympus endoscopes (CF-H190L and-CF-HQ190L). Videos were recorded with an AVerMedia video capture and a hard drive storage. In all, the PICCOLO dataset included 76 lesions from 40 patients. In total, 62 out of these 76 lesions included white light (WL) and narrow band imaging (NBI) frames, while the remaining 14 lesions are recorded only using WL. Original videos were of length equal to \(70.05\pm 59.28\) s (range: 6-345 s), which corresponds to \(1965.49\pm 1677.57\) frames per clip (range: 187-10,364 frames). In all, more than 145,000 frames were revised. Out of the 80,847 frames showing a polyp, 3433 frames were selected for manual segmentation: 2131 WL images and 1302 NBI images (Table 1).  
Image resolution are either \(854\times 480\) or \(1920\times 1080\), depending on the video they are acquired from. For each frame, three images are provided (Figure 2):  
- Frame itself: png files showing the WL or NBI image.  
- Mask: Binary mask indicating the area corresponding to the lesion.  
- Void: Binary mask indicating the black area of the image.  
\begin{table}
\begin{tabular}{l c c c c} \hline \hline
**Category** & **Items** & **\# Lesions** & **\# WL Frames** & **\# NBI Frames** \\ \hline Paris Classification & Protruded lesions: 0-lp & 10 & 191 & 193 \\  & Protruded lesions: 0-lps & 7 & 193 & 107 \\  & Protruded lesions: 0-ls & 16 & 387 & 253 \\  & Flat elevated lesions: 0-lla & 29 & 928 & 436 \\  & Flat elevated lesions:0-lla/c & 4 & 83 & 91 \\  & Flat lesions: 0-llb & 2 & 85 & 21 \\  & N/A & 8 & 264 & 201 \\ NICE classification & Type 1 & 17 & 404 & 284 \\  & Type 2 & 50 & 1454 & 782 \\  & Type 3 & 8 & 264 & 201 \\  & N/A & 1 & 9 & 35 \\ Diagnosis & Adenocarcinoma & 8 & 264 & 201 \\  & Adenoma & 50 & 1454 & 782 \\  & Hyperplasia & 17 & 404 & 284 \\  & N/A & 1 & 9 & 35 \\ Histological stratification & High grade dysplasia & 12 & 409 & 168 \\  & Hyperplasia & 13 & 312 & 225 \\  & Invasive adenocarcinoma & 8 & 264 & 201 \\  & Low grade dysplasia & 1 & 13 & 16 \\  & No dysplasia & 41 & 1124 & 657 \\  & N/A & 1 & 9 & 35 \\ \hline \hline \end{tabular}
\end{table}
Table 1: Lesions and frames in the PICCOLO dataset according to clinical metadata.  
Figure 2: Examples of images and masks from the PICCOLO dataset. First two rows correspond towhite light images, while last two rows are NBI images. First column corresponds to the polyp frame, second column corresponds to the binary mask for the polyp area, and third column corresponds to the binary mask for the void area.  
In the binary masks, pixels labelled with 1 correspond to the class (lesion or void area), and 0 otherwise (Figure 2).  
Acquired images have been assigned to the train, validation or test set. In order to assure patient independence between sets, lesions originated from the same video are assigned to the same set. In all, there are 2203 (64.17%), 897 (26.13%) and 333 (9.70%) images in the train, validation and test set, respectively. Their clinical information is provided in Table 2. Furthermore, Table S1 in Supplementary Material provides all clinical information and assigned set for each of the 76 lesions.  
The PICCOLO dataset is publicly available at the website of the Basque Biobank ([[https://www.biobancovasco.org/en/Sample-and-data-catalog/Databases/PD178-PICCOLO-EN.html](https://www.biobancovasco.org/en/Sample-and-data-catalog/Databases/PD178-PICCOLO-EN.html)]([https://www.biobancovasco.org/en/Sample-and-data-catalog/Databases/PD178-PICCOLO-EN.html](https://www.biobancovasco.org/en/Sample-and-data-catalog/Databases/PD178-PICCOLO-EN.html))), although a dedicated form to request downloading must be completed (the use of the dataset is restricted to research and educational purposes and use for commercial purposes is forbidden without prior written permission).