## 3 Materials and Methods
### The Proposed End-to-End Solution Integrating CRF-RNN with CNNs for PCa Detection
#### 3.2.2 The CRF-XmasNet Architecture  
We started from the XmasNet [33] architecture as baseline in our case study on the PROSTATEx17 dataset [43], since it achieved the second highest AUC in the PROSTATEx17 challenge despite its simplicity. Indeed, XmasNet can be seen as a parameter-efficient version of the VGG net [44] (i.e., XmasNet is less deep than VGG16) tailored to PCa detection in order to show the potential of deep learning in oncological imaging [33]. It is worth noting that the XmasNet model in the original paper exploited the ensemble of 20 individual XmasNet instances (which maximize the validation AUC on different combinations of the input MRI sequences) by using the weighted average of the predictions via a greedy bagging algorithm [33]. In our work, to keep full control of the CRF-RNN [31] introduction and to avoid the stochastic effect due to the network ensemble, we used only one XmasNet model to obtain the lesion's classification. In this manner, we can effectively assess the benefits provided by the end-to-end training of the proposed hybrid CRF-CNN approach. Figure 2 schematizes the proposed CRF-XmasNet architecture. The network can be divided into three main components: (_i_) downsampling, based on convolution, Batch Normalization (BN), ReLU and Max Pooling operators; (_ii_) upsampling, using one-dimensional convolution and deconvolution operators; (_iii_) classification involving flatten and FC layers, along with ReLU and sigmoid activation factions. The details about these three components are provided in Tables 1-3, respectively. Importantly, a CRF-RNN [31] layer was integrated into the XmasNet architecture, utilizing and merging the features extracted by the convolutional portions as inputs (see Figure 2). The merging operation is performed via skip connections from multiple layers and summing-up the feature maps. Figure 1: Example MR images from Patient #005: (**a**) T2w, (**b**) PDw, and (**c**) ADC sequences. The PCa lesions are highlighted (with red crosses) in the coordinates \((95,92)\), \((103,113)\), and \((78,109)\), with slice index \(z=30\), after the registration against the T2w MRI sequence. The three lesions are separately displayed on the T2w slice in (**d**–**f**). In particular, these Rols are centered and cropped on each lesion. Additional modifications were proposed, aimed at improving the network effectiveness:  
* three skip connections and two convolutional layers were added, as shown in Figure 2;
* dropout [64] was introduced between the FC layers and the sigmoid (with a dropout rate of 0.5);
* the number of parameters in the first and second FC layers was changed, from 1024 to 128 and 1024 to 256, respectively, because of performance constraints of the available computing power. Skip connections were added as they allow for: (_i_) a simple method of merging information coming from several layers into the CRF; (_ii_) processing the input of higher-level features not present in the CRF layer output into the classifier component of the network; (_iii_) improving the training process [45], particularly during the early epochs, since in the backpropagation procedure some errors might be directly presented to the downsampling component. To evaluate the performance of the proposed CRF-XmasNet architecture, we also compared its performance against the XmasNet architecture in which a CRF is used as a postprocessing phase. \begin{table}
\begin{tabular}{l l l l l l} \hline \hline
**Layer** & **Conv1** & **Conv2** & **MaxPool1** & **Conv3** & **Conv4** & **MaxPool2** \\ \hline Patch size/stride & \(3\times 3/1\) & \(3\times 3/1\) & \(2\times 2/2\) & \(3\times 3/1\) & \(3\times 3/1\) & \(2\times 2/2\) \\ Output size & \(64\times 64\times 32\) & \(64\times 64\times 32\) & \(32\times 32\times 32\) & \(32\times 32\times 32\) & \(32\times 32\times 32\) & \(16\times 16\times 32\) \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Downsampling component network parameters.