User Tools

Site Tools


cinderella_micrographs

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
cinderella_micrographs [2019/12/10 09:07]
twagner [How to use SPHIRE's Cinderella for micrograph selection]
cinderella_micrographs [2020/08/28 07:35]
twagner [Training]
Line 11: Line 11:
 ==== Training ==== ==== Training ====
  
-If you would like to train Cinderella with your own classes, you can easily do it. +The first step is to train Cinderella with manually selected good and bad micrographs. Create two folders, one containing manually selected good micrographs (e.g ''GOOD_MICS/'') and one contain bad micrographs (e.g ''BAD_MICS/''). Both folders can contain subfolders. 
-First you have to separate your good and bad classes into separate files. Create two folders, one containing good micrographs (e.g ''GOOD_MICS/'') and one contain bad classes (e.g ''BAD_MICS/''). Both folders can contain subfolders.+<note question> 
 +**How many micrographs do I need?** 
 + 
 +We typically start with 30 good and 30 bad micrographs. 
 +</note>
  
 Then specify the paths into a config file like this: Then specify the paths into a config file like this:
Line 34: Line 38:
 } }
 </code> </code>
-The fields have the following meaning:+The fields in the section **model** have the following meaning:
   * **input_size**: This is the image size to which each micrograph is resized to.   * **input_size**: This is the image size to which each micrograph is resized to.
-  * **batch_size**: How many micrograph are in one mini-batch. If you have memory problems, you can try to reduce this value.+  * **mask_radius**: (Optional) Circular mask radius which is applied after resizing to the input size. If not given, it uses 0.4 * **input_size** as default. 
 + 
 +The fields in the section **train** have the following meaning: 
 +  * **batch_size**: How many micrographs are in one mini-batch. If you have memory problems, you can try to reduce this value.
   * **good_path**: Path to folder with good micrographs.   * **good_path**: Path to folder with good micrographs.
   * **bad_path**: Path to folder with bad micrographs.   * **bad_path**: Path to folder with bad micrographs.
Line 55: Line 62:
  
 ==== Classify ==== ==== Classify ====
-Suppose you want to separate good and bad classes in folder ''micrographs'' and you want to save a list with the filenames of the good / bad micrographgs into the folder ''output_folder''. Furthermore you want to use the model ''my_model.h5'' and the GPU with ID=1. Micrographs with a confidence bigger than 0.5 should be classified as good micrograph.+Suppose you want to separate good and bad micrographs in the folder ''micrographs'' and you want to save a list with the filenames of the good / bad micrographgs into the folder ''output_folder''. Furthermore you want to use the model ''my_model.h5'' and the GPU with ID=1. Micrographs with a confidence bigger than 0.5 should be classified as good micrograph.
  
 This is the command to run: This is the command to run:
cinderella_micrographs.txt · Last modified: 2020/08/28 07:35 by twagner