score_pnp
Science Score: 62.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
✓Academic publication links
Links to: arxiv.org -
○Academic email domains
-
✓Institutional organization owner
Organization wustl-cig has institutional domain (cigroup.wustl.edu) -
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (9.9%) to scientific vocabulary
Repository
Basic Info
- Host: GitHub
- Owner: wustl-cig
- License: bsd-3-clause
- Language: Python
- Default Branch: main
- Size: 3.34 MB
Statistics
- Stars: 7
- Watchers: 1
- Forks: 1
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
Plug-and-Play Priors as a Score-Based Method

Abstract
Plug-and-play (PnP) methods are extensively used for solving imaging inverse problems by integrating physical measurement models with pre-trained deep denoisers as priors. Score-based diffusion models (SBMs) have recently emerged as a powerful framework for image generation by training deep denoisers to represent the score of the image prior. While both PnP and SBMs use deep denoisers, the score-based nature of PnP is unexplored in the literature due to its distinct origins rooted in proximal optimization. This letter introduces a novel view of PnP as a score-based method, a perspective that enables the re-use of powerful SBMs within classical PnP algorithms without retraining. We present a set of mathematical relationships for adapting popular SBMs as priors within PnP. We show that this approach enables a direct comparison between PnP and SBM-based reconstruction methods using the same neural network as the prior.
Environment setting
1) Clone the repository
``` git clone https://github.com/wustl-cig/score_pnp
cd score_pnp ```
2) Download Pretrained Score Function
- Download DnCNN denoiser trained on the ImageNet 256x256 dataset Pretrained DnCNN link. The default save directory is
./pretrained_models. - Download DRUNet denoiser trained on the ImageNet 256x256 dataset Pretrained DRUNet link. The default save directory is
./pretrained_models. - Download variance-preserving score neural network trained on the ImageNet 256x256 dataset Pretrained VP score link. The default save directory is
./pretrained_models.
2) Download blurring kernel
- Download blur kernels Levin09.npy Blur kernels link. The default save directory is
./blur_kernels.
3) Virtual environment setup
``` conda create -n Scorepnp python=3.9.19
conda activate Scorepnp
conda install -c conda-forge mpi4py mpich
pip install -r requirements.txt ```
Run experiment
1) Pick one task from configs directory:
Score-based PnP approches
configs/dpir_score.yamlconfigs/red_score.yamlconfigs/pnpadmm_score.yamlconfigs/diffpir_score.yaml
Classical PnP approches
configs/dpir_classical.yamlconfigs/red_classical.yamlconfigs/pnpadmm_classical.yaml
2) Open yaml file and customize # CUSTOMIZE
```
Open up the yaml file that you want to run experiment
vim {TASKYAMLFILE_NAME}.yaml
Only care the line that has # Attention #
gpu: # CUSTOMIZE 1 pretrainedcheckpoint: # CUSTOMIZE 2 ```
3) Execute the code
python3 first_argparse.py --task_config configs/{TASK_YAML_FILE_NAME}.yaml # example code: python3 first_argparse.py --task_config configs/score_dpir.yaml
Implementation detail
first_argparse.py # Read yaml file / set forward operator and data transform / initialize models
│
├────────── second_dpir.py # [DRUNet / Score]-based DPIR operation
│
├────────── second_red.py # [DnCNN / Score]-based RED operation
│
├────────── second_pnpadmm.py # [DnCNN / Score]-based PnP-ADMM operation
│
└────────── second_diffpir.py # DiffPIR operation
🔑 Core Logic for Score-Based Methods
These two components are central to applying parameter-matched denoising in our framework:
```python
Find the diffusion timestep corresponding to the desired noise level(s) to denoise.
util.tweedieutility.getnoiselevelalphastimestep
Performs score-based denoising using parameter matching
guided_diffusion.unet.UNetModel.forward ```
Troubleshooting
diff
! If you encounter any issues, feel free to reach out via email at chicago@wustl.edu.
Code references
We adopt the code structure from Deepinverse repo.
Citation
If you find our work useful, please consider citing
@inproceedings{park2024scorepnp,
title={Plug-and-Play Priors as a Score-Based Method},
author={Park, Chicago Y.
and Yuyang Hu
and McCann, Michael T.
and Garcia-Cardona, Cristina
and Wohlberg, Brendt
and Kamilov, Ulugbek S.},
booktitle={2025 IEEE International Conference on Image Processing (ICIP)},
year={2025},
address={Anchorage, Alaska},
}
Owner
- Name: Computational Imaging Group (CIG)
- Login: wustl-cig
- Kind: organization
- Location: St. Louis, MO, USA
- Website: https://cigroup.wustl.edu/
- Repositories: 16
- Profile: https://github.com/wustl-cig
Citation (CITATION.cff)
cff-version: 0.0.1 message: "If you use this software, please cite it as below." authors: - family-names: "Tachella" given-names: "Julian" orcid: "https://orcid.org/0000-0003-3878-9142" - family-names: "Chen" given-names: "Dongdong" orcid: "https://orcid.org/0000-0002-7016-9288" - family-names: "Hurault" given-names: "Samuel" orcid: "https://orcid.org/0000-0002-5163-2791" - family-names: "Terris" given-names: "Matthieu" orcid: "https://orcid.org/0009-0009-9726-6131" - family-names: "Wang" given-names: "Andrew" orcid: "https://orcid.org/0000-0003-0838-7986" title: "DeepInverse: A deep learning framework for inverse problems in imaging" version: latest doi: 10.5281/zenodo.7982256 date-released: 2023-06-30 url: "https://github.com/deepinv/deepinv"
GitHub Events
Total
- Issues event: 2
- Watch event: 6
- Issue comment event: 1
- Public event: 1
- Push event: 18
- Fork event: 1
Last Year
- Issues event: 2
- Watch event: 6
- Issue comment event: 1
- Public event: 1
- Push event: 18
- Fork event: 1
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 1
- Total pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Total issue authors: 1
- Total pull request authors: 0
- Average comments per issue: 0.0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 1
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 1
- Pull request authors: 0
- Average comments per issue: 0.0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- Ronales (1)
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- Pillow ==9.2.0
- PyYAML ==6.0
- certifi ==2022.9.14
- charset-normalizer ==2.1.1
- contourpy ==1.0.5
- cycler ==0.11.0
- fonttools ==4.37.2
- idna ==3.4
- kiwisolver ==1.4.4
- matplotlib ==3.6.0
- numpy ==1.23.3
- packaging ==21.3
- pyparsing ==3.0.9
- python-dateutil ==2.8.2
- requests ==2.28.1
- scipy ==1.9.1
- six ==1.16.0
- tqdm ==4.64.1
- typing-extensions ==4.3.0
- urllib3 ==1.26.12