Table of Contents

Particle Picking with Convolution Neural Network

Update 2018-1-24 EMAN2.21

In EMAN2.2 release and later version, the neural network particle picking is built in e2boxer.py

Launch e2boxer from e2projectmanager.py, choose Neural Net in Autoboxing Methods panel. Click Good Refs in Mouse Mode panel, choose a few good particles (~10 is usually enough, having more may help). Make sure to choose the good particles over micrographs of different defocus range, and the particles are centered. Then click Bad Refs, and pick some non-particles things in micrograph, like background noise and ice contamination (N>50). Click Train in the Autoboxing Methods panel. Look at the command line output. When it says done, click Autobox or Autobox All to box particles. The Auto-boxed particles are sorted by their score. Shift-click a particle to remove it, or Control-Shift-click a particle to remove this particles and all the particles after this one.

 e2boxer | width=800

Old Tutorial (deprecated)

EMAN2 daily build after 2015-11-06

The program can be found in:

//EMAN2/examples/convnet_pickparticle.py//

This program is developed by Muyuan Chen. Please contact muyuanc@bcm.edu if you have any questions.

Here we train a stack of convolutional neural nets to recognize particles in the micrograph. The basic structure of the convolutional net used in this program is described here:

http://deeplearning.net/tutorial/lenet.html

This program requires Theano, in addition to other EMAN2 dependencies. Guide to install Theano can be found here:

http://deeplearning.net/software/theano/install.html

This program runs on GPU if the GPU environment is set up in Theano. If not, it should be able to run on CPU, but the speed may be slower. Also, some functions (not very useful at this point) will be disabled if CPU is used.

Example

We use some IP3R images as a example.

 input micrograph | width=800

Making Training Set

 particles training set | width=800

 negative training set | width=800

Train the convolutional network

convnet_pickparticle.py ptcls_train.hdf –ngtvs ngtv_train.hdf –shrink 2 –trainout We shrink the particles by 2 for speed. Specify the –trainout option so the program will output the result on the training set.

 convolution training output | width=800

In stack display, toggle on the value called “label”. Resize the view so that there are 3*N images in each row. Here for each 3 images, the first one is one particle or noise sample, the second one is the output from the first layer of the neural net, and the third one is the final output of the classification layer of the neural net. Real particles have the label value of 1, while negative samples have label 0.

Due to some Theano issue, if the program is run on CPU, the second image (output from the first layer) will not display.

In a satisfying training, each third image (classification layer output) of a particle should be a bright ball, while the third image for a negative sample should be empty.

convnet_pickparticle.py –teston testimg.hdf

When the program finishes, you should see a new file called //"testresult.hdf"// in the folder. It is an image stack with two images. Open it with //Show 2D// in //e2display//.

 convolution training test on image | width=800

The first image is a filtered version of the input, and the second image is the output of the neural net. The particles should be highlighted in the second image. Note in this case some large ice contaminations are recognized as particles in this case but it generally looks fine. 

Box particles

convnet_pickparticle.py –teston micrographs –shrink 2 Here micrographs is the folder of all your micrographs. The program will apply the convolutional net on all images in the folder, find the particles and save as EMAN2 particle box format. Please make sure the shrink option is the same as in the training command.

e2boxer.py micrographs/*.mrc Auto-picked particles will show up as “manual picked particles” here.

 boxer | width=800

 boxer  | width=800

A zoomed in view of the particles:

 result  | width=800

 result  | width=800

That's it~

Muyuan