This is an old revision of the document!
JANNI implements a neural network denoising tool described in NVIDIA's noise2noise paper: Noise2Noise: Learning Image Restoration without Clean Data - arXiv
JANNI can be used a command line tool but also provides an simple interface to be integrated into other programs.
You can find the download and installation instructions here: Download and Installation
If you followed the installation instructions, you now have to activate the JANNI virtual environment with
source activate janni
You can use JANNI either by command line or with the GUI. Typically, most users prefer to use the GUI (but we will also provide the command line commands in this tutorial). You can start the GUI with
janni_denoise.py
The GUI is basically a visualization of the command line interface:
On the left side, you can see all available actions:
Each action has several parameters which are organized in tabs. Once you chosen your settings you can press “Start”, the command will be applied and JANNI shows you the output:
It will tell you when something went wrong. Pressing “edit” brings you back to your settings, where you can either edit the settings (in case something went wrong) or go to the next action.
In case you want to use the general model (Download here) you can skip this part and directly denoise your images.
In case you would like to train a model for your data, the first thing you have to do is to create a configuration file for JANNI.
In the GUI choose the action “config” and fill out the required arguments:
Press “start” and the config will be written in the specified config_out_path.
If you would like to use the command line, you can get a descriptio of all parameters with:
janni_denoise.py config -h
The following command will create the same config file as with the GUI:
janni_denoise.py config ~/example/config_janni.json --movie_dir ~/example/movies/ --even_dir ~/example/even/ --odd_dir ~/example/odd/
We typically use at least 30 movies (unaligned) to train the model. Less might also work, more work often much better.
To run the training on gpu 0:
janni_denoise.py train config.json -g 0
With a trained model (either trained by you or the general model) you can directly denoise either your movies or averages. In our experience, denoising the motion corrected averages works better.
To denoise a set if images you have to tell JANNI three mandatory arguments:
As model you can either use the model you trained for your data or the general model (Download here).
There are couple of optional parameters that you use:
Here is now how you do the actual denoising:
It is assumed that you run the command in a directory with your model file mymodel.h5
(might have a different name in case of the general model). Furthermore, it is assumed that your would like denoise averages in the folder /my/averages/ and want to write results in the folder /my/outputdir/denoised/
The following command will run the denoising on GPU 0:
janni_denoise.py predict /my/averages/ /my/outputdir/denoised/ mymodel.h5 -g 0
Please checkout the jupyter notebook to see how to use JANNI with python.