Immune cell image segmentation method and system based on multi-instance learning

Through the multi-instance learning method, positive immune cell counting and instance classifiers are used, combined with the density-peak clustering algorithm, to solve the problem of label data acquisition in immune quantitative analysis, achieve accurate counting, segmentation and positioning of immune cells, and improve analysis automation and accuracy.

CN118629037APending Publication Date: 2024-09-10TONGJI HOSPITAL ATTACHED TO TONGJI MEDICAL COLLEGE HUAZHONG SCI TECH
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202410750099.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-12
Publication Date
2024-09-10

AI Technical Summary

Technical Problem

In immunoquantification analysis, the cost of obtaining labeled data is high and the labeling process is complex. It is difficult to use limited labeled data to learn efficient representations, which affects the accuracy of cell segmentation and positioning.

Method used

Using a method based on multi-instance learning, positive immune cell counts are used as supervised labels to construct a cell counting network, instance classifier and segmentation network, combined with top-k adaptive instance selection and density-peak clustering algorithm, to achieve the collection of immune cells Count, segment and locate.

Benefits of technology

It improves the automation of quantitative immune analysis, provides objective and quantifiable evaluation indicators, enhances the generalization ability and training effect of the model, reduces computational costs, and is suitable for immunohistochemically stained cell images and other staining methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118629037A
    Figure CN118629037A
Patent Text Reader

Abstract

The invention discloses an immune cell image segmentation method and system based on multi-instance learning. The system comprises (1) a cell counting regression network module used for predicting the number of positive cells on an immunohistochemical staining cell image; (2) a super-pixel instance classifier: obtaining instances by sliding a window on the image, training the classifier and then predicting an instance classification probability on the whole image so as to obtain a super-pixel level rough segmentation mask; and (3) a pixel-level segmentation network module which takes the refined mask as a supervision pseudo label, obtains a segmentation mask of the whole image, and generates a cell localization point from the mask based on a density-peak clustering algorithm. According to the method, positive immune cells are taken as recognition units, positive cell counting is taken as a supervision label, a cell counting network, an instance classifier and a segmentation network are constructed on an immunohistochemical staining cell image by using a convolutional neural network, and the method is an immune quantitative analysis method integrating cell counting, segmentation and positioning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of immune quantitative analysis, and in particular to an immune cell image segmentation method and system based on multi-instance learning. Background Art

[0002] As the first line of defense against cancer, the importance of the human immune system cannot be ignored. Immunotherapy inhibits the proliferation of cancer cells or kills cancer cells by activating the immune system. For example, when cancer cells accumulate in large numbers to form tumors, tumor-infiltrating lymphocytes induce inflammatory responses in the tumor-occurring area to fight the tumor.

[0003] Traditional cancer diagnosis and treatment methods mainly rely on pathologists' qualitative description of immunopathological cell images. However, this method has limitations such as low accuracy and poor interpretability. As a prerequisite for precise diagnosis and treatment, quantitative analysis is becoming increasingly important. Immune quantitative analysis is based on the histochemical staining and quantification methods of immune cells. By accurately counting, segmenting and locating immune cells, it provides objective and quantifiable evaluation indicators for cancer prognosis and treatment. In immune quantitative analysis, the density of tumor-infiltrating lymphocytes is an important indicator for cancer prognosis evaluation.

[0004] In recent years, with the rapid development of deep learning technology, its application in quantitative immune analysis has gradually increased. Deep learning models can efficiently and accurately complete tasks such as cell counting, segmentation and positioning, providing a powerful tool for quantitative immune analysis. However, a common problem faced by deep learning tasks is the source of labeled data. For cell segmentation and positioning tasks, fine mask labels and center positioning points are required for training, but the acquisition cost of such labels is high and the labeling process is complicated. Therefore, how to use limited labeled data to learn efficient representation has become an important issue that researchers in the field of quantitative immune analysis need to face.

[0005] In summary, immune quantitative analysis, as an evaluation method based on accurate counting, segmentation and localization of immune cells, provides objective and quantifiable evaluation indicators for cancer prognosis and treatment. The high efficiency and accuracy of deep learning technology provide a powerful tool for immune quantitative analysis. However, it is still very challenging to obtain labeled data. Researchers need to explore the use of limited labeled data to learn efficient representations for immune quantitative analysis. Summary of the invention

[0006] The purpose of the present invention is to provide an immune cell image segmentation method and system based on multi-instance learning. The method uses positive immune cells as identification units and positive cell counts as supervisory labels, and uses convolutional neural networks to construct cell counting networks, instance classifiers, and segmentation networks on immunohistochemically stained cell images, thereby realizing a new multi-stage automatic immune quantitative analysis method and system that integrates counting, segmentation, and positioning.

[0007] In order to achieve the above object, the present invention adopts the following technical solution:

[0008] In a first aspect of the present invention, a method for immune cell image segmentation based on multiple instance learning is provided, the method comprising:

[0009] Step S1, extracting features of the input immunohistochemical staining cell image, obtaining the number of positive immune cells through the features, and performing rounding operation on the number of positive immune cells;

[0010] Step S2, obtaining instances by sliding a window on the immunohistochemically stained cell image, using top-k adaptive instance selection to train instances and predict the probability scores of positive cells; then obtaining a rough segmentation mask at the superpixel level based on the positive probability scores and combined with a threshold;

[0011] Step S3, refining the coarse segmentation mask at the superpixel level in combination with image information to obtain a refined mask;

[0012] Step S4, using the refined mask as a supervised pseudo-label to obtain a positive cell segmentation mask with pixel-level accuracy for the entire image to achieve separation, and generating cell center positioning points from the positive cell segmentation mask based on a density-peak clustering algorithm to achieve immune-positive cell positioning.

[0013] Furthermore, in the top-k adaptive instance selection method,

[0014] At the beginning of each training round, the image is sampled with a sliding window according to a fixed step size to obtain the entire instance set, and the sliding window size is larger than the step size;

[0015] Extract the features of all instances and obtain the probability score of each instance containing positive cells;

[0016] Sort all instances of each image in descending order of positive probability scores;

[0017] Select positive and negative instances according to the positive cell count labels of the image, that is, if the count label Ci of image i is equal to 0, select the first Kn instances and assign them negative labels; if the count label Ci of image i is greater than 0, select the first Kp×Ci instances and assign them positive labels;

[0018] The selected positive and negative instance training sets are trained.

[0019] Furthermore, the step of refining the coarse segmentation mask at the superpixel level in combination with the image information to obtain a refined mask includes:

[0020] Threshold the brightness channel in the HSV color channel of the image to obtain the HSV channel threshold mask;

[0021] Obtaining a rough mask by pixel-level bit operation, and fusing the rough mask with the HSV channel threshold mask to generate an initial refined mask;

[0022] Then, the isolated small areas in the initial refined mask are removed, and the small holes are filled to obtain the HSV channel threshold mask.

[0023] In a second aspect of the present invention, a system for immune cell image segmentation based on multiple instance learning is provided, the system comprising:

[0024] Cell counting regression network module: used to predict the number of positive cells in immunohistochemical staining cell images and perform rounding operations on them;

[0025] Superpixel instance classifier: used to obtain instances by sliding a window on the image, select instances using the top-k adaptive instance selection method for training, and then predict the probability score of positive cells; then, according to the instance positive probability score and combined with the threshold, a rough segmentation mask at the superpixel level is obtained;

[0026] A refinement mask module: used to refine the coarse segmentation mask at the superpixel level in combination with image information to obtain a refinement mask;

[0027] Pixel-level segmentation network module: Using the refined mask as a supervised pseudo-label, a positive cell segmentation mask with pixel-level accuracy for the entire image is obtained to achieve image segmentation, and cell location points are generated from the positive cell segmentation mask based on a density-peak clustering algorithm to achieve immune-positive cell location.

[0028] Further, the cell counting regression network module includes a first encoder and a regressor;

[0029] The first encoder is used to extract features of immunohistochemical staining cell images, wherein the features of immunohistochemical staining cell images include width and height;

[0030] The regressor is used to input and process the immunohistochemical staining cell image features to obtain a target quantity of positive immune cells; and to perform a rounding operation on the target quantity of positive immune cells.

[0031] Further, the superpixel instance classifier includes a second encoder and a classifier;

[0032] The second encoder: based on a multi-instance learning mode, regards the image as a bag, slides a square window with equal steps on the image to sample a set of image instances, and extracts features from all the selected instances to obtain instance features;

[0033] The classifier is used to classify the instance features to obtain a probability score that the instance contains positive cells; and to obtain a rough segmentation mask of the entire image based on the instance positive probability score combined with a threshold.

[0034] Further, the pixel-level segmentation network module includes: a third encoder, a convolutional network decoder and a positioning unit;

[0035] The third encoder is used to extract image features;

[0036] Convolutional network decoder: used to obtain the positive cell segmentation mask with pixel-level accuracy of the whole image based on the extracted image features and then use the refined mask as a supervised pseudo-label to achieve image segmentation;

[0037] A positioning unit is used to generate positive cell positioning points based on the positive cell segmentation mask using a density-peak clustering algorithm to achieve immune-positive cell positioning.

[0038] In a third aspect of the present invention, a computer device is provided, comprising a memory, a processor and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the method.

[0039] In a fourth aspect of the present invention, a computer-readable storage medium is provided, on which a computer program / instruction is stored, and when the computer program / instruction is executed by a processor, the steps of the method are implemented.

[0040] In a fifth aspect of the present invention, there is provided a computer program product comprising a computer program / instructions which, when executed by a processor, implement the steps of the method.

[0041] One or more technical solutions in the embodiments of the present invention have at least the following technical effects or advantages:

[0042] (1) The immune cell image segmentation method based on multi-instance learning proposed in the present invention can capture and utilize image information at different levels, so as to accurately count, segment and locate positive immune cells in immunohistochemically stained cell images, thereby improving the automation level of immune quantitative analysis and providing objective and quantifiable evaluation indicators for cancer prognosis and treatment.

[0043] (2) The immune cell image segmentation method based on multi-instance learning proposed in the present invention adopts a specially designed top-k adaptive instance selection method in the training process of the superpixel instance classifier, which can effectively use the counting labels to obtain segmentation pseudo labels, thereby improving the generalization ability of the model. At the same time, by using the cell counting labels as supervisory information, the present invention can make up for the difficulty of obtaining fine-grained labels and using coarse-grained labels in the field of immune quantitative analysis to a certain extent, thereby improving the training effect of the model.

[0044] (3) The immune cell image segmentation method based on multi-instance learning proposed in the present invention reuses the ResNet-50 encoder in the cell counting regression network, superpixel instance classifier and pixel-level segmentation network, and keeps the encoder parameters unchanged during the training process through the parameter freezing strategy, retaining the knowledge learned on the source task, which is more conducive to model convergence and achieving better results, while reducing the computational cost and improving the stability of the model and training efficiency.

[0045] The immune cell image segmentation method based on multi-instance learning proposed in the present invention is a universal multi-stage quantitative analysis method for immunohistochemical stained cell images under the supervision of counting labels, which integrates counting, segmentation and positioning functions. This method is not only suitable for immunohistochemical stained cell images, but also for quantitative analysis tasks of other staining methods. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0047] Figure 1 This is a flow chart of the immune cell image segmentation method based on multiple instance learning proposed by the present invention;

[0048] Figure 2 The structure of the regressor in the cell counting regression network;

[0049] Figure 3 is the structure of the classifier in the superpixel instance classifier;

[0050] Figure 4 It is the structure of the pixel-level segmentation network;

[0051] Figure 5 This is a structural diagram of the immune cell image segmentation system based on multi-instance learning proposed by the present invention; the accompanying drawings in the figure are marked as follows: 100, cell counting regression network module; 110, first encoder; 120, regressor;

[0052] 200, superpixel instance classifier; 210, second encoder; 220, classifier;

[0053] 300, refinement mask module;

[0054] 400, pixel-level segmentation network module; 410, third encoder; 420, convolutional network decoder; 430, positioning unit;

[0055] Figure 6 The comparison results of the classification and segmentation accuracy of cell images in Experimental Example 1. DETAILED DESCRIPTION

[0056] The present invention will be described in detail below in conjunction with specific implementations and examples, and the advantages and various effects of the present invention will be more clearly presented. It should be understood by those skilled in the art that these specific implementations and examples are used to illustrate the present invention, rather than to limit the present invention.

[0057] Throughout the specification, unless otherwise specifically stated, the terms used herein should be understood as meanings commonly used in the art. Therefore, unless otherwise defined, all technical and scientific terms used herein have the same meanings as those generally understood by those skilled in the art to which the present invention belongs. In the event of a conflict, the present specification takes precedence.

[0058] Unless otherwise specified, various raw materials, reagents, instruments and equipment used in the present invention can be purchased from the market or obtained by existing methods.

[0059] The technical solution of the embodiment of the present application is to solve the above technical problems, and the overall idea is as follows:

[0060] According to a typical embodiment of the present invention, a method for immune cell image segmentation based on multi-instance learning is provided, the method comprising:

[0061] Step S1, extracting features of the input immunohistochemical staining cell image, obtaining the number of positive immune cells through the features, and performing rounding operation on the number of positive immune cells;

[0062] In the step S1,

[0063] The characteristics of the immunohistochemical staining cell image specifically include width and height; in a specific embodiment, the width and height are both 299*299;

[0064] Step S2, obtaining instances by sliding a window on the immunohistochemically stained cell image, selecting instances by a top-k adaptive instance selection method for training, and then predicting the probability scores of positive cells; and then obtaining a rough segmentation mask at the superpixel level according to the positive probability score and a threshold;

[0065] In the top-k adaptive instance selection method,

[0066] At the beginning of each training round, the image is sampled with a sliding window according to a fixed step size to obtain the entire instance set, and the sliding window size is larger than the step size;

[0067] Extract the features of all instances and obtain the probability score of each instance containing positive cells;

[0068] Sort all instances of each image in descending order of positive probability scores;

[0069] Select positive and negative instances according to the positive cell count labels of the image, that is, if the count label Ci of image i is equal to 0, select the first Kn instances and assign them negative labels; if the count label Ci of image i is greater than 0, select the first Kp×Ci instances and assign them positive labels;

[0070] The selected positive and negative instance training sets are trained.

[0071] Step S3, combining the image information, refining the rough segmentation mask at the superpixel level to obtain a refined mask; using the refined mask as a supervised pseudo-label to obtain a positive cell segmentation mask with pixel-level accuracy for the entire image, and generating cell location points from the positive cell segmentation mask based on a density-peak clustering algorithm, thereby achieving immune cell image segmentation.

[0072] In the step S3,

[0073] The step of combining the image information to refine the coarse segmentation mask at the superpixel level to obtain a refined mask includes:

[0074] Threshold the brightness channel in the HSV color channel of the image to obtain the HSV channel threshold mask;

[0075] Obtaining a rough mask by pixel-level bit operation, and fusing the rough mask with the HSV channel threshold mask to generate an initial refined mask;

[0076] Then, the isolated small areas in the initial refined mask are removed, and the small holes are filled to obtain the HSV channel threshold mask.

[0077] Therefore, a system for immune cell image segmentation based on multi-instance learning implemented by computer code according to the method is also within the protection scope of the present invention;

[0078] like Figure 1-4 As shown, the system comprises:

[0079] Cell counting regression network module 100: used to predict the number of positive cells on the immunohistochemical staining cell image and perform rounding operation on it;

[0080] Superpixel instance classifier 200: used to obtain instances by sliding a window on the image, select instances using a top-k adaptive instance selection method to train the classifier, and then predict the probability score of positive cells; then obtain a rough segmentation mask at the superpixel level based on the instance positive probability score and a threshold;

[0081] A refinement mask module 300 is used to refine the rough segmentation mask at the superpixel level in combination with image information to obtain a refinement mask;

[0082] Pixel-level segmentation network module 400: Using the refined mask as a supervised pseudo-label, a positive cell segmentation mask with pixel-level accuracy for the entire image is obtained, and cell location points are generated from the positive cell segmentation mask based on a density-peak clustering algorithm, thereby achieving immune cell image location.

[0083] Further, the cell counting regression network module 100 includes a first encoder 110 and a regressor 120;

[0084] The first encoder 110 is used to extract immunohistochemical staining cell image features, wherein the immunohistochemical staining cell image features include width and height;

[0085] The regressor 120 is used to input and process the immunohistochemical staining cell image features to obtain a target number of positive immune cells; and perform a rounding operation on the target number of positive immune cells.

[0086] In the above technical solution, the counting labels in the data set (the data set is the existing data set LYSTO, and the data set includes many images and counting labels corresponding to the images) supervise the cell counting regression network module 100;

[0087] In the above technical solution, the first encoder 110 may adopt a ResNet-50 encoder;

[0088] In the above technical solution, the specific implementation method of the cell counting regression network module 100 is:

[0089] The first encoder 110 extracts features of the immunohistochemically stained cell image;

[0090] The obtained features are input into the regressor 120 to obtain the target quantity of the number of positive immune cells; and the scalar is rounded.

[0091] As a specific implementation, the regressor 120 may be directly spliced ​​onto the first encoder 110, and the construction method is as follows:

[0092] It consists of a global pooling structure and two fully connected layers with Dropout. The global pooling structure consists of a global mean pooling module and a global maximum pooling module in parallel, both of which pool the width and height dimensions of the input features to 1, and the results are added and then transmitted to the fully connected layer.

[0093] Preferably, the superpixel instance classifier 200 includes a second encoder 210 and a classifier 220;

[0094] The second encoder 210 is used to consider the image as a bag based on the multi-instance learning mode, and slide a square window with equal steps on the image to sample the image instance set; and extract features from all the selected instances to obtain instance features;

[0095] The classifier 220 is used to classify the instance features to obtain a probability score that the instance contains positive cells; and to obtain a rough segmentation mask of the entire image based on the instance positive probability score combined with a threshold.

[0096] In the above technical solution, the second encoder 210 may adopt a ResNet-50 encoder; in other implementations, the second encoder 210 and the first encoder 110 may adopt the same ResNet-50 encoder, or may adopt different ResNet-50 encoders.

[0097] Preferably, the second encoder 210 and the first encoder 110 use the same ResNet-50 encoder;

[0098] The first encoder 110 (ResNet-50 encoder) extracts immunohistochemical staining cell image features to train the ResNet-50 encoder, so that it can be used as the second encoder in step S2 to extract instance features.

[0099] Preferably, the number of positive immune cells obtained in step S1 can be used to fine-tune the rough segmentation mask at the superpixel level obtained in step S2, and the fine-tune method includes: limiting the image without positive cells to generate an erroneous rough mask.

[0100] As a preferred implementation, the specific implementation method of the superpixel instance classifier 200 is:

[0101] The second encoder 210: based on the multi-instance learning mode, regards the image as a bag, slides a square window with equal step length on the image to sample a set of image instances, and obtains multiple image instances; and inputs the multiple image instances into the second encoder 210 to extract instance features;

[0102] The instance features are input into the classifier 220 to obtain a probability score that the instance contains positive cells; and a rough segmentation mask of the entire image is obtained based on the probability score of the positive cells and a threshold.

[0103] The step S2 includes two aspects: (1) using the top-k adaptive instance selection method to select instances to train the classifier 220; (2) sliding the window backward to obtain all image instances for prediction;

[0104] In both of the above two aspects, the second encoder 210 and the classifier 220 are used. The difference is that in the first aspect, the top-k adaptive instance selection method is used to select instances to train the classifier 220, and only some instances are adaptively selected to train the classifier 220. Specifically, in the top-k adaptive instance selection method, at the beginning of each training round, the image sliding window is sampled according to a fixed step size to obtain a set of all instances, and the sliding window size is greater than the step size; the features of all instances are extracted to obtain the probability score of each instance containing positive cells; all instances of each image are sorted in descending order according to the positive probability score; positive and negative instances are selected according to the positive cell count label of the image, that is, if the count label Ci of image i is equal to 0, the first Kn instances are selected and assigned negative labels; if the count label Ci of image i is greater than 0, the first Kp×Ci instances are selected and assigned positive labels; the selected positive and negative instances and their labels (labels are used as supervision information) are used as training sets for training, and the positive and negative categories of each instance in the training process are supervision labels.

[0105] In the aspect (2), all image instances are obtained for prediction to obtain a rough segmentation mask at the super-pixel level.

[0106] As a specific implementation, the classifier 220 has a simple structure and is constructed as follows:

[0107] It consists of a global pooling structure, a fully connected layer, and a Softmax layer. The global pooling structure is the same as in the regressor, but it is only used when the encoder output feature size of the superpixel instance classifier is larger than a single pixel.

[0108] As a preferred implementation, in the top-k adaptive instance selection method,

[0109] At the beginning of each training round, the image is sampled with a sliding window according to a fixed step size to obtain the entire instance set, and the sliding window size is larger than the step size;

[0110] The features of all instances extracted by the second encoder 210 are input into the classifier 220 to obtain the probability score of each instance containing positive cells; and all instances of each image are sorted in descending order according to the positive probability score; positive and negative instances are selected according to the positive cell count label of the image, that is, if the count label Ci of image i is equal to 0, the first Kn instances are selected and assigned negative example labels; if the count label Ci of image i is greater than 0, the first Kp×Ci instances are selected and assigned positive example labels; and then the selected positive and negative instance training sets are trained to obtain the probability scores of positive cells of the positive and negative instances.

[0111] The step S3 specifically includes, combining the image information to refine the rough segmentation mask at the superpixel level to obtain a refined mask, including:

[0112] Threshold the brightness channel in the HSV color channel of the image to obtain the HSV channel threshold mask;

[0113] Obtaining a rough mask by pixel-level bit operation, and fusing the rough mask with the HSV channel threshold mask to generate an initial refined mask;

[0114] Then, the isolated small areas in the initial refined mask are removed, and the small holes are filled to obtain the HSV channel threshold mask.

[0115] Preferably, the pixel-level segmentation network module 400 includes: a third encoder 410, a convolutional network decoder 420 and a positioning unit 430;

[0116] The third encoder 410 is used to extract image features;

[0117] Convolutional network decoder 420: used to obtain a positive cell segmentation mask with pixel-level accuracy for the entire image based on the extracted image features and then using the refined mask as a supervised pseudo-label to achieve image segmentation;

[0118] The positioning unit 430 is used to generate positive cell positioning points based on the positive cell segmentation mask using a density-peak clustering algorithm to achieve immune-positive cell positioning.

[0119] As a specific implementation, the convolutional network decoder 420 is symmetrical to the third encoder 410 (ResNet-50 encoder), and is constructed as follows:

[0120] It consists of 5 convolutional network layers. The input of the first 4 convolutional network layers is the concatenation of the output of the corresponding layer in the encoder and the upsampling result of the output of the previous layer of the network. The upsampling operation of the output features of the previous layer doubles the width and height dimensions of the features. The last layer of the convolutional network only upsamples the output features of the previous layer and then performs convolution.

[0121] As a preferred embodiment,

[0122] The first encoder 110 in the cell counting regression network module 100, the second encoder 210 in the superpixel instance classifier 200, and the third encoder 420 in the pixel-level segmentation network module 400 all use the same ResNet-50 encoder, specifically:

[0123] The encoders in the superpixel instance classifier 200 and the pixel-level segmentation network module 400 are both reused ResNet-50 encoders in the cell counting regression network module 100;

[0124] In the cell counting regression network module 100, its encoder participates in training and its parameters can be learned; in the superpixel instance classifier 200 and the pixel-level segmentation network module 400, its encoder parameters are frozen during the training process and remain unchanged.

[0125] It should be noted that the first encoder and the third encoder extract image features, and the second encoder extracts instance features; the second encoder and the third encoder are frozen (that is, used directly, not involved in training) reused (reused). The first encoder and the regressor participate in training, the second encoder does not participate in training, only its classifier participates in training, and the third encoder does not participate in training, only its decoder participates in training.

[0126] The immune cell image segmentation method based on multi-instance learning of the present invention will be described in detail below in conjunction with specific embodiments.

[0127] Example 1: An immune cell image segmentation method based on multi-instance learning

[0128] Step S1, extracting features of the input immunohistochemical staining cell image, obtaining the number of positive immune cells through the features, and performing rounding operation on the number of positive immune cells;

[0129] Step S2, obtaining instances by sliding a window on the immunohistochemically stained cell image, selecting instances by a top-k adaptive instance selection method for training, and then predicting the probability scores of positive cells; and then obtaining a rough segmentation mask at the superpixel level according to the positive probability score and a threshold;

[0130] In the top-k adaptive instance selection method,

[0131] At the beginning of each training round, the image is sampled with a sliding window according to a fixed step size to obtain the entire instance set, and the sliding window size is larger than the step size;

[0132] Extract the features of all instances and obtain the probability score of each instance containing positive cells;

[0133] Sort all instances of each image in descending order of positive probability scores;

[0134] Select positive and negative instances according to the positive cell count labels of the image, that is, if the count label Ci of image i is equal to 0, select the first Kn instances and assign them negative labels; if the count label Ci of image i is greater than 0, select the first Kp×Ci instances and assign them positive labels;

[0135] The selected positive and negative instance training sets are trained.

[0136] Step S3, combining the image information, refining the rough segmentation mask at the superpixel level to obtain a refined mask; using the refined mask as a supervised pseudo-label to obtain a positive cell segmentation mask with pixel-level accuracy for the entire image, and generating cell location points from the positive cell segmentation mask based on a density-peak clustering algorithm, thereby achieving immune cell image segmentation.

[0137] In the step S3,

[0138] The step of combining the image information to refine the coarse segmentation mask at the superpixel level to obtain a refined mask includes:

[0139] Threshold the brightness channel in the HSV color channel of the image to obtain the HSV channel threshold mask;

[0140] Obtaining a rough mask by pixel-level bit operation, and fusing the rough mask with the HSV channel threshold mask to generate an initial refined mask;

[0141] Then, the isolated small areas in the initial refined mask are removed, and the small holes are filled to obtain the HSV channel threshold mask.

[0142] Example 2: An immune cell image segmentation system based on multi-instance learning

[0143] The immune cell image segmentation method based on multi-instance learning proposed in the embodiment of the present invention includes four parts: a cell counting regression network module 100, a superpixel instance classifier 200, a refinement mask module 300 and a pixel-level segmentation network module 400. Figure 1As shown, the cell counting regression network module 100 realizes the counting function of positive immune cells in the input immunohistochemical staining cell image under the supervision of the counting label. The superpixel instance classifier 200 uses the second encoder to obtain instances by sliding a window on the image, selects instances to train the classifier in combination with a specially designed instance selection method, and then predicts the probability scores of all instances on the entire image containing positive immune cells, and then obtains a rough segmentation mask at the superpixel level through threshold division. The mask is refined and used as a supervised pseudo-label for the pixel-level segmentation network. The pixel-level segmentation network module 400 takes the entire immunohistochemical staining cell image as input and outputs its predicted pixel-level image mask.

[0144] The specific implementation of each part is described below.

[0145] (1) Cell counting regression network module 100

[0146] The cell counting regression network module 100 consists of a ResNet-50 encoder and a regressor, and is used to predict the number of positive cells on immunohistochemically stained cell images.

[0147] ResNet-50 encoder Figure 4 As shown in the figure, it is the convolutional network part of ResNet-50, excluding the pooling layer and fully connected layer at the back of ResNet-50, which is used to extract the features of the input immune cell image. The encoder has been pre-trained on ImageNet, and the width and height dimensions of its output features are 1 / 32 of the input image.

[0148] Regressor such as Figure 2 As shown in Figure 1, it can be directly spliced ​​on the encoder. The regressor consists of a global pooling structure and two fully connected layers with Dropout. The global pooling structure consists of a global mean pooling module and a global maximum pooling module in parallel, both of which pool the width and height dimensions of the input features to 1. The results are added and then transmitted to the subsequent fully connected layer. The fully connected layer outputs a scalar of the number of positive immune cells in the image, which can be discretized into a number by rounding.

[0149] The cell counting regression network uses the number of positive immune cells in the image as the supervised label, and uses L2 loss and SGD learning algorithm to train the weight parameters in the network.

[0150] (2) Superpixel instance classifier 200

[0151] The superpixel instance classifier 200 consists of an encoder and a simple classifier. The encoder part reuses the ResNet-50 encoder in the counting network and adopts a parameter freezing strategy to maintain the performance of the encoder and retain the image knowledge learned in the counting network.

[0152] The classifier structure is as follows Figure 3 As shown in Figure 1, it consists of a global pooling structure, a fully connected layer, and a Softmax layer. The global pooling structure is the same as that in the regressor, but it is only used when the encoder output feature size of the superpixel instance classifier is larger than a single pixel, that is, when the width and height dimensions of the instance image input to the encoder are larger than 32.

[0153] The superpixel instance classifier slides the input image at a fixed step size to obtain a set of instance images of a fixed size, and then inputs the instance images into the network part in turn to obtain the probability score of each instance containing positive immune cells. If the instance probability score is greater than the set threshold, the instance area on the image belongs to the mask part, thereby obtaining a rough segmentation mask for the entire image.

[0154] When training the superpixel instance classifier, only some instances of all images in the training data set are selected for training. The selection method is a specially designed top-k adaptive instance selection method. The specific steps are as follows:

[0155] At the beginning of each training round, the image is sampled with a sliding window according to a fixed step size to obtain the entire instance set, and the sliding window size is larger than the step size;

[0156] Send all instances to the superpixel instance classifier to obtain the probability score of each instance containing positive cells;

[0157] Sort all instances of each image in descending order of positive probability scores;

[0158] Select positive and negative instances based on the positive cell count labels of the image, that is, if the count label of image i, Ci, is equal to 0, select the first Kn instances and assign them negative labels. These negative instances are the instances that are most likely to be judged as containing positive immune cells in the non-positive cell area. If the count label of image i, Ci, is greater than 0, select the first Kp×Ci instances and assign them positive labels.

[0159] The selected instance set is sent as a training set to the superpixel instance classifier for training.

[0160] In the top-k adaptive instance selection method, Kn represents the number of instances selected from non-positive images, and Kp represents the number of superpixels sampled on each positive cell, and its value is constrained by the ratio of superpixel size to cell size. Consider a simplified scenario, that is, the immune cells in the immunopathological images of the same tissue or organ obtained under a digital microscope with the same magnification are all circles of the same size, with a radius of a, and can be marked by a bounding box with a side length of 2a. In order to ensure that all superpixel instances assigned positive labels are collected from the positive cell bounding box, the value of Kp needs to meet the following constraints:

[0161]

[0162] Among them, t is the window size and δ is the sliding step size.

[0163] The superpixel instance classifier uses the instance set selected by the top-k adaptive instance selection method as the training set, the positive and negative categories of each instance as the supervision label, and uses the cross entropy loss function and Adam learning algorithm to train the network weight parameters.

[0164] (3) a mask refinement module 300: configured to refine the coarse segmentation mask at the superpixel level in combination with image information to obtain a refined mask;

[0165] The specific steps of the refinement are as follows:

[0166] Threshold the brightness channel in the HSV color channel of the image to obtain an image mask without semantic information;

[0167] The coarse mask obtained from the superpixel classifier and the HSV channel threshold mask are fused through pixel-level bit operations to generate an initial refined mask;

[0168] Remove small isolated areas in the initial refinement mask and fill small holes.

[0169] (4) Pixel-level segmentation network module 400

[0170] The architecture of the pixel-level segmentation network module 400 is as follows: Figure 1 and 4 As shown in the figure, it consists of an encoder, a decoder and a definition unit, where the encoder is still the reuse of the ResNet-50 encoder in the cell counting regression network. Like the superpixel instance classifier, it adopts a parameter freezing strategy to retain the image knowledge that the encoder has learned in the counting network.

[0171] The decoder structure is symmetrical to the encoder structure. It consists of 5 convolutional network layers. The first 4 convolutional network layers halve the number of channels of the input features, and the last convolutional network layer changes the number of channels of the input features to 2. The input of each convolutional network layer is different. The input of the first 3 convolutional network layers is the concatenation of the output of the corresponding layer in the encoder and the upsampling result of the output of the previous layer in the network. The upsampling operation of the output features of the previous layer first doubles the width and height dimensions of the features, and then performs a 3×3 convolution operation with a step size of 1 on the features to halve the number of feature channels. The input of the fourth convolutional network layer is the result of upsampling the output features of the previous layer, that is, the output features of the third convolutional network layer. The width and height dimensions of its output features are doubled and used as the input of the last convolutional network layer, and the final output is a binary segmentation mask with the same width and height dimensions as the input image.

[0172] The refined mask is used as a supervised pseudo-mask for the pixel-level segmentation network, and the segmentation network is trained using the cross entropy loss function and the Adam learning algorithm.

[0173] The trained network can generate a segmentation mask of the positive cell area of ​​the input image. Based on this mask, the density-peak clustering algorithm can be used to obtain the central positioning point of the positive immune cells in the entire image without using image information.

[0174] The density-peak clustering algorithm can find the cluster center as follows:

[0175] For each point, two values ​​are calculated: the local density ρ of the point i and the minimum value Δ of the distance between this point and other points with higher local density than this point i , the calculation formula is as follows:

[0176]

[0177] Among them, d ij is the distance between points i and j, χ(·) is the indicator function, when x<0, χ(x)=1, when x>0, χ(x)=0. The larger value of ρ and Δ is taken as the center point of the cluster;

[0178] All sample points except the center point are assigned to each cluster center according to the nearest neighbor method.

[0179] Example 3: A system for immune cell image segmentation based on multi-instance learning

[0180] An embodiment of the present invention provides a system for immune cell image segmentation based on multi-instance learning, the system comprising:

[0181] A processor and a memory, wherein the memory is coupled to the processor, and the memory stores instructions, which, when executed by the processor, enable the system for immune cell image segmentation based on multi-instance learning to perform the steps of the method described in Example 1.

[0182] Embodiment 4: A computer-readable storage medium

[0183] An embodiment of the present invention provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the method of embodiment 1 are implemented.

[0184] Of course, the computer executable instructions of a storage medium including computer executable instructions provided by an embodiment of the present invention are not limited to the operations of the method described above, but can also execute related operations in the method provided by any embodiment of the present invention.

[0185] Through the above description of the implementation methods, the technicians in the relevant field can clearly understand that the present invention can be implemented by means of software and necessary general hardware, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory (FLASH), hard disk or optical disk, etc., including a number of instructions for an electronic device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0186] It is worth noting that in the above embodiments, the various units and modules included are only divided according to functional logic, but are not limited to the above divisions, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.

[0187] Experimental Example 1: Comparison with existing methods

[0188] The classification and segmentation accuracy of cell images were statistically analyzed using the method of the embodiment of the present invention and the method of the comparative example. The results are shown in Table 1 below.

[0189] The method used for comparison is shown in the paper "Self-supervised Equivariant Attention Mechanism for Weakly Supervised Semantic Segmentation"

[0190] Table 1

[0191] method Segmentation accuracy % Method of the embodiment of the present invention 0.7469 Method of comparison 0.6168

[0192] Depend on Figure 6 As shown in Table 1, the segmentation accuracy is improved by the method of the present invention, and the training effect of the model is improved. In summary, the present invention is a multi-stage quantitative analysis method for immunohistochemical staining cell images that integrates counting, segmentation and positioning functions. The method is not only applicable to immunohistochemical staining cell images, but also to quantitative analysis tasks of other staining methods.

[0193] Finally, it should be noted that the terms "comprises," "includes," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements that are inherent to such process, method, article, or apparatus.

[0194] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.

[0195] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A method for immune cell image segmentation based on multiple instance learning, It is characterized in that The method comprises: Step S1, extracting features of the input immunohistochemical staining cell image, obtaining the number of positive immune cells through the features, and performing rounding operation on the number of positive immune cells; Step S2, obtaining instances by sliding a window on the immunohistochemically stained cell image, selecting instances by a top-k adaptive instance selection method for training, and then predicting the probability scores of positive cells; and then obtaining a rough segmentation mask at the superpixel level according to the positive probability score and a threshold; Step S3, refining the coarse segmentation mask at the superpixel level in combination with image information to obtain a refined mask; Step S4, using the refined mask as a supervised pseudo-label to obtain a positive cell segmentation mask with pixel-level accuracy for the entire image to achieve segmentation, and generating cell center positioning points from the positive cell segmentation mask based on a density-peak clustering algorithm to achieve immune-positive cell positioning.

2. According to claim 1, a method for immune cell image segmentation based on multi-instance learning, It is characterized in that In the top-k adaptive instance selection method, At the beginning of each training round, the image is sampled with a sliding window according to a fixed step size to obtain the entire instance set, and the sliding window size is larger than the step size; Extract the features of all instances and obtain the probability score of each instance containing positive cells; Sort all instances of each image in descending order of positive probability scores; Select positive and negative instances according to the positive cell count labels of the image, that is, if the count label Ci of image i is equal to 0, select the first Kn instances and assign them negative labels; if the count label Ci of image i is greater than 0, select the first Kp×Ci instances and assign them positive labels; The selected positive and negative instance training sets are trained.

3. According to claim 1, a method for immune cell image segmentation based on multi-instance learning, It is characterized in that The step of refining the rough segmentation mask at the superpixel level in combination with the image information to obtain a refined mask includes: Threshold the brightness channel in the HSV color channel of the image to obtain the HSV channel threshold mask; Obtaining a rough mask by pixel-level bit operation, and fusing the rough mask with the HSV channel threshold mask to generate an initial refined mask; Then, the isolated small areas in the initial refined mask are removed, and the small holes are filled to obtain the HSV channel threshold mask.

4. A system for immune cell image segmentation based on multiple instance learning, It is characterized in that The system comprises: Cell counting regression network module: used to predict the number of positive cells in immunohistochemical staining cell images and perform rounding operations on them; Superpixel instance classifier: used to obtain instances by sliding a window on the image, select instances using the top-k adaptive instance selection method for training, and then predict the probability score of positive cells; then, according to the instance positive probability score and combined with the threshold, a rough segmentation mask at the superpixel level is obtained; A refinement mask module: used to refine the coarse segmentation mask at the superpixel level in combination with image information to obtain a refined mask; Pixel-level segmentation network module: The refined mask is used as a supervised pseudo-label to obtain a positive cell segmentation mask with pixel-level accuracy for the entire image to achieve image segmentation. At the same time, a density-peak clustering algorithm is used to generate cell location points from the positive cell segmentation mask to achieve immune-positive cell location.

5. The system for immune cell image segmentation based on multi-instance learning according to claim 4, It is characterized in that The cell counting regression network module includes a first encoder and a regressor; The first encoder is used to extract features of immunohistochemical staining cell images, wherein the features of immunohistochemical staining cell images include width and height; The regressor is used to input and process the immunohistochemical staining cell image features to obtain a target quantity of positive immune cells; and to perform a rounding operation on the target quantity of positive immune cells.

6. The system for immune cell image segmentation based on multi-instance learning according to claim 4, It is characterized in that The superpixel instance classifier includes a second encoder and a classifier; The second encoder: based on a multi-instance learning mode, regards the image as a bag, slides a square window with equal steps on the image to sample a set of image instances, and extracts features from all the selected instances to obtain instance features; The classifier is used to classify the instance features to obtain a probability score that the instance contains positive cells; and to obtain a rough segmentation mask of the entire image based on the instance positive probability score combined with a threshold.

7. The system for immune cell image segmentation based on multi-instance learning according to claim 4, It is characterized in that The pixel-level segmentation network module includes: a third encoder, a convolutional network decoder and a positioning unit; The third encoder is used to extract image features; Convolutional network decoder: used to obtain the positive cell segmentation mask with pixel-level accuracy of the whole image based on the extracted image features and then use the refined mask as a supervised pseudo-label to achieve image segmentation; A positioning unit is used to generate positive cell positioning points based on the positive cell segmentation mask using a density-peak clustering algorithm to achieve immune-positive cell positioning.

8. A computer device comprising a memory, a processor and a computer program stored in the memory, It is characterized in that The processor executes the computer program to implement the steps of the method of claims 1-3.

9. A computer-readable storage medium having a computer program / instructions stored thereon, It is characterized in that When the computer program / instructions are executed by a processor, the steps of the method according to claims 1-3 are implemented.

10. A computer program product comprising a computer program / instructions, It is characterized in that When the computer program / instructions are executed by a processor, the steps of the method according to claims 1-3 are implemented.

Citation Information

Cited By

  • Pathological cell image classification method and device, electronic equipment and storage medium

    CN119323785A

  • Immune cell state analysis method and system

    CN119444757A