User Tools

Site Tools


janni_tutorial

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
janni_tutorial [2019/09/16 11:24]
twagner [Just Another Noise 2 Noise Implementation (JANNI)]
janni_tutorial [2019/09/16 14:16]
shaikh [Training a model for your data]
Line 4: Line 4:
 [[https://arxiv.org/abs/1803.04189|Noise2Noise: Learning Image Restoration without Clean Data - arXiv]] [[https://arxiv.org/abs/1803.04189|Noise2Noise: Learning Image Restoration without Clean Data - arXiv]]
  
-Besides a simple GUI and a commandline interface JANNI also provides an simple python interface to be integrated into other programs.+Besides a simple GUI and a commandline interfaceJANNI also provides an simple python interface to be integrated into other programs.
  
 ==== Download and Installation ==== ==== Download and Installation ====
Line 15: Line 15:
 </code> </code>
  
-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+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:
 <code> <code>
 janni_denoise.py janni_denoise.py
 </code> </code>
  
-The GUI is basically a visualization of the command line interface:+The GUI is essentially a visualization of the command line interface:
  
 {{ ::start_01.png?700 |}} {{ ::start_01.png?700 |}}
Line 29: Line 29:
   * **denoise**: Run this action to apply a model on new images.   * **denoise**: Run this action to apply a model on new images.
  
-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: +Each action has several parameters which are organized in tabs. Once you chosen your settings you can press "Start," and the command will be applied and JANNI shows you the output: 
  
 {{ :janni_start_02.png?700 |}} {{ :janni_start_02.png?700 |}}
  
-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. +It will tell you if something goes 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. 
 ==== Training a model for your data ==== ==== Training a model for your data ====
-In case you want to use the general model ([[janni#Download|Download here]]) you can skip this part and directly [[janni_tutorial#denoise|denoise]] your images. +In case you want to use the general model ([[janni#Download|Download here]])you can skip this part and directly [[janni_tutorial#denoise|denoise]] your images. 
  
-In case you would like to train a model for your data, you need to copy a couple of movie files into a separate directory. We typically use at least 30 movies (unaligned) to train the model. Less might also work, more work often much better.  the first thing you have to do is to create a configuration file for JANNI.+In case you would like to train a model for your data, you need to copy a few movie files into a separate directory. We typically use at least 30 movies (unaligned) to train the model. Fewer might also work, but more often work much better.  The first thing you have to do is to create a configuration file for JANNI.
  
 === Configuration === === Configuration ===
Line 43: Line 43:
 {{ ::jann_config_02.png?700 |}} {{ ::jann_config_02.png?700 |}}
  
-Press "start" and the config will be written in the specified //config_out_path//. You should see the following output:+Press "Start," and the config file will be written in the specified //config_out_path//. You should see the following output:
 <hidden **Generate the configuration file with the command line**> <hidden **Generate the configuration file with the command line**>
 If you would like to use the command line, you can get a description of all parameters with: If you would like to use the command line, you can get a description of all parameters with:
Line 57: Line 57:
  
 === Training === === Training ===
-In principle you just have to specify the config file. However, you might want to specify the GPU ID as well. You find the GPU option in the //Optional arguments// tab.+In principleyou simply have to specify the config file. However, you might want to specify the GPU ID as well. You find the GPU option in the //Optional arguments// tab.
  
 {{:jann_train_01.png?420|}}{{:janni_train_02.png?420|}} {{:jann_train_01.png?420|}}{{:janni_train_02.png?420|}}
  
-Press "Start" to run the training and wait for finishing of JANNI. After that, press //Edit// to the next step.+Press "Start" to run the training and wait for finishing of JANNI. After that, press //Edit// (where the "Start" button used to be) to prepare for the next step.
  
 <hidden **Run the training with the command line**> <hidden **Run the training with the command line**>
Line 69: Line 69:
 </code> </code>
 </hidden> </hidden>
- 
 ==== Denoise ==== ==== Denoise ====
  
-With a trained model (either trained by you or the general model ([[janni#Download|Download here]]) ) you can directly denoise either your movies or averages. In our experience, denoising the motion corrected averages works better. In the GUI select the action //Denoise// and fill the required parameters:+With a trained model (either a model trained by you or the general model ([[janni#Download|Download here]]) )you can directly denoise either your movies or averages. In our experience, denoising the motion corrected averages works better. In the GUI select the action //denoise// and fill the required parameters:
 {{ ::janni_denoise.png?700 |}} {{ ::janni_denoise.png?700 |}}
  
-You might also want to change the GPU ID in //Optional arguments// tab. After that press the //Start// button. JANNI will denoise your images with roughly 1s per micrograph.+You might also want to change the GPU ID in //Optional arguments// tab. Then, press the //Start// button. JANNI will denoise your images at roughly 1s per micrograph.
  
 <hidden **Run prediction in the command line**> <hidden **Run prediction in the command line**>
-In case you need a description of all available parameters type:+In case you need a description of all available parameterstype:
 <code> <code>
 janni_denoise.py predict -h janni_denoise.py predict -h
 </code> </code>
  
-The following command will run the denoise the images in ''/my/averages/'' and save the denoised images in ''/my/outputdir/denoised/''. The denoising will run on GPU 0:+The following command will run the denoise the images in ''/my/averages/'' and save the denoised images in ''/my/outputdir/denoised/''. The denoising here will run on GPU 0:
 <code> <code>
 janni_denoise.py predict /my/averages/ /my/outputdir/denoised/ janni_imodel.h5 -g 0 janni_denoise.py predict /my/averages/ /my/outputdir/denoised/ janni_imodel.h5 -g 0
janni_tutorial.txt · Last modified: 2020/09/24 14:46 by twagner