This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
cinderella_tomograms [2019/12/13 14:58] twagner [Training] |
cinderella_tomograms [2019/12/13 15:52] twagner |
||
---|---|---|---|
Line 4: | Line 4: | ||
==== Training ==== | ==== Training ==== | ||
- | To train cinderella we have to create training data. To do that, we extract the central slices from your tomogram (step 1) and select bad and good particles | + | To train cinderella we have to create training data. To do that, we extract the central slices from your tomogram (step 1) and select bad and good particles |
=== 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: | ||
< | < | ||
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 '' | - Start e2display from eman2 and select the central slice file (in our example '' | ||
- 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 " | + | - Now click with the central mouse button (mouse wheel) on any particle. In the new dialog press the button ►[Sets] and select the tab " |
- | - There should | + | - There should already |
- | - If you now click on particles in the overview, they will be added to the current | + | - If you now click on particles in the overview, they will be added to the currently |
- | - After you finished the selection, press ►[Save] for each selected class. You should save the classes into separate folders (e.g. '' | + | - After you finished the selection, press ►[Save] for each selected class. You should save the classes into separate folders (e.g. '' |
{{ :: | {{ :: | ||
<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 do so, create an empty file with | ||
+ | < | ||
+ | touch config.json | ||
+ | </ | ||
- | Then specify | + | Copy the following configuration |
<code json config.json> | <code json config.json> | ||
Line 62: | Line 67: | ||
< | < | ||
- | sp_cinderella_train.py -c example_config.json --gpu 1 | + | sp_cinderella_train.py -c config.json --gpu 1 |
</ | </ | ||
- | This will train a classification network on the GPU with ID=1. After the training finishes, you get a '' | + | This will train a classification network on the GPU with ID=1. After the training finishes, you get a '' |
Line 71: | Line 76: | ||
==== Prediction ==== | ==== Prediction ==== | ||
+ | To run the prediction on ' | ||
+ | |||
+ | < | ||
+ | sp_cinderella_predict.py -i my_subtomograms.hdf -w my_model.h5 -o output_folder/ | ||
+ | </ | ||
+ | |||
+ | You will find two new mrcs files with the classified subtomograms. To check the results with e2display, you have to extract the central slices again (see [[cinderella_tomograms# | ||