Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2024 Apr;22(2):193-205.
doi: 10.1007/s12021-024-09655-9. Epub 2024 Mar 25.

DeepN4: Learning N4ITK Bias Field Correction for T1-weighted Images

Affiliations

DeepN4: Learning N4ITK Bias Field Correction for T1-weighted Images

Praitayini Kanakaraj et al. Neuroinformatics. 2024 Apr.

Abstract

T1-weighted (T1w) MRI has low frequency intensity artifacts due to magnetic field inhomogeneities. Removal of these biases in T1w MRI images is a critical preprocessing step to ensure spatially consistent image interpretation. N4ITK bias field correction, the current state-of-the-art, is implemented in such a way that makes it difficult to port between different pipelines and workflows, thus making it hard to reimplement and reproduce results across local, cloud, and edge platforms. Moreover, N4ITK is opaque to optimization before and after its application, meaning that methodological development must work around the inhomogeneity correction step. Given the importance of bias fields correction in structural preprocessing and flexible implementation, we pursue a deep learning approximation / reinterpretation of the N4ITK bias fields correction to create a method which is portable, flexible, and fully differentiable. In this paper, we trained a deep learning network "DeepN4" on eight independent cohorts from 72 different scanners and age ranges with N4ITK-corrected T1w MRI and bias field for supervision in log space. We found that we can closely approximate N4ITK bias fields correction with naïve networks. We evaluate the peak signal to noise ratio (PSNR) in test dataset against the N4ITK corrected images. The median PSNR of corrected images between N4ITK and DeepN4 was 47.96 dB. In addition, we assess the DeepN4 model on eight additional external datasets and show the generalizability of the approach. This study establishes that incompatible N4ITK preprocessing steps can be closely approximated by naïve deep neural networks, facilitating more flexibility. All code and models are released at https://github.com/MASILab/DeepN4 .

Keywords: 3D U-Net; Bias field correction; Inhomogeneity; N4ITK; T1-weighted images.

PubMed Disclaimer

Conflict of interest statement

Competing Interest The authors declare no competing interests.

Figures

Fig. 1
Fig. 1
T1w MRI scans show spatial variations of image intensities, known as bias field effects, caused by the field inhomogeneity. a The state-of-the-art framework that models the bias field has external dependencies that complicate integration into imaging pipelines. b To address this, we propose DeepN4, a deep learning differentiable end-to end-model that utilizes the PyTorch python library; ONNX allows conversion across a deep learning framework. Our model allows loss function based on post-inhomogeneity correction. Our approach allows for the loss function based on post-inhomogeneity correction. Abbreviation: NN, Neural network
Fig. 2
Fig. 2
N4ITK was processed on the large-scale datasets in Table 1 to generate the ground truth bias field and corrected T1w images. All the T1w images in Table 1 were fed into the DeepN4 which outputs the log of predicted bias field. Smoothing is performed on predicted bias field from which the corrected image is obtained. The loss is minimized between the ground truth bias field and corrected T1w image with the predicted bias field and computed corrected T1w image using Eqs. (3) and (4)
Fig. 3
Fig. 3
In simulation, the DeepN4 models performs with PSNR of 42 dB. DeepN4 NS = DeepN4 with no smoothing, DeepN4 G = DeepN4 with Gaussian smoothing, and DeepN4 B = DeepN4 with B-spline smoothing
Fig. 4
Fig. 4
For both (a) and (b) DeepN4 models outperform existing models, and the reconstructed image is similar to state-of-the-art N4ITK. Higher PSNR indicates that reconstructed images from DeepN4 models are closer to N4ITK. The observed difference in DeepN4 B and DeepN4 G is effectively the negligible. DeepN4 NS = DeepN4 with no smoothing, DeepN4 G = DeepN4 with Gaussian smoothing, DeepN4 B = DeepN4 with B-spline smoothing, and * p < 0.0001 (Wilcoxon sign rank test with Bonferroni correction)
Fig. 5
Fig. 5
For both (a) and (b) DeepN4 models outperform existing models, and the reconstructed image is similar to SPMbfc. Higher PSNR indicates that reconstructed images from DeepN4 models are closer to SPMbfc. SPMbfc = SPM bias field correction, DeepN4 NS = DeepN4 with no smoothing, DeepN4 G = DeepN4 with Gaussian smoothing, DeepN4 NS = DeepN4 with B-spline smoothing, and DeepN4 B = DeepN4 with B-spline smoothing
Fig. 6
Fig. 6
CNR in SPMbfc and ITKN4 highest for withheld and external test datasets. Negligible difference in DeepN4 T1w CNR from the SOTA ITKN4 and SPMbfc. Higher CNR denotes clearer distinction between the tissue types (here, white matter and gray matter). There are 0.05% of scans with a poor CNR. SPMbfc = SPM bias field correction, DeepN4 NS = DeepN4 with no smoothing, DeepN4 G = DeepN4 with Gaussian smoothing, and DeepN4 B = DeepN4 with B-spline smoothing
Fig. 7
Fig. 7
In simulation, the absolute percent error of truth T1w image to which the bias was introduced and corrected and the DeepN4 G T1 is approximately 20%
Fig. 8
Fig. 8
90th, 50th, and 10th percentile sample are taken from DeepN4 G results in external VMAP dataset. Lower curvature between the intensity along a slice from uncorrected T1w (blue line), N4ITK corrected T1w (green line), and DeepN4 corrected T1w (orange line) denotes more uniformity. The intensity distribution along the slice in DeepN4 and N4ITK have no significant variation in performance across the 90th, 50th, and 10th percentiles sample. A = Anterior, P = Posterior
Fig. 9
Fig. 9
Here, we show DeepN4 G results plotted against ITKN4, SPMbfc, and the original T1w. DeepN4 results are similar to the ground truth N4ITK (SOTA, but neither easily accessible nor differentiable). Less curvature in the intensity of the selected slices in DeepN4 T1w (orange line) when compared to the uncorrected T1w slice (blue line) is more homogeneous. A = Anterior, P = Posterior

Update of

References

    1. Agrawal A, Amos B, Barratt S, Boyd S, Diamond S, & Kolter JZ (2019). Differentiable convex optimization layers. Advances in neural information processing systems (Vol. 32).
    1. Ashburner J, & Friston KJ (2005). Unified segmentation. NeuroImage, 26(3), 839–851. - PubMed
    1. Avants BB, Tustison N, & Song G (2009). Advanced normalization tools (ANTS). Insight J, 2(365), 1–35.
    1. Axel L, Costantini J, & Listerud J (1987). Intensity correction in surface-coil MR imaging. AJR American Journal of Roentgenology, 148(2), 418–420. - PubMed
    1. Bakas S, Akbari H, Sotiras A, et al. (2017). Advancing the cancer genome atlas glioma MRI collections with expert segmentation labels and radiomic features. Scientific Data, 4(1), 1–13. - PMC - PubMed

MeSH terms

Grants and funding

LinkOut - more resources