Tumor segmentation methods, devices, computer equipment, readable storage media, and program products

By segmenting and supervising the target sample MRI images, a Gaussian distance distribution heatmap is generated. Combined with the backbone network and attention module, the problem of background interference in contrast-enhanced T1W1 sequence images is solved, and higher tumor segmentation accuracy is achieved.

CN120876868BActive Publication Date: 2025-12-02TSINGHUA UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511379069.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-25
Publication Date
2025-12-02
Estimated Expiration
2045-09-25

AI Technical Summary

Technical Problem

In contrast-enhanced T1W1 sequence images, background tissues such as the dura mater and blood vessels have similar signal intensities to the enhanced tumor region, interfering with target feature learning and resulting in low segmentation accuracy of the tumor segmentation model.

Method used

A tumor segmentation method is adopted, which segments the target sample by acquiring MRI images and generating a Gaussian distance distribution heatmap. The method combines a backbone network, a neighborhood space attention module, and a target category attention module for supervised training to improve the accuracy of the segmentation model.

Benefits of technology

This improves the segmentation model's ability to distinguish between tumor spatial location information and pixel-level category features, enabling more accurate differentiation between target tumors and interfering objects, thus enhancing tumor segmentation accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120876868B_ABST
    Figure CN120876868B_ABST
Patent Text Reader

Abstract

This application relates to a tumor segmentation method, apparatus, computer device, readable storage medium, and program product. The method includes: acquiring a target sample MRI image, the target sample MRI image including a target tumor and interfering objects; segmenting the target sample MRI image to obtain a target segmentation result, and obtaining a distance Gaussian distribution heatmap based on the target segmentation result; inputting the target sample MRI image into a segmentation model to be trained, obtaining the predicted segmentation result, weight feature map, and coarse segmentation result output by the backbone network, neighborhood space attention module, and target category attention module of the segmentation model, respectively; supervising the segmentation model based on the losses from the distance Gaussian distribution heatmap and weight feature map, the losses from the target segmentation result and the coarse segmentation result, and the losses from the target segmentation result and the predicted segmentation result, to obtain a target segmentation model after training. This method can improve the accuracy of tumor segmentation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of medical image processing technology, and in particular to a tumor segmentation method, apparatus, computer equipment, readable storage medium, and program product. Background Technology

[0002] Magnetic resonance-guided laser interstitial thermal therapy (LITT) has attracted widespread attention in the treatment of brain metastases. Because LITT treatment relies on precise lesion localization and planning of the thermal conduction pathway, high-quality imaging data and accurate tumor segmentation models are essential for developing an ablation plan.

[0003] Contrast-enhanced T1W1 sequence images are of crucial value in the clinical diagnosis of brain metastases. Therefore, contrast-enhanced T1W1 sequence images can be used to train tumor segmentation models. However, in contrast-enhanced T1W1 sequence images, background tissues such as the dura mater and blood vessels have similar signal intensities to the enhanced tumor region, which can interfere with the learning of target features, resulting in low segmentation accuracy of the trained tumor segmentation model. Summary of the Invention

[0004] Therefore, it is necessary to provide a tumor segmentation method, apparatus, computer equipment, readable storage medium, and program product that can improve the accuracy of tumor segmentation in response to the above-mentioned technical problems.

[0005] In a first aspect, this application provides a tumor segmentation method, the method comprising: acquiring a target sample MRI image, the target sample MRI image including a target tumor and an interfering object; segmenting the target sample MRI image to obtain a target segmentation result, and obtaining a distance Gaussian distribution heatmap based on the target segmentation result; the target segmentation result including a tumor region corresponding to the target tumor and an interfering region corresponding to the interfering object; the distance Gaussian distribution heatmap including distance information between the target tumor and the interfering object; inputting the target sample MRI image into a segmentation model to be trained, obtaining a predicted segmentation result output by the backbone network in the segmentation model, a weight feature map output by the neighborhood space attention module in the segmentation model, and a coarse segmentation result output by the target category attention module in the segmentation model; supervising the segmentation model based on the loss of the distance Gaussian distribution heatmap and the weight feature map, the loss of the target segmentation result and the coarse segmentation result, and the loss of the target segmentation result and the predicted segmentation result, and obtaining a target segmentation model after training; inputting the MRI image to be segmented into the target segmentation model to obtain the segmentation result corresponding to the MRI image to be segmented.

[0006] In one embodiment, the backbone network includes L downsampling layers and L upsampling layers, where L is a positive integer greater than 1. The target sample MRI image is input into the segmentation model to be trained, yielding the predicted segmentation result output by the backbone network, the weighted feature map output by the neighborhood space attention module, and the coarse segmentation result output by the target category attention module. This includes: inputting the target sample MRI image into the backbone network to obtain the feature map output by the (L-1)th upsampling layer; inputting the feature map into the neighborhood space attention module to obtain the weighted feature map and the first enhanced feature map output by the neighborhood space attention module; inputting the feature map into the target category attention module to obtain the coarse segmentation result and the second enhanced feature map output by the target category attention module; concatenating the output of the Lth upsampling layer, the output of the 1st downsampling layer, the first enhanced feature map, and the second enhanced feature map in the backbone network to obtain a fused feature map; and performing at least one convolution on the fused feature map, followed by processing with the Softmax function to obtain the predicted segmentation result output by the backbone network in the segmentation model.

[0007] In one embodiment, the neighborhood spatial attention module includes multiple convolutional layers connected in sequence; inputting a feature map into the neighborhood spatial attention module to obtain a weighted feature map and a first enhanced feature map output by the neighborhood spatial attention module includes: inputting the feature map into multiple convolutional layers, processing it through multiple convolutional layers, and then processing it through the Sigmoid function to obtain a weighted feature map; multiplying the weighted feature map and the feature map, and adding the result of the multiplication to the feature map to obtain the first enhanced feature map output by the neighborhood spatial attention module.

[0008] In one embodiment, the target category attention module includes a first attention layer and a second attention layer; inputting a feature map into the target category attention module to obtain a coarse segmentation result and a second enhanced feature map output by the target category attention module includes: inputting the feature map into the first attention layer to obtain a coarse segmentation result and a sub-feature map output by the first attention layer; inputting the sub-feature map into the second attention layer to obtain a second enhanced feature map output by the target category attention module.

[0009] In one embodiment, the first attention layer includes a first convolutional layer, a second convolutional layer, a third convolutional layer, and a fourth convolutional layer. Inputting a feature map into the first attention layer to obtain a coarse segmentation result and a sub-feature map output by the first attention layer includes: inputting the feature map into the first convolutional layer, flattening the output of the first convolutional layer, and processing the flattened result using a Softmax function to obtain the coarse segmentation result output by the first attention layer; multiplying the flattened feature map with the coarse segmentation result to obtain a representational feature map; inputting the representational feature map into the second and third convolutional layers respectively; inputting the feature map into the fourth convolutional layer, multiplying the output of the third convolutional layer with the output of the fourth convolutional layer, and processing the multiplication result using a Softmax function before multiplying it with the output of the second convolutional layer to obtain the sub-feature map output by the first attention layer.

[0010] In one embodiment, the second attention layer includes a fifth convolutional layer and a sixth convolutional layer; inputting the sub-feature map into the second attention layer to obtain the second enhanced feature map output by the target category attention module includes: inputting the sub-feature map into the fifth convolutional layer and concatenating the output of the fifth convolutional layer with the feature map; inputting the concatenated result into the sixth convolutional layer to obtain the second enhanced feature map output by the target category attention module.

[0011] In one embodiment, the method further includes: supervising the training of the neighborhood space attention module based on the loss of the distance Gaussian distribution heatmap and the weight feature map; and supervising the training of the target category attention module based on the loss of the target segmentation result and the coarse segmentation result.

[0012] Secondly, this application also provides a tumor segmentation device, the device comprising:

[0013] The acquisition module is used to acquire the target sample MRI image, which includes the target tumor and the interference object.

[0014] The first determining module is used to segment the NMR image of the target sample to obtain the target segmentation result, and to obtain a distance Gaussian distribution heatmap based on the target segmentation result; the target segmentation result includes the tumor region corresponding to the target tumor and the interference region corresponding to the interference object; the distance Gaussian distribution heatmap includes the distance information between the target tumor and the interference object;

[0015] The second determination module is used to input the NMR image of the target sample into the segmentation model to be trained, and obtain the predicted segmentation result output by the backbone network in the segmentation model, the weight feature map output by the neighborhood space attention module in the segmentation model, and the coarse segmentation result output by the target category attention module in the segmentation model.

[0016] The training module is used to supervise the training of the segmentation model based on the loss of the distance Gaussian distribution heatmap and weight feature map, the loss of the target segmentation result and the coarse segmentation result, and the loss of the target segmentation result and the predicted segmentation result. After training, the target segmentation model is obtained.

[0017] The third determining module is used to input the MRI image to be segmented into the target segmentation model to obtain the segmentation result corresponding to the MRI image to be segmented.

[0018] In one embodiment, the backbone network includes L downsampling layers and L upsampling layers, where L is a positive integer greater than 1. The second determination module is specifically used to input the target sample MRI image into the backbone network to obtain the feature map output by the (L-1)th upsampling layer in the backbone network; input the feature map into the neighborhood spatial attention module to obtain the weighted feature map and the first enhanced feature map output by the neighborhood spatial attention module; input the feature map into the target category attention module to obtain the coarse segmentation result and the second enhanced feature map output by the target category attention module; concatenate the output of the Lth upsampling layer, the output of the 1st downsampling layer, the first enhanced feature map, and the second enhanced feature map in the backbone network to obtain a fused feature map; after performing at least one convolution on the fused feature map, the predicted segmentation result output by the backbone network in the segmentation model is obtained by processing it through the Softmax function.

[0019] In one embodiment, the neighborhood spatial attention module includes multiple convolutional layers connected in sequence; the second determination module is specifically used to input the feature map into the multiple convolutional layers, and after processing by the multiple convolutional layers, obtain a weighted feature map by processing with the Sigmoid function; multiply the weighted feature map and the feature map, and add the result of the multiplication process to the feature map to obtain the first enhanced feature map output by the neighborhood spatial attention module.

[0020] In one embodiment, the target category attention module includes a first attention layer and a second attention layer; the second determination module is specifically used to input the feature map into the first attention layer to obtain the coarse segmentation result and sub-feature map output by the first attention layer; and to input the sub-feature map into the second attention layer to obtain the second enhanced feature map output by the target category attention module.

[0021] In one embodiment, the first attention layer includes a first convolutional layer, a second convolutional layer, a third convolutional layer, and a fourth convolutional layer; the second determining module is specifically used to input the feature map into the first convolutional layer, flatten the output of the first convolutional layer, and process the flattened result through the Softmax function to obtain the coarse segmentation result output by the first attention layer; multiply the flattened feature map with the coarse segmentation result to obtain a representation feature map; input the representation feature map into the second convolutional layer and the third convolutional layer respectively; input the feature map into the fourth convolutional layer, multiply the output of the third convolutional layer with the output of the fourth convolutional layer, process the result of the multiplication through the Softmax function, and multiply it with the output of the second convolutional layer to obtain the sub-feature map output by the first attention layer.

[0022] In one embodiment, the second attention layer includes a fifth convolutional layer and a sixth convolutional layer; the second determination module is specifically used to include: inputting the sub-feature map into the fifth convolutional layer and concatenating the output of the fifth convolutional layer with the feature map; inputting the concatenated result into the sixth convolutional layer to obtain the second enhanced feature map output by the target category attention module.

[0023] In one embodiment, the training module is further configured to supervise the training of the neighborhood space attention module based on the loss of the distance Gaussian distribution heatmap and the weight feature map; and to supervise the training of the target category attention module based on the loss of the target segmentation result and the coarse segmentation result.

[0024] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the method described in any one of the first aspects above.

[0025] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in the first aspect above.

[0026] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the method described in the first aspect above.

[0027] The aforementioned tumor segmentation method, apparatus, computer equipment, readable storage medium, and program product acquire target sample MRI images including the target tumor and interfering objects, segment the target sample MRI images to obtain target segmentation results, and generate a distance Gaussian distribution heatmap based on the target segmentation results. The target segmentation results include the tumor region corresponding to the target tumor and the interfering region corresponding to the interfering object; the distance Gaussian distribution heatmap includes distance information between the target tumor and the interfering object. Then, the target sample MRI image is input into a segmentation model to be trained, obtaining the predicted segmentation result output by the backbone network, the weight feature map output by the neighborhood space attention module, and the coarse segmentation result output by the target category attention module. The segmentation model is then trained under supervised supervision based on the losses from the distance Gaussian distribution heatmap and weight feature map, the losses from the target segmentation result and the coarse segmentation result, and the losses from the target segmentation result and the predicted segmentation result. After training, a target segmentation model is obtained. Finally, the MRI image to be segmented is input into the target segmentation model to obtain the segmentation result corresponding to the MRI image to be segmented. Since the Gaussian distance distribution heatmap can characterize the spatial location information of the target tumor and the interfering object, and the target segmentation result can characterize the category of the tumor region and the interfering region, supervised training of the segmentation model based on the loss of the Gaussian distance distribution heatmap and weighted feature map, the loss of the target segmentation result and the coarse segmentation result, and the loss of the target segmentation result and the predicted segmentation result can improve the segmentation model's ability to distinguish the spatial location information of the tumor and the pixel-level category features. As a result, the trained target segmentation model can more accurately distinguish the target tumor and the background including the interfering object, and thus improve the accuracy of tumor segmentation. Attached Figure Description

[0028] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0029] Figure 1 This is a diagram illustrating the application environment of a tumor segmentation method in one embodiment;

[0030] Figure 2 This is a flowchart illustrating a tumor segmentation method in one embodiment;

[0031] Figure 3 This is a schematic diagram of the segmentation model in one embodiment;

[0032] Figure 4 This is a schematic diagram of the neighborhood space attention module in one embodiment;

[0033] Figure 5 This is a schematic diagram of the target category attention module in one embodiment;

[0034] Figure 6 This is a flowchart illustrating a tumor segmentation method in another embodiment;

[0035] Figure 7 This is a structural block diagram of a tumor segmentation device in one embodiment;

[0036] Figure 8 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0037] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0038] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the embodiments, or any combination of multiple embodiments.

[0039] Because tumor cells can spread to the brain via the bloodstream and easily remain at the junction of white and gray matter, approximately 10% to 40% of patients with malignant tumors may experience brain metastases during the course of their disease. Brain metastases (BM) are usually multiple, affecting multiple brain regions such as the cerebrum, cerebellum, and brainstem, and have a high morbidity and mortality rate. Therefore, in the treatment of deep-seated tumors that are difficult to reach by conventional surgery and multiple metastatic lesions requiring repeated interventions, a minimally invasive treatment using magnetic resonance-guided laser interstitial ablation has received widespread attention. Compared to traditional craniotomy, it is minimally invasive, repeatable, and allows for rapid postoperative recovery. It only requires a small incision of less than 5 mm in the scalp, through which a laser fiber is precisely inserted into the lesion area via a catheter with a diameter of approximately 2.2 mm. The diffused energy of the laser heats and destroys the tumor tissue, providing a highly targeted intervention for patients for whom surgical resection or radiotherapy is relatively contraindicated. Currently, laser interstitial ablation is mainly suitable for patients with small tumors (usually <3 cm in diameter in a single dimension), located deep in the brain or near important functional areas, and with high surgical risks. Laser-assisted interstitial ablation relies on precise lesion localization and thermal conduction pathway planning, requiring high-quality imaging data and accurate tumor segmentation models to formulate an ablation plan. Magnetic resonance imaging (MRI)-based detection and segmentation of brain metastases can provide the necessary structural models of the lesions for preoperative planning of laser-assisted interstitial ablation, revealing their location and size to ensure precise planning and intervention. Currently, clinical practice typically uses contrast-enhanced T1-weighted imaging (T1W1) sequences to analyze brain metastases, with doctors manually delineating the boundaries. However, manual segmentation is not only subjective but also time-consuming and labor-intensive, and prone to missed detections. In contrast, automated detection and segmentation are less time-consuming and more consistent.

[0040] Early automated brain tumor segmentation methods primarily relied on traditional image processing and machine learning techniques, such as edge detection, region growing, and segmentation methods based on texture and morphological features. These methods typically required manual feature design and depended on pre-defined thresholds to determine the boundaries of different regions in the image. However, the complexity of brain tissue structures, inconsistent image quality, and the presence of noise often limited the segmentation effectiveness of these methods. In recent years, with the development of deep learning, neural network-based automated segmentation methods have significantly improved the accuracy and speed of magnetic resonance imaging (MRI) brain tumor segmentation. Therefore, deep learning has been widely applied to the detection and segmentation of brain metastases. Subsequently, to address the challenges of segmenting small metastases, high false positive rates, interference from similar backgrounds, and poor generalization performance in deep learning-based brain metastasis segmentation tasks, most current scientific research focuses on multimodal image data, designing multi-scale learning and multi-task strategies to improve segmentation performance.

[0041] For segmentation tasks involving multiple small lesions in brain metastases, image resolution is extremely important. However, acquiring high-resolution multimodal data simultaneously is very difficult in clinical practice, and registration errors and resolution inconsistencies between multiple modalities can affect segmentation accuracy. In clinical diagnosis of brain metastases, contrast-enhanced T1W1 sequence images are of crucial value, while other sequences offer limited improvement in accuracy. Therefore, accurately detecting and segmenting metastases using contrast-enhanced T1W1 sequence images would be highly practical in clinical settings. To this end, researchers have designed network models such as DeSeg and BMDS to address methods using only contrast-enhanced T1W1 sequence images, combining detection and segmentation multi-task strategies to improve the detection capability of small tumors while maintaining segmentation accuracy for large tumors.

[0042] However, multi-task strategies are typically accompanied by high computational complexity and resource consumption. Furthermore, in contrast-enhanced T1W1 sequence images, the similar signal intensity of background tissues such as the dura mater and blood vessels to the enhanced tumor region can interfere with the learning of target features, leading to problems such as target boundary confusion, misclassification, or missed detection of small metastases, resulting in low model segmentation accuracy.

[0043] Therefore, it is necessary to adopt necessary technical means to solve the above-mentioned technical problems. The technical solution of this application and how it solves the above-mentioned technical problems will be described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of this application will be described below with reference to the accompanying drawings.

[0044] The tumor segmentation method provided in this application embodiment can be applied to, for example... Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104 or located on the cloud or other network servers. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices. Portable wearable devices can be smartwatches, smart bracelets, head-mounted devices, etc. Head-mounted devices can be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc. Server 104 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.

[0045] In one exemplary embodiment, such as Figure 2As shown, a tumor segmentation method is provided, which is applied to computer equipment ( Figure 1 Taking a terminal or server as an example, the explanation includes the following steps 201 to 205. Wherein:

[0046] Step 201: Obtain the MRI image of the target sample, which includes the target tumor and the interference object.

[0047] The target sample MRI image can be a contrast-enhanced T1W1 sequence image; the target tumor can be a brain tumor; the interfering object can be background tissue with similar signal intensity to the tumor in the contrast-enhanced T1W1 sequence image, such as the dura mater and blood vessels.

[0048] In an optional implementation, step 201 includes steps 2011 and 2012, wherein:

[0049] Step 2011: Acquire MRI images of multiple samples. For example, collect contrast-enhanced T1W1 sequence images from existing publicly available brain tumor data and local clinical data.

[0050] Step 2012: Preprocess the NMR images of multiple samples to obtain the NMR image of the target sample.

[0051] For example, multiple first intermediate sample MRI images are obtained by screening preoperative MRI images belonging to primary brain tumors and metastatic brain tumors from multiple sample MRI images; multiple second intermediate sample MRI images are obtained by screening contrast-enhanced T1W1 sequence images where the resolution of each slice (in any dimension) is greater than or equal to a resolution threshold and the sequence is complete; and multiple target sample MRI images are obtained by screening sample MRI images where the resolution of a single tumor (lesion) in the image is less than or equal to a tumor size threshold. It can be understood that there are multiple target sample MRI images. The resolution threshold can be 2 mm, and the tumor size threshold can be 30 mm.

[0052] The target sample MRI image is obtained by selecting MRI images from multiple second intermediate sample MRI images where a single tumor is smaller than or equal to a tumor size threshold. This process includes: selecting MRI images from multiple second intermediate sample MRI images where a single tumor is smaller than or equal to a tumor size threshold, thus obtaining multiple third intermediate sample MRI images; and selecting MRI images from multiple third intermediate sample MRI images where the difference between the grayscale value of the tumor boundary and the background grayscale value is greater than the grayscale difference, thus obtaining the target sample MRI image. In other words, data without obvious enhancement boundaries are excluded. The grayscale difference can be 5.

[0053] Step 202: Segment the NMR image of the target sample to obtain the target segmentation result, and obtain the distance Gaussian distribution heatmap based on the target segmentation result; the target segmentation result includes the tumor region corresponding to the target tumor and the interference region corresponding to the interference object; the distance Gaussian distribution heatmap includes the distance information between the target tumor and the interference object.

[0054] The segmentation of the target sample MRI image can be achieved using a threshold segmentation method. For example, the tumor region can be identified from the target sample MRI image based on a first grayscale range, and the interference region can be identified based on a second grayscale range. Since background tissues such as the dura mater and blood vessels (interference objects) have similar signal intensities to the tumor region, the interference objects will be used as labels for model training. Therefore, identifying the interference region from the target sample MRI image based on the second grayscale range can be understood as generating labels for the bright background outside the tumor.

[0055] The Gaussian distance distribution heatmap obtained based on the target segmentation results can be obtained by masking the tumor region to obtain the mask boundary of the target tumor; calculating the shortest distance from each point on the mask boundary of the target tumor to the interference region to obtain multiple distance values, and drawing the Gaussian distance distribution heatmap based on the multiple distance values.

[0056] Step 203: Input the NMR image of the target sample into the segmentation model to be trained to obtain the predicted segmentation result output by the backbone network in the segmentation model, the weight feature map output by the neighborhood space attention module in the segmentation model, and the coarse segmentation result output by the target category attention module in the segmentation model.

[0057] The segmentation model includes a backbone network, a neighborhood space attention module (represented by ASA in the figure), and a target category attention module (represented by TCA in the figure); a schematic diagram of the segmentation model is shown below. Figure 3 As shown. The backbone network can be an nn-UNet, and the structural diagram of the backbone network is shown below. Figure 3 As shown in the diagram, the structural schematic of the neighborhood spatial attention module is as follows: Figure 4 As shown in the diagram, the structure of the target category attention module is as follows: Figure 5 As shown, it can be understood that the backbone network can also be other network models.

[0058] Taking nn-UNet as the backbone network as an example, the target sample MRI image is input into the backbone network. The input of the last upsampling layer (also known as the decoder) of the backbone network is input into the neighborhood spatial attention module and the target category attention module, respectively. The neighborhood spatial attention module outputs a weight feature map and a first enhanced feature map; the target category attention module outputs a coarse segmentation result and a second enhanced feature map. Then, the output of the last upsampling layer of the backbone network, the output of the first downsampling layer in the backbone network, the first enhanced feature map, and the second enhanced feature map are concatenated to obtain a fused feature map. The fused feature map is then processed to obtain the predicted segmentation result.

[0059] Step 204: Based on the loss of the Gaussian distance distribution heatmap and weight feature map, the loss of the target segmentation result and the coarse segmentation result, and the loss of the target segmentation result and the predicted segmentation result, supervised training is performed on the segmentation model to obtain the target segmentation model after training is completed.

[0060] In one possible implementation, the loss between the Gaussian distance heatmap and the weighted feature map can be the similarity loss between them, which can be calculated based on the following formula:

[0061]

[0062] in, The loss represents the distance to the Gaussian distribution heatmap and the weighted feature map. Indicates the number of samples. Represents a Gaussian distribution heatmap. This represents the weighted feature map.

[0063] The loss of the target segmentation result and the coarse segmentation result can be the cross-entropy loss of the target segmentation result and the coarse segmentation result, which can be calculated based on the following formula:

[0064]

[0065] in, This represents the loss between the target segmentation result and the coarse segmentation result. Indicates the target segmentation result. This indicates the result of coarse segmentation. This indicates the number of categories. In this embodiment, the categories can be understood to include tumor categories and interfering object categories. It should be noted that the target segmentation result also includes the true probability corresponding to the interfering object and the true probability corresponding to the target tumor. This represents the true probability; the coarse segmentation result includes the predicted probability of the interference object and the predicted probability of the target tumor. Predicting probabilities.

[0066] The loss between the target segmentation result and the predicted segmentation result can be the Dice loss, which can be calculated based on the following formula:

[0067]

[0068] in, This represents the loss between the target segmentation result and the predicted segmentation result. Indicates the target segmentation result. This represents the predicted segmentation result. It should be noted that the target segmentation result includes the tumor region corresponding to the target tumor and the interference region corresponding to the interference object. This represents the tumor region; the predicted segmentation result includes the predicted tumor region corresponding to the target tumor and the predicted interference region corresponding to the interference object; here This indicates the tumor prediction region.

[0069] The segmentation model is trained under supervised conditions based on the losses from the Gaussian distance heatmap and weighted feature map, the losses from the target segmentation result and the coarse segmentation result, and the losses from the target segmentation result and the predicted segmentation result. This includes: weighting and summing the losses from the Gaussian distance heatmap and weighted feature map, the losses from the target segmentation result and the coarse segmentation result, and the losses from the target segmentation result and the predicted segmentation result to obtain the target loss; and then training the segmentation model under supervised conditions based on this target loss. The target loss can be calculated using the following formula:

[0070]

[0071] in, Indicates target loss. , , is a coefficient.

[0072] Supervised training of the segmentation model based on the target loss can be achieved by using stochastic gradient descent to update the parameters of the segmentation model based on the target loss.

[0073] During training, the neighborhood space attention module can be trained under supervision based on the loss from the Gaussian distance distribution heatmap and the weight feature map; the target category attention module can be trained under supervision based on the loss from the target segmentation result and the coarse segmentation result. This supervised training process can be called soft supervision.

[0074] It is understandable that in order to train the target segmentation model, a large number of target sample MRI images are needed. Then, the large number of target sample MRI images are divided into two parts: one part of the target sample MRI images is used as the training set, and steps 202 and 203 are executed; the other part of the target sample MRI images is used as the test set to verify whether the target segmentation model meets the requirements.

[0075] Step 205: Input the MRI image to be segmented into the target segmentation model to obtain the segmentation result corresponding to the MRI image to be segmented.

[0076] After obtaining the trained target segmentation model, it can be stored locally on the terminal, where the MRI image to be segmented is directly input into the target segmentation model to obtain the segmentation result output by the model. Alternatively, the target segmentation model can be stored on a server, and the segmentation result is obtained by calling the target segmentation model. The calling method involves the terminal sending the MRI image to be segmented and the segmentation request to the server. Based on the segmentation request, the server inputs the MRI image to be segmented into the target segmentation model, and after obtaining the segmentation result, the server sends the segmentation result back to the terminal.

[0077] In addition, users can choose whether to extend the tumor boundary outward by a preset value, such as 2mm, based on actual clinical needs. For example, when the computer device detects the trigger option for extending the tumor boundary by the preset value, after obtaining the segmentation result, the computer device will perform the operation of extending the tumor boundary outward by the preset value based on the segmentation result to obtain the target segmentation result.

[0078] The aforementioned tumor segmentation method acquires target sample MRI images, including the target tumor and interfering objects, segments the target sample MRI images to obtain target segmentation results, and generates a Gaussian distance distribution heatmap based on the target segmentation results. The target segmentation results include the tumor region corresponding to the target tumor and the interfering region corresponding to the interfering object; the Gaussian distance distribution heatmap includes distance information between the target tumor and the interfering object. Then, the target sample MRI image is input into the segmentation model to be trained, obtaining the predicted segmentation result output by the backbone network, the weight feature map output by the neighborhood space attention module, and the coarse segmentation result output by the target category attention module. The segmentation model is then trained under supervised conditions based on the losses from the Gaussian distance distribution heatmap and weight feature map, the losses from the target segmentation result and the coarse segmentation result, and the losses from the target segmentation result and the predicted segmentation result. After training, the target segmentation model is obtained. Finally, the MRI image to be segmented is input into the target segmentation model to obtain the corresponding segmentation result. Since the Gaussian distance distribution heatmap can characterize the spatial location information of the target tumor and the interfering object, and the target segmentation result can characterize the category of the tumor region and the interfering region, supervised training of the segmentation model based on the loss of the Gaussian distance distribution heatmap and weighted feature map, the loss of the target segmentation result and the coarse segmentation result, and the loss of the target segmentation result and the predicted segmentation result can improve the segmentation model's ability to distinguish the spatial location information of the tumor and the pixel-level category features. As a result, the trained target segmentation model can more accurately distinguish the target tumor and the background including the interfering object, and thus improve the accuracy of tumor segmentation.

[0079] In one embodiment, reference Figure 3 As shown, the backbone network includes L downsampling layers and L upsampling layers, where L is a positive integer greater than 1. The target sample MRI image is input into the segmentation model to be trained, yielding the predicted segmentation result output by the backbone network, the weighted feature map output by the neighborhood space attention module, and the coarse segmentation result output by the target category attention module. This includes steps 2031 to 2035, where:

[0080] Step 2031: Input the NMR image of the target sample into the backbone network to obtain the feature map output by the (L-1)th upsampling layer in the backbone network.

[0081] In one possible implementation, refer to Figure 3 As shown, the downsampling layer includes convolution (Conv), normalization (Instance Norm, IN), activation (e.g., ReLU), and downsampling; the upsampling layer includes upsampling, convolution, normalization, and activation. The target sample MRI image passes through L downsampling layers, then through another downsampling layer. The output of this downsampling layer is then input into the first upsampling layer. The output of the first upsampling layer is then concatenated with the output of the Lth downsampling layer and input into the second upsampling layer. The output of the second upsampling layer is then concatenated with the output of the (L-1)th downsampling layer and input into the third upsampling layer, and so on, until the output of the (L-1)th upsampling layer is obtained. The output of the (L-1)th upsampling layer is then concatenated with the output of the second downsampling layer to obtain the feature map.

[0082] Step 2032: Input the feature map into the neighborhood space attention module to obtain the weighted feature map and the first enhanced feature map output by the neighborhood space attention module.

[0083] In one possible implementation, refer to Figure 4 As shown, the neighborhood spatial attention module includes multiple convolutional layers connected in sequence; the feature map is input into the multiple convolutional layers, and after processing by the multiple convolutional layers, the weight feature map is obtained by processing through the Sigmoid function; the weight feature map and the feature map are multiplied, and the result of the multiplication is added to the feature map to obtain the first enhanced feature map output by the neighborhood spatial attention module.

[0084] Specifically, the expression for the feature map can be: Where B is the BatchSize of the input features, C represents the number of channels, D is the number of feature layers, H is the feature map height, and W is the feature map width.

[0085] Multiple convolutional layers connected in sequence may include three 3D convolutional layers connected in sequence, wherein the last convolutional layer uses a convolution operation with a kernel of 1 to reduce the number of channels to 1; other convolutional layers may include convolution processing, normalization processing, and activation processing (e.g., ReLU).

[0086] Feature map After processing through multiple convolutional layers, a spatial location attention weight feature map can be generated using the Sigmoid function. Then use this weighted feature map For feature maps After element-wise weighting (i.e., multiplying the weighted feature map and the feature map), it is then compared with the feature map. The summation yields the first enhanced feature map, which enhances the spatial location. The mathematical formula is as follows:

[0087]

[0088]

[0089] Among them, the weighted feature map is used to represent the importance of different positions in the feature map. It is calculated based on the spatial characteristics of the feature map and the weight of each voxel can be adjusted. It is the Sigmoid function. It is element-wise multiplication. This represents element-wise addition. It is a convolution operation with a kernel of 1.

[0090] Step 2033: Input the feature map into the target category attention module to obtain the coarse segmentation result and the second enhanced feature map output by the target category attention module.

[0091] In one possible implementation, refer to Figure 5 As shown, the target category attention module includes a first attention layer and a second attention layer; the feature map is input into the first attention layer to obtain the coarse segmentation result and sub-feature map output by the first attention layer; the sub-feature map is input into the second attention layer to obtain the second enhanced feature map output by the target category attention module.

[0092] The first attention layer includes a first convolutional layer, a second convolutional layer, a third convolutional layer, and a fourth convolutional layer. The feature map is input into the first attention layer to obtain a coarse segmentation result and a sub-feature map output by the first attention layer. This process includes: inputting the feature map into the first convolutional layer, flattening the output of the first convolutional layer, and processing the flattened result using a Softmax function to obtain the coarse segmentation result output by the first attention layer; multiplying the flattened feature map with the coarse segmentation result to obtain a representational feature map; inputting the representational feature map into the second and third convolutional layers respectively; inputting the feature map into the fourth convolutional layer, multiplying the output of the third convolutional layer with the output of the fourth convolutional layer, and processing the multiplication result using a Softmax function before multiplying it with the output of the second convolutional layer to obtain the sub-feature map output by the first attention layer.

[0093] The second attention layer includes a fifth convolutional layer and a sixth convolutional layer. The sub-feature map is input into the second attention layer to obtain the second enhanced feature map output by the target category attention module. This includes: inputting the sub-feature map into the fifth convolutional layer and concatenating the output of the fifth convolutional layer with the feature map; inputting the concatenated result into the sixth convolutional layer to obtain the second enhanced feature map output by the target category attention module.

[0094] Each convolutional layer can include convolution processing, normalization processing, and activation processing (e.g., ReLU). The output of the second convolutional layer is equivalent to the value, the output of the third convolutional layer is equivalent to the key, and the output of the fourth convolutional layer is equivalent to the query. In addition, the first convolutional layer includes two convolution processing steps, with 3 and 1 kernels respectively.

[0095] Specifically, the expression for each pixel feature in the feature map can be: After undergoing 3D convolution operations with kernels of 3 and 1 respectively, coarse category segmentation is achieved, dividing the feature map into two rough categories: tumor region and interference region, and obtaining the category probabilities. This is used to obtain a coarse segmentation result, which is then used for soft supervision of the target category features that the target category attention module focuses on during the intermediate stage of training.

[0096] The coarse segmentation result includes target class weights. Target category weight Pixel features obtained after flattening the feature map After matrix multiplication, the representations of all target regions are obtained, which are the representation feature maps. .

[0097] Then the characterization feature map After convolution operations on the feature maps, the matrices are multiplied again, and the softmax function is used to generate relation weights. Characteristic Map After a convolution operation and relational weights After multiplication, we obtain the features of each pixel with weights. This is the sub-feature map. Finally, the feature map is convolved with the sub-feature map, and the convolved result is then subjected to further convolution and other operations to generate a second enhanced feature map. This second enhanced feature map is the strengthened feature map, and the features of each pixel in the second enhanced feature map can be used... The above content can be expressed mathematically as follows:

[0098]

[0099]

[0100]

[0101] in, Represents a relational function. , , , , All through 1 1 1. Transformation function implemented by convolution operation. Represents the set of all pixels. Indicates the number of categories.

[0102] Step 2034: The output of the Lth upsampling layer, the output of the 1st downsampling layer, the first enhanced feature map, and the second enhanced feature map in the backbone network are concatenated to obtain the fused feature map.

[0103] In one possible implementation, the feature map is input into the Lth upsampling layer to obtain the output of the Lth upsampling layer; the first enhanced feature map is input into the Lth upsampling layer to obtain the upsampled first enhanced feature map; the second enhanced feature map is input into the Lth upsampling layer to obtain the upsampled second enhanced feature map; the output of the Lth upsampling layer, the output of the 1st downsampling layer, the upsampled first enhanced feature map, and the upsampled second enhanced feature map are concatenated to obtain the fused feature map.

[0104] Step 2035: After performing at least one convolution on the fused feature map, the predicted segmentation result output by the backbone network in the segmentation model is obtained by processing it through the Softmax function.

[0105] As described above, the backbone network outputs the predicted segmentation result, the neighborhood space attention module outputs the weight feature map, and the target category attention module outputs the coarse segmentation result. This allows for supervised training of the segmentation model using losses based on the Gaussian distance distribution heatmap and weight feature map, losses based on the target segmentation result and the coarse segmentation result, and losses based on the target segmentation result and the predicted segmentation result. It also allows for supervised training of the neighborhood space attention module using losses based on the Gaussian distance distribution heatmap and weight feature map, and supervised training of the target category attention module using losses based on the target segmentation result and the coarse segmentation result.

[0106] In summary, as Figure 6 The diagram shows a flowchart of another tumor segmentation method, which includes:

[0107] Multiple sample NMR images were acquired and preprocessed to obtain multiple target sample NMR images. A portion of the target sample NMR images were used as the training set to train the segmentation model, while the other portion of the target sample NMR images were used as the test set to test the trained target segmentation model.

[0108] For the target sample MRI images in the training set, the target sample MRI images are segmented to obtain the target segmentation results, and a Gaussian distance distribution heatmap is generated. The target segmentation results include the tumor region corresponding to the target tumor and the interference region corresponding to the interference object, as well as the true probability corresponding to the interference object and the true probability corresponding to the target tumor. The Gaussian distance distribution heatmap includes the distance information between the target tumor and the interference object.

[0109] The target sample MRI image is input into the segmentation model to obtain the predicted segmentation result output by the backbone network in the segmentation model, the weight feature map output by the neighborhood space attention module in the segmentation model, and the coarse segmentation result output by the target category attention module in the segmentation model.

[0110] The neighborhood space attention module is trained under software supervision based on the loss function of the Gaussian distance distribution heatmap and the weight feature map; the target category attention module is trained under soft supervision based on the loss function of the target segmentation result and the coarse segmentation result. The segmentation model is then trained under supervision based on the loss function of the Gaussian distance distribution heatmap and the weight feature map, the loss function of the target segmentation result and the coarse segmentation result, and the loss function of the target segmentation result and the predicted segmentation result.

[0111] The training ends when the loss function converges. If it does, the target segmentation model is obtained; otherwise, training continues until the loss function converges.

[0112] After obtaining the target segmentation model, it is tested using a test set. If the test is successful, post-processing methods such as extending the tumor boundary outwards by a preset value can be selected based on actual clinical needs to adjust the target segmentation model. The final target segmentation model can then be used to perform segmentation masking on the MRI image to be segmented, yielding the segmentation result.

[0113] The tumor segmentation method proposed in this application effectively enhances the spatial location information and category features between the target tumor and the interfering object by introducing interfering object labels and an attention mechanism. Simultaneously, it employs a coarse category segmentation loss and a distance-weighted loss between the target tumor and the interfering object to jointly supervise the feature recovery process of the attention module, further optimizing the segmentation model's ability to distinguish the spatial location information and pixel-level category features of the tumor. This enables more accurate differentiation between the target tumor and the background, including the interfering object, significantly improving the model's tumor detection and segmentation performance. This allows for more precise acquisition of the target location and ablation volume information of brain metastases during preoperative planning for laser interstitial ablation.

[0114] Specifically, regarding the detection performance of the segmentation model in this application, the detection rate index is mainly based on the intersection-union ratio (IOU) of the gold standard (target segmentation result) and the predicted segmentation result under three thresholds: IOU>0, IOU>0.3, and IOU>0.5. Experimental results on cross-validation data and local test data show that the tumor segmentation method proposed in this application performs best under all overlap conditions. On the local data, when IOU>0, it achieves a detection rate of 98.02%. When IOU>0.5, the tumor segmentation method proposed in this application improves the detection rate by 6.04% compared to nn-UNet on cross-validation data and by 7.92% compared to nn-UNet on local test data, demonstrating excellent tumor detection capability.

[0115] Regarding the segmentation performance of the segmentation model in this application, three metrics were mainly used: DSC, 95% Hausdorff distance (HD95%), and average surface distance (ASSD) to evaluate the segmentation results compared with the gold standard in terms of internal filling consistency, boundary distance accuracy, and surface distance difference. Experimental results show that the tumor segmentation method proposed in this application outperforms other comparative methods in both cross-validation and local clinical data lesion-level segmentation metrics. In the cross-validation data, the DSC, HD95%, and ASSD of the tumor segmentation method proposed in this application were 63.03%, 74.57 mm, and 73.78 mm, respectively. Compared with nn-UNet, DSC improved by 4.09%, HD95% decreased by 23.09 mm, and ASSD decreased by 23.15 mm. In local clinical data, when the lesion diameter is greater than 5 mm, the tumor segmentation method proposed in this application achieves a lesion grade DSC of up to 87.09%, HD 95% and ASSD reduced to 1.29 mm and 0.45 mm, respectively, which is 6.3% higher than nn-UNet and 13.31% higher than TransBTS. These results demonstrate that the tumor segmentation method proposed in this application maintains excellent and stable fill consistency and boundary and surface distance consistency in both cross-validation and local data, indicating that the proposed tumor segmentation method has superior and more robust detection and segmentation advantages in LITT preoperative planning.

[0116] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.

[0117] Based on the same inventive concept, this application also provides a tumor segmentation apparatus for implementing the tumor segmentation method described above. The solution provided by this apparatus is similar to the implementation described in the above method; therefore, the specific limitations in one or more tumor segmentation apparatus embodiments provided below can be found in the limitations of the tumor segmentation method described above, and will not be repeated here.

[0118] In one exemplary embodiment, such as Figure 7 As shown, a tumor segmentation device 700 is provided, comprising: an acquisition module 701, a first determination module 702, a second determination module 703, a training module 704, and a third determination module 705, wherein:

[0119] The acquisition module 701 is used to acquire the target sample MRI image, which includes the target tumor and the interference object;

[0120] The first determining module 702 is used to segment the NMR image of the target sample to obtain the target segmentation result, and to obtain a distance Gaussian distribution heatmap based on the target segmentation result; the target segmentation result includes the tumor region corresponding to the target tumor and the interference region corresponding to the interference object; the distance Gaussian distribution heatmap includes the distance information between the target tumor and the interference object;

[0121] The second determining module 703 is used to input the target sample MRI image into the segmentation model to be trained, and obtain the predicted segmentation result output by the backbone network in the segmentation model, the weight feature map output by the neighborhood space attention module in the segmentation model, and the coarse segmentation result output by the target category attention module in the segmentation model.

[0122] Training module 704 is used to supervise the training of the segmentation model based on the loss of the distance Gaussian distribution heatmap and weight feature map, the loss of the target segmentation result and the coarse segmentation result, and the loss of the target segmentation result and the predicted segmentation result. After training, the target segmentation model is obtained.

[0123] The third determining module 705 is used to input the MRI image to be segmented into the target segmentation model to obtain the segmentation result corresponding to the MRI image to be segmented.

[0124] In one embodiment, the backbone network includes L downsampling layers and L upsampling layers, where L is a positive integer greater than 1. The second determination module 703 is specifically used to input the target sample MRI image into the backbone network to obtain the feature map output by the (L-1)th upsampling layer in the backbone network; input the feature map into the neighborhood spatial attention module to obtain the weighted feature map and the first enhanced feature map output by the neighborhood spatial attention module; input the feature map into the target category attention module to obtain the coarse segmentation result and the second enhanced feature map output by the target category attention module; concatenate the output of the Lth upsampling layer, the output of the 1st downsampling layer, the first enhanced feature map, and the second enhanced feature map in the backbone network to obtain a fused feature map; after performing at least one convolution on the fused feature map, the predicted segmentation result output by the backbone network in the segmentation model is obtained by processing it through the Softmax function.

[0125] In one embodiment, the neighborhood spatial attention module includes multiple convolutional layers connected in sequence; the second determination module 703 is specifically used to input the feature map into the multiple convolutional layers, and after processing by the multiple convolutional layers, obtain a weighted feature map by processing with the Sigmoid function; multiply the weighted feature map and the feature map, and add the result of the multiplication process to the feature map to obtain the first enhanced feature map output by the neighborhood spatial attention module.

[0126] In one embodiment, the target category attention module includes a first attention layer and a second attention layer; the second determination module 703 is specifically used to input the feature map into the first attention layer to obtain the coarse segmentation result and sub-feature map output by the first attention layer; and input the sub-feature map into the second attention layer to obtain the second enhanced feature map output by the target category attention module.

[0127] In one embodiment, the first attention layer includes a first convolutional layer, a second convolutional layer, a third convolutional layer, and a fourth convolutional layer; the second determining module 703 is specifically used to input the feature map into the first convolutional layer, flatten the output of the first convolutional layer, and process the flattened result through the Softmax function to obtain the coarse segmentation result output by the first attention layer; multiply the flattened feature map with the coarse segmentation result to obtain a representation feature map; input the representation feature map into the second convolutional layer and the third convolutional layer respectively; input the feature map into the fourth convolutional layer, multiply the output of the third convolutional layer with the output of the fourth convolutional layer, process the result of the multiplication through the Softmax function, and multiply it with the output of the second convolutional layer to obtain the sub-feature map output by the first attention layer.

[0128] In one embodiment, the second attention layer includes a fifth convolutional layer and a sixth convolutional layer; the second determination module 703 is specifically used to include: inputting the sub-feature map into the fifth convolutional layer and concatenating the output of the fifth convolutional layer with the feature map; inputting the concatenated result into the sixth convolutional layer to obtain the second enhanced feature map output by the target category attention module.

[0129] In one embodiment, the training module 704 is further configured to supervise the training of the neighborhood space attention module based on the loss of the distance Gaussian distribution heatmap and the weight feature map; and to supervise the training of the target category attention module based on the loss of the target segmentation result and the coarse segmentation result.

[0130] Each module in the aforementioned tumor segmentation device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.

[0131] In one exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 8 As shown, the computer device includes a processor, memory, input / output interface, communication interface, display unit, and input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interface. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interface is used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When executed by the processor, the computer program implements a tumor segmentation method. The display unit is used to form a visually visible image and can be a display screen, projection device, or virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.

[0132] Those skilled in the art will understand that Figure 8 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0133] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the method steps described in any of the above method embodiments.

[0134] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the method steps described in any of the above method embodiments.

[0135] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the method steps described in any of the above method embodiments.

[0136] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can 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 can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). 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, artificial intelligence (AI) processors, etc., and are not limited to these.

[0137] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0138] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A tumor segmentation method, characterized in that, The method includes: Acquire MRI images of the target sample, wherein the MRI images of the target sample include the target tumor and the interfering object; The target sample MRI image is segmented to obtain a target segmentation result, and a distance Gaussian distribution heatmap is obtained based on the target segmentation result; the target segmentation result includes the tumor region corresponding to the target tumor and the interference region corresponding to the interference object; the distance Gaussian distribution heatmap includes the distance information between the target tumor and the interference object; The target sample MRI image is input into the segmentation model to be trained to obtain the predicted segmentation result output by the backbone network in the segmentation model, the weight feature map output by the neighborhood space attention module in the segmentation model, and the coarse segmentation result output by the target category attention module in the segmentation model. Based on the loss of the Gaussian distance distribution heatmap and the weighted feature map, the loss of the target segmentation result and the coarse segmentation result, and the loss of the target segmentation result and the predicted segmentation result, the segmentation model is trained under supervision, and the target segmentation model is obtained after training. The MRI image to be segmented is input into the target segmentation model to obtain the segmentation result corresponding to the MRI image to be segmented.

2. The method according to claim 1, characterized in that, The backbone network comprises L downsampling layers and L upsampling layers, where L is a positive integer greater than 1; the step of inputting the target sample MRI image into the segmentation model to be trained, and obtaining the predicted segmentation result output by the backbone network in the segmentation model, the weight feature map output by the neighborhood space attention module in the segmentation model, and the coarse segmentation result output by the target category attention module in the segmentation model, includes: The target sample NMR image is input into the backbone network to obtain the feature map output by the (L-1)th upsampling layer in the backbone network; The feature map is input into the neighborhood space attention module to obtain the weighted feature map and the first enhanced feature map output by the neighborhood space attention module; The feature map is input into the target category attention module to obtain the coarse segmentation result and the second enhanced feature map output by the target category attention module; The output of the Lth upsampling layer, the output of the 1st downsampling layer, the first enhanced feature map, and the second enhanced feature map in the backbone network are concatenated to obtain a fused feature map; After performing at least one convolution on the fused feature map, the predicted segmentation result output by the backbone network in the segmentation model is obtained by processing it through the Softmax function.

3. The method according to claim 2, characterized in that, The neighborhood spatial attention module includes multiple convolutional layers connected in sequence; the step of inputting the feature map into the neighborhood spatial attention module to obtain the weighted feature map and the first enhanced feature map output by the neighborhood spatial attention module includes: The feature map is input into the multiple convolutional layers, and after processing by the multiple convolutional layers, the weighted feature map is obtained by processing with the Sigmoid function. The weighted feature map and the feature map are multiplied together, and the result of the multiplication is added to the feature map to obtain the first enhanced feature map output by the neighborhood space attention module.

4. The method according to claim 2, characterized in that, The target category attention module includes a first attention layer and a second attention layer; The step of inputting the feature map into the target category attention module to obtain the coarse segmentation result and the second enhanced feature map output by the target category attention module includes: The feature map is input into the first attention layer to obtain the coarse segmentation result and sub-feature map output by the first attention layer; The sub-feature map is input into the second attention layer to obtain the second enhanced feature map output by the target category attention module.

5. The method according to claim 4, characterized in that, The first attention layer includes a first convolutional layer, a second convolutional layer, a third convolutional layer, and a fourth convolutional layer; the step of inputting the feature map into the first attention layer to obtain the coarse segmentation result and sub-feature map output by the first attention layer includes: The feature map is input into the first convolutional layer, the output of the first convolutional layer is flattened, and the flattened result is processed by the Softmax function to obtain the coarse segmentation result output by the first attention layer. The feature map is flattened and then multiplied with the coarse segmentation result to obtain a characterization feature map; the characterization feature map is then input into the second convolutional layer and the third convolutional layer respectively. The feature map is input into the fourth convolutional layer. The output of the third convolutional layer is multiplied with the output of the fourth convolutional layer. The result of the multiplication is then processed by the Softmax function and multiplied with the output of the second convolutional layer to obtain the sub-feature map output by the first attention layer.

6. The method according to claim 4, characterized in that, The second attention layer includes a fifth convolutional layer and a sixth convolutional layer; the step of inputting the sub-feature map into the second attention layer to obtain the second enhanced feature map output by the target category attention module includes: The sub-feature map is input into the fifth convolutional layer, and the output of the fifth convolutional layer is concatenated with the feature map; The concatenated result is input into the sixth convolutional layer to obtain the second enhanced feature map output by the target category attention module.

7. The method according to claim 1, characterized in that, The method further includes: The neighborhood spatial attention module is trained under supervision based on the loss of the distance Gaussian distribution heatmap and the weight feature map. Based on the loss of the target segmentation result and the coarse segmentation result, the target category attention module is trained under supervision.

8. A tumor segmentation device, characterized in that, The device includes: The acquisition module is used to acquire the MRI image of the target sample, which includes the target tumor and the interference object; The first determining module is used to segment the target sample MRI image to obtain a target segmentation result, and to obtain a distance Gaussian distribution heatmap based on the target segmentation result; the target segmentation result includes the tumor region corresponding to the target tumor and the interference region corresponding to the interference object; the distance Gaussian distribution heatmap includes the distance information between the target tumor and the interference object; The second determining module is used to input the target sample MRI image into the segmentation model to be trained, and obtain the predicted segmentation result output by the backbone network in the segmentation model, the weight feature map output by the neighborhood space attention module in the segmentation model, and the coarse segmentation result output by the target category attention module in the segmentation model. The training module is used to supervise the training of the segmentation model based on the loss of the distance Gaussian distribution heatmap and the weight feature map, the loss of the target segmentation result and the coarse segmentation result, and the loss of the target segmentation result and the predicted segmentation result, so as to obtain the target segmentation model after the training is completed. The third determining module is used to input the MRI image to be segmented into the target segmentation model to obtain the segmentation result corresponding to the MRI image to be segmented.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.

11. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Focus detection model training method and method for identifying focus in image

    CN113362329A

  • Method for automatically segmenting pulmonary artery tree and tracheal tree on CTPA image

    CN119313910A