# Computational Methods for Neuron Segmentation in Two-Photon Calcium Imaging Data: A Survey
## 5 Matrix Factorization-Based Methods
### Non-Negative Matrix Factorization-Based Approaches  
In NMF frameworks, the observed data are described by the vector product of two lower rank matrices, one for the spatial footprint and one for temporal footprint along with some additive terms. The spatial and temporal footprints are constrained to be non-negative since neither the spatial coordinates nor the temporal traces of neurons can be negative. [PERSON] et al. formulated the neuron detection problem as an image reconstruction problem where the reconstructed image encodes the location of neuron centres [58]. The shapes of the neurons are encoded by the impulse response of a filter in the forward model and is estimated from training data. First, the neurons are represented in two groups, sparsely expressed and overly expressed neurons. Both of these groups are represented by two separate images, \(X^{(1)}\) and \(X^{(2)}\). These images are then estimated using a matrix factorization framework of four elements where the first element represents the matrix product of spatial and temporal footprints of the neurons, the second element represents the background fluorescence, the third element is white Gaussian noise, while the fourth element is noise from the dendrites. \(X^{(2)}\) and \(X^{(2)}\) are assumed to be independent, so their prior joint probability can be estimated by their individual prior probabilities. These probabilities are proportional to the L1 norms of \(X^{(1)}\) and \(X^{(2)}\). Taking all of these facts into account, \(X^{(1)}\) and \(X^{(2)}\) are estimated by a non-negative matrix factorization framework. This approach has been validated on a manually annotated dataset. It achieved the best performance figures with \(F1=91\%\), \(precision=95\%\) and \(recall=87\%\). This approach has not been validated on an established benchmark, so its performance against other neuron detection approaches is not established. [PERSON] et al. proposed a modular pipeline for enhancement, movement correction and signal extraction in one-photon calcium imaging stacks [59]. Each sub-module can be used as a stand-alone unit for their intended purposes. The enhancement modules removes grainy noise by applying anisotropic diffusion-based noise removal [60]. This is followed by morphological opening operations to remove smaller ROIs which might not be necessarily neurons. The movement correction is achieved by hierarchical video registration. The neural enhancement and motion correction are pre-processing steps which are followed by two more steps for calcium activity extraction. First, an over-complete set of seeds is initialized which might contain many false-positives. Then, this over-complete set is cleansed by applying a two-component Gaussian mixture model (GMM) on the traces of the seeds. The traces with relatively larger fluctuations are retained while the rest are discarded. To further strengthen the cleansing, an offline-trained long short-term memory (LSTM) network is used as a classifier to identify actual calcium spikes. The overlapping seeds which exhibit similar temporal activity are then merged together to remove redundant seeds. After seed initialization and cleansing, a constrained non-negative matrix factorization (CNMF) proposed by [PERSON] et al. [31] is used to extract spatial and temporal footprint of the neurons. The authors have validated MIN1 PIPE on a synthetic video for comparison with other approaches. The authors report a precision of 100% on this video and claim the pipeline successfully avoids almost all of the false positives found by CNMF. Next, the authors validated MIN1 PIPE on calcium imaging stacks obtained from the barrel of the cortex in freely behaving mice. MIN1 PIPE detected 357 potential ROI as compared to 79 by PCA/ICA and 598 by CNFM. The authors have not reported quantitative results on a ground truth, so we cannot evaluate its performance against a baseline. [PERSON] et al.