## 2 Materials and Methods
### Automatic Skin Ulcer Segmentation
The initial splits used for the WoundsDB were preserved, with no new images added to the Test Set, ensuring a high representation of this dataset in the network's training examples. This decision was driven by the study's focus on achieving robust segmentation performance specifically on WoundsDB images. For training, the network required a ground-truth text file for each image in the Training and Validation Sets and given the dataset's size constraints, a single-class training approach was adopted, with \"Ulcer\" designated as the sole object of interest to recognize. Creating the ground truth required the following steps: (1) manual segmentation of each image; (2) creation of the binary masks to identify the regions of interest; (3) extraction of the object contour coordinates; (4) creation of text files, where each line contained the class identification number of the object and the corresponding extracted coordinates of the contour. Once the network was trained with lesion detection and segmentation tasks, inference was performed on the Test Set. Different metrics were considered to quantify network performance. The Intersection over Union (IoU) evaluated the degree of overlap between the objects contained in the two masks and was calculated as follows:  
\[IoU=\frac{X\cap Y}{X\cup Y} \tag{3}\]  
where \(X\) is the set of white pixels belonging to the manual mask and \(Y\) is the set of white pixels belonging to the automatic mask. This metric ranges from 0 to 1. The counting error was computed as reported below:  
\[Error=N_{manual}-N_{automatic} \tag{4}\]  
where \(N_{manual}\) represents the number of objects contained in the manual mask, and \(N_{automatic}\) is the number of objects detected in the automatic mask. Finally, to quantify the performance improvement obtained by training the network on Dataset B, the percentage increase in the average IoU was computed as:  
Figure 3: (**a**) Initial Dataset A split for network training and validation. (**b**) Updated Dataset B obtained by adding WV images for the training and fine-tuning of the network. In the Test Set, the initial images from WoundsDB, necessary for the subsequent purposes of this work, were maintained, while the Training Set and Validation Set were expanded. \[Improvement=\frac{IoU_{B}-IoU_{A}}{IoU_{A}} \tag{5}\]  
where \(IoU_{A}\) is the average IoU calculated from the inference performed with the weights trained on Dataset A, and \(IoU_{B}\) is the average IoU calculated from the inference performed with the weights trained on Dataset B. Comparing the performance achieved using datasets of varying sizes is essential for quantifying the actual improvement that comes with increased data availability. This type of analysis allows for a precise evaluation of the impact that expanding the dataset has on model performance, highlighting how much the increase in available data can influence the quality of the results obtained. Especially in the medical field, various factors may limit the use of large datasets, such as privacy concerns and data security. Therefore, this type of analysis can serve as a guide for future research, helping to navigate these challenges while assessing the potential benefits of increased data availability.