A hybrid distribution-based double-layer sampling medical image pre-training method and system

By employing a hybrid distribution-based two-layer sampling method, combined with Gaussian distribution center clipping and local gradient direction mask selection, the problem of the inability to effectively capture key features in existing technologies is solved, significantly improving the accuracy of medical image segmentation and the adaptability of the model.

CN119399179BActive Publication Date: 2026-06-02XIDIAN UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
XIDIAN UNIV
Filing Date
2024-11-12
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

Existing medical image pre-training methods cannot effectively capture key features, resulting in insufficient model performance.

Method used

A two-layer sampling method based on a hybrid distribution is adopted, which combines a Gaussian distribution center clipping strategy and a mask selection strategy based on local gradient direction. Self-supervised learning for mask reconstruction is performed through a convolutional neural network to generate masked data and retained data. A self-supervised learning network for mask reconstruction is constructed, and its weights are transferred to a fully supervised segmentation model for training.

Benefits of technology

It significantly improves the model's ability to understand and analyze key features of medical images, enhances the accuracy and reliability of medical image segmentation, and strengthens the model's adaptability and generalization ability under different imaging modes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119399179B_ABST
    Figure CN119399179B_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on hybrid distribution's double-layer sampling medical image pre-training method and system, combined with the center cutting strategy based on Gaussian distribution and the mask selection strategy based on local gradient direction distribution, for improving the precision of medical image pre-training and segmentation.Gaussian distribution's center cutting strategy is cut by using the benchmark center point conforming to Gaussian distribution, so that cutting area is more concentrated in the main part of image;And the mask selection strategy based on local gradient direction distribution effectively selects the foreground part with larger information amount in medical image by capturing the shape features of image, so as to improve the understanding and analysis ability of model to key features of image in the mask reconstruction process.Experimental results show that the method of the application significantly improves the precision and reliability of medical image segmentation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of medical image pre-training technology, specifically relating to a method and system for pre-training medical images based on a hybrid distribution and dual-layer sampling. Background Technology

[0002] Center cropping and random cropping are common image preprocessing methods in 3D medical image segmentation training. Center cropping extracts a fixed-size segment from the central region of the image. Its main purpose is to capture the most important parts of the image, typically areas containing key anatomical structures or lesions. Since medical images usually have high resolution and large dimensions, processing the entire image directly can lead to enormous computational overhead and redundant information. Center cropping effectively reduces image size, improves computational efficiency, and preserves the most diagnostically valuable regions. This method is particularly suitable for scenarios where the target region is concentrated in the image center, such as certain types of tumor detection or organ segmentation.

[0003] Random cropping increases data diversity by randomly selecting any region from an image, thereby improving the model's generalization ability. Random cropping can generate image fragments at different locations, covering a wider feature space and reducing the model's dependence on specific regions or structures. This is particularly important when dealing with unevenly distributed image content or when the location of the target region is uncertain. By increasing the diversity of training data, random cropping can effectively improve the model's performance on unknown data.

[0004] In the field of masked reconstruction pre-training, random masking and progressive masking are common mask selection strategies. Random masking involves randomly selecting regions in the image for masking. During training, random masking selects different parts of the image for masking, forcing the model to utilize other uncovered parts of the image for prediction and reconstruction. This method can effectively improve the model's ability to recover partially missing information and enhance its robustness. However, a potential problem with random masking is that it may not be able to fully utilize all the information in the image, especially when the masked area is small; the model may tend to rely on uncovered areas for reconstruction.

[0005] Progressive masking helps a model learn features progressively from simple to complex by gradually increasing the size or number of masked regions. This method aims to allow the model to handle simpler tasks in the early stages of training, such as recovering small missing regions. As training progresses, the difficulty of the masking is gradually increased, exposing the model to more complex and larger areas of missing information. Progressive masking effectively guides the model to gradually adapt and learn from simple to complex features, thereby improving learning performance and generalization ability.

[0006] Existing methods use random cropping for sampling. Random cropping may remove key features or information from the image. Moreover, due to the uncertainty of the cropping region, the amount of information and complexity received by the model may be inconsistent between different training batches, which may affect the stability of training.

[0007] Another sampling method uses a center clipping technique, which over-relies on the central region, leading to a decrease in the model's sensitivity to non-central information and the neglect of useful features contained in the edge regions.

[0008] Another existing method uses a random masking strategy to mask the data. Random masks may cover the background area and ignore key feature areas in the image, causing the model to fail to learn important foreground features in the image effectively. The randomness of the mask may cause the amount of information received by the model to be inconsistent between different training batches, thus affecting the stability of training.

[0009] Another approach uses a progressive masking strategy to mask the data. As training progresses, the progressive masking strategy gradually increases the size or number of masked regions, which may prolong the training time. In the early stages of training, when the masked regions are small, the model may over-rely on the unmasked features, leading to overfitting to these features. Summary of the Invention

[0010] The technical problem to be solved by the present invention is to provide a method and system for pre-training medical images based on hybrid distribution and dual-layer sampling, which addresses the shortcomings of the prior art and solves the problem that the existing pre-training methods cannot effectively capture key features in medical images, resulting in insufficient model performance.

[0011] The present invention adopts the following technical solution:

[0012] A method for pre-training medical images based on a hybrid distribution and two-layer sampling includes the following steps:

[0013] Preprocess the raw medical images;

[0014] The preprocessed medical image is cropped into multiple image blocks of the same size;

[0015] Develop a masking strategy, perform masking operations on the obtained image patches, and generate masked data and retained data;

[0016] A self-supervised learning network for mask reconstruction based on convolutional neural network is constructed. The generated masked data is input into the self-supervised pre-training network for mask reconstruction to complete the pre-training of double-layer sampled medical images.

[0017] The weights of the self-supervised learning network reconstructed from the obtained mask are transferred to a fully supervised segmentation model with the same network structure, and the fully supervised segmentation model is trained using labeled image data.

[0018] Preferably, the preprocessing of the original medical images specifically includes:

[0019] Add a channel dimension to the image data; rearrange the image's coordinate axes, standardizing them to a right, front, top format; change the image's voxel dimensions. Adjusted to Normalize the pixel intensity of the image to a specified range; fill the space of the image to achieve a specified space size; calculate the effective target region within the image size in the training set, generate center points in the target region that conform to a Gaussian distribution with a mean of 0 and a variance of 1, scale the corresponding center points to the effective region, crop with the corresponding geometric center as the reference point, and extract image patches of a specified size from each image.

[0020] Preferably, the original medical images include magnetic resonance imaging, computed tomography, positron emission tomography, and ultrasound images.

[0021] Preferably, the voxel size of the image is adjusted. for:

[0022]

[0023] in, It is the interpolation weight function. and These are the original and adjusted images, respectively.

[0024] Preferably, the pixel intensity of the image is normalized to a specified range as follows:

[0025]

[0026] in, This is the original strength value. This is the normalized intensity value. It is the original strength range. It is the target intensity range.

[0027] Preferably, extracting image patches of a specific size from each image specifically involves:

[0028]

[0029] in, for, for, These are the parameters of a Gaussian distribution. It is a valid target area. The minimum size of the image patch that can be extracted. This represents the maximum size of the image patch that can be extracted.

[0030] Preferably, the generation of the masked data and the retained data are specifically as follows:

[0031] The image patch is segmented according to its channel dimension, with each channel as a two-dimensional slice; each slice is converted into an 8-bit unsigned integer, and the pixel values ​​are normalized to the range of 0 to 255; then the slice size is adjusted to... Pixel;

[0032] Calculate each pixel in the image The gradient;

[0033] Divide the image into segments of size [size]. The pixels are divided into small blocks. In each block, the gradient magnitude of the corresponding pixel is projected into a predetermined angle range according to the gradient direction of the pixel to form a direction histogram.

[0034] Combine several adjacent small blocks into a large block, and perform L2 normalization on the orientation histogram within the block.

[0035] The orientation histogram vectors of all normalized blocks are concatenated into a long vector to form the final feature vector; then, the feature value of the corresponding image block is obtained by calculating the average of these feature vectors.

[0036] Sort the image patches according to their feature values, and select the patches with the largest feature values ​​to generate a mask.

[0037] Generate masked data using a mask matrix. and the data to be retained , ⊙ represents element-wise multiplication.

[0038] Preferably, constructing a self-supervised learning network for mask reconstruction based on a convolutional neural network specifically involves:

[0039] The masked data Input to encoder In the process, feature representations are obtained. The encoder outputs feature Z, which is then input into the decoder. The goal is to reconstruct the obscured data area; calculate the reconstructed data. and real data The mean squared error between the two values ​​is calculated; a total loss function containing reconstruction loss and regularization loss is constructed; the total loss function is minimized using the Adam optimization algorithm.

[0040] Preferably, the total loss function Specifically:

[0041]

[0042] in, It is the weight of regularization. yes Loss of regularization It is to rebuild data and real data The mean squared error between them.

[0043] Secondly, embodiments of the present invention provide a dual-layer sampling medical image pre-training system based on hybrid distribution, comprising:

[0044] The preprocessing module performs preprocessing on the raw medical images;

[0045] The network module crops the preprocessed medical image into multiple image patches of the same size, and then feeds these image patches into the convolutional neural network as input data.

[0046] The strategy module defines the masking strategy, performs masking operations on the obtained image blocks, and generates masked data and retained data.

[0047] The module constructs a self-supervised learning network for mask reconstruction based on a convolutional neural network. The generated masked data is then input into the self-supervised pre-training network for mask reconstruction to complete the pre-training of double-layer sampled medical images.

[0048] The fine-tuning module transfers the weights of the self-supervised learning network reconstructed from the obtained mask to a fully supervised segmentation model with the same network structure, and trains the fully supervised segmentation model using labeled image data.

[0049] Thirdly, a computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the steps of the above-described method for pre-training medical images based on a hybrid distribution dual-layer sampling method.

[0050] Fourthly, embodiments of the present invention provide a computer-readable storage medium including a computer program, which, when executed by a processor, implements the steps of the above-described method for pre-training medical images based on a hybrid distribution dual-layer sampling method.

[0051] Compared with the prior art, the present invention has at least the following beneficial effects:

[0052] A hybrid distribution-based two-layer sampling medical image pre-training method is proposed. A Gaussian-distributed center-cropping strategy utilizes a Gaussian-compliant reference center point for cropping, concentrating the cropped area more closely on the main parts of the image. This method not only reduces the loss of important information during cropping but also ensures the preservation of key image regions, thereby improving the model's understanding and parsing capabilities. Combined with a mask selection strategy based on local gradient direction distribution, it effectively selects foreground regions with high information density in medical images. This mask selection strategy analyzes changes in local gradient directions to identify high-information-density regions in the image and then generates appropriate masks to cover these regions. During mask reconstruction, the model learns more deeply about the important information in the image, significantly improving its understanding and analysis of key image features.

[0053] Furthermore, this invention provides comprehensive optimization through adjustments to voxel size, pixel intensity normalization, and appropriate image patch extraction. First, voxel size adjustment ensures that medical images of different resolutions can be processed at a uniform scale, reducing errors caused by varying scanning conditions and thus improving image data consistency. Second, pixel intensity normalization eliminates intensity differences arising from different imaging devices, enabling analysis of medical image data from different modalities within the same intensity range, which helps improve the model's generalization ability and training stability. The image patch extraction employs a combination of Gaussian distribution and local gradient information, ensuring that the extracted image patches cover key areas with high information content without being too large or too small, effectively enhancing the model's ability to capture image details and key features. This series of preprocessing steps provides high-quality input data for subsequent medical image modeling and reconstruction, significantly improving the model's performance and accuracy in image analysis.

[0054] Furthermore, in the hybrid distribution-based dual-layer sampling medical image pre-training method, the original medical images include magnetic resonance imaging (MRI), computed tomography (CT), positron emission tomography (PET), and ultrasound imaging. This setup aims to enhance the model's versatility and adaptability. By introducing multiple imaging modalities, the characteristics of different imaging technologies can be fully utilized to improve the generalization ability of the pre-trained model. MRI excels at capturing the fine structure of soft tissues, while CT helps the model better identify hard tissues and bone contours. PET primarily reflects metabolic activities and biochemical changes; although the images are relatively blurry, they provide important information about functional lesions. Ultrasound imaging faces significant noise and low contrast issues, but its dynamic capture capability is particularly crucial for soft tissue analysis. By integrating these different image data during pre-training, the model can learn the feature representations of various images, improve its recognition ability in low signal-to-noise ratio environments, and enhance its adaptability to various medical scenarios, thus performing more robustly and accurately in subsequent tasks such as medical image segmentation and lesion detection.

[0055] Furthermore, the masking strategy is designed to improve data quality and model performance during medical image pre-training through effective feature extraction and mask generation. First, image patches are segmented into two-dimensional slices along the channel dimension, and pixel values ​​are standardized to 0 to 255. This process not only simplifies data processing but also ensures consistency of pixel values ​​across different channels, facilitating subsequent calculations and analysis. Next, by calculating the gradient of each pixel, edge information and texture features of the image can be captured, laying the foundation for subsequent histogram calculation. In the process of dividing the image into small blocks and calculating the orientation histogram, this step effectively extracts local features of the image while considering gradient direction, enhancing sensitivity to shape and contour. By combining the small blocks and performing L2 normalization on the orientation histogram, feature differences between different blocks can be reduced, improving feature stability and consistency. Finally, the orientation histograms of all normalized blocks are concatenated into a long vector, and its average value is calculated. This not only reduces the feature dimensionality but also provides an overall feature description, facilitating subsequent feature sorting and mask generation. Sorting by feature value and selecting the block with the largest feature value for mask generation ensures that the mask focuses on information-rich regions, thus improving the effectiveness of the mask reconstruction process. The masked and retained data generated through element-wise multiplication allow the model to fully learn effective features during training, enabling it to better identify and reconstruct key regions in medical images in subsequent tasks. In summary, masking the obtained image blocks, through reasonable feature extraction and mask generation strategies, improves the model's performance and its ability to understand key features of medical images.

[0056] Furthermore, the design of a self-supervised learning network for mask reconstruction based on a convolutional neural network aims to improve the model's performance and accuracy in processing masked medical images through feature reconstruction and loss optimization. First, the masked data is input into the encoder E to obtain the feature representation Z. The main purpose of this process is to extract latent features from the data and effectively capture key information affecting reconstruction. By encoding the masked data, the model can learn contextual information in the missing regions, supporting subsequent reconstruction. Next, the features Z are input into the decoder D, whose goal is to reconstruct the masked data region. Through this step, the model needs to transform the latent features extracted by the encoder back into the space of the original image. This process not only promotes the restoration of image details but also enhances the model's ability in generation tasks. The reconstruction effect will be evaluated in subsequent steps to ensure that the model can accurately understand and reconstruct the masked region in the feature space. Calculating the mean squared error between the reconstructed data and the real data quantifies the accuracy of the model's reconstruction. This loss metric provides feedback for the optimization process, helping the model adjust parameters to improve reconstruction results. Meanwhile, by constructing a total loss function that includes reconstruction loss and regularization loss, overfitting of the model can be effectively avoided, ensuring that the training process not only focuses on the accuracy of reconstruction but also maintains the model's generalization ability. Finally, the Adam optimization algorithm is used to minimize the total loss function, fully utilizing the advantages of the Adam optimizer in handling sparse gradients, thereby improving the model's convergence speed and stability. Therefore, through feature reconstruction, loss calculation, and optimization, an efficient training process is constructed, aiming to improve the model's ability to understand and recover key features in medical images, thereby enhancing its effectiveness and reliability in practical applications.

[0057] It is understandable that the beneficial effects of the second aspect mentioned above can be found in the relevant descriptions in the first aspect mentioned above, and will not be repeated here.

[0058] In summary, the hybrid distribution-based dual-layer sampling medical image pre-training method of this invention significantly improves the preprocessing effect and model performance of medical images by introducing a Gaussian distribution-based center clipping strategy and a mask selection strategy based on local gradient direction. Overall, this invention constructs an efficient medical image pre-training workflow through a series of rationally designed steps, enabling the model to deeply understand the key features in medical images, significantly improving its performance and accuracy in image analysis, thereby providing more reliable support for clinical applications.

[0059] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description

[0060] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the following description of the relative embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0061] Figure 1 This is a flowchart of the present invention;

[0062] Figure 2 This is a structural diagram of the present invention;

[0063] Figure 3 A framework diagram for selecting a mask strategy;

[0064] Figure 4 A schematic diagram of a computer device provided in an embodiment of the present invention;

[0065] Figure 5 This is a block diagram of an electronic device according to an embodiment of the present invention. Detailed Implementation

[0066] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0067] In the description of this invention, it should be understood that the terms "comprising" and "including" indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.

[0068] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.

[0069] It should also be further understood that the term "and / or" as used in this specification and the appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes such combinations. For example, A and / or B can represent three cases: A alone, A and B simultaneously, and B alone. Additionally, the character " / " in this invention generally indicates that the preceding and following objects have an "or" relationship.

[0070] It should be understood that although terms such as first, second, third, etc., may be used in the embodiments of the present invention to describe the preset range, these preset ranges should not be limited to these terms. These terms are only used to distinguish the preset ranges from one another. For example, without departing from the scope of the embodiments of the present invention, the first preset range may also be referred to as the second preset range, and similarly, the second preset range may also be referred to as the first preset range.

[0071] Depending on the context, the word "if" as used here can be interpreted as "when," "when," "in response to determination," or "in response to detection." Similarly, depending on the context, the phrase "if determination" or "if detection (of the stated condition or event)" can be interpreted as "when determination," "in response to determination," "when detection (of the stated condition or event)," or "in response to detection (of the stated condition or event)."

[0072] The accompanying drawings illustrate various structural schematic diagrams according to embodiments disclosed in this invention. These drawings are not to scale, and some details have been enlarged for clarity, and some details may have been omitted. The shapes of the various regions and layers shown in the drawings, as well as their relative sizes and positional relationships, are merely exemplary and may deviate from reality due to manufacturing tolerances or technical limitations. Furthermore, those skilled in the art can design regions / layers with different shapes, sizes, and relative positions as needed.

[0073] This invention provides a hybrid distribution-based dual-layer sampling medical image pre-training method, combining a Gaussian distribution-based center cropping strategy and a local gradient direction distribution-based mask selection strategy to improve the accuracy of medical image pre-training and segmentation. The Gaussian distribution-based center cropping strategy utilizes a reference center point conforming to a Gaussian distribution for cropping, making the cropped region more concentrated in the main part of the image. Meanwhile, the local gradient direction distribution-based mask selection strategy captures the shape features of the image, effectively selecting the foreground portion with high information content in the medical image, thereby improving the model's understanding and analysis ability of key image features during mask reconstruction. Experimental results show that the method of this invention significantly improves the accuracy and reliability of medical image segmentation.

[0074] Please see Figure 1 This invention discloses a two-layer sampling medical image pre-training method based on hybrid distribution. It describes image shape features by capturing local gradient direction distribution and then performs component masking based on patch information to improve the network's representation learning ability. The specific steps are as follows:

[0075] S1. Preprocess the raw medical images (including magnetic resonance imaging (MRI), computed tomography (CT), positron emission tomography (PET), and ultrasound imaging (US)).

[0076] First, add dimensions to the original image, rearrange the coordinate axes, adjust the resolution and pixel intensity, and fill the image. Then, calculate the effective target region within the image size. Generate a center point within the target region that conforms to a Gaussian distribution with a mean of 0 and a variance of 1. Then, scale the center point to the size of the effective target region and crop the image based on this geometric center point.

[0077] S101. Add a channel dimension to the image data;

[0078] S102. Rearrange the coordinate axis orientation of the image and standardize the coordinate axis orientation of the image to the right, front, and top format;

[0079] S103, Adjust the voxel size of the image. for :

[0080]

[0081] in, It is the interpolation weight function. and These are the original and adjusted images, respectively.

[0082] S104. Normalize the pixel intensity of the image to a specified range:

[0083]

[0084] in, This is the original strength value. This is the normalized intensity value. It is the original strength range. It is the target intensity range.

[0085] S105. Fill the space in the image to make it reach the specified space size;

[0086] S106. Calculate the effective target region within the image size in the training set, generate a center point within the target region that conforms to a Gaussian distribution with a mean of 0 and a variance of 1, scale the center point into the effective region, and crop the image using the geometric center as the reference point to extract image patches of a specific size from each image.

[0087]

[0088] in, These are the parameters of a Gaussian distribution. It is a valid target area.

[0089] S2. Calculate the Gaussian distribution reference center point of the image, crop the medical image preprocessed in step S1 into multiple image blocks of the same size, and input the image blocks as input data into the self-supervised pre-training network in sequence.

[0090] S3. Formulate a masking strategy, perform masking operations on the image blocks obtained in step S2, and generate masked data and retained data.

[0091] Please see Figure 3 The mask selection strategy is as follows:

[0092] S301. Divide the image patch according to its channel dimension, with each channel as a two-dimensional slice. Each slice is converted into an 8-bit unsigned integer, with the pixel value normalized to the range of 0 to 255. Then, resize these slices to... Pixel;

[0093] S302, For each pixel of the image Calculate the gradient to extract edge information and orientation features;

[0094] Flat gradient It is determined by calculating the difference in image pixel values ​​in the horizontal direction. The specific calculation method uses the Sobel operator formula as follows:

[0095]

[0096] Vertical gradient This is obtained by calculating the difference in image pixel values ​​in the vertical direction, using the following formula:

[0097]

[0098] gradient magnitude The gradient at a pixel is represented by the following formula:

[0099]

[0100] gradient direction The gradient vector represents the angle relative to the horizontal axis, and its calculation formula is as follows:

[0101]

[0102] S303. Construct a direction histogram;

[0103] First, divide the image into segments of size [size missing]. The pixels are divided into small blocks. In each block, the gradient magnitude of the corresponding pixel is projected into a predetermined angle range according to the gradient direction of the pixel, forming a direction histogram.

[0104] Specifically, the direction is divided into 9 intervals, each covering an angle range of 20°. For each pixel, its gradient magnitude is assigned to the corresponding angle interval according to the gradient direction and accumulated in the histogram.

[0105] S304, Block Normalization;

[0106] Combine several adjacent small blocks into a larger block, and then perform L2 normalization on the orientation histogram within the block:

[0107]

[0108] S305. Concatenate the orientation histogram vectors of all normalized blocks into a long vector to form the final feature vector; then, by calculating the average of these feature vectors, obtain the feature value of the image block.

[0109] S306. Sort the image blocks according to their feature values, and select several blocks with larger feature values ​​to generate a mask. These blocks with larger feature values ​​usually contain more key information. By masking elements in the data with a higher mask ratio, a more representative mask is generated by prioritizing the selection of blocks with greater information content.

[0110] S307. Use a mask matrix to generate the masked data and the retained data.

[0111] Data after masking and the data to be retained They are respectively:

[0112]

[0113]

[0114] Here, ⊙ represents element-wise multiplication.

[0115] S4. Construct a mask reconstruction self-supervised learning network based on convolutional neural network (CNN), and input the generated masked data into the mask reconstruction self-supervised pre-training network to complete the pre-training of double-layer sampled medical images.

[0116] S401, Mask the data Input to encoder In the process, feature representations are obtained. ;

[0117] Feature representation Specifically:

[0118]

[0119] S402. Input the feature Z output by the encoder into the decoder. The goal is to reconstruct the covered data area;

[0120] Masked area reconstructed by decoder for:

[0121]

[0122] in, It is a characteristic.

[0123] S403, Calculate Reconstruction Data and real data The mean squared error (MSE) between them;

[0124]

[0125] in, and They are the first The sample, the first The true value and reconstructed value of each feature.

[0126] S404. Total loss includes reconstruction loss and regularization loss.

[0127]

[0128]

[0129] in, It is the weight of regularization. yes Loss of regularization These are model parameters.

[0130] S405. Use the Adam optimization algorithm to minimize the total loss function.

[0131] Update model parameters :

[0132]

[0133] in, It's the learning rate. It is the gradient of the loss function with respect to the model parameters.

[0134] S5. Transfer the weights of the trained self-supervised mask reconstruction network to the fully supervised segmentation model with the same network structure, and train the fully supervised segmentation model using labeled image data.

[0135] In this stage, the segmentation model is trained using labeled image data to optimize its performance in real-world segmentation tasks.

[0136] Those skilled in the art will understand that various aspects of the present invention can be implemented as systems, methods, or program products. Therefore, various aspects of the present invention can be specifically implemented in the following forms: a completely hardware implementation, a completely software implementation (including firmware, microcode, etc.), or a combination of hardware and software aspects, collectively referred to herein as a "circuit," "module," or "platform."

[0137] In another embodiment of the present invention, a hybrid distribution-based dual-layer sampling medical image pre-training system is provided. This system can be used to implement the above-mentioned hybrid distribution-based dual-layer sampling medical image pre-training method. Specifically, the hybrid distribution-based dual-layer sampling medical image pre-training system includes a preprocessing module, a network module, a strategy module, a construction module, and a fine-tuning module.

[0138] The preprocessing module performs preprocessing on the original medical images.

[0139] Add a channel dimension to the image data; rearrange the image's coordinate axes, standardizing them to a right, front, top format; change the image's voxel dimensions. Adjusted to Normalize the pixel intensity of the image to a specified range; fill the space of the image to achieve a specified space size; calculate the effective target region within the image size in the training set, generate center points in the target region that conform to a Gaussian distribution with a mean of 0 and a variance of 1, scale the corresponding center points to the effective region, crop with the corresponding geometric center as the reference point, and extract image patches of a specified size from each image.

[0140] The original medical images include magnetic resonance imaging, computed tomography, positron emission tomography, and ultrasound images.

[0141] Adjusting the voxel size of the image for:

[0142]

[0143] in, It is the interpolation weight function. and These are the original and adjusted images, respectively.

[0144] The pixel intensity of the image is normalized to a specified range as follows:

[0145]

[0146] in, This is the original strength value. This is the normalized intensity value. It is the original strength range. It is the target intensity range.

[0147] Extracting image patches of a specific size from each image specifically involves:

[0148]

[0149] in, for, for, These are the parameters of a Gaussian distribution. It is a valid target area. The minimum size of the image patch that can be extracted. This represents the maximum size of the image patch that can be extracted.

[0150] The network module crops the preprocessed medical image into multiple image blocks of the same size;

[0151] The strategy module defines the masking strategy, performs masking operations on the obtained image blocks, and generates masked data and retained data.

[0152] The image patch is segmented according to its channel dimension, with each channel as a two-dimensional slice; each slice is converted into an 8-bit unsigned integer, and the pixel values ​​are normalized to the range of 0 to 255; then the slice size is adjusted to... Pixel; calculates each pixel in an image. The gradient; divide the image into parts of size. For each small pixel block, the gradient magnitude of the pixel is projected onto a predetermined angle interval based on the pixel's gradient direction, forming an orientation histogram. Several adjacent small blocks are combined into a larger block, and the orientation histogram within this block is L2 normalized. The orientation histogram vectors of all normalized blocks are concatenated into a long vector to form the final feature vector. Then, the average of these feature vectors is calculated to obtain the feature value of the corresponding image block. The image blocks are sorted according to their feature values, and the blocks with the largest feature values ​​are selected for mask generation. The masked data is then generated using the mask matrix. and the data to be retained , ⊙ represents element-wise multiplication.

[0153] The module constructs a self-supervised learning network for mask reconstruction based on a convolutional neural network. The generated masked data is then input into the self-supervised pre-training network for mask reconstruction to complete the pre-training of double-layer sampled medical images.

[0154] The masked data Input to encoder In the process, feature representations are obtained. The encoder outputs feature Z, which is then input into the decoder. The goal is to reconstruct the obscured data area; calculate the reconstructed data. and real data The mean squared error between the two values; constructing a total loss function that includes reconstruction loss and regularization loss; minimizing the obtained total loss function using the Adam optimization algorithm; the total loss function... Specifically:

[0155]

[0156] in, It is the weight of regularization. yes Loss of regularization It is to rebuild data and real data The mean squared error between them.

[0157] The fine-tuning module transfers the weights of the self-supervised learning network reconstructed from the obtained mask to a fully supervised segmentation model with the same network structure, and trains the fully supervised segmentation model using labeled image data.

[0158] In another embodiment of the present invention, a terminal device is provided, comprising a processor and a memory. The memory stores a computer program, which includes program instructions. The processor executes the program instructions stored in the computer storage medium. The processor may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. It is the computing and control core of the terminal, suitable for implementing one or more instructions, specifically suitable for loading and executing one or more instructions to achieve a corresponding method flow or corresponding function. The processor described in this embodiment can be used for the operation of a hybrid distributed dual-layer sampling medical image pre-training method, including:

[0159] The original medical images are preprocessed; the preprocessed medical images are cropped into multiple image patches of the same size; a masking strategy is formulated to perform masking operations on the obtained image patches, generating masked data and retained data; a self-supervised learning network for mask reconstruction based on a convolutional neural network is constructed, and the generated masked data is input into the self-supervised pre-training network for mask reconstruction to complete the pre-training of the two-layer sampled medical images; the weights of the self-supervised learning network for mask reconstruction are transferred to a fully supervised segmentation model with the same network structure, and the fully supervised segmentation model is trained using labeled image data.

[0160] In another embodiment of the present invention, a storage medium is provided, specifically a computer-readable storage medium (Memory), which is a memory device in a terminal device for storing programs and data. It is understood that the computer-readable storage medium here can include both the built-in storage medium in the terminal device and extended storage media supported by the terminal device; it can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. The computer-readable storage medium provides storage space that stores the terminal's operating system. Furthermore, the storage space also stores one or more instructions suitable for loading and execution by a processor, which can be one or more computer programs (including program code). It should be noted that more specific examples (a non-exhaustive list) of the computer-readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0161] Computer-readable storage media also include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable storage medium can also be any readable medium other than a readable storage medium that can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the readable storage medium can be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.

[0162] Program code for performing the operations of this invention can be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java and C++, and conventional procedural programming languages ​​such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0163] One or more instructions stored in a computer-readable storage medium can be loaded and executed by a processor to implement the corresponding steps of the above-described embodiments regarding the dual-layer sampling medical image pre-training method based on hybrid distribution; one or more instructions in the computer-readable storage medium are loaded and executed by the processor to perform the following steps:

[0164] The original medical images are preprocessed; the preprocessed medical images are cropped into multiple image patches of the same size; a masking strategy is formulated to perform masking operations on the obtained image patches, generating masked data and retained data; a self-supervised learning network for mask reconstruction based on a convolutional neural network is constructed, and the generated masked data is input into the self-supervised pre-training network for mask reconstruction to complete the pre-training of the two-layer sampled medical images; the weights of the self-supervised learning network for mask reconstruction are transferred to a fully supervised segmentation model with the same network structure, and the fully supervised segmentation model is trained using labeled image data.

[0165] Please see Figure 4 The terminal device is a computer device. In this embodiment, the computer device 60 includes a processor 61, a memory 62, and a computer program 63 stored in the memory 62 and executable on the processor 61. When executed by the processor 61, the computer program 63 implements the hybrid distribution-based dual-layer sampling medical image pre-training method described in this embodiment. To avoid repetition, details are omitted here. Alternatively, when executed by the processor 61, the computer program 63 implements the functions of each model / unit in the hybrid distribution-based dual-layer sampling medical image pre-training system described in this embodiment. To avoid repetition, details are omitted here.

[0166] Computer device 60 can be a desktop computer, laptop, handheld computer, cloud server, or other computing device. Computer device 60 may include, but is not limited to, a processor 61 and a memory 62. Those skilled in the art will understand that... Figure 4This is merely an example of computer device 60 and does not constitute a limitation on computer device 60. It may include more or fewer components than shown, or combine certain components, or different components. For example, computer device may also include input / output devices, network access devices, buses, etc.

[0167] The processor 61 may be a central processing unit (CPU), or other general-purpose processors, CPUs, graphics processing units (GPUs), digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, quantum computing-based data processing logic units, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.

[0168] The memory 62 can be an internal storage unit of the computer device 60, such as a hard disk or RAM of the computer device 60. The memory 62 can also be an external storage device of the computer device 60, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc. equipped on the computer device 60.

[0169] Furthermore, the memory 62 may include both internal storage units of the computer device 60 and external storage devices. The memory 62 is used to store computer programs and other programs and data required by the computer device. The memory 62 can also be used to temporarily store data that has been output or will be output.

[0170] Any references to memory, databases, or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM may be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.

[0171] The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0172] Please see Figure 5 The terminal device is an electronic device 600, which is manifested in the form of a general-purpose computing device. The components of the electronic device may include, but are not limited to: at least one processing unit 610, at least one storage unit 620, a bus 630 connecting different platform components (including storage unit 620 and processing unit 610), a display unit 640, etc.

[0173] The storage unit stores program code, which can be executed by the processing unit 610 to perform the steps described in the method section of this specification according to various exemplary embodiments of the present invention. For example, the processing unit 610 can perform actions such as... Figure 1 The steps are shown in the figure.

[0174] Storage unit 620 may include a readable medium in the form of a volatile storage unit, such as random access memory (RAM) 6201 and / or cache memory 6202, and may further include a read-only memory (ROM) 6203.

[0175] Storage unit 620 may also include a program / utility 6204 having a set (at least one) program module 6205, such program module 6205 including but not limited to: operating system, one or more application programs, other program modules and program data, each or some combination of these examples may include an implementation of a network environment.

[0176] Bus 630 can represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any of the multiple bus structures.

[0177] Electronic device 600 can also communicate with one or more external devices 700 (e.g., keyboard, pointing device, Bluetooth device, etc.), and with one or more devices that enable a user to interact with electronic device 600, and / or with any device that enables electronic device 600 to communicate with one or more other computing devices (e.g., router, modem, etc.). This communication can be performed via input / output (I / O) interface 650. Furthermore, electronic device 600 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 660. Network adapter 660 can communicate with other modules of electronic device 600 via bus 630. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage platforms.

[0178] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.

[0179] Step S1 uses a Gaussian distribution-based center cropping strategy to cover different locations in the cropping region, increasing data diversity and helping the model learn more robust features. In this process, the effective image size is first calculated, then a random number with a mean of 0 and a variance of 1 is generated and scaled to within the effective patch size range. Since the probability density of the Gaussian distribution is highest in the central region, this method tends to select areas closer to the geometric center of the image for cropping, thus preserving the main content of the image. The Gaussian distribution provides a more natural offset pattern, simulating the distribution of observation points or object positions in a real scene, which helps improve the model's generalization ability.

[0180] Step S3 extracts local shape features from image patches, enabling the mask to more accurately reflect key information in the image. In this process, the feature values ​​of the image patches are first sorted, and then important image patches are adaptively selected to generate the mask based on the sorting results. This method improves the effectiveness of the mask, thereby enhancing the overall accuracy of image segmentation.

[0181] Table 1

[0182]

[0183] The experimental results are shown in Table 1. The method of the present invention performs excellently in medical image segmentation tasks, significantly improving the accuracy and reliability of segmentation.

[0184] In summary, the present invention provides a bilayer sampling medical image pre-training method and system based on hybrid distribution, which demonstrates excellent performance in practical applications. Experimental verification on a large number of medical image datasets shows that the center-cropping strategy based on Gaussian distribution and the mask selection strategy based on local gradient direction distribution not only effectively improve the model's representation learning ability during the pre-training stage but also perform well in downstream tasks such as tumor segmentation. These strategies effectively reduce training time and computational resource consumption while improving the model's accuracy and robustness.

[0185] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0186] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0187] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed in this invention can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0188] In the embodiments provided by this invention, it should be understood that the disclosed devices / terminals and methods can be implemented in other ways. For example, the device / terminal embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0189] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0190] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0191] If the integrated module / unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium can be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electrical carrier signals and telecommunication signals.

[0192] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0193] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0194] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0195] The above content is only for illustrating the technical concept of the present invention and should not be construed as limiting the scope of protection of the present invention. Any modifications made to the technical solution based on the technical concept proposed in this invention shall fall within the scope of protection of the claims of this invention.

Claims

1. A method for pre-training medical images based on a hybrid distribution dual-layer sampling method, characterized in that, Includes the following steps: The original medical images are preprocessed as follows: Add a channel dimension to the image data; rearrange the image's coordinate axes, standardizing them to a right, front, top format; change the image's voxel dimensions. Adjusted to Normalize the pixel intensity of the image to a specified range; fill the space of the image to achieve a specified space size; calculate the effective target region within the image size in the training set, generate center points in the target region that conform to a Gaussian distribution with a mean of 0 and a variance of 1, scale the corresponding center points to the effective region, crop with the corresponding geometric center as the reference point, and extract image patches of a specified size from each image. The preprocessed medical image is cropped into multiple image blocks of the same size; A masking strategy is formulated to perform masking operations on the obtained image patches, generating masked data and retained data, specifically as follows: The image patch is segmented according to its channel dimension, with each channel as a two-dimensional slice; each slice is converted into an 8-bit unsigned integer, and the pixel values ​​are normalized to the range of 0 to 255; then the slice size is adjusted to... Pixel; Calculate each pixel in the image The gradient; Divide the image into segments of size [size]. The pixels are divided into small blocks. In each block, the gradient magnitude of the corresponding pixel is projected into a predetermined angle range according to the gradient direction of the pixel to form a direction histogram. Combine several adjacent small blocks into a large block, and perform L2 normalization on the orientation histogram within the block. The orientation histogram vectors of all normalized blocks are concatenated into a long vector to form the final feature vector; then, the feature value of the corresponding image block is obtained by calculating the average of these feature vectors. Sort the image patches according to their feature values, and select the patches with the largest feature values ​​to generate a mask. Generate masked data using a mask matrix. and the data to be retained , ⊙ represents element-wise multiplication; A self-supervised learning network for mask reconstruction based on convolutional neural network is constructed. The generated masked data is input into the self-supervised pre-training network for mask reconstruction to complete the pre-training of double-layer sampled medical images. The weights of the self-supervised learning network reconstructed from the obtained mask are transferred to a fully supervised segmentation model with the same network structure, and the fully supervised segmentation model is trained using labeled image data.

2. The medical image pre-training method based on hybrid distribution dual-layer sampling according to claim 1, characterized in that, The original medical images include magnetic resonance imaging, computed tomography, positron emission tomography, and ultrasound images.

3. The medical image pre-training method based on hybrid distribution dual-layer sampling according to claim 1, characterized in that, Adjusting the voxel size of the image for: in, It is the interpolation weight function. and These are the original and adjusted images, respectively.

4. The method for pre-training medical images based on hybrid distribution dual-layer sampling according to claim 1, characterized in that, The pixel intensity of the image is normalized to a specified range as follows: in, This is the original strength value. This is the normalized intensity value. It is the original strength range. It is the target intensity range.

5. The method for pre-training medical images based on hybrid distribution dual-layer sampling according to claim 1, characterized in that, Extracting image patches of a specific size from each image specifically involves: in, for, for, These are the parameters of a Gaussian distribution. It is a valid target area. The minimum size of the image patch that can be extracted. This represents the maximum size of the image patch that can be extracted.

6. The medical image pre-training method based on hybrid distribution dual-layer sampling according to claim 1, characterized in that, The specific steps for constructing a self-supervised learning network for mask reconstruction based on a convolutional neural network are as follows: The masked data Input to encoder In the process, feature representations are obtained. ; The feature Z output by the encoder is input into the decoder, and the decoder... The goal is to reconstruct the obscured data area; calculate the reconstructed data. and real data The mean squared error between the two values ​​is calculated; a total loss function containing reconstruction loss and regularization loss is constructed; the total loss function is minimized using the Adam optimization algorithm.

7. The medical image pre-training method based on hybrid distribution dual-layer sampling according to claim 6, characterized in that, Total loss function Specifically: in, It is the weight of regularization. yes Loss of regularization It is to rebuild data and real data The mean squared error between them.

8. A medical image pre-training system based on hybrid distribution and dual-layer sampling, characterized in that, include: The preprocessing module performs preprocessing on the original medical images, specifically: Add a channel dimension to the image data; rearrange the image's coordinate axes, standardizing them to a right, front, top format; change the image's voxel dimensions. Adjusted to Normalize the pixel intensity of the image to a specified range; fill the space of the image to achieve a specified space size; calculate the effective target region within the image size in the training set, generate center points in the target region that conform to a Gaussian distribution with a mean of 0 and a variance of 1, scale the corresponding center points to the effective region, crop with the corresponding geometric center as the reference point, and extract image patches of a specified size from each image. The network module crops the preprocessed medical image into multiple image patches of the same size, and then feeds these image patches into the convolutional neural network as input data. The strategy module defines the masking strategy, performs masking operations on the obtained image patches, and generates masked data and retained data, specifically: The image patch is segmented according to its channel dimension, with each channel as a two-dimensional slice; each slice is converted into an 8-bit unsigned integer, and the pixel values ​​are normalized to the range of 0 to 255; then the slice size is adjusted to... Pixel; Calculate each pixel in the image The gradient; Divide the image into segments of size [size]. The pixels are divided into small blocks. In each block, the gradient magnitude of the corresponding pixel is projected into a predetermined angle range according to the gradient direction of the pixel to form a direction histogram. Combine several adjacent small blocks into a large block, and perform L2 normalization on the orientation histogram within the block. The orientation histogram vectors of all normalized blocks are concatenated into a long vector to form the final feature vector; then, the feature value of the corresponding image block is obtained by calculating the average of these feature vectors. Sort the image patches according to their feature values, and select the patches with the largest feature values ​​to generate a mask. Generate masked data using a mask matrix. and the data to be retained , ⊙ represents element-wise multiplication; The module constructs a self-supervised learning network for mask reconstruction based on a convolutional neural network. The generated masked data is then input into the self-supervised pre-training network for mask reconstruction to complete the pre-training of double-layer sampled medical images. The fine-tuning module transfers the weights of the self-supervised learning network reconstructed from the obtained mask to a fully supervised segmentation model with the same network structure, and trains the fully supervised segmentation model using labeled image data.