Colorectal cancer image segmentation method and system, and medium

Through student-teacher network architecture and pseudo-labeling technology, the dependence on labeled data in colorectal cancer image segmentation is solved, efficient use of unlabeled data is achieved, and the segmentation performance and generalization ability of the model are improved.

CN119741499AActive Publication Date: 2025-04-01THE SECOND AFFILIATED HOSPITAL OF NAVAL MEDICAL UNIVERSITY PLA

Patent Information

Application Number
CN202510214030.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-26
Publication Date
2025-04-01
Estimated Expiration
2045-02-26

AI Technical Summary

Technical Problem

The prior art relies on too much labeled data in colorectal cancer image segmentation, resulting in scarce data, high cost, and insufficient generalization capabilities of the model, making it difficult to adapt to the lack of data or data distribution changes.

Method used

The student teacher network architecture is used to combine pseudo-label technology, and the labeled data is used for supervising learning, and the pseudo-label generation is optimized by unlabeled data, reducing dependence on the labeled data, and improving the learning efficiency and generalization ability of the model.

Benefits of technology

It significantly reduces the demand for labeled data, improves the utilization rate of unlabeled data, enhances the model's ability to segment complex areas, reduces labeling costs, and improves the generalization ability of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119741499A_ABST
    Figure CN119741499A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image segmentation, in particular to a colorectal cancer image segmentation method and system and a medium. The method comprises the following steps: acquiring colorectal cancer image annotation data and unannotated data; initializing a student-teacher network architecture to obtain a student network model and a teacher model; performing supervised learning on the student network by using the annotation data to obtain a preliminarily optimized student network model; inputting the unlabeled data into the preliminarily optimized student network to generate prediction data, and performing pseudo-label calculation on the prediction data and the unlabeled data to obtain pseudo-label data; optimizing the student network in combination with the pseudo tag data to obtain a secondary optimized student network model; and updating the teacher model by using the secondary optimization student network, and further optimizing the teacher model by using the annotation data to obtain a colorectal cancer image segmentation model. According to the method, the colorectal cancer image segmentation model with high precision and strong robustness is realized by utilizing limited annotated data and combining a large amount of unannotated data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image segmentation, and in particular to a method, system and medium for colorectal cancer image segmentation. Background Art

[0002] With the rapid development of medical imaging technology, CT (computed tomography) imaging has become an important non-invasive method for early screening and diagnosis of colorectal cancer. Through CT images, the internal tissue structure and abnormal areas of the human body, especially the growth of tumors, can be observed. However, due to the characteristics of fuzzy boundaries, complex shapes, and different sizes of tumor areas, accurate segmentation of tumor areas in CT images is still a huge technical challenge.

[0003] With the rise of deep learning, Convolutional Neural Networks (CNNs) have been widely used in medical image segmentation tasks. Among them, U-Net and its variants have become the most commonly used segmentation architectures. Deep learning-based methods have the following advantages: they can automatically learn multi-level features in images to achieve high-precision segmentation. By introducing convolution operations, the global context and local details of the tumor area can be captured. However, deep learning-based segmentation methods also face the following problems, such as dependence on labeled data. The labeling of medical images requires manual operation by clinical experts, which is cumbersome and costly. The scarcity of labeled data limits the performance of deep learning models; the generalization ability is insufficient. Since the model mainly relies on labeled data during training, its performance degrades when no data is seen or the data distribution changes. Summary of the invention

[0004] In order to solve the above technical problems, the present invention proposes a method, system and medium for colorectal cancer image segmentation to solve at least one of the above technical problems.

[0005] The present application provides a method for colorectal cancer image segmentation, comprising the following steps: Step S1: acquiring colorectal cancer image data, wherein the colorectal cancer image data includes colorectal cancer image annotated data and colorectal cancer image unannotated data; Step S2: Initializing the student-teacher network architecture according to the colorectal cancer image data to obtain an initialized student network model and an initialized teacher model; Step S3: supervise the initialization of the student network model according to the annotated data of the colorectal cancer images to obtain a preliminary optimized student network model; input the unlabeled data of the colorectal cancer images into the preliminary optimized student network model for calculation to obtain preliminary student model prediction data, and perform pseudo-label calculation on the unlabeled data of the colorectal cancer images and the preliminary student model prediction data to obtain pseudo-label data; optimize the preliminary optimized student network model according to the preliminary student model prediction data and the pseudo-label data to obtain a secondary optimized student network model; Step S4: Update the parameters of the initialized teacher model according to the secondary optimized student network model to obtain an updated teacher model, and optimize the updated teacher model according to the colorectal cancer image annotation data to obtain a colorectal cancer image segmentation model.

[0006] The present invention makes full use of the unlabeled data of colorectal cancer images by introducing pseudo-label technology and student-teacher network architecture, reducing excessive reliance on labeled data. The demand for labeled data is greatly reduced, while the potential information contained in the unlabeled data is mined. The teacher network is updated by exponential moving average (EMA), and the parameters are smoother and more robust to noise, providing high-quality guidance for the generation of pseudo-labels for unlabeled data. On the basis of supervised learning, the student network is further optimized by pseudo-labels to iteratively improve the segmentation performance. Pseudo-label generation improves the credibility of pseudo-labels by combining student model predictions with unlabeled data. The pseudo-label data is regionally verified and dynamically optimized, and low-confidence areas and erroneous labels are eliminated to improve the quality of pseudo-labels. Under the joint action of labeled data and unlabeled data, the model undergoes multiple optimizations (such as preliminary optimization, secondary optimization, and teacher network update) to form a closed-loop improvement mechanism. The parameters of the student network and the teacher network gradually approach the optimal, making the generated image segmentation model more excellent.

[0007] Preferably, step S1 specifically includes: Interact with multi-center hospital image databases through medical image data interfaces to obtain preliminary colorectal cancer CT image data; The preliminary colorectal cancer CT image data are grouped to obtain labeled data and unlabeled data; Extracting annotation features from the annotation data to obtain annotation feature data; Perform non-labeled data screening on the non-labeled data to obtain non-labeled screened data; Data enhancement is performed on the labeled feature data and the unlabeled screened data to obtain colorectal cancer image labeled data and colorectal cancer image unlabeled data, respectively.

[0008] In the present invention, colorectal cancer CT imaging data are obtained from multiple authoritative medical data sources to ensure the diversity, representativeness and real clinical value of the data. The grouping of labeled data and unlabeled data is the basis for subsequent supervised learning and pseudo-label generation. The labeled data is extracted separately to ensure the high quality of supervised learning; the unlabeled data is separated to facilitate pseudo-label generation and optimization. The feature expression ability of the labeled data is improved, and the redundant burden of model training is reduced. Focus on key areas (such as tumor boundaries) to improve the learning efficiency and segmentation accuracy of the model. Use quality assessment algorithms (such as clarity, noise level, and completeness) to screen unlabeled data and eliminate low-quality data (such as samples with low resolution, high noise or damaged data). The quality of unlabeled data is guaranteed by screening, providing high-quality input for pseudo-label generation. The scale of labeled data and unlabeled data is expanded, alleviating the problem of insufficient labeled data. The adaptability of the model to different scenarios and different tumor morphologies is enhanced.

[0009] Preferably, step S2 specifically includes: Extracting dimensionality characteristics based on the colorectal cancer image data to obtain dimensionality characteristics data; Generate network structure based on dimensionality characteristic feature data to obtain network architecture metadata; The student-teacher network architecture is initialized according to the network architecture metadata to obtain an initialized student network model and an initialized teacher model respectively.

[0010] In the present invention, the dimensional characteristics of colorectal cancer CT image data are analyzed, including image resolution, spatial dimension (2D or 3D), signal intensity distribution and other characteristics. These characteristics are extracted as expressions of the dimension and complexity of the input data, and mapped through a preset parameter library to design an adaptive network architecture. Images generated by different CT devices or scanning protocols have different dimensional characteristics (such as slice thickness and resolution). By extracting dimensional characteristics, the generated network architecture can adapt to different input data, enhancing the versatility of the method. For images of different resolutions, the input layer and intermediate layer parameters of the network are adjusted to avoid unnecessary computational overhead. Combined with dimensional characteristics, the network architecture is automatically generated, including key parameters such as input layer dimension, number of convolutional layers, number of feature channels, and number of downsampling times. Adopting a search-based architecture generation method (such as NAS, Neural Architecture Search) or a rule-driven method to generate an adaptive network architecture, the network architecture generated based on data characteristics can better meet the actual data requirements, thereby improving the training efficiency and segmentation performance of the model. The student network is used for direct training, and the teacher network is smoothly updated by the exponential moving average (EMA) parameter of the student network. In the initial stage, the weights of the teacher network are consistent with those of the student network, ensuring the stability of training. The EMA smoothing parameter update of the teacher network avoids the impact of student network parameter fluctuations on model performance during training. The initialized student and teacher network parameters are consistent, providing reliable initial conditions for pseudo-label generation.

[0011] Preferably, step S3 is specifically: The initialized student network model was supervised and learned based on the annotated data of colorectal cancer images to obtain a preliminary optimized student network model; The unlabeled data of colorectal cancer images are input into the preliminary optimized student network model for calculation to obtain the preliminary student model prediction data; Calculate spatially consistent pseudo labels for unlabeled colorectal cancer image data and preliminary student model prediction data to obtain spatially consistent pseudo label data; Comparative learning pseudo-label calculations are performed on the unlabeled data of colorectal cancer images and the data predicted by the preliminary student model to obtain comparative learning pseudo-label data; Confidence screening is performed based on spatial consistency pseudo-label data and comparative learning pseudo-label data to obtain pseudo-label data; The preliminary optimized student network model is optimized according to the preliminary student model prediction data and pseudo-label data to obtain a secondary optimized student network model.

[0012] In the present invention, the labeled data is used for supervised learning to improve the initial segmentation ability of the student network. At the same time, the potential information of the unlabeled data is fully explored through the pseudo-label generation technology to improve the learning efficiency of the model. The pseudo-label is generated by spatial consistency constraint, and the spatial relationship between pixels is used to ensure the smoothness and continuity of the pseudo-label. The conditional random field (CRF) or joint histogram and other technologies are introduced to make the pseudo-label more accurate in the boundary and small area. The pseudo-label is generated by contrastive learning method, and the pseudo-label is enhanced to distinguish complex background and blurred area through feature similarity analysis. The pseudo-label is generated by dynamically contrasting the target sampling and spatial perception characteristics, so that the model is more adaptable to complex scenes. By screening the confidence of the pseudo-label, high-quality labels are retained and low-quality labels are eliminated. Dynamic thresholds (such as dynamic screening strategies based on mean and standard deviation) are used to ensure the flexibility of the screening results. Supervised learning is used for the preliminary optimization of the model, and pseudo-label generation and optimization are used to further improve the segmentation performance. The model gradually achieves a stable improvement in performance through preliminary optimization and secondary optimization. At the same time, spatial consistency pseudo labels and contrastive learning pseudo labels are introduced. Pseudo labels are generated from multiple angles to enhance the diversity and adaptability of pseudo label generation. The confidence level is used to filter and fuse the two pseudo labels to retain the high-quality parts and remove the noise. Supervised learning of labeled data improves the initial segmentation performance, and pseudo label optimization of unlabeled data enhances the generalization ability of the model. In some special scenarios (such as blurred tumor boundaries of colorectal cancer and segmentation of small lesion areas), the model performs better.

[0013] Preferably, step S4 is specifically: Update the parameters of the initialized teacher model according to the secondary optimized student network model to obtain an updated teacher model; The updated teacher model is optimized according to the annotated data of colorectal cancer images to obtain the teacher annotation optimization model; The teacher annotation optimization model is optimized according to the pseudo-label data to obtain the teacher pseudo-label optimization model; The weights of the teacher pseudo-label optimization model were frozen to obtain the colorectal cancer image segmentation model.

[0014] The parameters of the teacher model in the present invention are updated by the exponential moving average (EMA) of the student model, which smoothes the noise and fluctuations in training and makes the teacher model more stable. The teacher model gradually approaches the optimal parameters through the EMA mechanism, ensuring that the generated pseudo-labels have high quality. The teacher model is optimized using labeled data to make it more accurate in segmenting tumor areas (especially areas with complex boundaries). The optimized teacher model is more reliable when generating pseudo-labels, avoiding the negative impact of low-quality labels on model training. The teacher model is optimized using high-quality pseudo-labels so that it can extract more potential information from unlabeled data and further improve the generalization ability of the model. Through pseudo-label optimization, the teacher model can absorb the knowledge of labeled data and unlabeled data at the same time, realizing the advantages of semi-supervised learning. After the teacher model is optimized, its weights are frozen to generate a segmentation model, avoiding parameter drift in further training. The frozen model can be directly used for reasoning, improving efficiency and stability in clinical applications. The parameter update of the teacher model depends on the secondary optimization results of the student model. The collaborative optimization of the two forms a closed loop, gradually improving the performance of the overall network. The student model focuses on dynamically learning labeled data and pseudo-labels, while the teacher model steadily improves the performance through smooth parameter updates.

[0015] Preferably, the spatial consistency pseudo label calculation is specifically as follows: The geological distance was calculated for the unlabeled data of colorectal cancer images and the preliminary student model prediction data to obtain the geological distance map data; Calculate the confidence of the preliminary student model prediction data to obtain confidence map data; Perform multi-scale analysis based on the geological distance map data and the confidence map data to obtain geological distance map multi-scale data and confidence map multi-scale data respectively; According to the multi-scale data of the geological distance map and the multi-scale data of the confidence map, spatial consistency constraints are performed to obtain consistent segmentation data; The confidence of the preliminary student model prediction data is screened according to the consistent segmentation data to obtain spatially consistent pseudo-label data.

[0016] The geological distance calculation in the present invention can effectively capture the spatial relationship between pixels, especially modeling the spatial continuity of the tumor region boundary. The geological distance map highlights the spatial separation between the target area (such as a tumor) and the background area, so that the model can more accurately identify the tumor area. According to the prediction probability of the student model, confidence map data is generated to evaluate the classification credibility of each pixel. The pseudo-labels in the high-confidence area are more credible, and the low-confidence area is eliminated through the screening mechanism to ensure the high quality of the pseudo-label. Multi-scale analysis captures the global features and local details of the target area by processing the geological distance map and the confidence map at different resolutions. Capturing the boundary details of the tumor at a small scale and capturing the global characteristics at a large scale improves the model's ability to segment complex areas. Using the multi-scale data of geological distance and confidence, the smoothness and coherence of the pseudo-label in space are ensured through consistency constraints. The consistent segmentation data further improves the accuracy of the pseudo-label by eliminating isolated pixels and discontinuous areas. The low-confidence areas in the consistent segmentation data are eliminated, and only the pseudo-label data with high confidence is retained, further improving the reliability of the pseudo-label. The flexibility and adaptability of pseudo-label filtering are ensured through the threshold filtering mechanism.

[0017] Preferably, the pseudo-label calculation of contrastive learning is specifically as follows: The unlabeled data of colorectal cancer images are extracted by preliminarily optimizing the student network model to obtain multi-level feature data; Multi-level features are processed in blocks to obtain local feature embedding data; Perform feature alignment based on local feature embedding data to obtain global alignment feature data; Performing comparison target sampling on the global alignment feature data to obtain comparison target data; Perform contrast learning data enhancement according to contrast target data to obtain enhanced contrast target data; Perform feature aggregation according to the enhanced contrast target data to obtain aggregated feature data; Perform cross-node comparison and consistency optimization based on aggregated feature data to obtain consistent optimized feature data; Generate similarity pseudo labels based on the consistent optimized feature data to obtain preliminary pseudo label data; Perform pseudo-label region verification based on preliminary pseudo-label data and preliminary student model prediction data to obtain pseudo-label verification data; Gaussian smoothing is performed on the pseudo-label verification data to obtain the pseudo-label data for comparative learning; The comparison target sampling is as follows: Performing target area boundary analysis on the global alignment feature data to obtain boundary feature data; Performing target area confidence assessment according to the boundary feature data to obtain target area confidence assessment data; When it is determined that the target area area data corresponding to the target area confidence evaluation data is greater than or equal to the preset target area area threshold data, sparse sampling is performed according to the target area confidence evaluation data to obtain comparison target sampling data; When it is determined that the target area area data corresponding to the target area confidence evaluation data is less than the preset target area area threshold data, dense sampling is performed according to the target area confidence evaluation data to obtain comparative target sampling data; Conduct confidence-guided target screening according to the comparison target sampling data to obtain confidence screening data; The data is filtered according to the confidence level to generate a spatial perception target, thereby obtaining spatial perception target data; According to the spatial perception target data, regional and background contrast target sampling is performed to obtain contrast target data.

[0018] The present invention captures multi-level feature data of shallow features (such as texture, edge information) and deep features (such as semantic information) to ensure that the model fully captures features of different scales and complexities. The computational complexity is reduced by the block and embedding mechanism, while enhancing the coherence of the feature expression of the local area. The alignment process eliminates the distribution differences of features between different scales and regions, and provides high-quality basic features for subsequent pseudo-label generation. The sampling strategy is dynamically adjusted to generate contrast target data based on confidence, spatial perception and boundary shape to ensure the pertinence and diversity of the sampled data. The sampling strategy ensures that the sampling is concentrated on the core area of ​​the tumor and the key area of ​​the boundary, avoiding excessive attention to non-related background areas. Data enhancement makes the model more adaptable to tumor areas of different shapes, scales and orientations, and reduces dependence on specific data distribution. Aggregation enhances the features of the contrast target data, and uses consistency optimization to ensure the coherence of feature expression globally and locally. The similarity pseudo-label generation strategy effectively captures the feature differences between the target area and the background, avoiding the generation of erroneous labels. Gaussian smoothing reduces isolated noise points in pseudo-labels and improves the spatial continuity of pseudo-labels.

[0019] The boundary information of the target area is extracted by using boundary detection algorithms (such as Canny or Sobel operators), and the boundary features are optimized by combining morphological operations. The extracted boundary feature data clarifies the shape, size and boundary complexity of the target area. The average confidence of the target area is calculated through the prediction results of the student network to evaluate the reliability of the model in classifying the target area. The high-confidence area is marked as a reliable target, and the low-confidence area is further processed through the subsequent screening mechanism. Sparse sampling is used for target areas with larger areas to avoid redundant data affecting the calculation efficiency. Dense sampling is used for target areas with smaller areas to capture more detailed information and ensure sufficient learning of small target areas. Based on confidence sorting, sampling points with lower confidence are eliminated, and only target data with high confidence is retained. The filtered target data is more accurate, which is helpful for subsequent feature processing and comparative learning. Combined with spatial distribution information (such as distance, density and adjacent relationship), a spatial perception matrix is ​​generated to clarify the spatial relationship of the target area. Spatially perceived target generation makes the target data more consistent with the actual spatial distribution characteristics. The high-confidence pixels in the target area are sampled, and the pixels in the background area with the largest feature difference from the target area are compared. The comparative sampling of the area and the background enables the model to better distinguish the target area from the background area.

[0020] Preferably, the multi-scale analysis is specifically: Perform preliminary multi-scale division according to the geological distance map data and the confidence map data to obtain preliminary multi-scale data of the geological distance map and preliminary multi-scale data of the confidence map; Perform global local entropy calculation based on preliminary multi-scale data of geological distance map and preliminary multi-scale data of confidence map to obtain multi-scale entropy data of geological distance map and multi-scale entropy data of confidence map; Multi-scale entropy similarity calculation is performed based on the multi-scale entropy data of the geological distance map and the multi-scale entropy data of the confidence map to obtain multi-scale entropy similarity data; According to the multi-scale entropy similarity data, the preliminary multi-scale data of the geological distance map and the preliminary multi-scale data of the confidence map are screened for non-similar entropy, and the multi-scale screening data of the geological distance map and the multi-scale screening data of the confidence map are obtained respectively; The consistency distribution calculation is performed based on the multi-scale screening data of the geological distance map and the multi-scale screening data of the confidence map to obtain the multi-scale data of the geological distance map and the multi-scale data of the confidence map.

[0021] In the present invention, the input data is divided into multiple scales, and the geological distance map and the confidence map are divided into versions of different scales to adapt to different resolutions and target sizes. The preliminary division captures global features and local features, so that the data shows diversity at different scales. Entropy calculation is used to measure the complexity and uncertainty of information in the image, and distinguish between structured areas (such as tumors) and unstructured areas (such as background). Global entropy calculation evaluates the overall information distribution, and local entropy calculation captures the complexity of information in a small range. The similarity between the two at multiple scales is quantified using entropy similarity to capture the relationship between geological distance and confidence. Similarity calculation compares the distribution consistency between multi-scale data and eliminates inconsistent areas. Screen out inconsistent or abnormal areas in multi-scale data, and eliminate high noise or low confidence areas. The eliminated areas are determined by threshold methods (such as screening strategies based on mean and standard deviation) to ensure screening flexibility and robustness. Consistent distribution calculation ensures the distribution coherence of multi-scale data at different resolutions, providing high-quality input for pseudo-label generation and model optimization. The combination of geological distance map and confidence map multi-scale data provides more spatial and semantic information for pseudo-label generation. After removing abnormal areas, pseudo-label generation is more accurate and reduces the interference of erroneous labels.

[0022] Preferably, the present application also provides a system for colorectal cancer image segmentation, which is used to execute the above-mentioned method for colorectal cancer image segmentation, and the system comprises: A colorectal cancer image data acquisition module, used to acquire colorectal cancer image data, wherein the colorectal cancer image data includes colorectal cancer image annotated data and colorectal cancer image unannotated data; A student-teacher network architecture initialization module is used to initialize the student-teacher network architecture according to colorectal cancer image data, and obtain an initialized student network model and an initialized teacher model respectively; The secondary optimized student network model construction module is used to perform supervised learning on the initialized student network model according to the annotated data of colorectal cancer images to obtain a preliminary optimized student network model; input the unlabeled data of colorectal cancer images into the preliminary optimized student network model for calculation to obtain preliminary student model prediction data, and perform pseudo-label calculation on the unlabeled data of colorectal cancer images and the preliminary student model prediction data to obtain pseudo-label data; optimize the preliminary optimized student network model according to the preliminary student model prediction data and the pseudo-label data to obtain a secondary optimized student network model; The colorectal cancer image segmentation model generation module is used to update the parameters of the initialized teacher model according to the secondary optimized student network model to obtain an updated teacher model, and optimize the updated teacher model according to the colorectal cancer image annotation data to obtain the colorectal cancer image segmentation model.

[0023] Preferably, the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, wherein the computer program is configured to execute the method described in any of the above items when running.

[0024] The beneficial effects of the present invention are as follows: the present invention combines labeled data and unlabeled data, uses labeled data to supervise the training of the student network, and fully mines the unlabeled data through pseudo-label generation technology. The utilization rate of unlabeled data is significantly improved, reducing the dependence on manually labeled data, thereby reducing the labeling cost. Pseudo-label generation combines spatial consistency pseudo-label calculation and contrastive learning pseudo-label calculation, and generates accurate and reliable pseudo-labels from the perspectives of spatial consistency and feature comparison, respectively. Spatially consistent pseudo-labels use geological distances and confidence maps, combined with multi-scale analysis and consistency distribution calculation, to improve the spatial coherence of pseudo-labels. Contrastive learning pseudo-labels generate high-quality pseudo-labels through feature alignment, dynamic sampling and similarity calculation, significantly improving the effective utilization of unlabeled data. The teacher network is updated through the exponential moving average (EMA) parameters of the student network, and the parameters are smoother and more robust to noise, which improves the stability of pseudo-label generation. Under multiple optimizations of labeled data and pseudo-label data, the teacher network gradually improves the segmentation ability of complex areas (such as fuzzy boundary areas and small lesions). The student network forms a closed loop through supervised learning and semi-supervised pseudo-label optimization, and the segmentation performance is continuously improved during training. The present invention makes model training more efficient by combining supervised learning of labeled data and semi-supervised pseudo-label optimization of unlabeled data. The teacher network parameters are updated through EMA to further smooth parameter changes and avoid shock and instability during training. The present invention is suitable for scenarios where labeled data is insufficient but unlabeled data is abundant, and the dependence on labeled data is greatly reduced through pseudo-label generation technology. In medical image segmentation tasks, labeled data is often scarce and expensive, so the present invention has a high application value. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting implementations made with reference to the following drawings: Figure 1 A flowchart of a method for colorectal cancer image segmentation according to an embodiment is shown; Figure 2 A flowchart showing the steps of a method for collecting colorectal cancer image data according to an embodiment is shown; Figure 3 A flow chart showing the steps of a method for initializing a student-teacher network architecture according to an embodiment is shown; Figure 4 A flowchart showing a method for constructing a secondary optimized student network model according to an embodiment is shown; Figure 5 A flowchart of the steps of a method for generating a colorectal cancer image segmentation model according to an embodiment is shown. DETAILED DESCRIPTION

[0026] The following is a clear and complete description of the technical method of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by technicians in this field without creative work are within the scope of protection of the present invention.

[0027] In addition, the accompanying drawings are only schematic illustrations of the present invention and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. The functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor methods and / or microcontroller methods.

[0028] It should be understood that, although the terms "first", "second", etc. may be used herein to describe various units, these units should not be limited by these terms. These terms are used only to distinguish one unit from another unit. For example, without departing from the scope of the exemplary embodiments, the first unit may be referred to as the second unit, and similarly the second unit may be referred to as the first unit. The term "and / or" used herein includes any and all combinations of one or more of the listed associated items.

[0029] The labeled dataset is 100,000 colorectal cancer CT images (labeled, each image size is 512×512 pixels). The unlabeled dataset is 500,000 colorectal cancer CT images (unlabeled). The model architecture is that the student network is based on the U-Net segmentation architecture of ResNet-50. The teacher network has the same architecture as the student network, and the parameters are updated through EMA. The student network is trained using labeled data and unlabeled data, and the utilization efficiency of unlabeled data is improved through pseudo-label generation. The goal is to improve the segmentation performance (measured by the Dice coefficient, the higher the better).

[0030] Obtain labeled data and unlabeled data. The labeled data is 100,000 CT images, and each image is labeled with the pixel mask of the tumor area. The unlabeled data is 500,000 CT images without any annotations. Normalize all images and adjust the pixel value range to [0,1]. Flip, rotate (random angle) and scale the labeled data to expand the labeled data set to 300,000 images.

[0031] The student network is a U-Net architecture based on ResNet-50, with randomly initialized weights. The initial parameters of the teacher network are the same as those of the student network. The input image size is 512×512. The output segmentation map size is 512×512. The initial convolutional layer output channels are 64, which increase layer by layer. The labeled data (300,000 images) is used as input. The supervised learning uses Dice loss. , where P is the predicted mask and G is the true mask. After preliminary training on the labeled data, the Dice coefficient of the student network on the validation set increased from the initial 0.55 to 0.72.

[0032] 500,000 unlabeled data were input into the student network to generate preliminary prediction results. In a certain unlabeled image, the student network predicted that the mask size of the tumor area was 2000 pixels. Through distance transformation, the distance from the tumor boundary to the target pixel was obtained to obtain a geological distance map. Based on the classification probability predicted by the student network, the confidence distribution of each pixel was generated to obtain a confidence map. The geological distance map and confidence map were divided into blocks, and the local entropy and global entropy were calculated. For example, the local entropy distribution of a certain image showed that the entropy value of the boundary area was 0.85, and the entropy value of the central area was 0.65. Pixels with confidence values ​​lower than 0.6 were removed to obtain spatially consistent pseudo labels.

[0033] Dynamic sampling is performed on the target area, with dense sampling for small tumor areas (area < 1500 pixels) and sparse sampling for large tumor areas. The similarity of features in different regions is calculated by cosine similarity, and pseudo labels for comparative learning are screened out.

[0034] The student network is optimized using pseudo-label training, using the loss function: ,in is the Dice loss based on pseudo labels, After pseudo-label optimization, the Dice coefficient of the student network increased from 0.72 to 0.79.

[0035] Use the student network to update the teacher network, and the EMA update formula is: ,in is the model weight of the current teacher network, including convolution kernel weight, bias, etc., is the model weight of the current student network, including convolution kernel weight, bias, etc., λ=0.99. Use the labeled data to further optimize the teacher network to enhance the segmentation ability of high confidence areas. Use pseudo-label data for secondary optimization to improve the generalization ability of the teacher network. After the optimization is completed, freeze the weight of the teacher network as the segmentation model.

[0036] On the test set (500,000 unlabeled CT images), the segmentation model achieved a Dice coefficient of 0.84, which is 12% higher than the model trained with labeled data only (Dice coefficient 0.72). The labeled data training time is 500 hours. The pseudo-label generation time for unlabeled data is 100 hours. The total training time is 600 hours.

[0037] See also Figures 1 to 5 , the present application provides a method for colorectal cancer image segmentation, comprising the following steps: Step S1: acquiring colorectal cancer image data, wherein the colorectal cancer image data includes colorectal cancer image annotated data and colorectal cancer image unannotated data; Specifically, by cooperating with multiple medical institutions, the medical imaging data interface is used to obtain CT image data of colorectal cancer patients. The data includes annotated colorectal cancer image data with expert annotations and unlabeled data. In the acquired image data, the annotated data and unlabeled data are first grouped. The annotated data is used for supervised learning training, and the unlabeled data is used to generate pseudo labels. In the annotated data, the regional feature information of colorectal cancer is extracted, such as the size, shape, and boundary of the tumor. Data enhancement processing is performed on the annotated data and the unlabeled data, including rotation, translation, scaling, flipping, cropping, etc., in order to increase the diversity of the data and thus improve the generalization ability of the model.

[0038] Step S2: Initializing the student-teacher network architecture according to the colorectal cancer image data to obtain an initialized student network model and an initialized teacher model; Specifically, based on colorectal cancer image data, the dimensional characteristic features of the image, such as the texture, shape and structural information of the image, are extracted through a deep learning model. According to the extracted dimensional characteristic feature data, a network structure suitable for colorectal cancer image segmentation is generated. The network structure includes a student network and a teacher network. The student network is used to learn the target segmentation task, while the teacher network is used to guide the learning direction of the student network. The student network model and the teacher model are initialized using the generated network architecture metadata. The parameters of the initial student network and teacher network are usually randomly initialized, or initialized using parameters pre-trained from other image segmentation tasks to speed up convergence.

[0039] Step S3: supervise the initialization of the student network model according to the annotated data of the colorectal cancer images to obtain a preliminary optimized student network model; input the unlabeled data of the colorectal cancer images into the preliminary optimized student network model for calculation to obtain preliminary student model prediction data, and perform pseudo-label calculation on the unlabeled data of the colorectal cancer images and the preliminary student model prediction data to obtain pseudo-label data; optimize the preliminary optimized student network model according to the preliminary student model prediction data and the pseudo-label data to obtain a secondary optimized student network model; Specifically, the annotated data of colorectal cancer images are input into the initialized student network for supervised learning training. During the training process, the cross entropy loss function is used to optimize the student network so that it can accurately predict the colorectal cancer area. After several rounds of training, a preliminary optimized student network model is obtained. The unlabeled colorectal cancer image data is input into the preliminary optimized student network for prediction and to generate the predicted data of the preliminary student model. Pseudo-label calculation is performed based on the predicted data of the student model and the data of the unlabeled image. The pseudo-label refers to the inference result of the student model for the unlabeled data. The pseudo-label will be regarded as a "virtual label" for further training of the model. The predicted data of the preliminary student model and the pseudo-label data are combined as a training set to continue to optimize the student network model. Through the back-propagation algorithm, the student network is adjusted according to the difference between the true label and the pseudo-label, thereby obtaining a secondary optimized student network model.

[0040] Step S4: Update the parameters of the initialized teacher model according to the secondary optimized student network model to obtain an updated teacher model, and optimize the updated teacher model according to the colorectal cancer image annotation data to obtain a colorectal cancer image segmentation model.

[0041] Specifically, the parameters of the initialized teacher model are updated according to the secondary optimized student network model. The knowledge gradually learned by the student network during the training process will be used to guide the teacher network, thereby improving the accuracy of the teacher model. The teacher model is updated with a slower learning rate to avoid over-adjustment. The updated teacher model is further optimized using the annotated colorectal cancer image data. Through supervised learning, the teacher model is trained on the annotated data and its segmentation accuracy is further improved. The optimization process includes fine-tuning the parameters of the teacher model to better match the annotated data. In addition to using annotated data, pseudo-label data can also be used to optimize the teacher model to increase the model's learning ability on unlabeled data and improve the robustness of the model. After the teacher model is fully optimized, its weight parameters are frozen to avoid further training. At this point, the teacher model has a strong ability to segment colorectal cancer images, and the resulting teacher model is a colorectal cancer image segmentation model that can automatically segment colorectal cancer areas on new images.

[0042] Preferably, step S1 specifically includes: Step S11: interacting with the multi-center hospital image database through a medical image data interface to obtain preliminary colorectal cancer CT image data; Specifically, the CT image data of colorectal cancer patients is obtained by interacting with the image database of multiple central hospitals through the medical image data interface. The database contains CT scan images of multiple colorectal cancer patients and their related pathological information.

[0043] Step S12: grouping the preliminary colorectal cancer CT image data to obtain labeled data and unlabeled data; Specifically, the preliminary colorectal cancer CT image data obtained are divided into two groups according to whether they contain expert annotations: annotated data and unannotated data. Annotated data refers to CT images of colorectal cancer tumor areas that have been annotated by medical experts. Usually, these data contain information such as tumor location, size, and shape; unannotated data do not have expert annotations and contain colorectal cancer CT images that have not been manually identified.

[0044] Step S13: extracting annotation features from the annotation data to obtain annotation feature data; Specifically, feature extraction is performed on the labeled data to extract representative image features from the CT images of colorectal cancer. The labeled data is processed using common image processing methods (such as edge detection, texture analysis, shape analysis, etc.) to obtain labeled feature data. The labeled feature data will contain the boundary information, texture features, structural features, etc. of colorectal cancer tumors, providing the student network with the target information needed for training.

[0045] Step S14: performing non-labeled data screening on the non-labeled data to obtain non-labeled screened data; Specifically, the unlabeled data is screened to remove irrelevant or poor quality images to ensure that the screened data can effectively participate in pseudo label generation and model training. The screening process can be carried out by checking factors such as image quality, resolution, and noise in the image. For example, CT images that are too blurry or incomplete are removed, and those with clear structures and high image quality are retained, ensuring that the unlabeled data only contains high-quality data, which will be used to generate pseudo labels.

[0046] Step S15: performing data enhancement on the annotated feature data and the unannotated screening data to obtain the annotated data of the colorectal cancer image and the unannotated data of the colorectal cancer image, respectively.

[0047] Specifically, data enhancement processing is performed on the labeled data and the filtered unlabeled data to increase the diversity of the data and improve the generalization ability of the model, including rotation and flipping, randomly rotating or flipping the image to simulate images at different angles; scaling and cropping, scaling the image or cropping different areas from the image to enhance the model's adaptability to objects of different sizes; translation and mirroring, translating and mirroring the image to simulate the spatial changes of the image; noise addition, adding a certain degree of noise to the image to make the model more robust during training.

[0048] Two data sets were obtained: annotated colorectal cancer image data and unlabeled colorectal cancer image data. The annotated data contains information about tumor regions annotated by experts and can be used directly for supervised learning; the unlabeled data can be used for pseudo-label generation and unsupervised learning after screening and data enhancement. The generated data set has the high-quality annotated data and unlabeled data required for training deep learning models, providing a sufficient foundation for network training.

[0049] Preferably, step S2 specifically includes: Step S21: extracting dimensionality characteristics based on the colorectal cancer image data to obtain dimensionality characteristics data; Specifically, in this step, the dimensionality characteristics of the colorectal cancer image data are first extracted. Dimensionality characteristics refer to information that describes the shape, texture, structure, etc. of the image. The model captures the unique manifestations of colorectal cancer. The image is processed by a deep learning model or traditional image processing methods (such as texture analysis, shape analysis, etc.) to extract the dimensionality characteristics of the image. The edge detection algorithm is used to extract the edge features of the tumor in the image. This can help the network accurately locate the boundaries of the tumor during segmentation. Texture analysis methods (such as grayscale co-occurrence matrix or Gabor filtering) are used to extract the texture features of the image to help the model understand the detailed structure of the tumor area. Through morphological analysis (such as dilation, corrosion, etc.), the shape information of the image is extracted to identify the shape characteristics of colorectal cancer tumors.

[0050] Step S22: Generate a network structure based on the dimensional characteristic feature data to obtain network architecture metadata; Specifically, based on the extracted dimensionality characteristic feature data, the network architecture metadata is generated. The network architecture metadata refers to the structural information of the network hierarchy, including the input and output size of each layer, the number of convolution kernels, the type of activation function, etc. According to the complexity of the dimensionality characteristic features, the number of network layers and the number of neurons in each layer are designed. For example, if the colorectal cancer image has strong texture features, more convolutional layers are required to extract high-level features. The configuration of the convolutional layer and the pooling layer is determined according to the spatial characteristics of the features. The convolutional layer is used to extract local features, and the pooling layer is used to reduce the spatial dimension while retaining important features. The activation function is selected according to the nature of the network, such as the ReLU activation function, because it can effectively accelerate convergence in most cases and handle nonlinear features in colorectal cancer image data.

[0051] Dimensional characteristics (such as the texture, edge, contrast, etc. of the image) play a vital role in designing the network architecture. The number of network layers and the number of neurons in each layer are adjusted according to the characteristics of the image. When the image has strong texture features (for example, the tumor edge, cell tissue, etc. in the colorectal cancer image have complex textures), a deeper network structure is required to extract these high-order features. The number of convolutional layers should be increased, and the number of neurons between layers should be increased to capture more complex texture information. If the texture of the image is relatively simple, the network depth is appropriately reduced, and fewer convolutional layers, such as 16 layers, can meet the feature extraction requirements. When the image contains more complex structural information (for example, the morphology of the tumor area varies greatly), a deeper network, such as 128 layers, is required to gradually extract spatial information of different scales. If the structure of the image is relatively simple and only basic shapes or edge features need to be extracted, a shallower network is used.

[0052] The convolution layer is responsible for extracting local features from the image. When designing the convolution layer, if the colorectal cancer image has detailed and complex texture features, it is recommended to use multiple convolution layers, each of which gradually extracts higher-order features. For example, the first few convolution layers are used to extract low-order features such as edges and colors, while subsequent layers extract high-order features of tumor regions or specific structures. The size of the convolution kernel determines the range of feature extraction. Smaller convolution kernels (such as 3x3 or 5x5) are suitable for images with rich details and effectively capture small spatial changes. For complex texture images, multiple layers of convolution stacking, such as 32 or 64 layers, are required to gradually aggregate local information.

[0053] The pooling layer is used to reduce the spatial dimension, reduce the amount of computation and retain the important features of the image. The pooling operation uses the maximum pooling (Max Pooling) or the average pooling (Average Pooling). The selection of the pooling layer involves the feature distribution of the image. A pooling layer is inserted after every two convolutional layers to gradually reduce the spatial dimension while retaining the key features of the image. In the processing of colorectal cancer images, the pooling layer can extract features with spatial stability (such as the shape and distribution of the tumor) and remove some unimportant details.

[0054] For simple image data, a small number of convolutional layers (such as 2-3 layers) and a small number of neurons (such as 64, 128) can be used for effective feature extraction and classification. For complex colorectal cancer image data, threshold judgment is performed based on the results of weight calculation of the texture features of the image, and more convolutional layers (such as 4-6 layers) are generated through preset parameters, and the number of neurons in each layer increases layer by layer. The number of layers in the front is small, and the number of layers in the back is large, and the number of neurons gradually increases. For example, the first convolutional layer uses 32 neurons, the second layer uses 64, the third layer uses 128, and the last layer requires more neurons (such as 256 or 512) to capture more complex features.

[0055] Step S23: Initialize the student-teacher network architecture according to the network architecture metadata to obtain an initialized student network model and an initialized teacher model respectively.

[0056] Specifically, in this step, the student network model is initialized according to the generated network architecture metadata. The student network is usually used to learn the specific features of the image and the task objectives, and its weight parameters are continuously adjusted during the training process. The student network is usually initialized by a random initialization method or by using a pre-trained model (such as a model pre-trained on ImageNet). The specific choice depends on the complexity of the task and the characteristics of the data. The teacher network is used to guide the learning of the student network and is more complex or more powerful than the student network. The initialization process of the teacher network is similar to that of the student network. First, the network structure of the teacher model is initialized according to the network architecture metadata, and the network weights are set using pre-trained parameters or random initialization. The parameter update speed of the teacher model is usually slow to avoid over-adjustment. The student and teacher networks can be identical in structure or different at some levels. The teacher network contains more layers or larger convolution kernels to learn the global features of colorectal cancer images from a higher level; while the student network focuses on low-level feature learning and is gradually optimized through collaborative training with the teacher network.

[0057] Preferably, step S3 is specifically: Step S31: performing supervised learning on the initialized student network model according to the colorectal cancer image annotation data to obtain a preliminary optimized student network model; Specifically, supervised learning is performed on the initialized student network model using annotated colorectal cancer image data. The goal of supervised learning is to train the student network to learn the features of colorectal cancer images through annotated image data. By inputting annotated image data, the loss between the predicted result and the actual label is calculated, and the parameters in the network are adjusted through back propagation to minimize the loss function. The cross entropy loss function or the Dice coefficient is used as the loss function, and the weights of the network are updated through an optimization algorithm (such as the Adam optimizer) until the loss value converges. A preliminary optimized student network model is obtained, which can perform relatively accurate image segmentation on annotated data.

[0058] Step S32: inputting the unlabeled data of colorectal cancer images into the preliminary optimized student network model for calculation to obtain preliminary student model prediction data; Specifically, the unlabeled data of colorectal cancer images are input into the preliminarily optimized student network model for prediction. The unlabeled data is used as input, and after being processed by the student network, the predicted data is obtained. These predicted data represent the inference results of the student network on the unlabeled images. Usually, the prediction results will contain the probability or label of each pixel belonging to a certain category (such as tumor and non-tumor).

[0059] Step S33: performing spatial consistency pseudo label calculation on the unlabeled data of colorectal cancer images and the preliminary student model prediction data to obtain spatial consistency pseudo label data; Specifically, spatial consistency pseudo-label calculation is performed based on the unlabeled data of colorectal cancer images and the predicted data of the preliminary student model. Pseudo-labels are generated using the spatial consistency between different regions in the image. In medical imaging, tumors often have a specific spatial structure, that is, tumor tissues will show a certain degree of coherence or consistency in space. The geological distance between each pixel in the image is calculated to identify the degree of regional change in the image. According to the prediction results of the preliminary student model, the confidence of each pixel is evaluated to identify the degree of confidence of the model in predicting a certain area. Spatial consistency information at different scales is analyzed to capture the performance of tumor regions at different levels. Through spatial consistency analysis, a pseudo-label data with high spatial consistency is generated, that is, by combining the model prediction data and spatial consistency features, it is determined which areas can be regarded as pseudo-labels.

[0060] Step S34: performing comparative learning pseudo-label calculation on the unlabeled data of colorectal cancer images and the preliminary student model prediction data to obtain comparative learning pseudo-label data; Specifically, based on the unlabeled data of colorectal cancer images and the predicted data of the preliminary student model, pseudo labels are further generated through contrastive learning. The goal of contrastive learning is to optimize the model by learning the similarity between data. The multi-level features of the image are extracted, and the feature map is processed in blocks to obtain local feature embedding data. The extracted local features are aligned and converted into global aligned feature data. Through contrastive learning, contrast targets are selected from the global aligned feature data. Contrast targets refer to image regions with similar features, which are used to train the model to distinguish features of different categories. Data enhancement is performed on the selected contrast target data to further increase the diversity of samples. The enhanced feature data is aggregated to produce more representative feature expressions, and the consistency is optimized so that the model can better distinguish tumor areas from other areas. Preliminary pseudo labels are generated based on the feature data after consistency optimization, and regional verification is performed to ensure the accuracy of the pseudo labels.

[0061] Step S35: performing confidence screening according to the spatial consistency pseudo-label data and the comparative learning pseudo-label data to obtain pseudo-label data; Specifically, the spatial consistency pseudo-label data is combined with the contrastive learning pseudo-label data, and the reliable pseudo-label data is further screened out through confidence screening. The confidence of each pseudo-label is calculated, and the pseudo-labels with higher confidence are screened out. These high-confidence pseudo-label data will be used to further optimize the student network.

[0062] Step S36: Optimize the preliminary optimized student network model according to the preliminary student model prediction data and the pseudo-label data to obtain a secondary optimized student network model.

[0063] Specifically, the preliminary optimized student network is retrained based on the predicted data of the preliminary student model and the screened pseudo-label data. During the training process, the labeled data, predicted data and pseudo-label data are used to jointly optimize the model. On the basis of continuously learning the labeled data, the student network can also gradually obtain effective learning signals from the pseudo-labels. The secondary student network model optimized by pseudo-labels will be able to better perform colorectal cancer image segmentation and further improve the accuracy of image segmentation.

[0064] Preferably, step S4 is specifically: Step S41: updating the parameters of the initialized teacher model according to the secondary optimized student network model to obtain an updated teacher model; Specifically, after obtaining the secondary optimized student network model, the student model is first used as a guide for the teacher model, and the parameters of the teacher model are updated by providing feedback on the learning effect of the student network. By comparing the outputs of the student model and the teacher model, the parameters of the teacher model are adjusted to a state that is more suitable for the current data. The purpose of parameter updating is to enable the teacher model to gradually approach the learning results of the student model, thereby improving the performance of the teacher model on unlabeled data. The parameter update of the teacher model includes using the weights of the student network as initialization values ​​for fine-tuning the teacher model. During the updating process, the learning rate of the teacher model is small to ensure that it does not deviate from the effect of the student model and gradually becomes consistent with the learning results of the student model. An updated teacher model is obtained, which performs closer to the student model, can handle more diverse input data, and has a strong generalization ability.

[0065] Step S42: optimizing the updated teacher model according to the colorectal cancer image annotation data to obtain a teacher annotation optimization model; Specifically, the annotated data of colorectal cancer images are input into the updated teacher model for further optimization. Through supervised learning, the teacher model is trained based on the annotated data and its parameters are continuously adjusted to reduce the difference between the predicted results and the actual labels. The loss function (such as cross entropy loss or Dice coefficient) is calculated using the annotated data, and the weights of the teacher model are updated through back propagation. The optimization process of the teacher model is similar to that of the student model, but because the teacher model usually has stronger reasoning ability, its optimization process pays more attention to details and high-order features in the data.

[0066] By training with labeled data, the teacher model will further improve the accuracy of image segmentation tasks, especially when dealing with high-quality labeled data.

[0067] Step S43: Optimizing the teacher annotation optimization model according to the pseudo-label data to obtain the teacher pseudo-label optimization model; Specifically, after the teacher model is optimized by the labeled data, it is further optimized using the generated pseudo-label data. The pseudo-label data provides a large amount of unlabeled image information. The teacher model is trained on these pseudo-label data in order to enable the model to adapt to more diverse image features and improve its performance on unlabeled data. The teacher model is trained using pseudo-label data so that it can recognize and learn the features contained in the pseudo-labels. Pseudo-label data supplements the deficiency of labeled data to a certain extent. Through the self-learning of the model, the teacher model can understand the potential structures in more images. During the training process, the quality of pseudo-labels is crucial to the optimization effect. Through confidence screening and other mechanisms, it can be ensured that the model pays attention to more reliable pseudo-labels, thereby avoiding the negative impact of the low-quality pseudo-labels on the model training. Through pseudo-label training, the teacher model will gradually gain more segmentation capabilities, especially the processing capabilities of unlabeled images have been significantly improved.

[0068] Step S44: Freeze the weights of the teacher pseudo-label optimization model to obtain a colorectal cancer image segmentation model.

[0069] Specifically, after the teacher model is optimized through labeled data and pseudo-label data, it enters the weight freezing stage. The main purpose of freezing weights is to prevent the teacher model from overfitting or learning unnecessary noise in further training. After freezing, the parameters of all layers of the teacher model will no longer be updated, thereby ensuring that the model remains stable in subsequent applications. Based on the teacher pseudo-label optimization model, the weights of certain layers are selectively frozen, the lower layers of the network (such as convolutional layers) are frozen, and the higher layers (such as fully connected layers) are kept for fine-tuning. The strategy of freezing weights is usually based on the structure and training process of the model. The frozen layers should include those parts of the network that have converged on labeled data and pseudo-label data to ensure stability. The teacher model after freezing weights is the final colorectal cancer image segmentation model, which can not only process labeled data, but also has a strong ability to process unlabeled data, and has high robustness and accuracy in practical applications.

[0070] Preferably, the spatial consistency pseudo label calculation is specifically as follows: The geological distance was calculated for the unlabeled data of colorectal cancer images and the preliminary student model prediction data to obtain the geological distance map data; Specifically, in medical images, the pixel gradient in the boundary area is larger, while the pixel gradient in the area is smaller. In order to capture the structural information of the image more accurately, image gradient information should be introduced in geological distance calculation. The gradient of the image is represented by the local change of the image. The calculation formula is: ,in Pixel The gradient value of For images Middle pixels, is the gray value of the image, For images in The gradient value of the direction, For images in After calculating the gradient of each pixel, the gradient information is used as a weighting factor to affect the calculation of geological distance. ,in is the weighted geological distance, for as well as The spatial distance between them is calculated by Euclidean distance. is the weighting coefficient of the gradient, Pixel The gradient value of Pixel The gradient value of the calculated results is stored in the form of a matrix to form the geological distance map data. In the geological distance map, each element Represents pixels and pixels The weighting of the spatial distance and gradient information between them.

[0071] Calculate the confidence of the preliminary student model prediction data to obtain confidence map data; Specifically, the class probability distribution of each pixel is obtained from the output of the preliminary student network model. The output of the model is a tensor ,in and Represents the height and width of the image respectively, represents the number of categories, is the data type space in the output probability distribution tensor, and is the real number space representing the data in the output layer of the neural network. Each element Indicates the position in the image The pixels belong to the category Calculate the confidence value of each pixel and select the maximum probability value from the category probability distribution output by the model as the confidence value of the pixel. . Calculation formula: , is the maximum index of the category, that is, each pixel of the image has possible classes, select pixel The maximum predicted probability of the corresponding category is used as the confidence value of the pixel. This confidence value indicates the degree of certainty of the model's prediction for the pixel. The higher the value, the more confident the model is in predicting the pixel category. Different weighting coefficients are assigned to different regions by calculating the gradient of the image. Calculate the local confidence weighting coefficient for each pixel , which is proportional to the gradient size. ,in is the local confidence weighting coefficient, For images The Line The gradient value corresponding to the pixel point in the column. The weighted confidence value of the boundary area Calculated as: , and get the confidence map is a size of A matrix with each element Indicates the position in the image The confidence of the pixel.

[0072] Perform multi-scale analysis based on the geological distance map data and the confidence map data to obtain geological distance map multi-scale data and confidence map multi-scale data respectively; Specifically, geological distance map data and confidence map data have different spatial characteristics. In the preliminary analysis, these two types of data can be scaled separately. In order to process the multiple scale features in the image, the original image is decomposed into different scale ranges, such as large scale, medium scale, and small scale for processing. The geological distance map is divided into multiple scales. This can be achieved by applying Gaussian blur of different sizes to the original image. For example, using Gaussian convolution kernels of different sizes (like , , )( Represents different scales, such as , , ), and the images are blurred to obtain geological distance map data of three different scales. , , . For the confidence map data, similarly, it is processed by convolution of different scales. Convolution kernels of different sizes are used (like , , ,like , , )( Represents different scales), for confidence map data Perform convolution to obtain confidence maps of three scales , , . Obtain geological distance map data and confidence map data of different scales, and fuse these scale data. Merge information at different scales by weighted average or convolution kernel to obtain a more comprehensive feature representation. Alternatively, fuse information of different scales through convolution layer. Perform convolution operation on image data of multiple scales through preset multi-scale convolution kernel to obtain fused features. The feature representation is (small-scale data, medium-scale data, large-scale data, multi-scale fused data).

[0073] According to the multi-scale data of the geological distance map and the multi-scale data of the confidence map, spatial consistency constraints are performed to obtain consistent segmentation data; Specifically, for each pixel, the pixels in its surrounding neighborhood can be checked, and threshold judgment is used to determine whether these neighboring pixels should be classified into the same category based on geological distance and confidence. Cross-scale consistency ensures that pixels or regions in the image can maintain consistent labels at different scales. Smaller scales focus on detailed information, while larger scales focus on global features. The geological distance map and confidence map obtained from different scales (such as large, medium, and small scales) provide different levels of image features. At each scale, the aforementioned neighboring region consistency strategy is used to calibrate the region label. For each pixel, it is necessary to check its label consistency at multiple scales. If the labels are inconsistent at multiple scales, the labels are smoothed and adjusted, such as through smoothing operations, that is, where the labels are inconsistent, the labels are adjusted by weighted smoothing or majority voting mechanisms so that the labels at each scale tend to be consistent. For each pixel, its label is adjusted by calculating its weighted average at multiple scales and neighborhoods. Specifically, different weights are assigned to each scale, and weighted adjustments are made in combination with geological distance and confidence, ensuring that label information at different scales is integrated to avoid excessive influence of labels at a certain scale. Label consistency is further optimized through optimization algorithms (such as gradient descent or conditional random fields). By introducing global constraints, the label of each pixel is optimized, making the labels of adjacent regions or pixels more consistent, thereby obtaining consistent segmentation results.

[0074] The confidence of the preliminary student model prediction data is screened according to the consistent segmentation data to obtain spatially consistent pseudo-label data.

[0075] Specifically, the prediction data of the preliminary student model is confidence screened using the consistent segmentation data to obtain spatially consistent pseudo-label data. The consistent segmentation data is screened using the preset confidence threshold data, and regions with higher confidence are selected as pseudo-labels. The higher the confidence, the stronger the reliability of the pseudo-label. For the regional verification of the pseudo-labels, further regional verification is performed on the screened regions to ensure that the segmentation results of these regions are accurate and stable. If a large error is found in the pseudo-label region, the region will be corrected or ignored. In order to eliminate the noise at the boundary of the pseudo-label, Gaussian smoothing is performed to make the pseudo-label data smoother and continuous, thereby improving the segmentation quality.

[0076] Preferably, the pseudo-label calculation of contrastive learning is specifically as follows: The unlabeled data of colorectal cancer images are extracted by preliminarily optimizing the student network model to obtain multi-level feature data; Specifically, the low-level features of the image are extracted by convolving the image with multiple convolution kernels (filters) in the first layer of the convolutional neural network. For example, the convolution layer extracts basic features such as edges, textures, and lines in the image. For colorectal cancer images, the low-level features capture the boundaries between tumor tissue and normal tissue. The input image is calculated with multiple convolution kernels through convolution operations to obtain a set of feature maps, which represent the activation of local areas in the image. Each convolution kernel learns different features, such as edges, corners, textures, etc. The pooling layer follows the convolution layer and is used to reduce the spatial dimension of the feature map and retain the main information, including maximum pooling and average pooling. Pooling operations are performed on each convolutional feature map to obtain a pooled feature map. For example, maximum pooling takes the maximum value in a small area to retain the most important information. As the depth of the network increases, the network can learn more and more complex and abstract features. Shallow features (feature maps of the first and second layers) include edges, corners, and simple texture information of the image, such as the outline of the tumor, the basic shape of blood vessels, and other areas. Mid-level features (feature maps in the middle layer) represent more complex structures, such as local areas of tumors, texture patterns between tissues, etc. Deep features (feature maps in deeper layers) represent the global information of the image, such as tumor areas, normal tissues, background, etc.

[0077] Multi-level features are processed in blocks to obtain local feature embedding data; Specifically, the image is divided into local regions of fixed size or feature-based region division (for example, division based on saliency or change regions). The features of each local region are converted into vector form through an embedding layer for subsequent feature alignment and learning.

[0078] Perform feature alignment based on local feature embedding data to obtain global alignment feature data; Specifically, feature alignment is performed by embedding local feature data to obtain globally aligned feature data. The purpose of feature alignment is to make the features extracted in different regions and at different scales consistent. Global feature alignment is performed by calculating the similarity or distance measurement between feature vectors, and using metrics such as cosine similarity or Euclidean distance to align features in different regions to a unified scale or space. Based on the results of global alignment, the feature vectors are further optimized to make the features in different regions more consistent.

[0079] Performing comparison target sampling on the global alignment feature data to obtain comparison target data; Specifically, based on the global alignment feature data, comparison target sampling is performed to obtain comparison target data. The purpose of comparison target sampling is to select the most representative region from the global alignment feature for further learning, identify the target region and background region of the image in the global alignment feature, and select the target region as the comparison object by calculating the similarity between the regions. Based on the data after feature alignment, the closest region in the feature space is selected as the comparison target. The target region contains the tumor or other abnormal region of interest to the model.

[0080] Perform contrast learning data enhancement according to contrast target data to obtain enhanced contrast target data; Specifically, after obtaining the contrast target data, data enhancement for contrast learning is performed to improve data diversity and help the model generalize better. The selected contrast target data is rotated, translated, scaled, and other operations are performed to simulate changes under different conditions, so that the model can learn richer features. Through this enhancement, the model can learn the performance of the target area under different transformations, thereby improving its robustness.

[0081] Perform feature aggregation according to the enhanced contrast target data to obtain aggregated feature data; Specifically, feature aggregation is performed on the enhanced contrast target data to obtain aggregated feature data. The purpose of feature aggregation is to fuse multiple enhanced contrast target data into an overall feature representation to facilitate model training and optimization. The feature data generated by different enhancement methods are merged, and weighted averaging, splicing or other aggregation methods can be used to fuse multiple feature information into a whole. Through feature aggregation, the model can obtain more comprehensive and representative target area features.

[0082] Perform cross-node comparison and consistency optimization based on aggregated feature data to obtain consistent optimized feature data; Specifically, based on the aggregated feature data, cross-node comparison consistency optimization is performed. Ensure that the features between different nodes are consistent and reduce the errors caused by differences between nodes. Check whether the feature data between different nodes are consistent, and optimize by measuring the differences in feature distribution between different nodes. Through the comparative learning method, the features between different nodes are aligned so that similar areas can remain consistent between different nodes.

[0083] During the optimization process, the feature consistency is first measured by calculating the difference in feature distribution between different nodes (such as mean square error, KL divergence, etc.). When the feature data is inconsistent, the contrastive learning method is used to adjust the weight of the network by calculating the contrast loss between positive and negative sample pairs, so that the feature vectors from similar areas are closer in the feature space, and the distance between the feature vectors of dissimilar areas is increased. Through this optimization process, the network can align the feature data between different nodes (hospitals or equipment) so that similar areas are more consistently represented between different nodes. The optimization process can effectively reduce the errors caused by differences between different nodes, thereby improving the segmentation performance of the model in a multi-center, multi-device environment, especially in the segmentation of tumor areas in colorectal cancer images, with significant improvement in results.

[0084] Through the contrastive learning optimization process, the representations in the feature space are gradually aligned, so that features from similar regions have similar feature representations regardless of which node they come from. Through the optimization process, the tumor regions in colorectal cancer images from different nodes (such as different hospitals or equipment) have close vector representations in the feature space. Through the optimization of contrastive loss, features from different regions (such as tumor and normal tissue regions) have a large distance, thereby maintaining the distinguishability of the features.

[0085] Generate similarity pseudo labels based on the consistent optimized feature data to obtain preliminary pseudo label data; Specifically, based on the feature data after consistency optimization, similarity pseudo labels are generated to obtain preliminary pseudo label data. The generation of pseudo labels mainly depends on the similarity between features, that is, labels are predicted by similar regions. The feature similarity between different regions is calculated, and regions with high similarity are selected to generate pseudo labels. Labels are assigned to each pixel or region based on the similarity.

[0086] Perform pseudo-label region verification based on preliminary pseudo-label data and preliminary student model prediction data to obtain pseudo-label verification data; Specifically, the pseudo-label area of ​​the preliminary pseudo-label data is verified to ensure that the generated pseudo-label is accurate and valid. The verification step includes verifying whether the boundary of the pseudo-label area is accurate and ensuring that the pseudo-label matches the real area of ​​the image. If there are obvious errors or deviations in the pseudo-label area, it is corrected or discarded.

[0087] Gaussian smoothing is performed on the pseudo-label verification data to obtain the pseudo-label data for comparative learning; Specifically, Gaussian smoothing is used to smooth the pseudo-label verification data to remove boundary noise and make the pseudo-label smoother. Gaussian smoothing processes each pixel point by weighted average to make the label area more continuous and smooth.

[0088] The comparison target sampling is as follows: Performing target area boundary analysis on the global alignment feature data to obtain boundary feature data; Specifically, the target region boundaries in the image are identified by analyzing the global alignment feature data. The goal of boundary analysis is to identify regions with significant structural changes in the image, which represent tumors, lesions, or other important tissue structures. Image processing techniques (such as edge detection algorithms) are used to identify significant boundaries in the image, using information such as gradient changes and texture changes to identify these regions. The boundary feature data of the target region is obtained by analyzing the shape, size, and complexity of the boundary. These features can include the length, curvature, and density of the boundary.

[0089] Performing target area confidence assessment according to the boundary feature data to obtain target area confidence assessment data; Specifically, based on the boundary feature data, the confidence of the target area is evaluated to determine which areas contain higher information and which areas are noisy or irrelevant. The confidence of each target area is evaluated based on the global alignment feature data and boundary features, which is achieved by calculating indicators such as the intensity of pixels in the area, the clarity of the boundary, and the consistency of the area. A confidence score is generated for each target area. Areas with high confidence indicate that the area contains important tumor or lesion information, while areas with low confidence are background or noise.

[0090] When it is determined that the target area area data corresponding to the target area confidence evaluation data is greater than or equal to the preset target area area threshold data, sparse sampling is performed according to the target area confidence evaluation data to obtain comparison target sampling data; When it is determined that the target area area data corresponding to the target area confidence evaluation data is less than the preset target area area threshold data, dense sampling is performed according to the target area confidence evaluation data to obtain comparative target sampling data; Specifically, the sampling density is determined based on the size of the target area and the confidence assessment data: when the area of ​​the target area is greater than or equal to the preset target area threshold (for example, the target area is large), sparse sampling is selected, which means that sampling is performed only in key parts of the target area (such as the edge or center) to reduce the computational burden and the risk of overfitting. When the area of ​​the target area is less than the preset target area threshold (for example, the target area is small), dense sampling is performed, which means uniform sampling is performed in the entire target area to ensure that all relevant features are captured.

[0091] Conduct confidence-guided target screening according to the comparison target sampling data to obtain confidence screening data; Specifically, based on the sampled comparison target data, further confidence-guided target screening is performed to ensure that the target data finally selected has high representativeness and reliability. A confidence threshold is set, and only those sampled data with confidence scores higher than the threshold will be retained. Low-confidence target data will be removed to reduce the interference of noise on subsequent learning. All sampled data are sorted according to the confidence score, and target data with higher confidence are selected as the final comparison target data.

[0092] The data is filtered according to the confidence level to generate a spatial perception target, thereby obtaining spatial perception target data; Specifically, spatially aware target data is generated based on the target data filtered by confidence. Spatial perception refers to generating features that effectively distinguish the target from the background by analyzing the spatial relationship between the target data. The spatial relationship between the target area and the background area is analyzed, such as the geometric shape and distribution characteristics of the target area. By modeling these spatial information, spatially aware target data is obtained.

[0093] According to the spatial perception target data, regional and background contrast target sampling is performed to obtain contrast target data.

[0094] Specifically, after generating spatial perception target data, contrast target sampling between the region and the background is performed. According to the spatial perception target data, the target region is clearly distinguished from the background region, which is achieved by image segmentation technology or threshold-based segmentation method. Contrast target sampling is performed between the target region and the background region. Contrast sampling helps to improve the robustness of the model, especially when dealing with complex backgrounds and blurred areas.

[0095] Preferably, the multi-scale analysis is specifically: Perform preliminary multi-scale division according to the geological distance map data and the confidence map data to obtain preliminary multi-scale data of the geological distance map and preliminary multi-scale data of the confidence map; Specifically, preliminary multi-scale division is performed on the geological distance map data and the confidence map data. The geological distance map is segmented according to different scales, and the accuracy of the division can be controlled by defining different scale factors. For example, the geological distance map is segmented using a fixed window size to obtain regional features at different scales. Similarly, the confidence map data is also divided according to the same scale. The area at each scale represents the confidence distribution of different areas in the image.

[0096] Perform global local entropy calculation based on preliminary multi-scale data of geological distance map and preliminary multi-scale data of confidence map to obtain multi-scale entropy data of geological distance map and multi-scale entropy data of confidence map; Specifically, based on the preliminary multi-scale data, global local entropy calculation is performed to measure the complexity of data distribution at different scales. The purpose of entropy calculation is to evaluate the amount of information in different regions of the image. The global entropy values ​​of the entire geological distance map and confidence map at different scales are calculated. The global entropy is obtained by performing a statistical distribution analysis on the data of the entire image. In each block area, its local entropy value is calculated to reflect the degree of change of the features in the area. The local entropy value can reflect the local detail information of the image.

[0097] Multi-scale entropy similarity calculation is performed based on the multi-scale entropy data of the geological distance map and the multi-scale entropy data of the confidence map to obtain multi-scale entropy similarity data; Specifically, the similarity between the geological distance map and the confidence map is calculated by comparing the multi-scale entropy data. The entropy similarity calculation method is used to evaluate the similarity between image regions at different scales based on the entropy data of the geological distance map and the confidence map, and the correlation or distance between the entropy data is calculated. Regions with higher similarity are considered to have similar features in the image, which can provide more information for screening and optimization.

[0098] According to the multi-scale entropy similarity data, the preliminary multi-scale data of the geological distance map and the preliminary multi-scale data of the confidence map are screened for non-similar entropy, and the multi-scale screening data of the geological distance map and the multi-scale screening data of the confidence map are obtained respectively; Specifically, based on the multi-scale entropy similarity data, the preliminary multi-scale data of the geological distance map and the preliminary multi-scale data of the confidence map are screened for non-similar entropy. According to the similarity calculation results, those areas with low entropy similarity are removed. That is, those areas with low information content and belonging to noise are selected for elimination, and areas with higher similarity are retained. A similarity threshold is set, and areas below the threshold will be screened out, and only those areas with significant features are retained.

[0099] The consistency distribution calculation is performed based on the multi-scale screening data of the geological distance map and the multi-scale screening data of the confidence map to obtain the multi-scale data of the geological distance map and the multi-scale data of the confidence map.

[0100] Specifically, after multi-scale screening, the consistency distribution of the geological distance map and confidence map is calculated. Check whether the screened geological distance map and confidence map have consistent feature distribution at different scales. Specifically, it is necessary to evaluate whether the same area has consistent confidence and geological features at multiple scales. Based on the screened data, their distribution characteristics at different scales, such as position, morphology, regional consistency, etc., are calculated to further optimize image segmentation.

[0101] Preferably, the present application also provides a system for colorectal cancer image segmentation, which is used to execute the above-mentioned method for colorectal cancer image segmentation, and the system comprises: A colorectal cancer image data acquisition module, used to acquire colorectal cancer image data, wherein the colorectal cancer image data includes colorectal cancer image annotated data and colorectal cancer image unannotated data; A student-teacher network architecture initialization module is used to initialize the student-teacher network architecture according to colorectal cancer image data, and obtain an initialized student network model and an initialized teacher model respectively; The secondary optimized student network model construction module is used to perform supervised learning on the initialized student network model according to the annotated data of colorectal cancer images to obtain a preliminary optimized student network model; input the unlabeled data of colorectal cancer images into the preliminary optimized student network model for calculation to obtain preliminary student model prediction data, and perform pseudo-label calculation on the unlabeled data of colorectal cancer images and the preliminary student model prediction data to obtain pseudo-label data; optimize the preliminary optimized student network model according to the preliminary student model prediction data and the pseudo-label data to obtain a secondary optimized student network model; The colorectal cancer image segmentation model generation module is used to update the parameters of the initialized teacher model according to the secondary optimized student network model to obtain an updated teacher model, and optimize the updated teacher model according to the colorectal cancer image annotation data to obtain the colorectal cancer image segmentation model.

[0102] Preferably, the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, wherein the computer program is configured to execute the method described in any of the above items when running.

[0103] The beneficial effects of the present invention are as follows: the present invention combines labeled data and unlabeled data, uses labeled data to supervise the training of the student network, and fully mines the unlabeled data through pseudo-label generation technology. The utilization rate of unlabeled data is significantly improved, reducing the dependence on manually labeled data, thereby reducing the labeling cost. Pseudo-label generation combines spatial consistency pseudo-label calculation and contrastive learning pseudo-label calculation, and generates accurate and reliable pseudo-labels from the perspectives of spatial consistency and feature comparison, respectively. Spatially consistent pseudo-labels use geological distances and confidence maps, combined with multi-scale analysis and consistency distribution calculation, to improve the spatial coherence of pseudo-labels. Contrastive learning pseudo-labels generate high-quality pseudo-labels through feature alignment, dynamic sampling and similarity calculation, significantly improving the effective utilization of unlabeled data. The teacher network is updated through the exponential moving average (EMA) parameters of the student network, and the parameters are smoother and more robust to noise, which improves the stability of pseudo-label generation. Under multiple optimizations of labeled data and pseudo-label data, the teacher network gradually improves the segmentation ability of complex areas (such as fuzzy boundary areas and small lesions). The student network forms a closed loop through supervised learning and semi-supervised pseudo-label optimization, and the segmentation performance is continuously improved during training. The present invention makes model training more efficient by combining supervised learning of labeled data and semi-supervised pseudo-label optimization of unlabeled data. The teacher network parameters are updated through EMA to further smooth parameter changes and avoid shock and instability during training. The present invention is suitable for scenarios where labeled data is insufficient but unlabeled data is abundant, and the dependence on labeled data is greatly reduced through pseudo-label generation technology. In medical image segmentation tasks, labeled data is often scarce and expensive, so the present invention has a high application value.

[0104] Therefore, from any point of view, the embodiments should be regarded as illustrative and non-restrictive, and the scope of the present invention is limited by the attached application documents rather than the above description, and it is intended that all changes falling within the meaning and scope of equivalent elements of the application documents are included in the present invention.

[0105] The above description is only a specific embodiment of the present invention, so that those skilled in the art can understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but should conform to the widest scope consistent with the principles and novel features invented herein.

Claims

1. A method for colorectal cancer image segmentation, characterized in that: The following steps are involved: Step S1: acquiring colorectal cancer image data, wherein the colorectal cancer image data includes colorectal cancer image annotated data and colorectal cancer image unannotated data; Step S2: Initializing the student-teacher network architecture according to the colorectal cancer image data to obtain an initialized student network model and an initialized teacher model; Step S3: Performing supervised learning on the initialized student network model according to the annotated data of colorectal cancer images to obtain a preliminary optimized student network model; inputting the unlabeled data of colorectal cancer images into the preliminary optimized student network model for calculation to obtain preliminary student model prediction data, and performing pseudo-label calculation on the unlabeled data of colorectal cancer images and the preliminary student model prediction data to obtain pseudo-label data; optimizing the preliminary optimized student network model according to the preliminary student model prediction data and the pseudo-label data to obtain a secondary optimized student network model; Step S4: Update the parameters of the initialized teacher model according to the secondary optimized student network model to obtain an updated teacher model, and optimize the updated teacher model according to the colorectal cancer image annotation data to obtain a colorectal cancer image segmentation model.

2. The method according to claim 1, characterized in that Step S1 is specifically as follows: Interact with multi-center hospital image databases through medical image data interfaces to obtain preliminary colorectal cancer CT image data; The preliminary colorectal cancer CT image data are grouped to obtain labeled data and unlabeled data; Extracting annotation features from the annotation data to obtain annotation feature data; Perform non-labeled data screening on the non-labeled data to obtain non-labeled screened data; Data enhancement is performed on the labeled feature data and the unlabeled screened data to obtain colorectal cancer image labeled data and colorectal cancer image unlabeled data, respectively.

3. The method according to claim 1, characterized in that Step S2 is specifically as follows: Extracting dimensionality characteristics based on the colorectal cancer image data to obtain dimensionality characteristics data; Generate network structure based on dimensionality characteristic feature data to obtain network architecture metadata; The student-teacher network architecture is initialized according to the network architecture metadata to obtain an initialized student network model and an initialized teacher model respectively.

4. The method according to claim 1, characterized in that: Step S3 is specifically as follows: The initialized student network model was supervised and learned based on the annotated data of colorectal cancer images to obtain a preliminary optimized student network model; The unlabeled data of colorectal cancer images are input into the preliminary optimized student network model for calculation to obtain the preliminary student model prediction data; Calculate spatially consistent pseudo labels for unlabeled colorectal cancer image data and preliminary student model prediction data to obtain spatially consistent pseudo label data; Comparative learning pseudo-label calculations are performed on the unlabeled data of colorectal cancer images and the data predicted by the preliminary student model to obtain comparative learning pseudo-label data; Confidence screening is performed based on spatial consistency pseudo-label data and comparative learning pseudo-label data to obtain pseudo-label data; The preliminary optimized student network model is optimized according to the preliminary student model prediction data and pseudo-label data to obtain a secondary optimized student network model.

5. The method according to claim 4, characterized in that Step S4 is specifically as follows: Update the parameters of the initialized teacher model according to the secondary optimized student network model to obtain an updated teacher model; The updated teacher model is optimized according to the annotated data of colorectal cancer images to obtain the teacher annotation optimization model; The teacher annotation optimization model is optimized according to the pseudo-label data to obtain the teacher pseudo-label optimization model; The weights of the teacher pseudo-label optimization model were frozen to obtain the colorectal cancer image segmentation model.

6. The method according to claim 4, characterized in that The spatial consistency pseudo label calculation is as follows: The geological distance was calculated for the unlabeled data of colorectal cancer images and the preliminary student model prediction data to obtain the geological distance map data; Calculate the confidence of the preliminary student model prediction data to obtain confidence map data; Perform multi-scale analysis based on the geological distance map data and the confidence map data to obtain geological distance map multi-scale data and confidence map multi-scale data respectively; According to the multi-scale data of the geological distance map and the multi-scale data of the confidence map, spatial consistency constraints are performed to obtain consistent segmentation data; The confidence of the preliminary student model prediction data is screened according to the consistent segmentation data to obtain spatially consistent pseudo-label data.

7. The method according to claim 4, characterized in that The calculation of pseudo labels for contrastive learning is as follows: The unlabeled data of colorectal cancer images are extracted by preliminarily optimizing the student network model to obtain multi-level feature data; Multi-level features are processed in blocks to obtain local feature embedding data; Perform feature alignment based on local feature embedding data to obtain global alignment feature data; Performing comparison target sampling on the global alignment feature data to obtain comparison target data; Perform contrast learning data enhancement according to contrast target data to obtain enhanced contrast target data; Perform feature aggregation according to the enhanced contrast target data to obtain aggregated feature data; Perform cross-node comparison and consistency optimization based on aggregated feature data to obtain consistent optimized feature data; Generate similarity pseudo labels based on the consistent optimized feature data to obtain preliminary pseudo label data; Perform pseudo-label region verification based on preliminary pseudo-label data and preliminary student model prediction data to obtain pseudo-label verification data; Gaussian smoothing is performed on the pseudo-label verification data to obtain the pseudo-label data for comparative learning; The comparison target sampling is as follows: Performing target area boundary analysis on the global alignment feature data to obtain boundary feature data; Performing target area confidence assessment according to the boundary feature data to obtain target area confidence assessment data; When it is determined that the target area area data corresponding to the target area confidence evaluation data is greater than or equal to the preset target area area threshold data, sparse sampling is performed according to the target area confidence evaluation data to obtain comparison target sampling data; When it is determined that the target area area data corresponding to the target area confidence evaluation data is less than the preset target area area threshold data, dense sampling is performed according to the target area confidence evaluation data to obtain comparative target sampling data; Conduct confidence-guided target screening according to the comparison target sampling data to obtain confidence screening data; The data is filtered according to the confidence level to generate a spatial perception target, thereby obtaining spatial perception target data; According to the spatial perception target data, regional and background contrast target sampling is performed to obtain contrast target data.

8. The method according to claim 6, characterized in that The multi-scale analysis is as follows: Perform preliminary multi-scale division according to the geological distance map data and the confidence map data to obtain preliminary multi-scale data of the geological distance map and preliminary multi-scale data of the confidence map; Perform global local entropy calculation based on preliminary multi-scale data of geological distance map and preliminary multi-scale data of confidence map to obtain multi-scale entropy data of geological distance map and multi-scale entropy data of confidence map; Multi-scale entropy similarity calculation is performed based on the multi-scale entropy data of the geological distance map and the multi-scale entropy data of the confidence map to obtain multi-scale entropy similarity data; According to the multi-scale entropy similarity data, the preliminary multi-scale data of the geological distance map and the preliminary multi-scale data of the confidence map are screened for non-similar entropy, and the multi-scale screening data of the geological distance map and the multi-scale screening data of the confidence map are obtained respectively; The consistency distribution calculation is performed based on the multi-scale screening data of the geological distance map and the multi-scale screening data of the confidence map to obtain the multi-scale data of the geological distance map and the multi-scale data of the confidence map.

9. A colorectal cancer image segmentation system, characterized in that: For executing the method for colorectal cancer image segmentation according to claim 1, the system comprises: A colorectal cancer image data acquisition module, used to acquire colorectal cancer image data, wherein the colorectal cancer image data includes colorectal cancer image annotated data and colorectal cancer image unannotated data; A student-teacher network architecture initialization module is used to initialize the student-teacher network architecture according to colorectal cancer image data, and obtain an initialized student network model and an initialized teacher model respectively; The secondary optimized student network model construction module is used to perform supervised learning on the initialized student network model according to the annotated data of colorectal cancer images to obtain a preliminary optimized student network model; input the unlabeled data of colorectal cancer images into the preliminary optimized student network model for calculation to obtain preliminary student model prediction data, and perform pseudo-label calculation on the unlabeled data of colorectal cancer images and the preliminary student model prediction data to obtain pseudo-label data; optimize the preliminary optimized student network model according to the preliminary student model prediction data and the pseudo-label data to obtain a secondary optimized student network model; The colorectal cancer image segmentation model generation module is used to update the parameters of the initialized teacher model according to the secondary optimized student network model to obtain an updated teacher model, and optimize the updated teacher model according to the colorectal cancer image annotation data to obtain the colorectal cancer image segmentation model.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program is configured to execute the method according to any one of claims 1 to 8 when executed.

Citation Information

Patent Citations

  • MR medical image colorectal cancer segmentation method and system based on semi-supervised learning

    CN117409201A

  • Colposcope image segmentation model construction method, image classification method and device

    CN118334336A

  • Semi-supervised medical image segmentation method for eye movement guided hybrid data enhancement

    CN119205802A

Cited By

  • Semantic segmentation model training method and device

    CN119919669A

  • A method and device for training a semantic segmentation model

    CN119919669B

  • Power transmission line fault detection method and system based on RKM-YOLO algorithm

    CN121304673A