## 3 Dataset
### Nucleus-Based Cervical Lesion Dataset  
To create a new dataset annotated in terms of nuclei with cervical lesions, the following TBS classes were considered: atypical squamous cell of undetermined significance (ASC-US); low-grade squamous intraepithelial lesion (LSIL); atypical squamous cell, cannot rule out high-grade lesion (ASC-H); high-grade squamous intraepithelial lesion (HSIL); and squamous cell carcinoma (SCC). It should be noted that the Region-Based Cervical Lesion Dataset already provides annotations for these same classes, although not for nuclei but for entire cells and cell aggregates. Contrarily, the Adequacy Assessment Dataset provides nucleusi annotations but in terms of cell types, not cervical lesions. Figure 1: Mobile-based framework for automated cervical cytology screening: (**A**) μSmartScope with smartphone attached and LBC sample inserted; (**B**) smartphone application screenshots (from [6]). Given that around 30% of the images in the Region-Based Cervical Lesion Dataset are also present in the Adequacy Assessment Dataset, the overlap between the annotation of these two datasets was explored. Only squamous nucleus annotations from the Adequacy Assessment Dataset were considered since the previously referred cervical lesion classes are only present on this type of cells. In the new dataset, the cervical lesion class of each squamous nucleus annotation inside an annotated cervical lesion region was considered equal to the class of the region annotation that encompassed it, as shown in Figure 2.  
To take advantage of the full extent of cervical lesion annotations from the Region-Based Cervical Lesion Dataset, an automatic annotation strategy was applied to the subset of images without overlap with the Adequacy Assessment Dataset. In particular, the best-performing model for squamous nucleus detection proposed in [5] was used to detect the squamous nuclei on that subset, with the same process mentioned above being further applied to attribute the cervical lesion label to all nucleus detections inside annotated cervical lesion regions. Figure 3 provides examples of nucleus and region annotations for each TBS class. Table 1 depicts the final number of region and nucleus annotations per TBS lesion class for the Nucleus-Based Cervical Lesion Dataset. The higher number of nucleus annotations is justified by annotated regions in the Region-Based Cervical Lesion Dataset that encompass more than one cell, leading to several nucleus lesion annotations per region. Nevertheless, it can be observed that this dataset suffers from class imbalance for both nucleus and region annotations. \begin{table}
\begin{tabular}{l l l l} \hline \hline  & **Class** & \multicolumn{2}{c}{**Annotations**} \\  & & **Regions** & **Nuclei** \\ \hline \multirow{5}{*}{Squamous cells} & ASC-US & 477 & 768 \\  & ISIL & 96 & 144 \\  & ASC-H & 109 & 132 \\  & HSIL & 232 & 329 \\  & SCC & 13 & 22 \\  & Normal & & 31,698 \\  & Total & 927 & 33,093 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Per-class distribution of nuclei and regions annotations of Nucleus-Based Cervical Lesion Dataset. Figure 2: Creation of the Nucleus-Based Cervical Lesion Dataset: green boxes correspond to squamous nucleus annotations present in the Adequacy Assessment Dataset; white box corresponds to lesion annotations present in the Region-Based Cervical Lesion Dataset; orange box corresponds to the transformation of a squamous nucleus annotation to an ASC-US nucleus annotation. Regarding dataset split, the train/test division will be equal to the previously reported for the Region-Based Cervical Lesion Dataset [6], including the usage of a patch-slicing operation (i.e., images are sliced into patches of fixed dimensions). Similarly to that previous work, the SCC and HSIL types of lesions were merged in a single class (HSIL-SCC) due to  
Figure 3: Illustrative examples of nucleus and region annotations for each TBS class in the Nucleus-Based Cervical Lesion Dataset: (**a**) ASC-US; (**b**) LSIL; (**c**) ASC-H; (**d**) HSIL; and (**e**) SCC.