## 4 Discussion
Thus, when these NNs are applied to real CXRs, the accuracy of the scatter correction depends on the precision of the Monte Carlo codes. Despite the fact that MC simulations are the gold standard in the field and provide very realistic images, some works for scatter estimation in CT showed that the accuracy of deep-learning models could decrease when applying to real images NNs trained only with simulated images [19]. For CXRs, more studies are needed to determine the accuracy of neural networks in this situation. Since having a sufficient amount of cases to train only with real data is complex in this field, it would be convenient to obtain images that are as realistic as possible. For this purpose, if at least some real cases are available, the use of generative adversarial networks (GANs) [58] in combination with MC simulations could achieve this goal and thus improve the accuracy of the models applied to real data. It is important to note that the input-output pairs of images of the neural network are exclusively uncorrected-scatter-scatter ratio images. That is to say, the models are not trained to distinguish if the input image is affected by scatter, so if a scatter-free projection is given to the network, it will still yield some scatter estimation. The subtraction of this estimated image from a scatter-free input image would entail some loss of information in the final result. Therefore, these models cannot be applied to acquisitions taken with an anti-scatter grid or any other scatter suppression technique, and neither can be used to check the effectiveness in scatter removal of those hardware-based scatter suppression methods. A neural network that identifies if the input image is affected by scattered rays is currently being implemented, but it is beyond the scope of this work. As explained in Section 2.3, an ROI focus primarily on the lungs was selected in the training, validation, and test images (see Figure 1). This way, the edges of the images that could cause the appearance of artifacts in the scatter estimation and the scatter-corrected images are removed. This allows us to obtain very accurate results, but it must be taken into account before putting the models into practice. An input image with a large number of empty regions could compromise the robustness of the models, just as suggested by the results obtained for images simulated SDD = 200 cm. Although the number of training and validation cases might seem small, the variety in the patient sizes within the dataset (explained in Section 2.1), along with the data augmentation described in Section 2.3, guarantees the accuracy of the models for images with different amounts of scatter ratio. The fact that the contrast \(C\) (Section 3.2) and the ratio between lung regions with and without rib (Section 3.3) improve after the application of the presented deep-learning models implies that the detection and diagnosis of COVID-19 will be enhanced after scatter correction since it will help physicians to better differentiate infected areas of the lung. This deep-learning-based tool can be easily implemented in the software used by physicians so they can obtain scatter-corrected chest X-rays in a couple of seconds. In this work, we focused on COVID-19 since a large number of databases related to this disease have been gathered in recent years as a consequence of the worldwide pandemic. However, the same analysis could be performed for any other pulmonary infection, such as pneumonia, tumors, atelectasis, and pneumothorax. It is highly expected that the scatter correction will also entail a contrast improvement in areas affected by any of these lesions and, therefore, facilitate its identification. Furthermore, similar deep-learning-based models could be applied to other types of medical imaging modalities affected by background noise, in which contrast can be improved, therefore enhancing image quality and diagnostic accuracy.