This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
auto2d_tutorial [2019/07/29 11:18] twagner [Training] |
auto2d_tutorial [2020/08/28 07:36] (current) twagner [Training] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== How to use SPHIRE' | + | ====== How to use SPHIRE' |
+ | This tutorial describes how to use Cinderella to classify 2D class averages. You can either use a pretrained model (see section // | ||
==== Download & Install ==== | ==== Download & Install ==== | ||
You can find the download and installation instructions here: [[auto_2d_class_selection|Download and Installation]] | You can find the download and installation instructions here: [[auto_2d_class_selection|Download and Installation]] | ||
Line 6: | Line 8: | ||
I suppose you downloaded the latest classification model. | I suppose you downloaded the latest classification model. | ||
- | |||
- | This is the corresponding configuration file: | ||
- | |||
- | <code json config.json> | ||
- | { | ||
- | " | ||
- | " | ||
- | }, | ||
- | |||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | } | ||
- | </ | ||
- | |||
- | The fields have the following meaning: | ||
- | * **input_size**: | ||
- | * **batch_size**: | ||
- | * **good_classes**: | ||
- | * **bad_classes**: | ||
- | * **pretrained_weights**: | ||
- | * **saved_weights_name**: | ||
- | * **learning_rate**: | ||
- | * **nb_epoch**: | ||
- | * **nb_early_stop**: | ||
- | * **train_valid_thresh**: | ||
- | * **max_valid_img_per_file**: | ||
- | |||
- | Copy this into a new file called '' | ||
To run the classification I suppose you want to separate good and bad classes in classes_after_isac.hdf (or any other .mrcs / .hdf file with classes) and you want to save your new .hdf (.mrcs) files into the folder '' | To run the classification I suppose you want to separate good and bad classes in classes_after_isac.hdf (or any other .mrcs / .hdf file with classes) and you want to save your new .hdf (.mrcs) files into the folder '' | ||
Line 50: | Line 14: | ||
< | < | ||
- | sp_cinderella_predict.py -i path/ | + | sp_cinderella_predict.py -i path/ |
</ | </ | ||
Line 57: | Line 21: | ||
==== Training ==== | ==== Training ==== | ||
If you would like to train Cinderella with your own classes, you can easily do it. | If you would like to train Cinderella with your own classes, you can easily do it. | ||
- | First you have to separate your good and bad classes into separate files. Create two folders, | + | First you have to separate your good and bad classes into separate files. Create two folders, |
Then specify the paths into a config file like this: | Then specify the paths into a config file like this: | ||
Line 64: | Line 28: | ||
{ | { | ||
" | " | ||
- | " | + | " |
}, | }, | ||
" | " | ||
" | " | ||
- | "good_classes": " | + | "good_path": " |
- | "bad_classes": " | + | "bad_path": " |
" | " | ||
" | " | ||
Line 79: | Line 43: | ||
} | } | ||
</ | </ | ||
- | The fields have the following meaning: | + | The fields |
* **input_size**: | * **input_size**: | ||
+ | * **mask_radius**: | ||
+ | |||
+ | The fields in the section **train** have the following meaning: | ||
* **batch_size**: | * **batch_size**: | ||
- | * **good_classes**: Path to folder with good classes. | + | * **good_path**: Path to folder with good classes. |
- | * **bad_classes**: Path to folder with bad classes. | + | * **bad_path**: Path to folder with bad classes. |
- | * **pretrained_weights**: | + | * **pretrained_weights**: |
* **saved_weights_name**: | * **saved_weights_name**: | ||
* **learning_rate**: | * **learning_rate**: | ||
* **nb_epoch**: | * **nb_epoch**: | ||
- | * **nb_early_stop**: | + | * **nb_early_stop**: |
The next step is to run the training: | The next step is to run the training: |