Immunofluorescent staining neuron cell body segmentation method based on semi-supervised and diffusion model
By using a method based on semi-supervised and diffusion models to generate pseudo labels and pseudo images, and optimizing the neuron cell body segmentation model, we solve the problem of relying on a large amount of label data in the existing technology and achieve efficient and low-cost neuron cell body segmentation. Suitable for complex biomedical image processing.
Patent Information
- Application Number
- CN202410867072.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-01
- Publication Date
- 2024-09-06
AI Technical Summary
Existing deep learning-based neuron cell body segmentation methods require a large amount of accurately labeled data, resulting in high human resource consumption and high cost. Especially when labeling resources are scarce in the field of biomedical images, it is difficult to effectively handle neurons with high noise and complex backgrounds. Cell body image.
An immunofluorescence stained neuron cell body segmentation method based on semi-supervised and diffusion models is used. By training the diffusion model and semi-supervised model, pseudo labels and pseudo images are generated to form a pseudo data set. The model is further optimized to reduce dependence on annotated data. Only Good segmentation results can be achieved using a small amount of labeled data.
Significantly reduces the need for label data and improves cell body segmentation efficiency and accuracy. It can achieve a Dice score of 84.17% using only 5% of label data, reducing manual labeling costs and time. It is suitable for processing large-scale and high-complexity tasks. Biomedical image data.
Smart Images

Figure CN118608536A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to an immunofluorescence staining neuron cell body segmentation method based on a semi-supervised and diffusion model. Background Art
[0002] The basic components of neurons are cell bodies, axons, and dendrites. Neuroscientists have proven that the composition, structure, function, and connections between neurons are interrelated, and they vary in different species, different individuals of the same species, and different growth stages of the same individual. Therefore, large-scale quantitative analysis of neurons is helpful for the study of brain diseases and brain functions.
[0003] High-resolution neural images are the data basis for quantitative analysis of neuronal distribution, and usually require the use of optical microscopes and biomarker technology for image acquisition. Optical microscopes have moderate resolution and can efficiently obtain neuronal imaging data of large volumes of brain tissue, while biomarker technology can enhance the contrast of specific structures in brain tissue, obtain imaging data sets containing specific structures, and extract neuronal distribution information in the data sets through neural image analysis.
[0004] Traditional image processing techniques, such as deep learning and machine vision algorithms, perform well in general image recognition and simple segmentation tasks, but their effectiveness is greatly reduced when faced with images of neuronal cell bodies with high noise, complex backgrounds, and diverse morphologies. These methods usually require a large amount of labeled data to train the model and often have difficulty processing new types of samples that have not been seen. This problem is particularly prominent in the field of neuroscience, especially when processing images produced by special imaging techniques such as immunofluorescence staining.
[0005] In the quantitative analysis of neuron distribution, it is usually necessary to obtain the number of neurons, and in specific applications, it is also necessary to extract cell body morphology information as an auxiliary reference. Manual analysis with the assistance of software is a traditional method of neural image analysis. Although it can provide reliable neuron distribution information, it requires experienced annotators to repeatedly observe three-dimensional images to annotate the position coordinates of a large number of neurons. This is not only very time-consuming, but also affected by individual subjective differences, making it difficult to quickly produce repeatable prediction results. On the other hand, the work fatigue of the annotators will also affect the efficiency and accuracy of neural image analysis. Moreover, as the processed neuron data becomes larger and more diverse, the quantitative analysis of neuron distribution also faces huge challenges. These challenges include the following: the image background noise is strong, and it is difficult to extract cell body signals from the image; the signals in the image are complex, not only cell body signals, but also interference signals such as fibers and blood vessels, and some morphologies are similar to cell bodies, which easily produce false positive results during the recognition process; the morphological characteristics of cell bodies such as size and shape are diverse.
[0006] In addition, in the field of image segmentation, especially when dealing with biomedical images such as neuronal cell body segmentation, the main challenges include high image complexity and great variability. These images often contain irregular object shapes, complex backgrounds, and similar texture features, which puts higher requirements on the accuracy and robustness of segmentation algorithms. Previous semi-supervised learning methods often rely on a large amount of high-quality labeled data to improve the generalization ability of the algorithm, which is often difficult to meet in practical applications, especially in the field of medical images where annotation resources are scarce and costly.
[0007] In short, with the rapid development of biomedical imaging technology, especially high-resolution microscopic optical imaging technology, it is facing the challenge of processing TB-level or even PB-level massive biomedical image data. Existing deep learning-based cell segmentation methods usually require a large number of accurate labels to achieve effective segmentation effects. However, obtaining these accurate labels requires a lot of human resources. In order to solve this problem, Associate Professor Xiao Chi and others published a study titled "Cross Comparison Representation Learning for Semi-supervised Segmentation of Cellular Nuclei in Immunofluorescence Staining" in the top journal of computational biology "Computers in Biology and Medicine" (IF=7.7), proposing a semi-supervised cell segmentation algorithm based on the Mean Teacher model. The algorithm introduces semi-supervised learning technology, combines contrast learning with Mean Teacher technology, and only requires a small amount of labeled data and a large amount of unlabeled data to achieve good segmentation effects. However, this method still requires at least 20% of labeled data to achieve effective segmentation effects, that is, the labeled data is still large. Summary of the invention
[0008] The purpose of the present invention is to provide an immunofluorescence stained neuron cell body segmentation method based on semi-supervised and diffusion models, which can achieve better segmentation effect with less label data, that is, further reduce the amount of label data, thereby improving segmentation efficiency and reducing costs.
[0009] In order to achieve the above object, the present invention provides the following technical solutions:
[0010] In a first aspect, the present invention provides a method for segmenting immunofluorescence-stained neuron soma based on a semi-supervised and diffusion model, comprising the following steps:
[0011] S10, training diffusion model and semi-supervised model based on the same original dataset;
[0012] S20, using the semi-supervised model trained by S10 to segment the unlabeled cell body image, generate pseudo labels, and then input the image containing the pseudo labels into the diffusion model trained by S10 to generate corresponding pseudo images, and the pseudo images constitute a pseudo data set;
[0013] S30, retraining the semi-supervised model trained in S10 based on the pseudo data set and the original data set, and using the trained semi-supervised model to segment the immunofluorescence stained neuron cell bodies.
[0014] In the above scheme, the original data is trained through semi-supervision, and the original data is used to train the diffusion model; then, the semi-supervised model that has been preliminarily trained is used to segment some unlabeled data, and the generated preliminary segmentation results are processed into pseudo-labels, which are used to generate pseudo-images. These pseudo-labels and pseudo-images are combined to form a new pseudo-dataset, and finally the pseudo-dataset is used together with the original dataset to further train the semi-supervised model so that the model can learn and optimize from it. The semi-supervised model generated by this process has high accuracy and strong generalization ability, and can effectively handle complex cell body image segmentation tasks.
[0015] By generating a large number of pseudo images similar to the original images to assist in training, the reliance on the original data is greatly reduced, and the demand for labeled data is reduced. Only a small number of sample images need to be labeled, which greatly reduces the sample labeling cost and time, and improves the efficiency of cell segmentation. After experiments, this method was applied to the immunofluorescence staining cell body dataset, and only 5% of the labeled data was used to achieve a Dice score of 84.17%, effectively reducing the label requirement.
[0016] In a further optimized solution, in S20, the image containing the pseudo label is input into the diffusion model trained in S10 to generate the corresponding pseudo image, including:
[0017] S201, the encoder encodes the pseudo label to obtain an encoding tensor;
[0018] S202, performing a Gaussian diffusion operation on the encoded tensor to add noise;
[0019] S203, ControlNet extracts edge features of the edge map through the canny algorithm, fuses the extracted edge features with the encoding tensor after adding noise, and performs reverse denoising operation on each layer of the fused feature map to remove noise;
[0020] S204, looping through steps S202 and S203 until a set number of iterations is reached;
[0021] S205, the decoder performs a decoding operation on the encoded tensor after the iteration to generate a pseudo image.
[0022] The above scheme adopts an improved diffusion model. By using the neural network structure ControlNet on the diffusion model, ControlNet adds edge detection to the diffusion model and introduces additional edge features to control the generation process of AI raw images, so that the position information corresponding to each cell body in the image containing pseudo-labels is generated, and the position information of the cell body in the image containing pseudo-labels is well preserved, and then highly accurate pseudo images can be generated. The newly generated pseudo images are very similar to the original images used in reality in terms of image features, making the segmentation ability of the semi-supervised model trained using these pseudo images more accurate.
[0023] In the further optimized solution, in S10, the proportion of the labeled data in the original data set to the total data volume is 5%-10%.
[0024] The larger the sample size in the pseudo data set, the more annotation cost and time are saved, but the segmentation accuracy of the final model will be affected; the smaller the sample size in the pseudo data set, the better the segmentation accuracy of the final model, but the greater the cost and time of manual annotation. After experimental verification, it is only necessary to annotate 5%-10% of the samples in the original data set, train the semi-supervised model using the method of the present invention, and perform cell body segmentation based on the semi-supervised model obtained by the final training, which has a better segmentation effect. Therefore, there is no need to manually annotate more samples, saving annotation costs and time.
[0025] In the further optimized scheme, in S30, the semi-supervised model is a mean teacher model combined with contrastive learning.
[0026] At present, the mainstream methods in the semi-supervised field are based on the mean teacher model. The above scheme makes improvements on this basis and uses the contrastive learning algorithm to enhance the model's learning ability for unlabeled data. The contrastive learning module extracts high-dimensional features in unlabeled images and compares these features with similar features of other images, thereby effectively learning complex structural information from a large amount of unlabeled data. This not only enhances the semi-supervised model's ability to perceive subtle features, but also improves the generalization ability of the model by optimizing the differences in feature representation.
[0027] In a further optimized solution, in S10, the original data set includes the real cell body image obtained by acquisition, and a supplementary image obtained based on the real cell body image. The supplementary image is obtained by cropping, rotating and flipping the annotated image at different angles.
[0028] In the above scheme, by performing corresponding processing on the real cell body images to generate supplementary images, the demand for real cell body images is further reduced. Even if there are only a small number of real cell body images, model training can be performed without affecting the segmentation effect of the final model.
[0029] In a second aspect, the present invention provides a computer program product, comprising computer-readable instructions, characterized in that the computer-readable instructions, when executed by a processor, implement the steps of the immunofluorescence stained neuron cell body segmentation method based on semi-supervised and diffusion models of the present invention.
[0030] In a third aspect, the present invention provides a computer-readable storage medium comprising computer-readable instructions, characterized in that the computer-readable instructions, when executed by a processor, implement the steps of the immunofluorescence stained neuron cell body segmentation method based on semi-supervised and diffusion models of the present invention.
[0031] In a fourth aspect, the present invention provides an electronic device, comprising: a memory storing program instructions; a processor connected to the memory, executing the program instructions in the memory, and implementing the steps in the immunofluorescence stained neuron cell body segmentation method based on the semi-supervised and diffusion model of the present invention.
[0032] Compared with the prior art, the present invention has the following technical advantages:
[0033] The present invention combines semi-supervised learning and diffusion models, generates pseudo-labeled data that are visually and structurally similar to real labeled data through an improved diffusion model, and assists in training by generating a large number of pseudo images similar to original images, thereby significantly improving the accuracy of cell body segmentation and greatly reducing the number of required labels, significantly reducing the dependence on high-quality labeled data, and effectively utilizing unlabeled data through a semi-supervised learning strategy, thereby enhancing the generalization ability and segmentation accuracy of the model, and achieving a Dice score of 84.17% using only 5% labeled data, effectively reducing label requirements.
[0034] The implementation of the method of the present invention not only improves processing efficiency, but also significantly reduces costs, and is particularly suitable for biomedical research fields that require processing of large-scale and highly complex image data sets.
[0035] For other advantages of the present invention, please refer to the relevant description in the embodiment section. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0037] Figure 1 Flow chart of the immunofluorescence stained neuron cell body segmentation method based on semi-supervised and diffusion models in an embodiment of the present invention.
[0038] Figure 2 Schematic diagram of the semi-supervised model in the embodiment.
[0039] Figure 3 Schematic diagram of the diffusion model in the embodiment.
[0040] Figure 4a , Figure 4b They are the pseudo-label image used as an example and the cell body position result image obtained after the pseudo-label image is processed by ControlNet.
[0041] Figure 5a , Figure 5b They are the real original image and the pseudo image generated from the original image as examples.
[0042] Figure 6 This is the experimental result diagram based on the IS dataset.
[0043] Figure 7 The figure shows the experimental results based on the CRAG dataset.
[0044] Figure 8 It is a block diagram of the composition of the electronic device provided in the embodiment. DETAILED DESCRIPTION
[0045] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0046] See also Figure 1 This embodiment provides a method for segmenting immunofluorescence-stained neuron soma based on a semi-supervised and diffusion model, comprising the following steps:
[0047] S10, the diffusion model and the semi-supervised model are trained based on the same original dataset.
[0048] S20, using the semi-supervised model trained by S10 to segment the unlabeled cell body image, generate pseudo labels, and then input the image containing the pseudo labels into the diffusion model trained by S10 to generate corresponding pseudo images, and the pseudo images constitute a pseudo data set.
[0049] More specifically, the unlabeled cell body image data is segmented using the semi-supervised model trained by S10 to obtain preliminary segmentation results, and these segmentation results are converted into pseudo labels through post-processing (such as binarization, random flipping, scaling, etc.). The images containing these pseudo labels are then input into the diffusion model trained by S10 to generate corresponding pseudo images. Pseudo images have pseudo labels, which are similar to manual annotation information, so pseudo images can be treated as labeled images for model training. Pseudo images form a new pseudo dataset, which contains rich, converted data information, which helps to improve the generalization ability of the model during training.
[0050] S30, retraining the semi-supervised model trained in S10 based on the pseudo data set and the original data set, and using the trained (ie, completed) semi-supervised model to segment the immunofluorescence stained neuron cell bodies.
[0051] This step combines the newly generated pseudo dataset with the original dataset and inputs them into the semi-supervised model for in-depth training. In this way, the semi-supervised model can learn more information from the pseudo dataset and optimize it on this basis, thereby improving the segmentation accuracy of the entire semi-supervised model. The final semi-supervised model will have higher accuracy and stronger generalization ability, and can effectively handle various complex cell body image segmentation tasks.
[0052] like Figure 2 As shown, the semi-supervised model in this embodiment is improved on the basis of the mean teacher model, that is, the mean teacher model combined with contrastive learning, and its structure includes a teacher model, a student model and a contrastive learning module.
[0053] See also Figure 2 More specifically, the labeled data is first segmented by the student model, and the segmentation result is compared with the ground truth map to calculate the supervision loss L sup For unlabeled data, we first preprocess it using the image transformation function, and then send it to the student model and the teacher model for independent segmentation to generate two sets of segmentation results. The similarity of these two sets of segmentation results is used to calculate the consistency loss L cons Next, the supervision loss is added to the consistency loss to get the total loss L total , the total loss L totalIt is used to further train the student model through back propagation. At the same time, the teacher model is updated through the exponential moving average (EMA) method to maintain the stability of its parameters and update efficiency. The contrastive learning module extracts high-dimensional features in unlabeled images and compares these features with similar features of other images, thereby effectively learning complex structural information from a large amount of unlabeled data. This not only enhances the network's perception of subtle features, but also improves the generalization ability of the model by optimizing the differences in feature representation.
[0054] The diffusion model in this paper adopts the stable diffusion model as Stable Diffusion. During training, only training images need to be input without training labels. Therefore, there is no pressure to draw labels when training the diffusion model.
[0055] See also Figure 3 , Figure 3 This is a structural diagram of the diffusion model Stable Diffusion. The diffusion model includes an encoder, a Gaussian diffusion module, a reverse denoising module, and a decoder. Figure 3 It can also be understood as a workflow diagram of the diffusion model. After the above step S10 is processed, the trained semi-supervised model and the diffusion model are obtained. The semi-supervised model trained by S10 is used to segment the unlabeled cell body image to generate a pseudo label, and then input into the encoder to obtain the encoding tensor. After obtaining the encoding tensor, the Gaussian diffusion process is performed to add noise, and then the reverse denoising process is performed to remove the noise. The Gaussian diffusion process and the reverse denoising process are iteratively performed, and each step is aimed at removing unnecessary noise to improve the image quality. This step-by-step noise addition and denoising process helps the diffusion model to better learn and understand the intrinsic structure of the data. After completing these steps, the processed encoding tensor is sent to the decoder to restore the encoding tensor to an image. Through the processing of the decoder, an image that is very close to the original image in style and details can be obtained, which is called a pseudo image.
[0056] from Figure 3 A detail can be observed in the figure, that is, the cell bodies in the image containing pseudo labels and the pseudo image correspond one to one in position. This is because this article has improved the diffusion model, that is, the neural network structure ControlNet is used on Stable Diffusion. ControlNet is used to enhance the function of the image generation model based on the diffusion process of Stable Diffusion. ControlNet adds auxiliary network modules to the Stable Diffusion model and introduces additional conditions to control the generation process of AI raw images, making the generation process more controllable, thereby achieving more and more stable innovation and creation. Since the underlying network architecture of ControlNet is relatively complex and this article does not modify its architecture, I will not go into details here.
[0057] ControlNet is added to each stage of the denoising process of the diffusion model as an additional network (auxiliary network) to control the content generated by the diffusion model. ControlNet guides the generation steps in the denoising process by receiving additional control information (such as edge maps, postures, sketches, etc.). This control information can affect the generation results so that they meet specific conditions or constraints. In this paper, ControlNet performs edge detection through the canny algorithm. More specifically, the input edge map is first preprocessed, including normalization and feature extraction. The feature extraction uses a convolutional neural network to obtain the edge features E of the edge map. Then, in each denoising step of the diffusion model, the extracted edge features E are fused with the features of the current image (i.e., the encoded tensor after adding noise). The fusion method can be feature concatenation or weighted summation. At each layer, the fused feature map is further processed by the denoising network to generate new image features, and denoising is gradually performed until the final clear image is generated. In this way, ControlNet uses the edge information extracted by the Canny algorithm to effectively control the generation process of the diffusion model, so that the generated image has clear edge features and conforms to the structural information of the input edge map. That is, Figure 4b As shown, the canny algorithm is used to perform edge detection on the original image, thereby fixing the cell positions in the pseudo image, so that the newly generated pseudo image is more similar to the image features of the original image.
[0058] This paper uses the Canny algorithm in ControlNet to generate the position information corresponding to each cell body in the image containing pseudo labels. Figure 4a , Figure 4b As shown, Figure 4a This paper uses the semi-supervised model trained by S10 to perform preliminary segmentation and obtain images with pseudo labels through some post-processing procedures. Figure 4b This is the position information result obtained by the Canny algorithm in ControlNet for the image containing the pseudo-label. It can be clearly seen that the position information of the cell body in the pseudo-label is well preserved. This accurate position information is extremely important for the Stable Diffusion model because it relies on this data to generate the corresponding cell body image in the correct position. By ensuring that the position information of each cell body is accurate, this paper can generate highly accurate pseudo images. Figure 5a , Figure 5b It can be seen that the newly generated pseudo image is very similar to the original image used in this article in terms of image features.
[0059] That is to say, in this embodiment, an improved diffusion model is used to process an image containing a pseudo label to obtain a pseudo image. The specific process includes:
[0060] S201, the encoder encodes the pseudo label to obtain an encoding tensor;
[0061] S202, performing a Gaussian diffusion operation on the encoded tensor to add noise;
[0062] S203, ControlNet extracts edge features of the edge map through the canny algorithm, fuses the extracted edge features with the encoding tensor after adding noise, and performs reverse denoising operation on each layer of the fused feature map to remove noise;
[0063] S204, looping through steps S202 and S203 until a set number of iterations is reached;
[0064] S205, the decoder performs a decoding operation on the encoded tensor after the iteration to generate a pseudo image.
[0065] These pseudo images can then be used as training data sets for further training and optimization of the semi-supervised model. This not only improves the quality of the pseudo images, but also enhances the stability and reliability of the entire semi-supervised model. Moreover, by generating pseudo images as training data for model training, the amount of data for real training samples can be greatly reduced, thereby reducing the workload of manual annotation, improving the efficiency of generating labeled data, and then improving the efficiency of immunofluorescence stained neuron cell body segmentation.
[0066] In order to verify the reliability of the above method, it is compared and analyzed with several popular algorithms. The algorithms are:
[0067] (1) Mean Teacher Model (MT): This is one of the most classic methods in the semi-supervised learning field. It first proposed the teacher-student model of semi-supervised learning, laying the foundation for the development of the semi-supervised learning field.
[0068] (2) Transformation Consistent Self-Ensemble Model (TCSM): TCSM is an improvement on the MT method and has achieved excellent segmentation results in the field of biomedical image segmentation. Many subsequent works are based on this method.
[0069] (3) Hierarchical Consistency Mean Teacher (HS): Based on the TCSM method, this method achieves better segmentation performance by introducing multi-level loss calculation and innovating the loss function.
[0070] (4) Cross-Dense Contrastive Learning (CDCL): CDCL innovatively combines semi-supervised learning with traditional contrastive learning and achieves remarkable results. This method provides a valuable perspective for contrastive analysis.
[0071] (5) Multi-layer Global Context Cross-Consistency Model (MGCC): MGCC combines the recently introduced diffusion model with semi-supervised learning and represents a novel and effective approach. Its innovativeness and relevance to current research trends make it an important component of comparative studies.
[0072] (6) Dual Noise Average Teacher Ensemble Model (DNMT): Based on TCSM, DNMT introduces a dual semi-supervised model training method, which has shown impressive segmentation results. Its effectiveness in tumor segmentation makes it an important part of the benchmark in this paper.
[0073] Cycle GAN: Cycle GAN and Stable Diffusion are both deep learning models for image generation. They both show strong capabilities in image generation tasks.
[0074] Evaluation indicators include precision, recall, Jaccard index (.JA), Dice coefficient (DI) and normalized surface Dice coefficient (NSD) to measure segmentation performance. Precision measures the correct proportion of predicted samples, recall measures the proportion of correctly identified true positive samples, Jaccard quantifies the overlap between predictions and truth, and Dice evaluates the similarity of two samples. The formulas for Precision, Reacall, Dice coefficient and Jaccard index are shown in formulas (1) and (2).
[0075] Among them, TP, TN, FP, and FN are the number of true positives, true negatives, false positives, and false negatives, respectively.
[0076]
[0077] NSD is an uncertainty-aware segmentation metric used to calculate the overlap between the predicted boundary and the actual boundary. The specific formula is shown in formula (3), where S A and S B are the boundaries of set A and set B respectively. B(τ) and A(τ) are the boundary areas of B and A within τ respectively. τ is the maximum tolerance distance. In experiments, τ is usually set to 2 pixels. |S A ∩B(τ)| is S A The number of elements in the boundary region B(τ). A | and |S B |represents the number of elements in boundary A and boundary B respectively.
[0078]
[0079] The main dataset used in the experiment is the whole-brain immunofluorescence staining images of mice generated based on fMOST technology, and the selected images are mainly from the mouse cerebral cortex area, which are uniformly recorded as IS datasets in subsequent experiments. In addition, in order to verify the versatility and reliability of the model, this chapter also includes experimental analysis of the public dataset CRAG, which also contains image resources related to neuroscience research.
[0080] In order to further expand the data set and enhance the training effect of the model, the labeled images are cropped to generate multiple small image fragments that can be used for training from a single large image, thereby increasing the diversity of samples. In addition, the images are rotated and flipped at different angles to simulate various deformations and perspectives that the images may encounter in practical applications, thereby improving the model's adaptability and robustness to image changes. Through these methods, the final dataset constructed includes 405 images of size 512×512 pixels for training, and 100 images of the same size for testing.
[0081] The experimental results based on the IS dataset are as follows: Figure 6 As shown in Figure 2, the qualitative analysis results of using only 5% labeled data for training are shown, where green indicates correct segmentation, blue indicates incorrect segmentation, and red indicates missed segmentation. It can be seen that the method proposed in this paper (Ours) outperforms other methods in segmentation results and greatly reduces missed detection and false detection.
[0082] In addition, a comprehensive quantitative analysis was performed to verify the cell body segmentation ability of the proposed method, as shown in Table 1. As can be seen from Table 1, the three indicators of the proposed method are better than other methods, and the difference with the fully supervised SUP is about 1%. When the same 25% training data is generated by Cycle GAN for training, it can be seen that the three indicators of the proposed method are all more than about 2%, indicating that the quality of the images generated by Cycle GAN is not as good as the quality generated by the proposed method, which also proves the effectiveness of the proposed method.
[0083] Table 1: Quantitative analysis results on the IS dataset
[0084]
[0085]
[0086] The experimental results based on the CRAG dataset are as follows Figure 7As shown in the figure, the qualitative analysis results are shown. Different colors are used to identify different aspects of the segmentation results: the green part represents the correct segmentation area, that is, the area successfully recognized by the model; the red part represents the missed segmentation (missed detection), which means that these areas should be segmented but the model failed to recognize them; the blue part represents the wrong segmentation (false detection), that is, the part that the model mistakenly marked as the target area. Through these color identifications, the accuracy and reliability of the model when processing complex images can be intuitively evaluated. Compared with other comparison methods, the method in this paper has obvious advantages, which are manifested in fewer false detections and missed detections. This shows that the method in this paper is more accurate and reliable in identifying and segmenting target areas. In particular, when compared with the fully supervised method SUP, the method in this paper shows performance close to or even beyond the fully supervised method.
[0087] In addition to the qualitative analysis, this paper also conducts a detailed quantitative analysis to evaluate the performance of this method, as shown in Table 2. Through quantitative analysis, it can be observed that this method shows a significant improvement in all three indicators, and has significant advantages over other existing methods. For example, compared with the method using Cycle GAN, this method has a nearly 5% improvement in performance, which proves the effectiveness of this method in improving the accuracy of medical image segmentation. More importantly, compared with the fully supervised method, this method has only a performance gap of about 2%, which shows that even with less supervision, this method can achieve a performance level similar to that of the fully supervised method.
[0088] Table 2: Quantitative analysis results on the CRAG dataset
[0089] Comparison Method JA% DI% F1-score% SUP 82.09 90.55 90.18 CDCL 74.03 83.96 85.56 TCSM 74.38 84.61 85.91 MT 71.45 82.97 83.58 HS 62.7 75.79 78.70 CycleGAN 75.10 84.75 86.36 MGCC 50.74 66.08 67.99 Ours 80.91 88.98 89.76
[0090] These results highlight the efficiency and feasibility of our method in medical image segmentation tasks. The semi-supervised learning strategy optimized by this paper not only improves the accuracy of segmentation, but also reduces the dependence on a large amount of labeled data. Therefore, our method has important value in practical applications and provides an accurate and efficient solution for medical image analysis.
[0091] Since different training ratios and different numbers of pseudo datasets will lead to different experimental results, this paper also tests the effects of different training ratios and different numbers of generated pseudo datasets on the method. In theory, this paper hopes to use less real data and generate better pseudo datasets, and achieve better segmentation results. The reason for this is that the less annotation cost is needed, the better the training data used. At the same time, since generating pseudo datasets also requires a certain amount of time cost, and a large number of pseudo datasets will affect the segmentation network's feature extraction of the original dataset, the number of pseudo images generated must also be controlled within a certain range, not too much or too little.
[0092] Table 3: Comparative experiments of the methods proposed in this study under different label ratios and numbers of pseudo images
[0093]
[0094] As shown in Table 3, this paper conducted detailed tests under different proportions of training data and different numbers of pseudo images (i.e., generated pseudo images). As can be seen from Table 3, with the increase of the generated pseudo image data set, the final segmentation effect first increases and then decreases. This also shows that if the number of pseudo images is small, it will not bring significant improvement to the semi-supervised model. However, if the proportion of pseudo images is too large, the semi-supervised model will extract wrong features when extracting image features, thereby reducing the segmentation accuracy. From the results, the theory is consistent with the facts. At the same time, under 5% training data, this method only generates 100 data to achieve an effect close to full supervision, which is about 2% different from full supervision. When the training data is 10%, the difference between this method and full supervision is less than 1%, which is enough to show that this method can achieve good segmentation effects with less data and fewer generated images. Compared with the experimental results in Chapter 3, this chapter once again reduces the cost of annotated data, that is, from 10% to 5%. In summary, the method in this chapter can obtain better segmentation effects on fewer data sets, verifying the feasibility of the proposed method.
[0095] like Figure 8 As shown, this embodiment also provides an electronic device, which may include a processor 41 and a memory 42, wherein the memory 42 is coupled to the processor 41. It is worth noting that this figure is exemplary, and other types of structures may be used to supplement or replace this structure to achieve data extraction, report generation, communication or other functions.
[0096] like Figure 8 As shown, the electronic device may further include: an input unit 43, a display unit 44 and a power supply 45. It is worth noting that the electronic device does not necessarily have to include Figure 8In addition, electronic devices may also include Figure 8 For components not shown, reference may be made to the prior art.
[0097] The processor 41 is sometimes also called a controller or an operation control, and may include a microprocessor or other processor devices and / or logic devices. The processor 41 receives inputs and controls the operations of various components of the electronic device.
[0098] The memory 42 may be, for example, one or more of a cache, a flash memory, a hard drive, a removable medium, a volatile memory, a non-volatile memory or other suitable devices, and may store information such as configuration information of the processor 41 and instructions executed by the processor 41. The processor 41 may execute the program stored in the memory 42 to implement information storage or processing. In one embodiment, the memory 42 also includes a buffer memory, i.e., a buffer, to store intermediate information.
[0099] An embodiment of the present invention further provides a computer program product, including computer-readable instructions. When the computer-readable instructions are executed in an electronic device, the program product enables the electronic device to execute the operation steps included in the method of the present invention.
[0100] An embodiment of the present invention further provides a storage medium storing computer-readable instructions, wherein the computer-readable instructions enable an electronic device to execute the operation steps included in the method of the present invention.
[0101] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0102] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0103] The above-described embodiments are only specific implementations of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications, replacements and improvements within the technical scope disclosed by the present invention, and these modifications, replacements and improvements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. A method for segmenting immunofluorescence-stained neuron cell bodies based on semi-supervised and diffusion models, characterized in that: The following steps are involved: S10, training diffusion model and semi-supervised model based on the same original dataset; S20, using the semi-supervised model trained by S10 to segment the unlabeled cell body image, generate pseudo labels, and then input the image containing the pseudo labels into the diffusion model trained by S10 to generate corresponding pseudo images, and the pseudo images constitute a pseudo data set; S30, retraining the semi-supervised model trained in S10 based on the pseudo data set and the original data set, and using the trained semi-supervised model to segment the immunofluorescence stained neuron cell bodies.
2. The immunofluorescence staining neuron cell body segmentation method based on semi-supervised and diffusion model according to claim 1, characterized in that: In S20, the image containing the pseudo label is input into the diffusion model trained in S10 to generate the corresponding pseudo image, including: S201, the encoder encodes the pseudo label to obtain an encoding tensor; S202, performing a Gaussian diffusion operation on the encoded tensor to add noise; S203, ControlNet extracts edge features of the edge map through the canny algorithm, fuses the extracted edge features with the encoding tensor after adding noise, and performs reverse denoising operation on each layer of the fused feature map to remove noise; S204, looping through steps S202 and S203 until a set number of iterations is reached; S205, the decoder performs a decoding operation on the encoded tensor after the iteration to generate a pseudo image.
3. The immunofluorescence staining neuron cell body segmentation method based on semi-supervised and diffusion model according to claim 1, characterized in that: In S10, the amount of labeled data in the original data set accounts for 5%-10% of the total data.
4. The immunofluorescence staining neuron cell body segmentation method based on semi-supervised and diffusion model according to claim 3 is characterized in that: The fusion method in S203 is feature concatenation or weighted summation.
5. The immunofluorescence staining neuron cell body segmentation method based on semi-supervised and diffusion model according to claim 1, characterized in that: In S30, the semi-supervised model is a mean teacher model combined with contrastive learning.
6. The immunofluorescence staining neuron cell body segmentation method based on semi-supervised and diffusion model according to claim 1, characterized in that: In S10, the original data set includes the acquired real cell body image and the supplementary image obtained based on the real cell body image.
7. The method for segmenting neuron soma using immunofluorescence staining based on semi-supervised and diffusion models according to claim 6, characterized in that: The supplementary image is obtained by cropping, rotating at different angles and flipping the labeled image.
8. A computer program product comprising computer readable instructions, characterized in that: When the computer-readable instructions are executed by a processor, the steps in the immunofluorescence-stained neuron cell body segmentation method based on a semi-supervised and diffusion model described in any one of claims 1 to 7 are implemented.
9. A computer-readable storage medium comprising computer-readable instructions, characterized in that: When the computer-readable instructions are executed by a processor, the steps in the immunofluorescence-stained neuron cell body segmentation method based on a semi-supervised and diffusion model described in any one of claims 1 to 7 are implemented.
10. An electronic device, characterized in that: include: Memory, which stores program instructions; A processor is connected to the memory and executes program instructions in the memory to implement the steps in the immunofluorescence stained neuron cell body segmentation method based on semi-supervised and diffusion models as described in any one of claims 1 to 7.
Citation Information
Cited By
Text sentiment classification method and system
CN116738289A
A text sentiment classification method and system
CN116738289B
Semi-supervised natural language time sequence positioning method based on diffusion model and related device
CN120411851A
A Semi-Supervised Natural Language Temporal Localization Method and Related Devices Based on Diffusion Model
CN120411851B
