## 2 Materials and Methods
### Validation and Comparison Baselines  
In order to evaluate our contouring results, we used four metrics comparing the predicted and manual segmentations. The Dice similarity coefficient (DSC) and the Jaccard index (JI) measure the overlap between two binary masks, while the symmetric mean boundary distance (SMBD) assesses the distance between the contours (i.e., the sets of points located at the boundary of the binary masks) delineating those binary masks. We also computed the difference between the manual and predicted volumes for all the organs considered. More specifically,  
\[\text{DSC}=\frac{2|M\cap P|}{|M|+|P|}, \tag{1}\]  
\[\text{JI}=\frac{|M\cap P|}{|M\cup P|}, \tag{2}\]  
\[\text{SMBD}=\frac{\overline{D}(M,P)+\overline{D}(P,M)}{2}, \tag{3}\]  
where \(M\) and \(P\) are the sets containing the matricial indices of the manual and predicted segmentation 3D binary masks, respectively; \(\overline{D}(M,P)\) is the mean of \(D(M,P)\) over the voxels of \(\Omega_{M}\); and \(D(M,P)=\{\min_{x\in\Omega_{P}}||s\odot(x-y)||,y\in\Omega_{M}\}\), where \(\Omega_{M}\), \(\Omega_{P}\) are the boundaries extracted from \(M\) and \(P\), respectively, and \(s^{\top}=(1.2,1.2,1.5)\) is the pixel spacing in mm. Comparing the manual and predicted organ volumes was motivated by the field of application of this study. Indeed, from the perspective of adaptive radiotherapy, the organs' volumes are needed in order to compare the initial CT plan dose-volume histograms for bladder, rectum, and prostate with the doses actually delivered as determined from CBCT scans acquired during the image-guided treatment [27]. The manual and predicted organ volumes were compared using a Bland-Altman plot, which allows quantification of  
Figure 3: 3D U-net model architecture. Each blue rectangle represents the feature maps resulting from a convolution operation, while white rectangles represent copied feature maps. For the convolutions, zero padding was chosen such that the volume size was preserved (“same” padding). The output size was 4: one per segmentation (bladder, rectum, and prostate) and one for the background. the agreement between two quantitative measurements (i.e., the manual and predicted organ volumes) by studying their mean difference and constructing limits of agreement [28]. We computed the bias as:  
\[\text{Bias}=\frac{1}{n}\sum_{i=1}^{n}(p_{i}-m_{i}), \tag{4}\]  
where \(n\) is the number of patients in the test set and \(p_{i}=s_{1}\times s_{2}\times s_{3}\times|P_{i}|\), \(m_{i}=s_{1}\times s_{2}\times s_{3}\times|M_{i}|\) are the volumes of the manual and predicted segmentations of the \(i^{\text{th}}\) patient. It provides the systematic under- or over-estimation of the predicted volumes. We also computed the precision,  
\[\text{Precision}=\frac{1}{n}\sum_{i=1}^{n}|p_{i}-m_{i}|, \tag{5}\]  
which measures the difference between manual and predicted volume (in absolute value). The DL-based segmentation was compared with different alternative approaches as summarized in Table 2. Two segmentation methods based on deformable image registration (denoted DIR in Table 2, second column) were applied to our dataset. First, the contours from the planning CT scans of set \(\mathcal{S}_{2}\) were mapped to the follow-up CBCT scans of the same patient by using a rigid registration followed by DIR with the anatomically constrained deformation algorithm (ANACONDA) algorithm without controlling regions of interest (ROIs) in RayStation ([[https://www.raysearchlabs.com/raystation/](https://www.raysearchlabs.com/raystation/)]([https://www.raysearchlabs.com/raystation/](https://www.raysearchlabs.com/raystation/))) (Version 5.99.50.22) [29]. This algorithm adopts an intensity-based registration. Second, the contours were mapped from the planning CT scan to the follow-up CBCT scan using the diffeomorphic morphons' DIR algorithm implemented in OpenReggui ([[https://openreggui.org/](https://openreggui.org/)]([https://openreggui.org/](https://openreggui.org/))) [30].