Renal artery blood supply area segmentation method and system based on CT image
By introducing a multi-head self-attention mechanism into the U-Net model and pre-processing of CT images, the complexity of segmentation of renal arterial blood supply area in CT images is solved, achieving higher segmentation accuracy and safer surgical procedures.
Patent Information
- Application Number
- CN202510157411.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-13
- Publication Date
- 2025-06-24
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The prior art is difficult to accurately segment the renal artery blood supply area from CT images, which is affected by renal morphological changes, individual differences and pathological status, resulting in an increase in segmentation complexity.
The multi-head self-attention mechanism based on the U-Net model is adopted, and the CT images are pre-processed (denoising, contrast enhancement and normalization) and the multi-head self-attention mechanism is introduced in the U-Net model to train the model to output the segmentation results of the renal artery blood supply area.
It improves the segmentation accuracy of the renal artery blood supply area and can more effectively help surgeons remove lesion tissue while protecting normal tissue, reducing surgical risks and complications.
Smart Images

Figure CN120198448A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of CT image segmentation, and particularly relates to a method and system for segmenting the renal artery blood supply area based on CT images. Background Art
[0002] CT (Computed Tomography) can provide high-resolution three-dimensional images and can display detailed information about the internal structure and blood vessels of the kidney in medicine. The renal artery is complexly distributed in the kidney, and its blood supply area requires precise positioning and segmentation; in kidney surgery, precise segmentation of the blood supply area can help surgeons remove diseased tissues while protecting normal tissues, reducing surgical risks and complications.
[0003] However, due to the morphological changes of the kidney, individual differences, and the influence of pathological conditions, the complexity of renal artery segmentation has increased; therefore, there is an urgent need for a method that can accurately segment the renal artery blood supply area from CT images. Summary of the Invention
[0004] Aiming at the deficiencies of the prior art, the purpose of the present invention is to provide a method and system for segmenting the renal artery blood supply area based on CT images, which solves the problems in the prior art.
[0005] The purpose of the present invention can be achieved through the following technical solutions:
[0006] A method for segmenting the renal artery blood supply area based on CT images includes the following steps:
[0007] Obtain a CT image and perform preprocessing on the CT image;
[0008] Introduce a multi-head self-attention mechanism into the U-Net model to obtain an improved U-Net model;
[0009] Use the preprocessed CT image to train the improved U-Net model;
[0010] Input the CT image to be segmented into the trained improved U-Net model and output the segmentation result.
[0011] Further, the preprocessing of the CT image includes denoising, contrast enhancement, and normalization processing.
[0012] Further, the improved U-Net model includes:
[0013] Encoder: including a sequence of convolutional layers, using convolutional operations to extract features, followed by an activation function and a batch normalization layer after each convolutional block, and adding a max-pooling layer after each convolutional block to reduce the spatial dimension of the feature map;
[0014] Middle layer: where a multi-head self-attention mechanism is introduced;
[0015] Decoder: It includes an upsampling layer that performs an upsampling operation after each pooling layer to gradually restore the spatial resolution of the feature map; and introduces skip connections to connect the corresponding encoder features and decoder features.
[0016] Output layer: Uses a convolutional layer and an activation function to generate the final segmentation mask.
[0017] Further, the activation function is:
[0018]
[0019] In the formula, x is the input value; the Sigmoid function maps the input value to a probability value ranging from 0 to 1, representing the probability that each pixel belongs to the renal artery blood supply area.
[0020] Further, the steps for training the improved U-Net model are as follows:
[0021] S31, Divide the preprocessed CT images into a training set and a validation set in a ratio of 8:2.
[0022] S32, Combine the cross-entropy loss and the Dice Loss to construct a loss function, and use the Adam optimizer to minimize the loss function and update the model parameters.
[0023] S33, Input the training set into the improved U-Net model for training.
[0024] S34, Use the validation set to validate the trained model and evaluate its generalization ability on unseen data.
[0025] Further, the loss function of the improved U-Net model is:
[0026] L = α × L1 + β × L2
[0027]
[0028]
[0029] Where L1 is the Dice Loss; L2 is the cross-entropy loss; α and β are weight coefficients, p is the predicted mask of the model, g is the true mask, ε1 and ε2 are both small constants for numerical stability; N is the number of samples, C is the number of classes, g ic is the probability distribution of the true label, and p ic is the probability distribution predicted by the model.
[0030] A renal artery blood supply area segmentation system based on CT images, comprising:
[0031] Image processing module: Obtain CT images and preprocess the CT images;
[0032] U-Net model improvement module: Introduce a multi-head self-attention mechanism into the U-Net model to obtain an improved U-Net model;
[0033] Model training module: Use the preprocessed CT images to train the improved U-Net model;
[0034] And a segmentation module: Input the CT image to be segmented into the trained improved U-Net model and output the segmentation result.
[0035] A computer storage medium stores a readable program that, when run, can execute the above-mentioned method for segmenting the renal artery blood supply area based on CT images.
[0036] An electronic device includes: a processor, a memory, a communication interface, and a communication bus, and the processor, the memory, and the communication interface complete communication with each other through the communication bus;
[0037] The memory is used to store at least one executable instruction, and the executable instruction causes the processor to perform the operations corresponding to the above-mentioned method for segmenting the renal artery blood supply area based on CT images.
[0038] A computer program product includes computer instructions that direct a computing device to perform the operations corresponding to the above-mentioned method for segmenting the renal artery blood supply area based on CT images.
[0039] Advantages of the present invention:
[0040] 1. By denoising and enhancing the CT images, problems such as image noise and blurred boundaries are overcome, so as to provide accurate segmentation results subsequently;
[0041] 2. Use the U-Net model improved by the multi-head self-attention mechanism to perform the segmentation task on the CT images. The multi-head self-attention mechanism can capture the long-range dependencies between different positions in the feature map, which helps the model better understand the global context information in the image, thereby improving the segmentation accuracy of the renal artery blood supply area, and further can effectively help surgeons remove diseased tissues while protecting normal tissues, reducing surgical risks and complications. Description of the Drawings
[0042] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the accompanying drawings required for the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0043] Figure 1 It is the flowchart of the segmentation method of the present invention. Specific embodiments
[0044] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present invention.
[0045] Embodiment 1
[0046] As Figure 1 shown, a method for segmenting the renal artery blood supply area based on CT images includes the following steps:
[0047] S1, obtain CT images and preprocess the CT images;
[0048] The preprocessing of CT images includes denoising, contrast enhancement, and normalization processing to overcome adverse factors such as blurred image boundaries;
[0049] In CT images, noise may come from the scanning device, physical conditions, or the sensor itself. Gaussian filtering formula is used for CT image denoising;
[0050]
[0051] In the formula, is the pixel value after denoising, I(i,j) is the pixel value within the neighborhood N(x,y), and σ is the standard deviation of the Gaussian kernel, which controls the smoothness of the filter.
[0052] The enhancement processing aims to improve the visual quality and features of the image, making it more suitable for analysis and recognition. In CT images, enhancement can enhance the contrast, reduce blur, or increase the details of the image. In this embodiment, contrast enhancement is used to enhance the CT image. Specifically, by adjusting the gray level range of the image, the distinguishability of different structures in the image is increased.
[0053] Normalization is to scale the pixel values of an image into the range [0, 1] so that different images have similar scales and dynamic ranges before being input into the model, thereby obtaining better performance and a stable training process. The formula for normalization is as follows:
[0054]
[0055] In the formula, Z(x, y) represents the pixel value of the image at position (x, y); min(Z) is the minimum pixel value in the entire image; max(Z) is the maximum pixel value in the entire image; is the normalized pixel value at position (x, y).
[0056] S2. Introduce the multi-head self-attention mechanism into the U-Net model to obtain an improved U-Net model;
[0057] The improved U-Net model includes:
[0058] 1) Encoder: It includes a sequence of convolutional layers. The sequence of convolutional layers is similar to the traditional U-Net, using convolutional operations to extract features. Each convolutional block is followed by an activation function (such as ReLU) and a batch normalization layer; a max-pooling layer is added after each convolutional block to reduce the spatial dimension of the feature map;
[0059] 2) Middle layer: The multi-head self-attention mechanism is introduced into it; the multi-head attention mechanism introduces multiple attention heads, and each attention head learns different queries (Query), keys (Key), and values (Value), which are represented by Q, K, and V respectively. By independently applying the self-attention mechanism h times, multiple different attention representations are generated. Finally, the outputs of these heads are concatenated and linearly transformed to obtain the output of the final multi-head attention mechanism.
[0060] For a given input X, the calculation of the multi-head attention mechanism is as follows:
[0061] The input X is mapped through multiple different to multiple Q (i) , K (i) , V (i) (i = 1, 2,..., h; representing the i-th attention head).
[0062] The self-attention output calculated by each attention head is: Attention (i) (X)
[0063] Connect the outputs of all heads and obtain the final output through a linear transformation W O :
[0064] MultiHead(X) = Concat(Attention(1) (X),..., Attention (h) (X))W O
[0065] Among them, W O is a learned weight matrix.
[0066] 3) Decoder: It includes an upsampling layer, where an upsampling operation is performed after each pooling layer to gradually restore the spatial resolution of the feature map; and skip connections are introduced to connect the corresponding encoder features and decoder features to help retain more detailed information.
[0067] 4) Output layer: A convolutional layer and an activation function are used to generate the final segmentation mask.
[0068] The activation function is:
[0069]
[0070] In the formula, x is the input value, which can be the output value of the output layer; the Sigmoid function maps the input value to a probability value in the range of 0 to 1, which can represent the probability that each pixel belongs to the renal artery blood supply area.
[0071] The multi-head self-attention mechanism is introduced in the U-Net, enabling each attention head to focus on different feature relationships and scales, which helps the model better capture local and global features in the image. By introducing the multi-head mechanism, the model can more effectively learn the complex features and context information of the input image, thereby improving the performance of segmentation or other tasks. The multi-head mechanism enables the model to dynamically adjust the attention to adapt to different input patterns and task requirements.
[0072] S3. Use the preprocessed CT images to train the improved U-Net model;
[0073] S31. Divide the preprocessed CT images into a training set and a validation set; the ratio is 8:2.
[0074] S32. Combine the cross-entropy loss function (Cross-Entropy Loss) and Dice Loss to construct the loss function; it is used to measure the difference between the model output and the true label, and the Adam optimizer is used to minimize the loss function and update the model parameters;
[0075] Among them, the loss function of the improved U-Net model is:
[0076] L = α × L1 + β × L2
[0077]
[0078]
[0079] Among them, L1 is the Dice Loss; L2 is the cross-entropy loss; α and β are weight coefficients, p is the predicted mask of the model, g is the ground truth mask, and ε1 and ε2 are both small constants for numerical stability; N is the number of samples, C is the number of classes, and g ic is the probability distribution of the ground truth labels, and p ic is the probability distribution predicted by the model.
[0080] Using the Dice Loss and cross-entropy loss together can help improve the performance of the U-Net model in CT image segmentation tasks, being able to accurately handle pixel-level segmentation and ensure overall classification accuracy.
[0081] S33. Input the training set into the improved U-Net model for training; during the training process, the model will gradually learn how to correctly map the input image to the corresponding labels (such as segmentation results).
[0082] S34. Use the validation set to validate the trained model and evaluate its generalization ability on unseen data.
[0083] S4. Input the CT image to be segmented into the trained improved U-Net model and output the segmentation result.
[0084] Embodiment 2
[0085] In this embodiment, a renal artery blood supply area segmentation system based on CT images is disclosed, which specifically includes:
[0086] Image processing module: Obtain the CT image and preprocess the CT image;
[0087] U-Net model improvement module: Introduce a multi-head self-attention mechanism into the U-Net model to obtain an improved U-Net model;
[0088] Model training module: Use the preprocessed CT image to train the improved U-Net model;
[0089] And a segmentation module: Input the CT image to be segmented into the trained improved U-Net model and output the segmentation result.
[0090] The method of the present invention can be implemented in hardware, firmware, or be implemented as software or computer code that can be stored in a recording medium (such as a CDROM, RAM, floppy disk, hard disk, or magneto-optical disk), or be implemented as computer code originally stored in a remote recording medium or a non-transitory machine-readable medium and to be downloaded through a network and stored in a local recording medium, so that the method described herein can be stored on such a software process on a recording medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware (such as an ASIC or FPGA). It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component (such as RAM, ROM, flash memory, etc.) that can store or receive software or computer code, and when the software or computer code is accessed and executed by the computer, the processor, or the hardware, the method described herein is implemented. In addition, when a general-purpose computer accesses the code for implementing the method shown herein, the execution of the code converts the general-purpose computer into a dedicated computer for executing the method shown herein.
[0091] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited by the above embodiments, and what is described in the above embodiments and the specification is only to illustrate the principle of the present invention. Without departing from the spirit and scope of the present invention, the present invention will have various changes and improvements, and these changes and improvements all fall within the scope of the present invention claimed.
Claims
1. A method for segmenting the renal artery blood supply area based on CT images, characterized in that: The following steps are involved: Acquire CT images and preprocess the CT images; Introducing the multi-head self-attention mechanism into the U-Net model, an improved U-Net model is obtained; Use the preprocessed CT images to train the improved U-Net model; The CT image to be segmented is input into the trained improved U-Net model and the segmentation result is output.
2. The method for segmenting the renal artery blood supply area based on CT images according to claim 1, characterized in that: The preprocessing of the CT image includes denoising, contrast enhancement and normalization.
3. The method for segmenting the renal artery blood supply area based on CT images according to claim 1, characterized in that: The improved U-Net model includes: Encoder: It consists of a sequence of convolutional layers, using convolution operations to extract features. Each convolution block is followed by an activation function and batch normalization layer. A maximum pooling layer is added after each convolution block to reduce the spatial dimension of the feature map. Middle layer: where a multi-head self-attention mechanism is introduced; Decoder: includes upsampling layers, and performs an upsampling operation after each pooling layer to gradually restore the spatial resolution of the feature map; and introduces skip connections to connect the corresponding encoder features with the decoder features; Output layer: Use convolutional layers and activation functions to generate the final segmentation mask.
4. The method for segmenting the renal artery blood supply area based on CT images according to claim 3, characterized in that: The activation function is: Where x is the input value; the Sigmoid function maps the input value to a probability value ranging from 0 to 1, indicating the probability that each pixel belongs to the renal artery blood supply area.
5. The method for segmenting the renal artery blood supply area based on CT images according to claim 3, characterized in that: The steps to train the improved U-Net model are: S31, dividing the preprocessed CT images into a training set and a validation set in a ratio of 8:2; S32, combines cross entropy loss and Dice Loss to construct the loss function, and uses Adam optimizer to minimize the loss function and update the model parameters; S33, inputting the training set into the improved U-Net model for training; S34, use the validation set to validate the trained model and evaluate its generalization ability on unseen data.
6. The method for segmenting the renal artery blood supply area based on CT images according to claim 5, characterized in that: The loss function of the improved U-Net model is: L=α×L1+β×L2 Among them, L1 is Dice Loss; L2 is cross entropy loss; α and β are weight coefficients, p is the predicted mask of the model, g is the real mask, ε1 and ε2 are both small constants for numerical stability; N is the number of samples, C is the number of categories, g ic is the probability distribution of the true label, p ic is the probability distribution predicted by the model.
7. A renal artery blood supply area segmentation system based on CT images, characterized in that: include: Image processing module: obtain CT images and preprocess them; U-Net model improvement module: introduces a multi-head self-attention mechanism into the U-Net model to obtain an improved U-Net model; Model training module: Use the preprocessed CT images to train the improved U-Net model; And, the segmentation module: inputs the CT image to be segmented into the trained improved U-Net model and outputs the segmentation result.
8. A computer storage medium storing a readable program, characterized in that: When the program is running, it can execute the method for segmenting the renal artery blood supply area based on CT images as described in any one of claims 1 to 6.
9. An electronic device, characterized in that: include: A processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform operations corresponding to a method for segmenting the renal artery blood supply area based on a CT image as described in any one of claims 1-6.
10. A computer program product comprising computer instructions, characterized in that: The computer instructions instruct the computing device to execute operations corresponding to the method for segmenting the renal artery blood supply area based on a CT image as described in any one of claims 1-6.