First-time autoscreening setup » History » Revision 6
Revision 5 (Anchi Cheng, 03/15/2022 12:56 PM) → Revision 6/17 (Anchi Cheng, 03/15/2022 01:47 PM)
h1. Smart-leginon multi-grid autoscreening Automated square and hole finders are added to leginon to use Ptolemy (https://arxiv.org/abs/2112.01534) to determine optimal targets using computer vision algorithm and Convolutional Neural Network trained on user target selections accumulated at Simons Electron Microscopy Center at New York Biology Center (SEMC@NYSBC. This implementation requires Ptolemy which has a separate license. For this release, the communication is through command line interface and rely on shared file system. * At SEMC@NYSBC, Ptolemy, which was tested on python 3.9, runs in anaconda environment on the same CentOS7 computer where the main leginon process is. h2. Install Ptolemy and setup shell scripts to use its cli for [[Setup Ptolemy CLI shell script|grid square finding]] and [[Setup Ptolemy CLI for exposure targeting|exposure target hole finding]] h2. Upload MSI-Ptolemy application into leginon database Follow the instruction in [[Applications|web application tools]] * Note: If your system needs two Leginon client opened, each on a different pc, use MSi-Ptolemy2.xml If you have your own application you can do the following replacement by [[Use_the_Application_Editor_to_create_Leginon_applications|editing your application]] : Square Targeting Node : MosaicClickTargetFinder class => MosaicScoreTargetFinder Exposure Targeting Node: JAHCFinder => ScoreTargetFinder h2. Start Leginon Rrun MSi-Ptolemy and acquire a grid atlas. This can be used for setting up. h2. Setup Square Targeting Finding Node h3. Set, in Blobs Settings, the script to run as */path_to/sq_finder.sh* h3. Define target area size sampling in the settings next to "acquisition" target panel. Enter # Maximal number of squares to select # Number of target group to sample For example, total of 12 squares selected in 3 groups means the program divided out all blob squares with valid area range into 3 size group (small, medium,and large). It then choose 4 blob squares in each group with highest score given by Ptolemy as the output square targets. High score in Ptolemy result means it is more likely to be a good square. h3. Set the limits of the square area range in "Thresholded" settings. You can set it directly. However, it is easier to select a number of examples targets including the smallest and the largest grid square you will choose and then click on the auto square finding tool on the toolbar. Leginon will use the example targets to set the limits of the square area. !Square_FindingGUI.png! h3. Activate auto finding in the main settings dialog. Shortest path can be applied in ordering the resulting targets as well. !ProcessingSettings.png! h2. Setup Exposure Targeting Node h3.Define Hole Settings * the script to run as */path_to/hl_finder.sh* or whatever path your shell script is located. * the json key for threshold the result. For Ptolemy, this should be "score" * the minimal key value to accept. For Ptolemy, the probability score range is 0-1. We tend to use a very small number to only rule out the obvious bad holes. 0.01, for example. !score_finding.png! h3. Define Ice thickness thresholding Like JAHC template hole finder, you can narrow the selection in Leginon with hole statistics calculation and create template for convolution. The interface is similar to JAHC hole finder. h3. Define target sampling For screening, you may not want all target found to be acquired. Use Acquisition Target Sampling section to achieve this: [[Settings for Target Sampling]]