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
janni_tutorial [2019/09/16 13:27]
shaikh [Training a model for your data]
janni_tutorial [2020/09/24 14:46]
twagner [Training a model for your data]
Line 37: Line 37:
 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 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.+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. Its recommended to copy movies from different data collections into different folders. If you later water do denoise binned micrographs, you should setup binning correctly. 
 + 
 +<note important> 
 +** Setup binning ** 
 +In case your movies are superresolution and you later want to denoise binned micrographs, the movies need to be binned during training. Therefore create a file ''bin.txt'' in the training folder with the movies that needs to be binned. Write the binning factor into this file (typically 2 or 4). 
 +</note>  
 + 
 +The next thing you have to do is to create a configuration file for JANNI.
  
 === Configuration === === Configuration ===
Line 61: Line 68:
 {{: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 71: Line 78:
 ==== 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 denoise -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 denoise /my/averages/ /my/outputdir/denoised/ janni_imodel.h5 -g 0
 </code> </code>
 </hidden> </hidden>
janni_tutorial.txt · Last modified: 2020/09/24 14:46 by twagner