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
In case you want to use the general model you can skip this part and directly denoise your images. The first thing you have to do is to create a configuration file for JANNI. In the following I assume you named it config.json. It should look like this:
{ "model" : { "architecture": "unet", "patch_size": 1024 }, "train": { "movie_dir": "/path/to/movie/directory/", "even_dir": "even_averages/", "odd_dir": "odd_averages/", "batch_size": 4, "learning_rate": 1e-3, "nb_epoch": 100, "saved_weights_name": "mymodel.h5" } }
The fields have the following meaning:
In principle you only have to adapt the paths. The other could keep as they are. We typically use at least 30 movies 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
After you trained your model, you can denoise either your movies or denoise your averages directly. 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 the 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.