This version (2019/10/14 10:49) was approved by twagner.The Previously approved version (2019/09/20 10:08) is available.Diff

Here you can find how to apply the general models we trained for you. If you would like to train your own general model, please see our extra wiki page: How to train your own general model.

Our general models can be found and downloaded here: Download and Installation.

If you followed the installation instructions, you now have to activate the cryolo virtual environment with

source activate cryolo

You can use crYOLO either by command line or by using the GUI. The GUI should be easier for most users. You can start it with:


The crYOLO GUI is essentially a visualization of the command line interface. On left side, you find all possible “Actions”:

  • config: With this action you create the configuration file that you need to run crYOLO.
  • train: This action lets you train crYOLO from scratch or refine an existing model.
  • predict: If you have a (pre)trained model you can pick particles in your data set using this command.
  • evaluation: This action helps you to quantify the quality of your model.

Each action has several parameters which are organized in tabs. Once you have chosen your settings you can press [Start] (just as example, don't press it now ;-)), the command will be applied and crYOLO shows you the output:

It will tell you if something went wrong. Moreover, it will tell you all parameters used. Pressing [Back] brings you back to your settings, where you can either edit the settings (in case something went wrong) or go to the next action.

2019/09/13 20:00 · twagner

In the GUI choose the config action. Fill in your target box size and leave the train_image_folder and train_annot_folder fields empty.

There are three general models available. It is important that you choose the same filtering options in “Denoising options” tab as we did during training the general models. In the following are the filtering settings that we used for the respective general models:

  • General model trained for low-pass filtered images : Select filter “LOWPASS” and low_pass_cutoff of 0.1
  • General model trained for JANNI-denoised images: Select filter “JANNI” and the janni general model for janni_model. Keep the defaults for janni_overlap and janni_batches
  • General model for negative stain images: Select filter “NONE”

► Press the [Start] button to write the configuration file to disk.

Alternative: Create the configuration file using the command line

Click to display ⇲

Click to hide ⇱

In the following I assume that you target box size is 220. Please adapt if necessary.

For the general Phosaurus network trained for low-pass filtered cryo images run:

cryolo_gui.py config config_cryolo_.json 220 --filter LOWPASS --low_pass_cutoff 0.1

For the general model trained with neural-network denoised cryo images (with JANNI's general model) run:

cryolo_gui.py config config_cryolo_.json 220 --filter JANNI --janni_model /path/to/janni_general_model.h5

For the general model for negative stain data please run:

cryolo_gui.py config config_cryolo_.json 220 --filter NONE

Select the action “predict” and fill all arguments in the “Required arguments” tab:

Adjusting confidence threshold

In crYOLO, all particles have an assigned confidence value. By default, all particles with a confidence value below 0.3 are discarded. If you want to pick less or more conservatively you might want to change this confidence threshold to a less (e.g. 0.2) or more (e.g. 0.4) conservative value in the “Optional arguments” tab. However, it is much easier to select the best threshold after picking using the CBOX files written by crYOLO as described in the next section.

You will find the picked particles in your specified output directory.

► Press the the [Start] button to run the prediction.

Alternative: Run prediction from the command line
<hidden> To pick all your images in the directory full_data with the model weight file cryolo_model.h5 (e.g. or gmodel_phosnet_X_Y.h5 when using the general model) and and a confidence threshold of 0.3 run::

cryolo_predict.py -c config.json -w cryolo_model.h5 -i full_data/ -g 0 -o boxfiles/ -t 0.3

You will find the picked particles in the directory boxfiles. </hidden initialState=“visible”>

2019/09/14 10:12 · twagner

To visualize your results you can use the box manager:


Now press File → Open image folder and the select the full_data directory. The first image should pop up. Then you import the box files with File → Import box files and select in the boxfiles folder the EMAN directory (or EMAN_HELIX_SEGMENTED in case of filaments).

The following does not yet work for filaments.

CrYOLO writes cbox files in a separate CBOX folder. You can import these into the box manager which enables a slider in the GUI that allows you to change the confidence threshold and see the results in a live preview. You can then write the new box selection into a new box file.

This example shows how to filter particle boxes using the crYOLO boxmanager. It is an animated GIF. Click on it to see it playing.
2019/09/14 10:18 · twagner
  • pipeline/window/cryolo/picking_general.txt
  • Last modified: 2019/10/11 17:11
  • by twagner