# Computational Methods for Neuron Segmentation in Two-Photon Calcium Imaging Data: A Survey
## 6 Machine Learning-Based Methods  
### ML Methods Applied to Summary Images  
In this sub-section, we cover all those ML/DL based approaches which apply an ML/DL algorithm to the summary images of the input stacks. Therefore, the first step of these approaches after preprocessing is always the extraction of an appropriate summary image. [PERSON] et al. [74] proposed a multi-staged classification pipeline to determine which pixel belongs to a neuron or otherwise. The first two stages consist of robust-boostclassifiers [75]. The first stage classifier classifies every pixel into neuron and non-neuron classes based on eight statistical features. A median filter is then used to remove small regions falsely identified as neurons. The second stage classifier is another robust-boost classifier which classifies if a candidate neuron is actually a neuron or false positive based on six morphological features. The output probability map is then thresholded and neurons are segmented using connected thresholds. The authors have tested their approach on 64 different datasets, resulting from 16 different regions imaged over 4 trials on 4 mice. Each data set consisted of 200 frames at a resolution of \(256\times 256\) pixels. They have reported a test error of 7% and ROC curve maxing at 0.97. [PERSON] et al. [76] proposed a two staged neuron detection pipeline. In the first stage, the raw image stack is first denoised by taking a moving average along temporal axis. Then they normalize the stack using local maxima and minima along temporal axis. After normalization, they generate a reference image by taking maximum value along temporal axis and an average image by taking average value along temporal axis. They binarize the reference image using Local Adaptive Thresholding Algorithm (LATA) [77]. After binarization, they use watershed algorithm on the binary and reference image to create intermediate segmentation mask. To separate neurons from non-neuron blobs in the segmentation mask, they train a three layered CNN. The first and second layers consist of a convolutional layer followed by a max-pooling layer while the third layer is fully connected layer generating two outputs, 1 for neurons and 0 for otherwise. They have evaluated their pipeline on nine manually annotated image stacks and reported F1 score of \(85\%\pm 1\%\). They have not reported the performance of their pipeline on any benchmarks, so it is hard to compare their pipeline against other state-of-the-art approaches. [PERSON] et al. [78] proposed a standard UNet [21] based neuron segmentation pipeline. They create a single mean summary image by taking average value across temporal dimension. This operation flattens the temporal dimension and converts 3D stack into a 2D image. Then they apply a UNet on \(128\times 128\) patch of the summary image to segment the neurons. The UNet is composed of an input layer, three encoding layers, one middle layer, three decoding layers and an output layer. The input layer has two \(3\times 3\) convolutional operations with 32 filters each. First encoding layer consists of two \(3\times 3\) convolutional layers with 64 filters each and a 0.25 dropout layer. The second encoding layer consists of two \(3\times 3\) convolutional layers with 128 filters each and a 0.5 dropout layer. The third encoding layer consists of two \(3\times 3\) convolutional layers with 256 filters each and a 0.5 dropout layer. The middle encoding layer consists of two \(3\times 3\) convolutional layers with 512 filters each and a 0.5 dropout layer. Each decoding layer consists of concatenation, two \(3\times 3\) convolutions, a \(3\times 3\) deconvolution and dropout.