IMPLEMENTATION OF MODEL-BLIND VIDEO DENOISING VIA FRAME-TO-FRAME TRAINING
- Author : EHRET Thibaud ehret.thibaud@gmail.com
- Licence : AGPL v3
This code is provided to reproduce the results from "Model-blind Video Denoising Via Frame-to-frame Training , T. Ehret, A. Davy, J.M. Morel, G. Facciolo, P. Arias, CVPR 2019". Please cite it if you use this code as part of your research.
The sequences used for the article can be found in https://github.com/cmla/derf-hd-dataset.
List all available options:
python blind_denoising.py --help
There are 4 mandatory input arguments:
--inputthe path to input frames (C type)--flowthe path to optical flow (C type), must be readable by readFlowFile.py--outputthe path to output frames (C type)--refthe path to reference frames (C type), it can be set to the input frames if the true reference is not available (only used to compute the PSNR)
There are 5 optional input arguments:
--firstthe index of the first frame to be processed, default is 1--lastthe index of the last frame to be processed, default is 300--output_psnrthe path to file where the PSNRs are going to be written, default isplot_psnr.txt--output_networkthe path to file where the fine-tuned network will be saved, default isfinal.pth--iterthe number of backpropagation to done, default is 20--networkthe path to the network (only change if you know what you are doing), default is set to DnCNN 25
The input sequence provided should already be a degraded grayscale sequence (the code can read grayscale png, jpeg and tiff files). The optical flow should be computed before running the denoising code (and preferably on the degraded sequence).
The code used to compute the optical flow for the CVPR paper is provided in the tvl1flow folder. It's a modified version of "Javier Sánchez Pérez, Enric Meinhardt-Llopis, and Gabriele Facciolo, TV-L1 Optical Flow Estimation, Image Processing On Line, 3 (2013), pp. 137–150."
The code is compilable on Unix/Linux and hopefully on Mac OS (not tested!).
Compilation: requires the cmake and make programs.
Compile the source code using make.
UNIX/LINUX/MAC:
$ mkdir build; cd build
$ cmake ..
$ make
Binaries will be created in the build/ folder.
NOTE: By default, the code is compiled with OpenMP multithreaded parallelization enabled (if your system supports it).
A script tvl1flow.sh is also provided.
The command to run this script is (assuming it is in the same folder as the tvl1flow binary):
$ ./tvl1flow.sh inputPath first last outputPath
where the mandatory inputs are:
inputPaththe path to the input frames (using the C standard), for example 'frame%03d.png'firstthe index of the first frame, for example '1'lastthe index of the last frame, for example '100'outputPaththe path to the output flow, for example 'tvl1_%03d.flo'