Pytorch implementation of paper "Joint Image demosaicking and denoising with mutual guidance of color channels"
git clone https://github.com/yongzhangwhu/MGCC-JDD
cd MGCC-JDD
- Python 3.7
- PyTorch 1.7.1
- Tensorflow 1.15.0
- scipy 1.1.0
- scikit-image 0.17.2
- opencv-python
You can download the pretrained models for synthetic and realistic datasets from here.
- preparation
-
for synthetic datasets
- add noise by preprocess.m using matlab for test images.
- modify --test_noisy_path, --test_gt_path, --sigma, --pretrained_model in ./script/test-MGCC-jdd-df2k.sh.
-
for MSR dataset
- generate txt file used for test by ./datasets/generate_image_list.py.
- modify --test_datalist, --pretrained_model in ./script/test-MGCC-jdd-df2k_msr.sh.
-
- test model
- test model trained by synthesis datasets
sh ./script/test-MGCC-jdd-df2k.sh
- test model trained by MSR datasets
sh ./script/test-MGCC-jdd-df2k_msr.sh
- test model trained by synthesis datasets
We train our model on both synthesis datasets(DF2k) and realistic dataset(MSR dataset).
- preparation
- generate txt file used for training by ./datasets/generate_image_list.py.
- modify the training setting in ./script/run-MGCC-jdd-df2k.sh or ./script/run-MGCC-jdd-df2k_msr.sh.
- train model
- on synthetic datasets
sh ./script/run-MGCC-jdd-df2k.sh
- on realistic dataset
sh ./script/run-MGCC-jdd-df2k_msr.sh
- on synthetic datasets
The architecture of our codes are based on TENet. The pac code is provided by PACNet. The noise estimation code wmad_estimator.py is provided by Kokkinos.