Home

Awesome

Ultrasound Image Reconstruction with Denoising Diffusion Restoration Models

The supplement materials for this repo is on GoogleDrive, including 2 folders MATLAB and exp. It is neccessary to download them for reproducing the results.

After downloading the supplement materials, the folder's structure is supposed to be:

<MATLAB> 
├── PICMUS  # (download from drive) contains some tools required for running other scripts 
│   ├── ... 
├── Results # work in this directory for pre(post)-processing or showing the results in paper
│   ├── 01_simulation  
│   ├── 02_spicmus
│   ├── ...  # some functions required for running other scripts 
├── SVD  # (download from drive) contains the SVD results of model matrices 
│   ├── 01_simulation  
│   ├── 02_spicmus
<exp>  # (download from drive)
├── logs 
│   ├── imagenet  # a folder named by the argument `--doc` given to main.py
│   │   ├──model000000.pt  # checkpoint (2.2GB)  before fine-tuning
│   │   ├──model006000.pt  # checkpoint (2.2GB)  after fine-tuning
├── image_samples 
│   ├── us # contains the restored data
<runners> 
├── ... 
<gided_diffusion> 
├── ... 
<functions> 
├── ... 
<configs>
├── ... 
main.py
environment.yml

For simply displaying the figures and the table values in the paper

Only MATLAB > PICMUS is required to be downloaded from drive, and then you can simply run the scripts

Inputs of DDRM

The inputs used in the paper are saved in the folders MATLAB/Results/.../yd. These inputs were calculated by using the scripts:

Sampling from the model

The general command to do the restoration is as follows:

python main.py --ni --config {CONFIG.yml} --doc {MODELFOLDER} --timesteps {STEPS} --matlab_path {MATLABPATH} 

where the following are options

For example

python main.py --ni --config imagenet_256.yml --doc imagenet --timesteps 50 --matlab_path /home/user/Documents/MATLAB/ 

References and Acknowledgements

@inproceedings{kawar2022denoising,
    title={Denoising Diffusion Restoration Models},
    author={Bahjat Kawar and Michael Elad and Stefano Ermon and Jiaming Song},
    booktitle={Advances in Neural Information Processing Systems},
    year={2022}
}

This implementation is based on / inspired by: