Skip to content

Msc Thesis notes - Evaluation of the effectiveness of artificial neural networks in reducing noise in chest images obtained by various computer tomography methods

Notifications You must be signed in to change notification settings

MKastek/Noise-CT-Scans

Repository files navigation

Noise-CT-Scans

Hounsfield scale

The pixel values of this CT scan are expressed in Hounsfield Units: $$HU(x,y) = 1000 \cdot \frac{\mu{(x,y)} - \mu_{water}}{\mu_{water}-\mu_{air}}$$ where $\mu$ is the attenuation coefficient of the material. The linear attenuation coefficient is defined based on how the intensity of a photon beam decays as it passes a distance $x$ through a material $I=I_{0}e^{-\mu x}$. Note that $\mu$ depends on the energy of the photon beam, and in a CT scan photons usually have energies 100 keV.

Noise assesment

Basic concept of signal and noise:

The noise distributions within the object and in the background are characterized by normal distributions defined by their standard deviations $\sigma$, with the shift between the two distributions corresponding to the signal amplitude: $|s_{1}-s_{2}|$. Although the signal-to-noise ratio is an important parameter in determining the detectability of an object, the SNR does not completely characterize noise. These two images with exactly the same noise level as measured by the standard deviation $\sigma$ however, these two images have dramatically different appearances to the observer.

The differences between images are due to the noise texture, that is, the spatial-frequency distribution of the noise is different in these two images.

Noise Power Spectrum - NPS

The noise-power spectrum (NPS) is a useful measure that provides a more complete description of noise than the simple standard deviation. It describes the noise variance as a function of spatial frequency and therefore characterizes noise texture.

NPS 2D


NPS can be calculated with the formula: $$NPS(f_{x},f_{y})=\frac{1}{N}\frac{\Delta_{x}\Delta_{y}}{N_{x}N_{y}}\sum_{i=1}^{N}|DFT_{2D}[I_{i}(x,y)-\bar{I_{i}}]|^{2}$$ where:
$N$ - the number of ROIs
$I_{i}(x,y)$ - the signal in the $i^{th}$ ROI
$\bar{I}$ - mean of $I_{i}(x,y)$
$\Delta_{x}, \Delta_{y}$ - pixel size
Result of NPS in spatial frequency $f_{x}, f_{y}$

NPS 1D

The $f_{x}$ and $f_{y}$ frequencies in the 2D NPS can be collapsed to a 1D radial frequency, $f_{r}$ by radially averaging using:
$$f_{r} = \sqrt{f_{x}^{2}+f_{y}^2}$$

The initial positive slope of this curve results from the ramp filtering that is used in filtered-back-projection reconstruction, and the negative slope at higher spatial frequencies occurs due to the roll-off properties of the reconstruction kernel used to dampen high-frequency noise in the images.

Denoising with DnCNN

Denosing with Deep Image Prior

Run training

Train DnCNN

python train_DnCNN.py --num_scans 5 --num_epochs 10 --batch_size 32 -lr 0.0001 --noise_level 15

Train DIP

python train_DIP.py --num_epochs 5000 -lr 0.0001

Requirements

  • NumPy (2.1.1)
  • Pandas (2.2.3)
  • Matplotlib (3.9.2)
  • opencv-python (4.10.0.84)
  • SciPy (1.14.1)
  • PyTorch (2.4.1)
  • Pydicom (3.0.1)

All requirements: requirements.txt

About

Msc Thesis notes - Evaluation of the effectiveness of artificial neural networks in reducing noise in chest images obtained by various computer tomography methods

Topics

Resources

Stars

Watchers

Forks