CN-116630970-B - Rapid high-precision cell identification and segmentation method
Abstract
The invention discloses a rapid high-precision cell identification and segmentation method, which comprises affine and amplification transformation of a cell image and a corresponding mask, calculation of a central mask, construction of a multi-code-automatic encoder model, training of a network model, cell identification segmentation by using the network model, and segmentation of the cell image by using a watershed algorithm to obtain an independent cell image and mask; the method overcomes the defect of lower performance of the traditional algorithm mainly based on semantic segmentation in cell adhesion treatment, absorbs the advantages of the example segmentation algorithm on cell segmentation, avoids the space and the computational complexity caused by using the example segmentation algorithm, and has the beneficial effects of simple model, high compatibility, high speed and strong expansibility.
Inventors
- XIAO HONGJIANG
- CHEN RONGZHOU
- XIAO SHENGPING
Assignees
- 杭州济扶科技有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20230620
Claims (8)
- 1. A rapid high-precision cell identification and segmentation method comprises the following steps: Step 1, giving a random cell image group and a mask corresponding to each cell image, and carrying out affine and amplification transformation on the image group and the mask respectively to obtain a new image group and a new mask corresponding to the new image group; step 2, sequentially calculating pixel centers of cells in the new mask to obtain a center mask; Step 3, constructing a multi-coding-automatic coder model, wherein a new image group is input into the coder model, and the output of the coder model is an implicit space; step 4, performing dimension reduction processing on the hidden space by using a PCA algorithm to obtain a three-dimensional hidden variable; Step 5, clustering the hidden variables by using a self-clustering algorithm K-Means, and changing the hidden variables into a plurality of clusters; Step 6, training the cell mask to identify the network by using the new image group and the new mask in the step 1 and obtaining a first network model after training, and training the cell mask to identify the network by using the new mask group and the mask before being changed in the step 1 and obtaining a second network model after training; step 7, training a first network model and a second network model respectively by utilizing a plurality of clusters in the step 5 to obtain a first optimized model and a second optimized model after optimization; Step 8, calculating a mask of the cell image to be segmented by using the first optimization model Calculating a mask of the image of the cells to be segmented using the second optimization model Then mask with As a seed point, the seed point is used, The method is a prospect, and can be used for realizing accurate segmentation of cells to obtain a single cell mask; The multiple encoding-automatic encoder model in step 3 also varies for different spaces Different encoders are provided Encoder The input being an image The output is an implicit vector A decoder is also arranged in the multi-code-automatic encoder Decoder The input being an implicit vector The output is implicit space 。
- 2. The method of claim 1, wherein the multi-encoder-auto-encoder model in step 3 further comprises providing different encoders for different spatial variations, the encoders having new image sets as inputs and outputs as implicit vectors.
- 3. The method of claim 2, wherein a decoder is further provided in the multi-encoder-auto-encoder model, the decoder takes the implicit vector as input and the output as implicit space.
- 4. The method for rapid and precise cell identification and segmentation according to claim 1, wherein the step 4 uses the hidden space The algorithm performs dimension reduction processing specifically as follows: Step 1, calculating an average value of each dimension in an implicit space; Step 2, subtracting the average value of the corresponding dimension from the data in each dimension of the hidden space to obtain a centralized data matrix; step 3, calculating a covariance matrix of the centralized data matrix; step 4, calculating eigenvalues and eigenvectors of the covariance matrix; Step 5, arranging the characteristic values in a descending order, and selecting characteristic vectors corresponding to the first 3 largest characteristic values to form a projection matrix; And 6, multiplying the centralized data matrix by the projection matrix to obtain the dimension-reduced three-dimensional hidden variable.
- 5. The rapid high-precision cell identification and segmentation method according to claim 1, wherein the number of clusters in step 5 is 3, and the number of clusters is 3 Step 7, the first network model is duplicated in three parts and respectively recorded as The second network model is duplicated in three parts and respectively recorded as 。
- 6. The rapid and high-precision cell identification and segmentation method according to claim 5, wherein the rapid and high-precision cell identification and segmentation method comprises the following steps: Training respectively And And get trained And , Training respectively And And get trained And , Training respectively And And get trained And 。
- 7. The method for rapid and accurate cell identification and segmentation according to claim 1, wherein the first network model and the second network model in step 6 are both composed of The loss functions of both the first network model and the second network model are the same for the backbone network.
- 8. The method of claim 7, wherein the step 6 and the step 7 are performed on the basis that the model training is performed in such a way that the loss function is not significantly changed.
Description
Rapid high-precision cell identification and segmentation method Technical Field The invention relates to the technical field of cell identification and segmentation, in particular to a rapid high-precision cell identification and segmentation method. Background At present, the traditional cell image processing technology mainly adopts an image segmentation algorithm to realize the segmentation of a cell instance, wherein the most common is the traditional algorithms based on threshold segmentation, edge detection, region growth and the like, the algorithms are simple and easy to realize, but the problem of inaccurate segmentation often occurs under the conditions of complex cell morphology, more background noise, high segmentation precision requirement and the like, and along with the development of deep learning, particularly the rising of semantic segmentation and instance segmentation technology, more and more researchers begin to use a deep learning algorithm to process the cell image. The semantic segmentation algorithm based on the threshold mainly depends on the threshold calculated by the maximum internal variance, taking a fluorescent picture as an example, the threshold is regarded as background, and the threshold is regarded as foreground. The method has the greatest defects that complicated picture scenes cannot be processed, particularly impurities and cell areas cannot be effectively distinguished for bright field pictures, even if a window self-adaptive mode is used, the problem cannot be completely solved, background noise is possibly recognized as a prospect, for an organoid image with incomplete fluorescence imaging, a fluorescence signal of an organoid internal structure is weaker, a 'filling-in' algorithm is generally needed to be filled for obtaining a better segmentation result, but the algorithm still has the condition of inaccurate recognition for cells or organoid images with seriously missing internal signals, and because threshold division can only realize front-background distinction, the example segmentation of single cells cannot be realized, and the follow-up processing such as a watershed algorithm is needed. The method is still dependent on a watershed algorithm to realize the example segmentation of single cells like the threshold algorithm, and still can not realize the identification of more accurate single cells for cell images with serious adhesion. The method is characterized in that a model is more complex, and particularly for denser cell images, the spatial and temporal complexity of the network is higher than that of a simple semantic segmentation algorithm, and the algorithm represented by MASK R-CNN mainly predicts different examples/objects into a plurality of layers of MASKs and predicts the classification of the objects corresponding to each layer of MASK. The traditional semantic segmentation algorithm can identify the foreground and the background of the image, but cannot accurately segment the cells, so that the cells need to be further processed by using algorithms such as water-flooding filling, and the like, while the instance segmentation network can directly identify the position and the outline of each cell, but requires more data and calculation resources to train and run the model, and the response time is long. Aiming at the problems, the invention provides a novel rapid high-precision cell instance segmentation algorithm, which realizes high-precision instance segmentation of cell images by comprehensively utilizing various advanced technologies such as feature extraction, dimension reduction processing, clustering, model training, fine tuning and the like. Therefore, the invention has wide application prospect and can be used in the fields of biological research, medical diagnosis, drug research and development and the like. Disclosure of Invention The invention aims to provide a rapid and high-precision cell identification and segmentation method so as to solve the problems in the background technology. In order to achieve the purpose, the invention provides the following technical scheme that the rapid high-precision cell identification and segmentation method comprises the following steps: step 1, given any group of cell image groups and masks corresponding to each cell image, affine and amplifying the image groups and the masks respectively to obtain new images And a corresponding new mask; step 2, sequentially calculating pixel centers of cells in the new mask to obtain a center mask; Step 3, constructing a multi-coding-automatic coder model, wherein a new image group is input into the coder model, and the output of the coder model is an implicit space; step 4, performing dimension reduction processing on the hidden space by using a PCA algorithm to obtain a three-dimensional hidden variable; Step 5, clustering the hidden variables by using a self-clustering algorithm K-Means, and changing the hidden variables into a plurality of clusters;