This code is a implement of the paper "NHNet: A Non-Local Hierarchical Network for Image Denoising".
Please run this code in the terminal:
pip install -r requirements.txt
Trainsets
-
For Gaussian denoising on gray images and color images
-
For real noise
Testsets
- For gray images
- For color images
set5
McMaster
Kodak24
- For real noise
Branchmark from SIDD(http://130.63.97.225/sidd/dataset.php)
Validation data from SIDD(http://130.63.97.225/sidd/dataset.php)
DND(https://noise.visinf.tu-darmstadt.de/)
main_train_###.py
The file main_train_DRNet_###.py contains the best model in the paper:
- For Gaussian denoising on gray images: main_train_NHNet.py
- For Gaussian denoising on color images : main_train_NHNet_color.py
- For real noise: main_train_NHNet_sidd.py
Other files, such as main_train_NHNet_no_bn.py, corresponds to the control model used in the ablation experiment.
main_test_###.py
For Gaussian noise, we provide pre-trained models of three noise level, 15, 25 and 50. Please ensure the test noise level is consistent with the model you select (you can select them in the test file). Names of the pre-trained models as follows:
---_gray15 ---_gray25 ---_gray50 ---_color15 ---_color25 ---_color50
For real noise, we provide the pre-trained model "real.pth". Test results can be produced by running file as follows:
---_sidd_valu.py for Validation data from SIDD
sidd_Submit.py for branchmark data from SIDD. The file generated by it should be submitted to http://130.63.97.225/sidd/dataset.php to receive the result report.
test_denoising_dnd.py for DND. The file generated by it also should be submitted.
Link:https://pan.baidu.com/s/1ZjB-t4YuZkL0PAB8jkCDNA
code:xe88
- model_zoo (there are some pretrained model in the papar)
- options (Config files of the models)
- models (network, train method definition)
- model_zoo (pre-trained models)
- testsets
- trainsets
- utils
If you meet this bug, please make sure that you are not running the code in Pycharm's test environment: E:\soft2\anaconda\envs\pytorchgpu37\python.exe E:\PyCharm2020.1\plugins\python\helpers\pycharm_jb_nosetest_runner.py --target test_DiehlAndCook2015.py::test Traceback (most recent call last): File "E:\PyCharm2020.1\plugins\python\helpers\pycharm_jb_nosetest_runner.py", line 4, in import nose ModuleNotFoundError: No module named 'nose'