Skip to content

XYuan01/Self-supervised-Noise2Noise-for-LDCT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Self-supervised Noise2Noise for LDCT denoising from corrupted images.

Dependencies

To install the latest version of all packages, run

pip3 install --user -r requirements.txt

Dataset

Dataset address: Mayo

Training

See python3 train.py --h for list of optional arguments.

By default, the model train with noisy targets. To train with clean targets, use --clean-targets. To train and validate on smaller datasets, use the --train-size and --valid-size options. To plot stats as the model trains, use --plot-stats; these are saved alongside checkpoints. By default CUDA is not enabled: use the --cuda option if you have a GPU that supports it.

Hybrid noise

The noise parameter is the maximum standard deviation σ.

python3 train.py \
  --train-dir ../data/train/ldct\
  --valid-dir ../data/valid/ldct\
  --ckpt-save-path ../ckpts \
  --nb-epochs 10 \
  --batch-size 4 \
  --loss l2 \
  --noise-type hybrid\
  --noise-param 15\
  --crop-size 64 \
  --plot-stats \
  --cuda

Testing

Model checkpoints are automatically saved after every epoch. To test the denoiser, provide test.py with a PyTorch model (.pt file) via the argument --load-ckpt and a test image directory via --data. The --show-output option specifies the number of noisy/denoised/clean montages to display on screen. To disable this, simply remove --show-output.

python3 test.py \
  --data ../data \
  --load-ckpt ../ckpts/
  --noise-type hybrid\
  --noise-param 15 \
  --crop-size 256 \
  --show-output 3 \
  --cuda

See python3 test.py --h for list of optional arguments, or examples/test.sh for an example.

About

Self-supervised Noise2Noise for LDCT denoising from corrupted images.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages