Demo code for paper "COLOR IMAGE DEMOSAICKING USING A 3-STAGE CONVOLUTIONAL NEURAL NETWORK STRUCTURE"
K. Cui, Z. Jin, E. Steinbach, Color Image Demosaicking using a 3-stage Convolutional Neural Network Structure, IEEE International Conference on Image Processing (ICIP 2018), Athens, Greece, Oktober 2018. DOI: 10.1109/ICIP.2018.8451020
add TensorFlow implentation and pretrained model.
-
Dependencies:
- Python 3
- TensorFlow 1.XX (1.10 or newer)
- NumPy
- Pillow
- NVIDIA GPU + CUDA (if running in GPU mode)
-
Dataset:
-
Usage:
- run
python main_py3_tfrecord.py
to test the Kodak dataset. - When testing other datasets, simply add
--test_set NAME
, e.g.,python main_py3_tfrecord.py --test_set McM
- It also supports the ensemble testing mode, run
python main_py3_tfrecord.py --phase ensemble
- run
- Please download the matconvnet toolbox from http://www.vlfeat.org/matconvnet/ and install it according to the instructions from their website.
- Please go to the folder ./MatConvnet_implementation
- Please copy the ./MatConvnet_implementation folder into the following path, ./Matconvnet-1.0-beta2X/examples/
- Please copy the customized layer functions vl_nnsplit.m, vl_nnsplit_new.m in the ./customized_layers/ to ./Matconvnet-1.0-beta2X/matlab/; Copy the Split.m, Split_new.m in the ./customized_layers/ to ./Matconvnet-1.0-beta2X/matlab/+dagnn/;
- The script test_CDMNet.m is a demo for testing using the trained model which is stored in ./model/CNNCDM.mat
- In case you would like to train the network. The traing dataset used is the Waterloo Exploration Database. Please download the dataset here https://ece.uwaterloo.ca/~k29ma/exploration/ and put all the images in ./pristine_images/; and then run mosaicked_image_generation to generate the bilinear initial CDM input of the network; and then run train_CDMNet_MSE for training.
- Please read our paper for more details!
- Have fun!
@INPROCEEDINGS{LMT2018-1279,
author = {Kai Cui AND Zhi Jin AND Eckehard Steinbach},
title = {Color Image Demosaicking using a 3-stage Convolutional Neural Network Structure},
booktitle = {{IEEE} International Conference on Image Processing ({ICIP} 2018)},
month = {Oct},
year = {2018},
address = {Athens, Greece}
}
@Kai Cui (kai.cui@tum.de)
Lehrstuhl fuer Medientechnik (LMT)
Technische Universitaet Muenchen (TUM)
Last modified 06.02.2021