User Tools

Site Tools


pipeline:window:cryolo

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
pipeline:window:cryolo [2019/08/30 13:40]
twagner [Data preparation]
pipeline:window:cryolo [2019/09/14 10:11]
twagner
Line 35: Line 35:
  
 You can find the download and installation instructions here: [[howto:download_latest_cryolo|Download and Installation]] You can find the download and installation instructions here: [[howto:download_latest_cryolo|Download and Installation]]
 +
 +===== Tutorials =====
 +
 +Depending what you want to do, you can follow one of these Tutorials:
 +
 +  - I would like to train a model from scratch for picking my particles
 +  - I would like to train a model from scratch for picking filaments.
 +  - I would like to refine a general model for my particles.
 +
 +The **first and the second tutorial** are the most common use cases and well tested. The **third tutorial** is still experimental but might give you better results in less time or less training data. 
 +
 +
  
 ===== Picking particles - Using a model trained for your data ===== ===== Picking particles - Using a model trained for your data =====
Line 51: Line 63:
 One may ask how many micrographs have to be picked? It depends! Typically 10 micrographs are a good start. However, that number may increase / decrease due to several factors: One may ask how many micrographs have to be picked? It depends! Typically 10 micrographs are a good start. However, that number may increase / decrease due to several factors:
   * A very heterogenous background could make it necessary to pick more micrographs.   * A very heterogenous background could make it necessary to pick more micrographs.
 +  * When you refine a general model, you might need to pick less micrographs.
   * If your micrograph is only sparsely decorated, you may need to pick more micrographs.   * If your micrograph is only sparsely decorated, you may need to pick more micrographs.
-We recommend that you start with 10 micrographs, then autopick your data, check the results and finally decide whether to add more micrographs to your training set. + 
 +We recommend that you start with 10 micrographs, then autopick your data, check the results and finally decide whether to add more micrographs to your training set. If you refine a general model, even 5 micrographs might be enough.
  
 {{:pipeline:window:box_manager.png?direct&400 |}} {{:pipeline:window:box_manager.png?direct&400 |}}
Line 68: Line 82:
   * CONTROL + LEFT MOUSE BUTTON: Remove a box   * CONTROL + LEFT MOUSE BUTTON: Remove a box
  
-You can change the box size in the main window, by changing the number in the text field labeled //Box size://. Press //Set// to apply it to all picked particles. For picking, you should the use minimum sized square which encloses your particle.+You can change the box size in the main window, by changing the number in the text field labeled //Box size://. Press //Set// to apply it to all picked particles. __For picking, you should the use minimum sized square which encloses your particle.__
  
 If you finished picking from your micrographs, you can export your box files with //Files -> Write box files//. If you finished picking from your micrographs, you can export your box files with //Files -> Write box files//.
Line 74: Line 88:
  
 Now create a third folder with the name ''train_image''. Now for each box file, copy the corresponding image from ''full_data'' into ''train_image''((While it is nice to keep the things organized, you don't have to copy your training images in a separate folder. In the configuration file (see below) you can also simply specify the full_data directory as "//train_image_folder//". crYOLO will find the correct images using the box files.)). crYOLO will detect image / box file pairs by search taking the box file an searching for an image filename which contains the box filename. Now create a third folder with the name ''train_image''. Now for each box file, copy the corresponding image from ''full_data'' into ''train_image''((While it is nice to keep the things organized, you don't have to copy your training images in a separate folder. In the configuration file (see below) you can also simply specify the full_data directory as "//train_image_folder//". crYOLO will find the correct images using the box files.)). crYOLO will detect image / box file pairs by search taking the box file an searching for an image filename which contains the box filename.
 +
 +==== Start crYOLO ====
 +{{page>pipeline:window:cryolo:start_cryolo}}
  
 ==== Configuration ==== ==== Configuration ====
-You now have to create a config file your picking project. To do this type:+You now have to create a configuration file your picking project. It contains all important constants and paths and helps you to reproduce your results later on.  
 + 
 +You can either use the commandline to create the configuration file or the GUI. 
 + 
 +**Using the command line:** 
 + 
 +To create an empty file do:
 <code> <code>
 touch config.json touch config.json
Line 122: Line 145:
 //[[:cryolo_config|Click here to get more information about the configuration file]]// //[[:cryolo_config|Click here to get more information about the configuration file]]//
  
-Please set the value in the //"anchors"// field to your desired box size. It should be size of the minimum enclosing square in pixels. Furthermore check if the fields //"train_image_folder"// and //"train_annot_folder"// have the correct values. Typically, 20% of the training data are randomly chosen as validation data. If you want to use specific images as validation data, you can move the images and the corresponding box files to the folders specified in //"valid_image_folder"// and //"valid_annot_folder"//. Make sure that they are removed from the original training folder! With the line below, crYOLO automatically filters your images to an absolute frequency 0.1 and write them into a folder "filtered".+Please set the value in the //"anchors"// field to your desired box size. It should be the same as in your training box files. Furthermore check if the fields //"train_image_folder"// and //"train_annot_folder"// have the correct values. Typically, 20% of the training data are randomly chosen as validation data. If you want to use specific images as validation data, you can move the images and the corresponding box files to the folders specified in //"valid_image_folder"// and //"valid_annot_folder"//. Make sure that they are removed from the original training folder! With the line below, crYOLO automatically filters your images to an absolute frequency 0.1 and write them into a folder "filtered".
 <code> <code>
 "filter":               [0.1,"filtered"]. "filter":               [0.1,"filtered"].
Line 131: Line 154:
 **Alternative: Using neural-network denoising with JANNI** **Alternative: Using neural-network denoising with JANNI**
  
-Since crYOLO 1.4 you can also use neural network denoising with [[:janni|JANNI]]. The easiest way is to use the JANNI's general model ([[:janni#janni_general_model|Download here]]) but you can also [[:janni_tutorial#training_a_model_for_your_data|train JANNI for your data]]. crYOLO directly uses an interface to JANNI to filter your data, you just have to specify the path to your JANNI model, overlap of the batches (default 24), the batch size (default 3) and a path where the denoised images should be written. +Since crYOLO 1.4 you can also use neural network denoising with [[:janni|JANNI]]. The easiest way is to use the JANNI's general model ([[:janni#janni_general_model|Download here]]) but you can also [[:janni_tutorial#training_a_model_for_your_data|train JANNI for your data]]. crYOLO directly uses an interface to JANNI to filter your data, you just have to specify the path to your JANNI model, overlap of the patches (default 24), the batch size (default 3) and a path where the denoised images should be written. 
  
 To use JANNI's denoising you have to use following entry in your config.json: To use JANNI's denoising you have to use following entry in your config.json:
Line 145: Line 168:
 Please note the wiki entry about the [[:cryolo_config|crYOLO configuration file]] if you want to know more details. Please note the wiki entry about the [[:cryolo_config|crYOLO configuration file]] if you want to know more details.
  
 +**Using the GUI:**
  
 ==== Training ==== ==== Training ====
Line 208: Line 231:
  
 Our general models can be found and downloaded here: [[howto:download_latest_cryolo|Download and Installation]].  Our general models can be found and downloaded here: [[howto:download_latest_cryolo|Download and Installation]]. 
 +
 +==== Start crYOLO ====
 +{{page>pipeline:window:cryolo:start_cryolo}}
 +
 ==== Configuration==== ==== Configuration====
 The next step is to create a configuration file. Type: The next step is to create a configuration file. Type:
pipeline/window/cryolo.txt · Last modified: 2021/02/19 10:00 by twagner