Cell nucleoplasm segmentation method based on gray clustering characteristic distribution
By constructing a self-supervised network and iterative search methods, the problem of inaccurate nucleoplasm extraction in cell images is solved, high-precision nucleoplasm segmentation is achieved, adapting to different staining environments, and detecting accuracy is improved.
Patent Information
- Application Number
- CN202510583182.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-07
- Publication Date
- 2025-08-15
AI Technical Summary
In the prior art, when processing cell images, the extraction site of the nucleoplasm of the cell is inaccurate, and impurities are easily mixed, which affects the detection accuracy.
Using a method based on grayscale clustering characteristic distribution, a self-supervised network was constructed to obtain the cell intensity distribution map of the cell image, iteratively searched for candidate areas of the cell nucleoplasm, and performed precise segmentation, and finally the minimum external contour of the cell nucleoplasm is drawn in the original color map.
It realizes high-precision distinction and identification of nucleoplasm in different staining environments, adapts to different staining conditions, and improves the accuracy and detection accuracy of nucleoplasm segmentation.
Smart Images

Figure CN120496064A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of image processing and biomedical technology, and relates to a cell nucleus-cytoplasm segmentation method based on grayscale clustering characteristic distribution. Background Art
[0002] Nucleoplasm is one of the most fundamental concepts in modern biology. With the advancement of modern diagnostic medicine, the accurate identification and extraction of nucleoplasm has become a crucial task. Nucleoplasm recognition algorithms use algorithms to automatically segment the boundaries of cell components and accurately identify the biological concept of each component within a given cell image. The characteristics of the nucleoplasm are crucial factors in determining whether a cell is cancerous, and have broad application prospects in the field of early cancer cell screening. Segmentation and identification of cell components can undoubtedly improve the accuracy of these components, which has important practical implications for medical testing.
[0003] The accuracy of nucleus-cytoplasm identification depends primarily on two aspects: first, accurate segmentation and identification of the cell components within the image; second, identification and removal of any impurities surrounding the cell image. An effective segmentation method is fundamental to subsequent pathological analysis, so developing a novel nucleus-cytoplasm segmentation method is crucial to overcome the shortcomings of existing technologies. Summary of the Invention
[0004] The purpose of the present invention is to provide a cell nucleus-cytoplasm segmentation method based on the grayscale clustering characteristic distribution, which solves the problem that the existing technology is inaccurate in extracting parts when processing cell images, easily mixed with impurities, and affects the detection accuracy. It can achieve high-precision distinction and identification of cell nucleus and cytoplasm while occupying only a small amount of computing power.
[0005] The technical solution adopted by the present invention is a cell nucleus-cytoplasm segmentation method based on grayscale clustering characteristic distribution, which is implemented according to the following steps: Step 1: Build a self-supervised network to obtain the cell intensity distribution map of the cell image; Step 2: Determine the candidate cell region in the intensity map of cell distribution. The staining intensity of each cell distribution intensity map is different, but the darkest part of the picture must belong to the cell nucleoplasm area. Therefore, an iterative search method is used to solve the candidate area of the cell nucleoplasm; Step 3: Accurately segment the candidate cell region obtained in step 2 to obtain the segmentation result of the cell nucleus and cytoplasm, and finally draw the minimum circumscribed outline of the cell nucleus and cytoplasm in the original color image.
[0006] The present invention has the beneficial effect of obtaining a cell intensity distribution map from a TCT staining image to adapt to different staining conditions; then obtaining candidate nucleoplasm regions from the cell intensity map, and performing a morphological closing operation on the candidate nucleoplasm regions to obtain a nucleoplasm segmentation result. The present invention can adaptively and accurately segment nucleoplasm regions with different characteristics under different staining environments. BRIEF DESCRIPTION OF THE DRAWINGS
[0007] Figure 1 is an input-output relationship diagram of the self-supervisory network used in the method of the present invention; Figure 2 It is a flowchart of the self-supervisory network used in the method of the present invention; Figure 3 This is an example of a TCT staining image of the method of the present invention; Figure 4 This is an example of a cell intensity distribution diagram obtained by the method of the present invention; Figure 5 This is an example of a binary image for extracting a candidate nucleus-cytoplasm region according to the method of the present invention; Figure 6 This is an example of extracting the nucleocytoplasmic connectivity domain of the method of the present invention; Figure 7 This is an example of the effect of the connected domain opening and closing operation of the method of the present invention; Figure 8 is the nucleocytoplasmic region segmentation result obtained by the method of the present invention; Figure 9 are the original image and the final processed image of Example 1 of the method of the present invention; Figure 10 : the original image and the final processed image of Example 2 of the method of the present invention; Figure 11 : the original image and the final processed image of Example 3 of the method of the present invention; Figure 12 : are the original image and the final processed image of Example 4 of the method of the present invention; Figure 13 : are the original image and the final processed image of Example 5 of the method of the present invention; Figure 14 These are the original image and the final processed image of Example 6 of the method of the present invention. DETAILED DESCRIPTION
[0008] The present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.
[0009] The present invention is based on the cell nucleus-cytoplasm recognition algorithm of grayscale clustering characteristic distribution, which is implemented according to the following steps: Step 1: Build a self-supervised network to obtain the cell intensity distribution map of the cell image. In order to ensure the adaptability of dyes from different batches and manufacturers, a self-supervisory network is set up. The input and output relationship of the self-supervisory network is as follows: Figure 1 As shown, the flow chart of the self-supervised network is as follows Figure 2 As shown; Assume that the input cell staining image is of size An image with three color channels , which is converted into an intensity map and recorded as In order to facilitate the correct segmentation of the subsequent nucleoplasm region, the intensity map The intensity level is set to level, and set the intensity value to { }, this step is preferred , the operation process of the self-supervised network is as follows: 1.1) Setting the weight matrix , the initial value is a matrix composed of random numbers distributed in [0, 255]; 1.2) Perform forward calculation, the expression is: , (1) ,here (2) Among them, when the cell image intensity level is set to Level, zk It is k Strength values, w(lk) is the weight matrix No. l Row, No. k List of element value; c(i,j,l) is the input cell staining image exist( i,j ) position l The pixel value of each color channel, l= 1 is the red channel, l= 2 is the green channel, l= 3 is the blue channel; f(x) The mapping function representing the nonlinear neurons of the network; 1.3) Perform reverse calculation, the expression is: , (3) (4) in, emin(l) is the minimum deviation of the reverse calculation, k* represents the serial number of the network neuron that achieves the minimum deviation. w(lk) is the weight matrix No. l Row, No. k List of element value; 1.4) Perform weight matrix correction calculation, the expression is: (5) in, is the iteration intensity coefficient, is an empirical value. To ensure iterative convergence, , w(lk) is the weight matrix No. l Row, No. k Elements of the column; 1.5) Order The loop is iterated until the given number of iterations reaches the given number N, where N is an empirical value determined according to the size of the staining difference of the cell image. Figure 1 As shown, the coloring difference corresponding to the method of the present invention is large, so N=200 is preferred; if the coloring difference is small, the number of iterations N can be appropriately reduced to improve the calculation efficiency; 1.6) After the iterative training is completed, the cell intensity map is obtained , the expression is: , , (6) in, y ( i,j ) is the cell intensity map exist (i,j) Intensity value at the location; like Figure 4 , is to Figure 3 Follow steps 1.1) to 1.6) to obtain an intensity map of cell distribution.
[0010] Step 2: Determine the candidate cell region in the intensity map of cell distribution. Although the staining intensity of almost every cell distribution intensity map is different, the darkest part of the image must belong to the nucleoplasm region. Therefore, an iterative search method is used to solve the candidate regions of the nucleoplasm. The specific process is: 2.1) Get the intensity map The number of pixels that meet the conditions: (7) in, ,function Count the pixels that meet the conditions; 2.2) Calculate the threshold for discriminating cell candidate regions , the expression is: (8) in, The ratio of the size of the nucleus and cytoplasm in the image is too large or too small. The area cannot be the nucleus and cytoplasm. In this step, it is preferred to ; 2.3) Based on threshold , perform binarization on the intensity map to obtain a binary map , in the binary graph In the example, the nucleoplasm is set to black and the non-nucleoplasm is set to white. The expression is: , , (9) For example Figure 3 The intensity diagram shown in Figure 1 is obtained by following formulas (7), (8) and (9): Figure 5 The binary image shown clarifies the candidate cell area.
[0011] Step 3: Accurately segment the candidate cell region obtained in step 2 to obtain the nucleus and cytoplasm segmentation results. 3.1) Label the binary image obtained in step 2.3) (the labeling algorithm is the existing technology). Assume that the obtained label matrix is , the number of labels is , calculate the label matrix as The area of the connected domain marked by the label and each label is expressed as: (10) in, S q It is q The area of the connected domain marked by labels, , lab ( i,j ) is the label matrix exist (i,j) The value of the element at the position, N lab is the number of labels; find (.) means to find the element point that meets the conditions, function Count the pixels that meet the conditions; 3.2) Calculate the label number corresponding to the maximum area of the connected domain marked by the label obtained by formula (10) q* , the expression is: (11) in, S q It is q The area of the connected domain marked by labels, , N lab is the number of labels; 3.3) According to step 3.2), remove the interference area of non-nucleoplasm to obtain a more accurate segmentation result of the nucleoplasm area. , the expression is: , (12) like Figure 6 As shown, it is Figure 5 The segmentation result after step 3.3) is completed.
[0012] 3.4) Segmentation results obtained in step 3.3) , perform morphological closing operation to obtain the segmentation result of cell nucleus and cytoplasm , the expression is: , , (13) Among them, the structural elements The value size is , the origin of the structural element is set to its center point, The value of is based on the degree of defect in the nucleoplasm region obtained in step 3.3), preferably ; So far, the segmentation results of the nucleus and cytoplasm are obtained, such as Figure 7 As shown; 3.5) To facilitate visualization, finally, in the original color image, according to the segmentation results of the nucleus and cytoplasm obtained in step 3.4), the minimum circumscribed contour of the nucleus and cytoplasm is drawn accordingly (the minimum circumscribed contour is obtained by the existing technology), and the following is obtained: Figure 8 The final display result is shown.
[0013] Example 1 Identification object: TCT cell staining image of patient 1.
[0014] According to the aforementioned method of the present invention, implement according to the following steps: Step 1: Build a self-supervised network to obtain the cell intensity distribution map of the cell image. A self-supervisory network is set up, and the input and output relationship of the self-supervisory network is as follows Figure 1 As shown, the flow chart of the self-supervised network is as follows Figure 2 As shown; Assume that the input cell staining image is of size An image with three color channels , which is converted into an intensity map and recorded as , the intensity map The intensity level is set to level, and set the intensity value to { }, , the operation process of the self-supervised network is as follows: 1.1) Setting the weight matrix , the initial value is a matrix composed of random numbers distributed in [0, 255]; 1.2) Perform forward calculation, the expression is: , (1) ,here (2) Among them, when the cell image intensity level is set to Level, zk It is k Strength values, w(lk) is the weight matrix No. l Row, No. k List of element value; c(i,j,l) is the input cell staining image exist( i,j ) position l The pixel value of each color channel, l= 1 is the red channel, l= 2 is the green channel, l= 3 is the blue channel; f(x) The mapping function representing the nonlinear neurons of the network; 1.3) Perform reverse calculation, the expression is: , (3) (4) in, emin(l) is the minimum deviation of the reverse calculation, k * represents the serial number of the network neuron that achieves the minimum deviation. w(lk) is the weight matrix No. l Row, No. k List of element value; 1.4) Perform weight matrix correction calculation, the expression is: (5) in, is the iteration intensity coefficient, is an empirical value. To ensure iterative convergence, , w(lk) is the weight matrix No. l Row, No. k Elements of the column; 1.5) Order Loop iteration, N=200; 1.6) After the iterative training is completed, the cell intensity map is obtained , the expression is: , , (6) in, y ( i,j ) is the cell intensity map exist (i,j) Intensity value at the location; Step 2: Determine the candidate cell region in the intensity map of cell distribution. The candidate regions of the nucleus and cytoplasm are solved by iterative search. The specific process is: 2.1) Get the intensity map The number of pixels that meet the conditions: (7) in, ,function Count the pixels that meet the conditions; 2.2) Calculate the threshold for discriminating cell candidate regions , the expression is: (8) in, is the coefficient of the proportion of the cell nucleus and cytoplasm in the figure, with a value of 0.05; 2.3) Based on threshold , perform binarization on the intensity map to obtain a binary map , in the binary graph In the example, the nucleoplasm is set to black and the non-nucleoplasm is set to white. The expression is: , , (9) Step 3: Accurately segment the candidate cell region obtained in step 2 to obtain the nucleus and cytoplasm segmentation results. 3.1) Label the binary image obtained in step 2.3) Assume that the obtained label matrix is , the number of labels is , calculate the label matrix as The area of the connected domain marked by the label and each label is expressed as: (10) in, S q It is q The area of the connected domain marked by labels, , lab ( i,j ) is the label matrix exist (i,j) The value of the element at the position, N lab is the number of labels; find (.) means to find the element point that meets the conditions, function Count the pixels that meet the conditions; 3.2) Calculate the label number corresponding to the maximum area of the connected domain annotated by the label q* , the expression is: (11) in, S q It is q The area of the connected domain marked by labels, , N lab is the number of labels; 3.3) According to step 3.2), remove the interference area of non-nucleoplasm to obtain a more accurate segmentation result of the nucleoplasm area. , the expression is: , (12) 3.4) Segmentation results obtained in step 3.3) , perform morphological closing operation to obtain the segmentation result of cell nucleus and cytoplasm , the expression is: , , (13) Among them, the structural elements The value size is , the origin of the structural element is set to its center point, The value of is 5; 3.5) Finally, in the original color image, according to the segmentation results of the nucleus and cytoplasm obtained in step 3.4), the minimum circumscribed outline of the nucleus and cytoplasm is drawn accordingly, and the following is obtained: Figure 9 The final display result is shown.
[0015] The specific effects of Example 1 are analyzed as follows: it can resist the complex characteristics of the different shades of staining of the cytoplasm in the cell body, and can detect one of the cell nuclei.
[0016] Example 2 Identification object: TCT cell staining image of patient 2.
[0017] According to the aforementioned method of the present invention, implement according to the following steps: Step 1: Build a self-supervised network to obtain the cell intensity distribution map of the cell image. A self-supervisory network is set up, and the input and output relationship of the self-supervisory network is as follows Figure 1 As shown, the flow chart of the self-supervised network is as follows Figure 2 As shown; Assume that the input cell staining image is of size An image with three color channels , which is converted into an intensity map and recorded as , the intensity map The intensity level is set to level, and set the intensity value to { }, , the operation process of the self-supervised network is as follows: 1.1) Setting the weight matrix , the initial value is a matrix composed of random numbers distributed in [0, 255]; 1.2) Perform forward calculation, the expression is: , (1) ,here (2) Among them, when the cell image intensity level is set to Level, zk It is k Strength values, w(lk) is the weight matrix No. l Row, No. k List of element value; c(i,j,l) is the input cell staining image exist( i,j ) position l The pixel value of each color channel, l= 1 is the red channel, l= 2 is the green channel, l= 3 is the blue channel; f(x) The mapping function representing the nonlinear neurons of the network; 1.3) Perform reverse calculation, the expression is: , (3) (4) in, emin(l) is the minimum deviation of the reverse calculation, k * represents the serial number of the network neuron that achieves the minimum deviation. w(lk) is the weight matrix No. l Row, No. k The element value of the column; 1.4) Perform weight matrix correction calculation, the expression is: (5) in, is the iteration intensity coefficient, is an empirical value. To ensure iterative convergence, , w(lk) is the weight matrix No. l Row, No. k Elements of the column; 1.5) Order Loop iteration, N=180; 1.6) After the iterative training is completed, the cell intensity map is obtained , the expression is: , , (6) in, y ( i,j ) is the cell intensity map exist (i,j) Intensity value at the location; Step 2: Determine the candidate cell region in the intensity map of cell distribution. The candidate regions of the nucleus and cytoplasm are solved by iterative search. The specific process is: 2.1) Get the intensity map The number of pixels that meet the conditions: (7) in, ,function Count the pixels that meet the conditions; 2.2) Calculate the threshold for discriminating cell candidate regions , the expression is: (8) in, is the ratio of the size of the nucleus to the size of the image, and its value is 0.1; 2.3) Based on threshold , perform binarization on the intensity map to obtain a binary map , in the binary graph In the example, the nucleoplasm is set to black and the non-nucleoplasm is set to white. The expression is: , , (9) Step 3: Accurately segment the candidate cell region obtained in step 2 to obtain the nucleus and cytoplasm segmentation results. 3.1) Label the binary image obtained in step 2.3) Assume that the obtained label matrix is , the number of labels is , calculate the label matrix as The area of the connected domain marked by the label and each label is expressed as: (10) in, S q It is q The area of the connected domain marked by labels, , lab ( i,j ) is the label matrix exist (i,j) The value of the element at the position, N lab is the number of labels; find (.) means to find the element point that meets the conditions, function Count the pixels that meet the conditions; 3.2) Calculate the label number corresponding to the maximum area of the connected domain annotated by the label q* , the expression is: (11) in, S q It is q The area of the connected domain marked by labels, , N lab is the number of labels; 3.3) According to step 3.2), remove the interference area of non-nucleoplasm to obtain a more accurate segmentation result of the nucleoplasm area. , the expression is: , (12) 3.4) Segmentation results obtained in step 3.3) , perform morphological closing operation to obtain the segmentation result of cell nucleus and cytoplasm , the expression is: , , (13) Among them, the structural elements The value size is , the origin of the structural element is set to its center point, The value of is 7; 3.5) Finally, in the original color image, according to the segmentation results of the nucleus and cytoplasm obtained in step 3.4), the minimum circumscribed outline of the nucleus and cytoplasm is drawn accordingly, and the following is obtained: Figure 10 The final display result is shown.
[0018] The specific effects of Example 2 are analyzed as follows: it can adapt to the situation of lighter staining, and can also resist the complex characteristics of different shades of staining of the cytoplasm in the cell body, and can detect the cell nucleus and cytoplasm.
[0019] Example 3 Identification object: TCT cell staining image of patient 3.
[0020] According to the aforementioned method of the present invention, implement according to the following steps: Step 1: Build a self-supervised network to obtain the cell intensity distribution map of the cell image. A self-supervisory network is set up, and the input and output relationship of the self-supervisory network is as follows Figure 1 As shown, the flow chart of the self-supervised network is as follows Figure 2 As shown; Assume that the input cell staining image is of size An image with three color channels , which is converted into an intensity map and recorded as , the intensity map The intensity level is set to level, and set the intensity value to { }, , the operation process of the self-supervised network is as follows: 1.1) Setting the weight matrix , the initial value is a matrix composed of random numbers distributed in [0, 255]; 1.2) Perform forward calculation, the expression is: , (1) ,here (2) Among them, when the cell image intensity level is set to Level, zk It is k Strength values, w(lk) is the weight matrix No. l Row, No. k List of element value; c(i,j,l) is the input cell staining image exist( i,j ) position l The pixel value of each color channel, l= 1 is the red channel, l= 2 is the green channel, l= 3 is the blue channel; f(x) The mapping function representing the nonlinear neurons of the network; 1.3) Perform reverse calculation, the expression is: , (3) (4) in, emin(l) is the minimum deviation of the reverse calculation, k * represents the serial number of the network neuron that achieves the minimum deviation. w(lk) is the weight matrix No. l Row, No. k The element value of the column; 1.4) Perform weight matrix correction calculation, the expression is: (5) in, is the iteration intensity coefficient, is an empirical value. To ensure iterative convergence, , w(lk) is the weight matrix No. l Row, No. k Elements of the column; 1.5) Order Loop iteration, N=150; 1.6) After the iterative training is completed, the cell intensity map is obtained , the expression is: , , (6) in, y ( i,j ) is the cell intensity map exist (i,j) Intensity value at the location; Step 2: Determine the candidate cell region in the intensity map of cell distribution. The candidate regions of the nucleus and cytoplasm are solved by iterative search. The specific process is: 2.1) Get the intensity map The number of pixels that meet the conditions: (7) in, ,function Count the pixels that meet the conditions; 2.2) Calculate the threshold for discriminating cell candidate regions , the expression is: (8) in, is the ratio of the size of the nucleus to the size of the image, and its value is 0.03; 2.3) Based on threshold , perform binarization on the intensity map to obtain a binary map , in the binary graph In the example, the nucleoplasm is set to black and the non-nucleoplasm is set to white. The expression is: , , (9) Step 3: Accurately segment the candidate cell region obtained in step 2 to obtain the nucleus and cytoplasm segmentation results. 3.1) Label the binary image obtained in step 2.3) Assume that the obtained label matrix is , the number of labels is , calculate the label matrix as The area of the connected domain marked by the label and each label is expressed as: (10) in, S q It is q The area of the connected domain marked by labels, , lab ( i,j ) is the label matrix exist (i,j) The value of the element at the position, N lab is the number of labels; find (.) means to find the element point that meets the conditions, function Count the pixels that meet the conditions; 3.2) Calculate the label number corresponding to the maximum area of the connected domain annotated by the label q* , the expression is: (11) in, S q It is q The area of the connected domain marked by labels, , N lab is the number of labels; 3.3) According to step 3.2), remove the interference area of non-nucleoplasm to obtain a more accurate segmentation result of the nucleoplasm area. , the expression is: , (12) 3.4) Segmentation results obtained in step 3.3) , perform morphological closing operation to obtain the segmentation result of cell nucleus and cytoplasm , the expression is: , , (13) Among them, the structural elements The value size is , the origin of the structural element is set to its center point, The value of is 9; 3.5) Finally, in the original color image, according to the segmentation results of the nucleus and cytoplasm obtained in step 3.4), the minimum circumscribed outline of the nucleus and cytoplasm is drawn accordingly, and the following is obtained: Figure 11 The final display result is shown.
[0021] The specific effects of Example 3 are analyzed as follows: it can adapt to the situation of lighter staining, and can also resist the situation where the microscope image is somewhat blurred, and can detect cell nucleus and cytoplasm.
[0022] Example 4 Identification object: TCT cell staining image of patient 4.
[0023] According to the aforementioned method of the present invention, implement according to the following steps: Step 1: Build a self-supervised network to obtain the cell intensity distribution map of the cell image. A self-supervisory network is set up, and the input and output relationship of the self-supervisory network is as follows Figure 1 As shown, the flow chart of the self-supervised network is as follows Figure 2 As shown; Assume that the input cell staining image is of size An image with three color channels , which is converted into an intensity map and recorded as , the intensity map The intensity level is set to level, and set the intensity value to { }, , the operation process of the self-supervised network is as follows: 1.1) Setting the weight matrix , the initial value is a matrix composed of random numbers distributed in [0, 255]; 1.2) Perform forward calculation, the expression is: , (1) ,here (2) Among them, when the cell image intensity level is set to Level, zk It is k Strength values, w(lk) is the weight matrix No. l Row, No. k List of element value; c(i,j,l) is the input cell staining image exist( i,j ) position l The pixel value of each color channel, l= 1 is the red channel, l= 2 is the green channel, l= 3 is the blue channel; f(x) The mapping function representing the nonlinear neurons of the network; 1.3) Perform reverse calculation, the expression is: , (3) (4) in, emin(l) is the minimum deviation of the reverse calculation, k * represents the serial number of the network neuron that achieves the minimum deviation. w(lk) is the weight matrix No. l Row, No. k The element value of the column; 1.4) Perform weight matrix correction calculation, the expression is: (5) in, is the iteration intensity coefficient, is an empirical value. To ensure iterative convergence, , w(lk) is the weight matrix No. l Row, No. k Elements of the column; 1.5) Order Loop iteration, N=120; 1.6) After the iterative training is completed, the cell intensity map is obtained , the expression is: , , (6) in, y ( i,j ) is the cell intensity map exist (i,j) Intensity value at the location; Step 2: Determine the candidate cell region in the intensity map of cell distribution. The candidate regions of the nucleus and cytoplasm are solved by iterative search. The specific process is: 2.1) Get the intensity map The number of pixels that meet the conditions: (7) in, ,function Count the pixels that meet the conditions; 2.2) Calculate the threshold for discriminating cell candidate regions , the expression is: (8) in, is the ratio of the size of the nucleus to the size of the image, and its value is 0.03; 2.3) Based on threshold , perform binarization on the intensity map to obtain a binary map , in the binary graph In the example, the nucleoplasm is set to black and the non-nucleoplasm is set to white. The expression is: , , (9) Step 3: Accurately segment the candidate cell region obtained in step 2 to obtain the nucleus and cytoplasm segmentation results. 3.1) Label the binary image obtained in step 2.3) Assume that the obtained label matrix is , the number of labels is , calculate the label matrix as The area of the connected domain marked by the label and each label is expressed as: (10) in, S q It is q The area of the connected domain marked by labels, , lab ( i,j ) is the label matrix exist (i,j) The value of the element at the position, N lab is the number of labels; find (.) means to find the element point that meets the conditions, function Count the pixels that meet the conditions; 3.2) Calculate the label number corresponding to the maximum area of the connected domain annotated by the label q* , the expression is: (11) in, S q It is q The area of the connected domain marked by labels, , N lab is the number of labels; 3.3) According to step 3.2), remove the interference area of non-nucleoplasm to obtain a more accurate segmentation result of the nucleoplasm area. , the expression is: , (12) 3.4) Segmentation results obtained in step 3.3) , perform morphological closing operation to obtain the segmentation result of cell nucleus and cytoplasm , the expression is: , , (13) Among them, the structural elements The value size is , the origin of the structural element is set to its center point, The value of is 11; 3.5) Finally, in the original color image, according to the segmentation results of the nucleus and cytoplasm obtained in step 3.4), the minimum circumscribed outline of the nucleus and cytoplasm is drawn accordingly, and the following is obtained: Figure 12 The final display result is shown.
[0024] The specific effects of this embodiment 4 are analyzed as follows: it can adapt to situations where the staining effect is very different from that of the previous embodiments, can resist the situation where cell bodies in the microscope image overlap, and can detect cell nucleus and cytoplasm.
[0025] Example 5 Identification object: TCT cell staining image of patient 5.
[0026] According to the aforementioned method of the present invention, implement according to the following steps: Step 1: Build a self-supervised network to obtain the cell intensity distribution map of the cell image. A self-supervisory network is set up, and the input and output relationship of the self-supervisory network is as follows Figure 1 As shown, the flow chart of the self-supervised network is as follows Figure 2 As shown; Assume that the input cell staining image is of size An image with three color channels , which is converted into an intensity map and recorded as , the intensity map The intensity level is set to level, and set the intensity value to { }, , the operation process of the self-supervised network is as follows: 1.1) Setting the weight matrix , the initial value is a matrix composed of random numbers distributed in [0, 255]; 1.2) Perform forward calculation, the expression is: , (1) ,here (2) Among them, when the cell image intensity level is set to Level, zk It is k Strength values, w(lk) is the weight matrix No. l Row, No. k List of element value; c(i,j,l) is the input cell staining image exist( i,j ) position l The pixel value of each color channel, l= 1 is the red channel, l= 2 is the green channel, l= 3 is the blue channel; f(x) The mapping function representing the nonlinear neurons of the network; 1.3) Perform reverse calculation, the expression is: , (3) (4) in, emin(l) is the minimum deviation of the reverse calculation, k * represents the serial number of the network neuron that achieves the minimum deviation. w(lk) is the weight matrix No. l Row, No. k The element value of the column; 1.4) Perform weight matrix correction calculation, the expression is: (5) in, is the iteration intensity coefficient, is an empirical value. To ensure iterative convergence, , w(lk) is the weight matrix No. l Row, No. k Elements of the column; 1.5) Order Loop iteration, N=100; 1.6) After the iterative training is completed, the cell intensity map is obtained , the expression is: , , (6) in, y ( i,j ) is the cell intensity map exist (i,j) Intensity value at the location; Step 2: Determine the candidate cell region in the intensity map of cell distribution. The candidate regions of the nucleus and cytoplasm are solved by iterative search. The specific process is: 2.1) Get the intensity map The number of pixels that meet the conditions: (7) in, ,function Count the pixels that meet the conditions; 2.2) Calculate the threshold for discriminating cell candidate regions , the expression is: (8) in, is the ratio of the size of the nucleus to the size of the image, and its value is 0.1; 2.3) Based on threshold , perform binarization on the intensity map to obtain a binary map , in the binary graph In the example, the nucleoplasm is set to black and the non-nucleoplasm is set to white. The expression is: , , (9) Step 3: Accurately segment the candidate cell region obtained in step 2 to obtain the nucleus and cytoplasm segmentation results. 3.1) Label the binary image obtained in step 2.3) Assume that the obtained label matrix is , the number of labels is , calculate the label matrix as The area of the connected domain marked by the label and each label is expressed as: (10) in, S q It is q The area of the connected domain marked by labels, , lab ( i,j ) is the label matrix exist (i,j) The value of the element at the position, N lab is the number of labels; find (.) means to find the element point that meets the conditions, function Count the pixels that meet the conditions; 3.2) Calculate the label number corresponding to the maximum area of the connected domain annotated by the label q* , the expression is: (11) in, S q It is q The area of the connected domain marked by labels, , N lab is the number of labels; 3.3) According to step 3.2), remove the interference area of non-nucleoplasm to obtain a more accurate segmentation result of the nucleoplasm area. , the expression is: , (12) 3.4) Segmentation results obtained in step 3.3) , perform morphological closing operation to obtain the segmentation result of cell nucleus and cytoplasm , the expression is: , , (13) Among them, the structural elements The value size is , the origin of the structural element is set to its center point, The value of is 11; 3.5) Finally, in the original color image, according to the segmentation results of the nucleus and cytoplasm obtained in step 3.4), the minimum circumscribed outline of the nucleus and cytoplasm is drawn accordingly, and the following is obtained: Figure 13 The final display result is shown.
[0027] The specific effect analysis of this embodiment 5 is as follows: the staining image is darker, and there are multiple similar target areas near the cell nucleus and cytoplasm and the distance is very close, so the staining is serious and uneven. However, the above situation can be adapted and the cell nucleus and cytoplasm can be detected.
[0028] Example 6 Identification object: TCT cell staining image of patient 6.
[0029] According to the aforementioned method of the present invention, implement according to the following steps: Step 1: Build a self-supervised network to obtain the cell intensity distribution map of the cell image. A self-supervisory network is set up, and the input and output relationship of the self-supervisory network is as follows Figure 1 As shown, the flow chart of the self-supervised network is as follows Figure 2 As shown; Assume that the input cell staining image is of size An image with three color channels , which is converted into an intensity map and recorded as , the intensity map The intensity level is set to level, and set the intensity value to { }, , the operation process of the self-supervised network is as follows: 1.1) Setting the weight matrix , the initial value is a matrix composed of random numbers distributed in [0, 255]; 1.2) Perform forward calculation, the expression is: , (1) ,here (2) Among them, when the cell image intensity level is set to Level, zk It is k Strength values, w(lk) is the weight matrix No. l Row, No. k List of element value; c(i,j,l) is the input cell staining image exist( i,j ) position l The pixel value of each color channel, l= 1 is the red channel, l= 2 is the green channel, l= 3 is the blue channel; f(x) The mapping function representing the nonlinear neurons of the network; 1.3) Perform reverse calculation, the expression is: , (3) (4) in, emin(l) is the minimum deviation of the reverse calculation, k * represents the serial number of the network neuron that achieves the minimum deviation. w(lk) is the weight matrix No. l Row, No. k The element value of the column; 1.4) Perform weight matrix correction calculation, the expression is: (5) in, is the iteration intensity coefficient, is an empirical value. To ensure iterative convergence, , w(lk) is the weight matrix No. l Row, No. k Elements of the column; 1.5) Order Loop iteration, N=200; 1.6) After the iterative training is completed, the cell intensity map is obtained , the expression is: , , (6) in, y ( i,j ) is the cell intensity map exist (i,j)Intensity value at the location; Step 2: Determine the candidate cell region in the intensity map of cell distribution. The candidate regions of the nucleus and cytoplasm are solved by iterative search. The specific process is: 2.1) Get the intensity map The number of pixels that meet the conditions: (7) in, ,function Count the pixels that meet the conditions; 2.2) Calculate the threshold for discriminating cell candidate regions , the expression is: (8) in, is the ratio of the size of the nucleus and cytoplasm in the figure, and its value is 0.06; 2.3) Based on threshold , perform binarization on the intensity map to obtain a binary map , in the binary graph In the example, the nucleoplasm is set to black and the non-nucleoplasm is set to white. The expression is: , , (9) Step 3: Accurately segment the candidate cell region obtained in step 2 to obtain the nucleus and cytoplasm segmentation results. 3.1) Label the binary image obtained in step 2.3) Assume that the obtained label matrix is , the number of labels is , calculate the label matrix as The area of the connected domain marked by the label and each label is expressed as: (10) in, S q It is q The area of the connected domain marked by labels, , lab ( i,j ) is the label matrix exist (i,j) The value of the element at the position, N lab is the number of labels; find (.) means to find the element point that meets the conditions, function Count the pixels that meet the conditions; 3.2) Calculate the label number corresponding to the maximum area of the connected domain annotated by the label q* , the expression is: (11) in, S q It is q The area of the connected domain marked by labels, , N lab is the number of labels; 3.3) According to step 3.2), remove the interference area of non-nucleoplasm to obtain a more accurate segmentation result of the nucleoplasm area. , the expression is: , (12) 3.4) Segmentation results obtained in step 3.3) , perform morphological closing operation to obtain the segmentation result of cell nucleus and cytoplasm , the expression is: , , (13) Among them, the structural elements The value size is , the origin of the structural element is set to its center point, The value of is 9; 3.5) Finally, in the original color image, according to the segmentation results of the nucleus and cytoplasm obtained in step 3.4), the minimum circumscribed outline of the nucleus and cytoplasm is drawn accordingly, and the following is obtained: Figure 14 The final display result is shown.
[0030] The specific effect analysis of this Example 6 is as follows: the staining image is darker, but because the nucleoplasm is relatively uniform and can be distinguished from the cytoplasm, the nucleoplasm can be detected more accurately.
Claims
1. A cell nucleus-cytoplasm segmentation method based on grayscale clustering characteristic distribution, characterized in that: Follow these steps to implement: Step 1: Build a self-supervised network to obtain the cell intensity distribution map of the cell image; Step 2: Determine the candidate cell region in the intensity map of cell distribution. The staining intensity of each cell distribution intensity map is different, but the darkest part of the picture must belong to the cell nucleoplasm area. Therefore, an iterative search method is used to solve the candidate area of the cell nucleoplasm; Step 3: Accurately segment the candidate cell region obtained in step 2 to obtain the segmentation result of the cell nucleus and cytoplasm, and finally draw the minimum circumscribed outline of the cell nucleus and cytoplasm in the original color image.
2. The cell nucleus-cytoplasm segmentation method based on grayscale clustering characteristic distribution according to claim 1, characterized in that: In step 1, the specific process is: Assume that the input cell staining image is of size An image with three color channels , which is converted into an intensity map and recorded as , the intensity map The intensity level is set to level, and set the intensity value to { }, the operation process of the self-supervised network is as follows: 1.1) Setting the weight matrix , the initial value is a matrix composed of random numbers distributed in [0, 255]; 1.2) Perform forward calculation, the expression is: , (1) ,here (2) Among them, when the cell image intensity level is set to Level, zk It is k Strength values, w(lk) is the weight matrix No. l Row, No. k List of element value; c(i,j,l) is the input cell staining image exist( i,j ) position l The pixel value of each color channel, l= 1 is the red channel, l= 2 is the green channel, l= 3 is the blue channel; f(x) The mapping function representing the nonlinear neurons of the network; 1.3) Perform reverse calculation, the expression is: , (3) (4) in, emin(l) is the minimum deviation of the reverse calculation, k * represents the serial number of the network neuron that achieves the minimum deviation. w(lk) is the weight matrix No. l Row, No. k The element value of the column; 1.4) Perform weight matrix correction calculation, the expression is: (5) in, is the iteration intensity coefficient, w(lk) is the weight matrix No. l Row, No. k Elements of the column; 1.5) Order The loop iterates until the given number of iterations reaches the given number N; 1.6) After the iterative training is completed, the cell intensity map is obtained , the expression is: , , (6) in, y ( i,j ) is the cell intensity map exist (i,j) The intensity value at the position.
3. The cell nucleus-cytoplasm segmentation method based on grayscale clustering characteristic distribution according to claim 2, characterized in that: In step 1, .
4. The cell nucleus-cytoplasm segmentation method based on grayscale clustering characteristic distribution according to claim 1, characterized in that: In step 1.4), ; In step 1.5), N=200.
5. The cell nucleus-cytoplasm segmentation method based on grayscale clustering characteristic distribution according to claim 1, characterized in that: In step 2, the specific process is: 2.1) Get the intensity map The number of pixels that meet the conditions: (7) in, ,function Count the pixels that meet the conditions; 2.2) Calculate the threshold for discriminating cell candidate regions , the expression is: (8) in, is the ratio of the size of the nucleus to the size of the cell nucleus; 2.3) Based on threshold , perform binarization on the intensity map to obtain a binary map , in the binary graph In the example, the nucleoplasm is set to black and the non-nucleoplasm is set to white. The expression is: , , (9) From this, a binary image is obtained, and the candidate cell area is clarified.
6. The cell nucleus-cytoplasm segmentation method based on grayscale clustering characteristic distribution according to claim 5, characterized in that: In step 2.2), .
7. The cell nucleus-cytoplasm segmentation method based on grayscale clustering characteristic distribution according to claim 1, characterized in that: In step 3, the specific process is: 3.1) Label the binary image obtained in step 2.3) Assume that the obtained label matrix is , the number of labels is , calculate the label matrix as The area of the connected domain marked by the label and each label is expressed as: (10) in, S q It is q The area of the connected domain marked by labels, , lab ( i,j ) is the label matrix exist (i,j) The value of the element at the position, N lab is the number of labels; find (.) means to find the element point that meets the conditions, function Count the pixels that meet the conditions; 3.2) Calculate the label number corresponding to the maximum area of the connected domain annotated by the label q* , the expression is: (11) in, S q It is q The area of the connected domain marked by labels, , N lab is the number of labels; 3.3) According to step 3.2), remove the interference area of non-nucleoplasm to obtain a more accurate segmentation result of the nucleoplasm area. , the expression is: , (12) 3.4) Segmentation results obtained in step 3.3) , perform morphological closing operation to obtain the segmentation result of cell nucleus and cytoplasm , the expression is: , , (13) Among them, the structural elements The value size is , the origin of the structural element is set to its center point, The value of is based on the degree of defect in the nucleoplasmic region obtained in step 3.3); At this point, the segmentation results of the nucleus and cytoplasm were obtained; 3.5) In the original color image, based on the nucleus and cytoplasm segmentation results obtained in step 3.4), draw the minimum circumscribed outline of the nucleus and cytoplasm to obtain the final display result.
8. The cell nucleus-cytoplasm segmentation method based on grayscale clustering characteristic distribution according to claim 7, characterized in that: In step 3.4), .
Citation Information
Cited By
Cell image recognition method and device, electronic equipment, medium and program product
CN121811404A