## 2 Materials and Methods
### Comparison with Existing Datasets  
In spite of the great advances that the creation of other UML diagram datasets have meant for the literature, it is important to highlight the benefits of ours, comparing it with the existing datasets. In this respect, the key aspects to consider are features such as the composition of the datasets (including the number and types of UML diagrams) and, more importantly, their quality (assessed by the presence of repeated diagrams, as duplicates in the datasets can potentially threaten the validity of results). The features of each dataset can be found in Table 1.  
Analyzing Table 1, one can observe that the dataset presented in the works from [PERSON] et al. [16; 17] contain 4 and 10 different types of UML diagrams, respectively, but introduce an additional class with non-UML images. In our opinion, it is better not to include non-UML images in a dataset that specifically contains UML diagrams of different classes to maintain dataset purity, unless there is a specific reason for including non-UML images, such as testing the model's ability to distinguish UML diagrams from other types of images. In this respect, we suggest it might be better to compile a non-UML-diagram class tailored to the specific context where it is needed, as this context can drastically change from one application to another. In other words, given that this type of image can be heterogeneous and context-dependent, it seems more practical to construct ad hoc binary models (UML diagrams or not) based on a specially compiled non-UML-diagram class for the desired context, to identify and remove non-UML images from the data. Finally, another point to consider is the effect that the non-UML class can have on classification performance, as this class could be comparatively easier to classify. Due to these reasons, and similarly to [PERSON] et al. [18], our dataset includes only UML diagrams, and comprises six different classes, each corresponding to a distinct type of UML diagram. However, what stands out the most, when analyzing Table 1, is not the number of classes, but the number of duplicate diagrams. In this respect, it has to be pointed out that the number of duplicates was calculated in the existing datasets making use of the program \"Duplicate Cleaner Pro\", because, as mentioned earlier, this program allows for comparisons between all images using similarity thresholds, which makes it possible to look for repeated images in content, even if they are not exact copies. Our strategy essentially consisted of using this program and visually inspecting the images that the program gave as possible duplicates. In all the datasets, we found a significant number of duplicate images in terms of their content, even though the files were not exact copies. Figure 1 shows examples of duplicate images found in existing datasets, illustrating the problem of duplicates. 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. Regarding the size of the datasets, we want to highlight that our dataset, which encompasses images of the six most commonly used UML diagrams [18], consists of 2626 images, while the seed dataset from which it was derived contained 1500 diagrams, and included 145 duplicates [18]. In contrast, the datasets referenced in Table 1 from