-
Notifications
You must be signed in to change notification settings - Fork 1
Automated segmentation
This phase of the project was led by Zetta AI.
Details to come, but largely this followed segmentation approaches previously applied in FAFB and FANC.
Details to come, but largely this followed segmentation approaches previously applied in FAFB and FANC.
Written by Alex Bae @ Zetta AI
Synapse detection is a two-step process: 1) Postsynaptic terminal detection and 2) synaptic partner assignment. For the postsynaptic terminal detection, the network is trained to detect the postsynaptic terminals, labeled at the postsynaptic sites roughly along the cleft. For the synaptic partner assignment, the network is trained to detect the presynaptic mask and postsynaptic mask. The cell segments with the highest mean probability for presynaptic and postsynaptic masks are assigned as the presynaptic and postsynaptic cells, respectively, under the assumption that there is only one presynaptic cell and one postsynaptic cell.
Postsynaptic terminal detection processes raw EM images as input and generates a probability map indicating the likelihood of each pixel belonging to the postsynaptic terminal. The model has been fine-tuned based on the FAFB detection model with additional postsynaptic terminal labels in BANC. The model was trained in resolution of 8 x 8 x 45 nm3 with input patch size of 128 x 128 x 20. The predicted output was downsampled by factor of 2 then thresholded with pixel value of 0.12. The postsynaptic terminal segments were generated by finding the connected components with 26-connectivity. The detected terminal may overlap with multiple cells, so the segmented terminal was divided based on the cell segments to ensure each terminal corresponds to a single cell segment. The postsynaptic terminal segment less than 3 voxels in 16 x 16 x 45 nm3 were removed.
Synaptic partner assignment predicts two outputs from the raw EM image centered around the detected postsynaptic terminal, the probability map indicating the probability of each pixel belonging to the presynaptic and postsynaptic cells. Assignment model was trained in resolution of 16 x 16 x 45 nm3 with input patch size of 24 x 24 x 8. Same assignment model from FAFB was used without any fine tuning. Assignment model assumes a single presynaptic cell and single postsynaptic cell for each postsynaptic terminal so it can only detect one connection when a postsynaptic terminal receives inputs from multiple presynaptic cells. To prevent overlapping assignment, detected postsynaptic terminals located within 200 nm based on their centroids are merged into one terminal to assign the partners.
The results can be visualized by line annotations where the end points represent the locations of presynaptic and postsynaptic sites. The location of each site is computed by following procedures. Once the presynaptic of the postsynaptic cell is determined within the patch, the closest voxel to the cell segment from any point in the postsynaptic terminal segment is determined. Then, the patch is redrawn centered around the identified coordinate, and the mean coordinates of voxels that belong to the intended cell segment is computed. Lastly, the algorithm determines the location coordinate by taking the closest voxel of the cell segment from the mean coordinates. The final results are stored in DataFrame format. Please see the details below for the meaning of each column.
Name | Contents |
---|---|
cleft_segid | Postsynaptic segment id |
centroid_x, y, z | Centroid coordinates of postsynaptic terminal in 16 x 16 x 45 nm3 resolution |
bbox_bx, by, bz | Start points of bounding box surrounding the postsynaptic terminal in 16 x 16 x 45 nm3 resolution |
bbox_ex, ey, ez | End points of bounding box surrounding the postsynaptic terminal in 16 x 16 x 45 nm3 resolution |
presyn_segid | Presynaptic cell id |
postsyn_segid | Postsynaptic cell id |
presyn_x, y, z | Location coordinates of presynaptic cell in 16 x 16 x 45 nm3 resolution |
postsyn_x, y, z | Location coordinates of postsynaptic cell in 16 x 16 x 45 nm3 resolution |
size | Size of postsynaptic terminal in voxels |