## 2 Materials and Methods
### CNN Architecture  
An enhanced U-Net-like architecture, named MultiResUNet, was used to train the NN models of scatter estimation. This evolution of the classical U-Net was first introduced by [PERSON] and [PERSON] in 2019 [30]. It is based on an encoder-decoder model, which, in the standard U-Net architecture, takes the input image and performs four series of two \(3\times 3\) convolution operations followed by a \(2\times 2\) max pooling (encoder part), which is the size of the input image downsampled by a factor of 2 in each series. Then, another sequence of two \(3\times 3\) convolutions joins the encoder and the decoder. The decoder first carries out a \(2\times 2\) transposed convolution upsampling the feature map by a factor of 2, which is followed again by a series of two \(3\times 3\) convolution operations. Finally, a \(1\times 1\) convolution generates the output image [26]. Furthermore, U-Net architecture adds skip connections between the encoder and decoder, concatenating the output of the two convolution operations in the encoder and the output of the upsampling convolution in the decoder. These connections enable the NN to recover spatial data lost due to pooling procedures. The MultiResUNet presents two main differences with respect to the standard U-Net. First, it substitutes the two consecutive \(3\times 3\) convolution operations for three different \(3\times 3\) convolutions, where the 2 nd and the 3 rd are intended to be approximately one \(5\times 5\) and one \(7\times 7\) procedure, respectively. Then, they are concatenated, and a \(1\times 1\) convolutional layer (residual connection) is added. The result forms the so-called MultiRes block. Additionally, the NN does a batch normalization [46] to every convolutional layer. The second variation is related to the shortcut connections between the encoder and the decoder. A so-called residual path is computed with \(3\times 3\) convolutions added to \(1\times 1\) convolutional filters for residual connections. Then, the result is concatenated with the output of the transposed convolution in the decoder stage [30]. The scheme of the network is presented in Figure 3.  
Figure 3: Diagram of the MultiResUNet architecture used in this work to train the neural networks. The input of the network is the image affected by scatter (i.e., uncorrected-scatter image), and the output is the fraction of the image of scatter with respect to the uncorrected-scatter image. Figure 2: Energy spectra used to acquire the low-energy (60 kVp, red line) and high-energy (130 kVp, blue line) projections in the Monte Carlo simulation. The two spectra were obtained with Specktr toolkit [44; 45], with 1.6 mm Al inherent filtration of the tube. In this work, we used the MultiResUNet architecture with ReLU (Rectified Linear Unit) [47] as an activation function in every convolution output, including the last one, which provides the final output of the NN. The initial number of filters was set to 64, which increased by a factor of 2 in the downsampling steps, and afterward, it decreased by the same factor in the upsampling processes. In the single-energy model, there was one input and one output channel: the network took pairs of input-output images, with the input image being the uncorrected-scatter image and the output the fraction of the scatter image with respect to the uncorrected-scatter image (scatter ratio), both high-energy CXRs acquired with the 130 kVp energy spectrum. In the dual-energy workflow, we tested two different algorithms. On the one hand, a neural network with two input channels, corresponding to the uncorrected-scatter projections of low and high energy, and one output channel, representing the same as in the single-energy model (scatter ratio for the high energy case). From now on, we will refer to this model as a 1-output dual-energy model. On the other hand, we developed a 2-output dual-energy model, which had two input and two output channels, i.e., it estimated the scatter ratio of low and high-energy images at the same time.