Patch2Self: Self-Supervised Denoising via Statistical Independence

Adapted from Lehtinen, J, et.al. “Noise2Noise: Learning Image Restoration without Clean Data”, Proceedings of the 35th International Conference on Machine Learning, PMLR 80:2965–2974, 2018.
Adapted from Batson, J, et. al. “Noise2Self: Blind Denoising by Self-Supervision”, Proceedings of the 36th International Conference on Machine Learning, PMLR 97:524–533, 2019.
Fadnavis, et. al, “Patch2Self: Denoising Diffusion MRI with Self-Supervised Learning”, Advances in Neural Information Processing Systems 33 (2020).
Fadnavis, et. al, “Patch2Self: Denoising Diffusion MRI with Self-Supervised Learning”, Advances in Neural Information Processing Systems 33 (2020).
Fadnavis, et. al, “Patch2Self: Denoising Diffusion MRI with Self-Supervised Learning”, Advances in Neural Information Processing Systems 33 (2020).
# To handle file handling
import numpy as np
from dipy.io.image import load_nifti, save_nifti
# Load the Patch2Self module from DIPY
from dipy.denoise.patch2self import patch2self
# Load your data!
data, affine = load_nifti('your_data.nii.gz')
bvals = np.loadtxt('your_data.bval')
# Run Patch2Self denoising
denoised_data = patch2self(data, bvals, verbose=True)
# save the data
save_nifti('denoised_your_data.nii.gz', denoised_data, affine)

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store