User Tools

Site Tools


cinderella_tomograms

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
Last revision Both sides next revision
cinderella_tomograms [2019/12/13 15:42]
twagner
cinderella_tomograms [2019/12/13 16:12]
twagner [Training]
Line 7: Line 7:
  
 === 1. Extract central slices === === 1. Extract central slices ===
 +To extract the central slices from e.g. my_subtomograms.hdf and to save it into sub_central.mrcs run:
 <code> <code>
 sp_cinderella_extract.py -i my_subtomograms.hdf -o sub_central.mrcs sp_cinderella_extract.py -i my_subtomograms.hdf -o sub_central.mrcs
Line 14: Line 15:
   - Start e2display from eman2 and select the central slice file (in our example ''sub_central.mrcs'').    - Start e2display from eman2 and select the central slice file (in our example ''sub_central.mrcs''). 
   - Press ►[Show Stack] to display the file.    - Press ►[Show Stack] to display the file. 
-  - Now click with the central mouse button (mouse wheel) on any particle. In new dialog press the button ►[Sets] and select the tab "Sets".  +  - Now click with the central mouse button (mouse wheel) on any particle. In the new dialog press the button ►[Sets] and select the tab "Sets".  
-  - There should be already a class "bad_particles". Create another class with and call it "good_particles". Highlight the set to which you want to add particle. +  - There should already be a class "bad_particles". Create a new class and name it "good_particles". Highlight the set to which you want to add particle. 
-  - If you now click on particles in the overview, they will be added to the current selected set. +  - If you now click on particles in the overview, they will be added to the currently selected set. 
-  - After you finished the selection, press ►[Save] for each selected class. You should save the classes into separate folders (e.g. ''good/'' and ''bad/''). Both folder can contain multiple files (e.g. examples from another tomogram).+  - After you finished the selection, press ►[Save] for each selected class. You should save the classes into separate folders (e.g. ''good/'' and ''bad/''). Both folders can contain multiple files (e.g. examples from another tomogram).
 {{ ::eman2_set_arrow.png?300 |}} {{ ::eman2_set_arrow.png?300 |}}
 <note question> <note question>
Line 27: Line 28:
 After your created your training data, you can start the training :-)  After your created your training data, you can start the training :-) 
  
-You need to specifiy all settings into one config file. To that, create an empty file with+You need to specify all settings into one config file. To do so, create an empty file using
 <code> <code>
 touch config.json touch config.json
 </code> </code>
  
-Copy the following configuration into it and adapt it for your needs. The only entries you might want to change is the input_size, good_path, bad_path and pretrained_weights.+Copy the following configuration into the new file and adapt it to your needs. The only entries you might want to change are the //input_size////good_path////bad_path// and //pretrained_weights//.
  
 <code json config.json> <code json config.json>
Line 53: Line 54:
 </code> </code>
 The fields have the following meaning: The fields have the following meaning:
-  * **input_size**: This is the image size to which each central slice is resized to. +  * **input_size**: Each central slice is resized to these dimensions
-  * **batch_size**: How many images are in one mini-batch. If you have memory problemsyou can try to reduce this value. +  * **batch_size**: The number of images in one mini-batch. If you have memory problems you can try to reduce this value. 
-  * **good_path**: Path to folder with good central slices.+  * **good_path**: Path of folder containing good central slices. 
-  * **bad_path**: Path to folder with bad central slices.+  * **bad_path**: Path of folder containing bad central slices.
   * **pretrained_weights**: Path to weights that are used to initialize the network. It can be empty. As Cinderella is using the same network architecture as crYOLO, we are typically using the [[downloads:cryolo_1#general_phosaurusnet_models|general network of crYOLO]] as pretrained weights.   * **pretrained_weights**: Path to weights that are used to initialize the network. It can be empty. As Cinderella is using the same network architecture as crYOLO, we are typically using the [[downloads:cryolo_1#general_phosaurusnet_models|general network of crYOLO]] as pretrained weights.
-  * **saved_weights_name**: Final model filename+  * **saved_weights_name**: Final model filename.
   * **learning_rate**: Learning rate, should not be changed.   * **learning_rate**: Learning rate, should not be changed.
   * **nb_epoch**: Maximum number of epochs to train. However, it will stop earlier (see nb_early_stop).   * **nb_epoch**: Maximum number of epochs to train. However, it will stop earlier (see nb_early_stop).
Line 69: Line 70:
 </code> </code>
  
-This will train a classification network on the GPU with ID=1. After the training finishes, you get a ''my_model.h5'' file. This can then be used to classify subtomograms into good / bad categories.+This will train a classification network on the GPU with ID=1. Once the training finishes, you get a ''my_model.h5'' file. This can then be used to classify subtomograms into good / bad categories.
  
  
cinderella_tomograms.txt · Last modified: 2019/12/13 16:13 by twagner