## 2 Materials and Methods
### Comparison with Existing Datasets
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Research** & **Dataset Size** & \begin{tabular}{c} **Number of** \\ **Classes** \\ \end{tabular} & \begin{tabular}{c} **Avg. Images** \\ **per Class** \\ \end{tabular} & \
\begin{tabular}{c} **Number of** \\ **Duplicates** \\ \end{tabular} &
\begin{tabular}{c} **Year of** \\ **Publication** \\ \end{tabular} \\ \hline [PERSON] et al. (I) [16] & 3231 & 4 + 1 & 941 & 292 & 2021 \\ [PERSON] et al. (II) [17] & 4706 & 10 + 1 & 428 & 337 & 2021 \\ [PERSON] et al. [18] & 1500 & 6 & 250 & 145 & 2021 \\ Our work & 2626 & 6 & 438 & 0 & 2024 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Datasets composition and quality. [PERSON] et al. contain 3231 diagrams (with 941 duplicates across 4 UML diagram types plus one non-UML class) [16] and 4706 diagrams (with 428 duplicates across 10 UML diagram types plus one non-UML class) [17]. Despite the larger size of these datasets, our collection stands out due to its unique advantage of being free from duplicates and having a higher average number of images per class (approximately 440). Additionally, all diagrams are correctly classified, thanks to the meticulous efforts invested in constructing our dataset. This careful curation not only enhances the quality of the dataset itself but also contributes to the robustness of model training and evaluation. Figure 1: Examples of duplicate diagrams found in the existing datasets (Dataset from [PERSON] et al. (I) [16], available at [[https://doi.org/10.5281/zenodo.4595956](https://doi.org/10.5281/zenodo.4595956)]([https://doi.org/10.5281/zenodo.4595956](https://doi.org/10.5281/zenodo.4595956)) under the Creative Commons Attribution 4.0 International license; Dataset from [PERSON] et al. (II) [17], available at [[https://doi.org/10.5281/zenodo.5141007](https://doi.org/10.5281/zenodo.5141007)]([https://doi.org/10.5281/zenodo.5141007](https://doi.org/10.5281/zenodo.5141007)) under the Creative Commons Attribution 4.0 International license; Dataset from [PERSON] et al. [18], available at [[https://doi.org/10.5281/zenodo.5544378](https://doi.org/10.5281/zenodo.5544378)]([https://doi.org/10.5281/zenodo.5544378](https://doi.org/10.5281/zenodo.5544378)) under the Creative Commons Attribution 4.0 International license). The pairs of duplicate diagrams in the different datasets show that, despite the files not being exact copies (as seen in the differing file names), the UML diagrams themselves are identical. This confirms that, while the files may vary, the content of the images remains the same in terms of the UML diagrams presented. (**a**) Image corresponding to file 11421.jpg from the dataset from [PERSON] et al. (I) [16]; (**b**) Image corresponding to file 14248.jpg from the dataset from [PERSON] et al. (I) [16]; (**c**) Image corresponding to file uml_class_diagram_for_publicma_77 qq.jpg from the dataset from [PERSON] et al. (II) [17]; (**d**) Image corresponding to file uml_class_diagram_for_publicma_84 qq.jpg from the dataset from [PERSON] et al. (II) [17]; (**e**) Image corresponding to file Component_Diagram_39.jpg from the dataset from [PERSON] et al. [18]; (**f**) Image corresponding to file Component_Diagram_110.jpg from the dataset from [PERSON] et al. [18]. We want to emphasize the importance of our dataset not having duplicate elements or incorrectly labeled elements because this guarantees greater precision and validity in the results obtained when using our dataset. Particularly, without duplicates, the risk of training and test sets containing the same images is avoided, ensuring that the results are truly representative and reliable, rather than artificially inflated. Without mislabeled items, major problems such as noise, bias, and incorrect assessment are avoided, allowing for accurate and reliable models to be developed with confidence in the results.