This is an implementation of block-matching CNN based image denoiser BMCNN using Python 3, Keras, and TensorFlow. This work is similar to IRCNN. The differences are:
-
Prior to denoising, a block matching algorithm searches for similar blocks. For each 4x4 block, 4 similar blocks are found. Thus, an image with 5 channels (one original and 4 similar blocks) are fed into the network.
-
Possibility to use a lighter network. Since the block matching already does some of the processing we can use a simpler network with a fewer number of filters (fs = 24).
-
Unlike most of CNN based denoisers that for noise sigma specific weights are required, BMCNN uses single model (fixed weight) for all noise levels.
The repository includes:
- Source code of BMCNN.
- Block-Matching code
- Pre-trained weights BMCNN
- Jupyter notebooks to visualize the denoising results
-
demo.ipynb Is the fastest way to start. It shows an example of using a model pre-trained for variation of noise levels. It includes code to run the denoiser on arbitrary images and different noise levels.
-
model.py: This file contains the main BMCNN implementation.
-
utils.py: This file contains some noise related functions.
-
Install dependencies
pip3 install package [numpy, keras, skimage, ...]
-
Clone this repository
-
Run setup from the
libs
directorypython3 setup.py install