Exploratory research into reduction of scatter and beam hardening in industrial computed tomography using convolutional neural networks

Owing to recent advancements in the field of machine learning, such as deep convolutional neural networks (CNN), new applications in image processing have become feasible. The aim of this study was to explore the use of CNNs for the correction of X-ray scatter and beam hardening in industrial computed tomography. Through simulation, a large heterogeneous set of radiographs was produced, comprising monochromatic and polychromatic X-ray spectra with or without simulated scatter. This data was used to train three CNNs: a single network in which the overall effect of scatter and beam hardening is estimated, as well as a dual network in which both effects are estimated separately (i.e. scatter correction first, followed by beam hardening correction). Application of the trained CNNs on testing data showed superior performance for the dual network, at the cost of a increased training time.


Introduction
Two of the most pertinent types of artefacts in computed tomography are due to X-ray scatter and beam hardening (Figure 1).Scatter, predominantly incoherent (i.e.Compton) scatter, can lead to noise or distinct artefacts depending on its spatial distribution [1].It is affected by the X-ray beam energy, the scanned part, and the object-detector distance.Current softwarebased scatter correction methods include Monte Carlo simulation [2] and statistical modeling [3]; however, these techniques are often time-consuming, limiting their applicability in routine practice.Beam hardening refers to the shift in mean energy of a polychromatic beam traversing matter, due to the predominant attenuation of low-energy X-rays.Due to the assumption of a monochromatic X-ray beam during conventional tomographic reconstruction (i.e.backprojection), beam hardening is manifested as poor grey value uniformity between central and peripheral areas of homogeneous objects, as artefacts extending from dense objects and as brightened peripheral edges.Beam hardening correction is possible using different approaches, e.g.linearization and iterative reconstruction, each with its advantages and drawbacks [4].Recently, the potential application of novel machine learning techniques in image processing has gained increasing attention.One particular technique that has shown high performance in computer vision is the use of deep convolutional neural networks (CNNs), in which imaging data is abstracted using multiple cross-correlated layers.In computed tomography, as there is an inherent connection between the total X-ray attenuation, the amount of scatter and the extent of beam hardening, CNN could be a suitable technique for estimating and, thus, correcting these effects.Whereas the training of such networks involves a relatively high computational workload, implementation of a trained CNN would allow for a fast correction of projection radiographs in practice.Recent studies in industrial CT [5] and medical CT [6,7] have shown great potential for CNNs in terms of improvement of overall image quality as well as artefact reduction.Two different approaches can be conceived: a single CNN in which the cumulative effect of scatter and beam hardening is estimated, and a dual CNN in which the effects are estimated separately.The aim of this study was to explore the use of CNNs for the correction of X-ray scatter and beam hardening in industrial computed tomography.In the following sections, the methodological approach will be described first, comprising the simulation of a large set of training data for the CNNs, and the set-up and training of the CNN frameworks.Next, the results are described and discussed, with indications towards future work.
Figure 1: Reconstructed CT scan of simulated projections at (SCAT) 450 kV, polychromatic, with scatter, (POLY) 450 kV, polychromatic, without scatter, (MONO) 300 kV, monochromatic, without scatter.Grey value profiles and subtraction images show reduced uniformity due to scatter, and increased grey values towards outer edges for polychromatic beams.

CT simulation
For data simulation, the aRTist software package was used (BAM -Institute for Materials Research and Testing, Berlin, Germany) [8].A total of 22 scan objects were included with varying geometric complexity and composition (titanium, aluminium and iron).The X-ray tube voltage was 450 kV (tungsten anode, filtration 4 mmAl + 5 mmCu) for polychromatic spectra and 300 kV for monochromatic spectra.All simulations were performed with a point-shaped focal spot, a magnification of 2.0 and in noiseless conditions.Simulated radiographs at 1° intervals covering a full rotation were generated as 16-bit TIF files.For each scanning set-up, three simulations were performed: (1) monochromatic, no scatter (MONO); (2) polychromatic, no scatter (POLY); (3) polychromatic, with Monte Carlo scatter (SCAT)(Figure 2).A total of 23760 radiographs were simulated (7920 per exposure condition).
Figure 2 : Simulated radiographs of scan objects for each exposure condition, with subtraction images showing the effect of scatter and beam hardening.Apart from scan objects with simple geometrical shapes, all parts were acquired from the aRTist library.Grey value window and level was adapted for each image for the purpose of visualization.

Set-up and training of convolutional neural networks
The Keras (v2.1.6)deep learning library along with the TensorFlow (v1.12.0) framework running on Python v3.6 was used for setting up and training the CNNs, which was performed on an NVIDIA GeForce 1070 GTX GPU using CUDA v9.0 and cuDNN v7.4.1.Two approaches for correcting beam hardening and scatter were explored.For the first approach, a single CNN (CNNSCAT-MONO) was set up using the SCAT radiographs as input and SCAT-MONO subtraction images as labels.For the second approach, scatter and beam hardening were addressed separately by using two CNNs: a first (CNNSCAT-POLY) to correct scatter, the output of which was used to correct SCAT radiographs, which were subsequently fed into a second network (CNNPOLY-MONO) to correct beam hardening.The network architecture proposed by Maier et al. [5] was used, which is a modified U-Net [9] comprising consecutive convolutional and pooling layers, which are concatenated with downsampled input images at each resolution.Next, after passing through additional convolutional layers, upsampling is performed followed by concatenation with images at the next (higher) resolution level (Figure 3).The network was further modified by using linear activation rather than ReLU activation for the last two layers, as this was found to reduce the risk of the training getting stuck in local minima.The resulting network contained 32 797 749 trainable parameters.Each network was trained using radiographs from 20 scan objects (i.e. 7 200 input images) and validated at each epoch using 720 radiographs from 2 objects.Hyperparameters used for each CNN are shown in Table 1.To monitor the performance of the trained model, custom accuracy (ACC) metrics were defined as the proportion of output values that were within 1%, 5% and 10% of the expected value.
Figure 3 : Network architecture, based on [5] which in turn is modified from [9].Compared with the architecture in [5], we used linear activation rather than ReLU for the last two layers.Note that, for applying the resulting model to actual radiographs of a CT scan, the radiographs are first downsampled to 256x256; the resulting scatter and/or beam hardening correction maps are then upsampled and subtracted from the original radiograph.

Results and discussion
Figure 4 shows all monitored metrics during training for each network, whereas Table 3 shows the endresult for each metric, averaged over the last 5 epochs.For all networks, training and testing loss as well as RSME decreased rapidly during the first few epochs, after which it remained relatively stable.However, accuracy metrics gradually increased throughout training, indicating a better fit of the model.Whereas the single network approach showed a good fit for the training data, metrics for the validation data showed a high RMSE and very low accuracy, whereas CNNSCAT-POLY as well as CNNPOLY-MONO showed a much higher performance on the validation data, with 67% and 85% of the predicted values being within 10% of the ground truth, respectively.A comparison of the corrected radiographs with the ground truth (Figure 6) shows a consistent underestimation of the ground truth by CNNSCAT-MONO for the validation data except in regions with low x-ray attenuation, in which an overestimation is seen.CNNSCAT-POLY shows an overestimation of the scatter in high-attenuation regions and vice versa.CNNPOLY-MONO shows an overall better correspondence to the ground truth than CNNSCAT-MONO , yet a higher overestimation in certain low-attenuation regions.From these results, it can be concluded that using a single CNN to estimate monochromatic radiographs from polychromatic data with scatter is not feasible, although higher performance may be possible if the network is adapted and/or the training dataset is expanded drastically.The most suitable approach would therefore be a dual-CNN; the resulting models can then be applied serially.Although the dual-CNN approach showed considerable scatter and beam hardening reduction for the validation data, the discrepancy in terms of loss and accuracy between training and testing data may point towards overfitting.Simpler network architectures as well as adapated hyperparameters were explored, but either showed identical or worse training results (with no improvement for the validation data).Further tests will evaluate whether increasing the overall training sample increases the validation accuracy and will explore the use of additional input features, as explained below.
The architecture adapted from [5] showed high efficacy and reasonable training times (<100 s per epoch).Whereas it was previously trained and tested for scatter reduction on a limited sample of scan objects, the current study shows that it is applicable to a larger, heterogeneous sample of scan objects.The use of 7 sampling levels (from 256x256 down to 4x4 pixels) proved to be useful in the depiction of relatively blurred scatter distributions as well as sharply delinated beam hardening correction maps.Application of the models to experimental data can be implemented in a straightforward manner by adding downsampling and upsampling of the input and output data, respectively, from their original resolution (e.g.2000x2000 pixels) to 256x256, followed by a subtraction of the estimated scatter / beam hardening maps from the input data.Correction of radiographs can thus be performed at high throughput (~20 ms/radiograph [5]) compared to alternative methods.Furthermore, when beam hardening correction is not needed [12], only the model generated by CNNSCAT-POLY can be applied.Finally, CNN SCAT-POLY could also be applied to single radiographic images, whereas beam hardening correction is only relevant for tomographic data.
The dual-CNN approach should be further extended and validated both in simulated and experimental conditions.A limitation of the current approach is that no a priori information is used; the only features used during training are the pixel values and their respective 2D coordinates within each individual radiograph.The robustness and accuracy of CNN-based artefact correction could be increased by adding input features such as beam energy, material composition, magnification, etc.Although a neural network can be set up to make optimal use of these features, training would be more challenging.However, the use of a relatively small batch size and number of epochs in this study indicates that further development of CNN-based artefact correction models could be done on a sparse training sample, focusing on high heterogeneity in terms of scan objects but using a limited set of radiographs per object.Another limitation of the approach used in this study is that the CNN considers radiographs as individual inputs, and does not make use of the information provided by other projection angles.The fact that these radiographs comprise a CT scan, with other radiographs providing complimentary information about the scanned object, is thus ignored by the CNN.For beam hardening in particular, correction based on individual radiographs may only be feasible for monomaterial objects.Expansion towards multimaterial artefact correction could make use of features of perpendicular radiographs (or a sparse set of radiographs) and/or from an initial (fast) reconstruction based on a few radiographs.
In conclusion, CNNs can be a useful tool for both scatter and beam hardening correction of radiographic projections.Further study is needed to asses the efficacy of this approach in terms of image quality of the reconstruction data, focusing on defect detection as well as dimensional metrology, and should expand the features used during training of each network.

Figure 4 :
Figure 4 : Root mean squared error and accuracy for each neural network

Figure 6 :
Figure 6 : Error between actual and estimated scatter and/or beam hardening maps, for the scan objects shown in the first, third, and fifth row of Figure 2. Negative grey values depict overestimation by the CNN model.

Table 1 :
Hyperparameters used for training

Table 2 :
Root mean squared error and accuracy for each neural network, averaged over the last five epochs