Liver focus segmentation method based on multi-scale anatomical prior and attention enhancement

By integrating semi-supervised learning and multi-scale anatomical prior features, combined with a 3D attention-enhanced segmentation network and a dynamic loss function, the problem of insufficient anatomical structure modeling in liver lesion segmentation is solved, achieving high-precision and robust lesion segmentation.

CN121837633APending Publication Date: 2026-04-10NANJING HEIKE ZHINING MEDICAL EQUIPMENT CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NANJING HEIKE ZHINING MEDICAL EQUIPMENT CO LTD
Filing Date
2025-12-23
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Existing technologies are insufficient to fully model the complex three-dimensional anatomical structure and spatial distribution characteristics of lesions in the liver, resulting in low lesion segmentation accuracy and poor robustness, especially with insufficient model generalization ability under conditions of scarce labeled data.

Method used

A semi-supervised learning strategy is adopted to extract multi-scale anatomical prior features through unsupervised training, and these prior information are deeply integrated into a three-dimensional attention-enhanced segmentation network. Combined with a hierarchical three-dimensional attention mechanism and a dynamic composite loss function, the accuracy and robustness of lesion segmentation are improved.

Benefits of technology

It significantly improves the segmentation accuracy and robustness of small, low-contrast, and blurred-border lesions, and enhances the model's generalization ability under different devices and scanning protocols.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121837633A_ABST
    Figure CN121837633A_ABST
Patent Text Reader

Abstract

The invention discloses a multi-scale anatomical prior and attention-enhanced liver lesion segmentation method, which comprises the following steps of: training a three-dimensional convolution denoising auto-encoder by using an unsupervised training data set of an original image to obtain a trained denoising auto-encoder model; inputting a supervised training data set of an original image into the trained denoising auto-encoder model to obtain prior anatomical features of each image at four different resolution levels; inputting the prior anatomical features and the original image into a 3D attention enhancement segmentation network for network training output to obtain a trained segmentation model; and obtaining a liver focus segmentation result of the three-dimensional image of the to-be-segmented liver region through the trained denoising auto-encoder model segmentation model. Dependence on labeled data is reduced through a semi-supervised learning strategy, global context construction of a focus area is enhanced by introducing a hierarchical three-dimensional attention mechanism, and segmentation precision, robustness and clinical generalization ability of a tiny, low-contrast and boundary fuzzy focus are improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of medical image recognition, in particular to a liver lesion segmentation method based on multi-scale anatomical prior and attention enhancement. BACKGROUND

[0002] Precise segmentation of liver lesions is a key step in the diagnosis and treatment process of liver cancer. Traditional methods rely on radiologists to manually delineate, which is time-consuming, subjective and has poor reproducibility. In recent years, automatic segmentation methods based on deep learning have made significant progress, but existing models still face three major challenges: (1) Clinical annotation data is scarce, and high-quality three-dimensional lesion annotation is extremely costly; (2) Lesions have diverse shapes, fuzzy boundaries, and low contrast, especially small lesions are easily overlooked; (3) The model lacks generalization ability and performs poorly on different devices, scanning protocols or patient groups.

[0003] Although three-dimensional U-Net and its variants perform well in medical image segmentation, their ability to model global context is limited, and they rely heavily on large amounts of labeled data. Some studies have attempted to introduce attention mechanisms or anatomical prior information, but most are limited to two-dimensional planes or a single scale, making it difficult to fully model the complex three-dimensional anatomical structure of the liver and the spatial distribution characteristics of lesions. Therefore, there is an urgent need for an intelligent segmentation method that can effectively integrate multi-scale anatomical knowledge, enhance lesion area perception, and still have high robustness under limited labeled data conditions. SUMMARY

[0004] The technical problem to be solved by the present application is that the prior art cannot fully model the complex three-dimensional anatomical structure of the liver and the spatial distribution characteristics of lesions. The present application provides a liver lesion segmentation method based on multi-scale anatomical prior and attention enhancement, which reduces the dependence on labeled data through a semi-supervised learning strategy, extracts multi-scale prior features of the liver anatomical structure using unsupervised pre-training, and deeply integrates these prior information in the segmentation network, while introducing a hierarchical three-dimensional attention mechanism to strengthen the global context modeling of lesion areas, thereby significantly improving the segmentation accuracy, robustness and clinical generalization ability of small, low-contrast and fuzzy boundary lesions.

[0005] The present application is realized by the following technical solutions: The present application provides a liver lesion segmentation method based on multi-scale anatomical prior and attention enhancement, comprising the following specific steps: Obtain an unsupervised training dataset and a supervised training dataset of the original image; Input the unsupervised training dataset into a three-dimensional convolutional denoising autoencoder for image reconstruction training to obtain a trained denoising autoencoder model; inputting the supervised training data set into the trained denoising autoencoder model to obtain the prior anatomical features of each image at four different resolution levels; constructing a 3D attention enhanced segmentation network, inputting the prior anatomical features and the original image into the 3D attention enhanced segmentation network for network training: the original image and the prior anatomical features of the corresponding resolution are spliced in the channel dimension and then input into the network, the network is based on the attention mechanism, outputs the liver lesion probability map according to the image details and the anatomical prior, calculates the loss and reversely propagates, and outputs the trained segmentation model; inputting the three-dimensional image of the liver region to be segmented into the denoising autoencoder model to obtain the prior anatomical features of the liver region to be segmented, inputting the prior anatomical features of the liver region to be segmented and the original image of the corresponding liver region to be segmented into the trained segmentation model to generate the liver lesion segmentation result.

[0006] Further, the obtaining steps of the unsupervised training data set and the supervised training data set include: extracting the liver region of interest from the abdominal CT / MRI cross-sectional image to obtain the liver ROI image; annotating the lesions in the liver region of interest to generate the corresponding binary mask, which constitutes the supervised training data set; The unlabeled samples in the liver region of interest constitute the unsupervised training data set.

[0007] Further, the inputting of the unsupervised training data set into the three-dimensional convolutional denoising autoencoder for image reconstruction training specifically includes: Before each training iteration, random Gaussian noise is added to the input liver ROI image by a noise generation module to obtain a noisy image; inputting the noisy image into the encoder module, the encoder is composed of 4 resolution modules and 3 three-dimensional maximum pooling layers stacked alternately, which extracts and down-samples the input image with semantic hierarchical multi-scale features step by step; inputting the deepest features output by the encoder into the decoder module, the decoder adopts a symmetrical structure with the encoder, and reconstructs an image with the same size as the original image by three-dimensional transpose convolution and step-by-step up-sampling; using the loss module to calculate the mean square error loss between the reconstructed image and the original noise-free image, and updating the network parameters by minimizing the loss, to complete the image reconstruction training of the denoising autoencoder.

[0008] Further, the 3D attention enhanced segmentation network specifically includes: at least 7 resolution modules, wherein the resolution module includes two layers of three-dimensional convolution, group normalization and ReLU activation function, for step-by-step extraction of multi-scale spatial features; 3 three-dimensional max-pooling layers, the pooling kernel and 3 three-dimensional deconvolution layers constitute an encoder-decoder symmetric structure; 1 hierarchical three-dimensional attention module, deployed in the lowest resolution layer of the encoder, for integrating multi-head three-dimensional self-attention mechanism and feedforward neural network; 1 output layer: composed of a single layer of three-dimensional convolution and Sigmoid function, for outputting a single-channel lesion probability map; 1 segmentation loss module: adopts multi-loss weighted combination.

[0009] Further, each resolution module comprises: two consecutive three-dimensional convolution layers, a group normalization layer and a ReLU activation function connected in turn; The max-pooling layer adopts three-dimensional max-pooling operation with a step size of 2 and a kernel size of 2x2x2 The three-dimensional deconvolution layer adopts transpose convolution operation with a step size of 2 and a kernel size of 2x2x2.

[0010] Further, the 3D attention enhanced segmentation network is trained, specifically including: Obtain four prior anatomical features F1, F2, F3 and F4 of different resolution levels from the trained denoising autoencoder model, wherein F1 has the highest resolution and F4 has the lowest resolution; After the original image and the prior anatomical feature F1 of the corresponding resolution are spliced in the channel dimension, the first resolution module is input to obtain the feature map E1; the feature map E1 enters the first max-pooling layer to obtain the feature map P1; After the feature map P1 and the prior anatomical feature F2 are spliced, the second resolution module is input to obtain the feature map E2; the feature map E2 enters the second max-pooling layer to obtain the feature map P2; After the feature map P2 and the prior anatomical feature F3 are spliced, the third resolution module is input to obtain the feature map E3; the feature map E3 enters the third max-pooling layer to obtain the feature map P3; After the feature map P3 and the prior anatomical feature F4 are spliced, the fourth resolution module is input to obtain the feature map E4; the feature map E4 is input into the hierarchical three-dimensional attention module to obtain the enhanced feature map A4; The enhanced feature map A4 is input into the first three-dimensional deconvolution layer to obtain the up-sampling feature map U1; U1 and the feature map E3 are spliced and input into the fifth resolution module to obtain the feature map D1; The feature map D1 is input into the second three-dimensional deconvolution layer to obtain the up-sampling feature map U2; U2 and the feature map E2 are spliced and input into the sixth resolution module to obtain the feature map D2; The feature map D2 is input into a third three-dimensional deconvolution layer to obtain an up-sampling feature map U3; the U3 is spliced with the feature map E1 and input into a seventh resolution module to obtain a feature map D3; the feature map D3 enters an output layer module to obtain a predicted mask; The predicted mask and the real mask are input into a segmentation loss module to calculate a segmentation loss value, and back propagation is performed to train the network.

[0011] Further, the segmentation loss is composed of a Dice loss term, a focal cross-entropy loss term and a difficult segmentation region adaptive loss term; The Dice loss term is used to ensure the coincidence degree of the overall segmentation region; The focal cross-entropy loss term is used to strengthen the attention to low confidence or error-prone classification voxels; The difficult segmentation region adaptive loss term is used to dynamically focus on difficult regions with large prediction errors in the current training round.

[0012] Further, the Dice loss calculation process specifically includes: The image to be segmented is input into the constructed segmentation network to obtain the predicted probability of each voxel belonging to the foreground; Each voxel is labeled as foreground or background according to the real mask to obtain the corresponding binary label; For foreground voxels, the power of the predicted probability minus 1 is used as the dynamic weight, and for background voxels, the power of the predicted probability is used as the dynamic weight, respectively reducing the contribution of high confidence easy-to-segment samples; The weighted foreground branch loss value and the background branch loss value are added and averaged to obtain the focal cross-entropy loss value.

[0013] Further, the focal cross-entropy calculation process specifically includes: The image to be segmented is input into the constructed segmentation network to obtain the predicted probability of each voxel belonging to the foreground; Each voxel is labeled as foreground or background according to the real mask to obtain the corresponding binary label; The point-by-point product sum of the predicted probability and the real label, the predicted probability square sum and the real label square sum are calculated respectively; The twice product sum is divided by the sum of the predicted square sum and the real square sum, and the quotient is subtracted by a constant to obtain the Dice loss value.

[0014] Further, the difficult segmentation region adaptive loss calculation process specifically includes: The image to be segmented is input into the constructed segmentation network to obtain the predicted confidence of each voxel; According to the error between the current prediction confidence and the true label, the voxels with errors exceeding a preset threshold are dynamically screened out to form a difficult segmentation region set special for this round of training; A weighted cross-entropy calculation is separately applied to the voxels in the difficult segmentation region set to obtain a difficult segmentation region adaptive loss value.

[0015] Compared with the prior art, the present application has the following advantages and beneficial effects: The present application constructs a three-dimensional convolutional denoising autoencoder, adopts a semi-supervised collaborative mechanism of unsupervised anatomical prior extraction and supervised segmentation guidance, and explicitly learns and extracts four levels of multi-scale anatomical structure features (F1~F4) from a large number of unlabeled liver ROIs. These features are deeply fused layer by layer in the encoding stage of the segmentation network, providing the model with strong constraints beyond the pixel level and conforming to the real anatomical laws of the liver, thereby effectively suppressing the unreasonable drift of the lesion segmentation result in anatomy under a small amount of labeled data, and solving the core problem of model overfitting and poor generalization under a small sample; The present application constructs a three-dimensional attention enhanced segmentation network of a novel network architecture of hierarchical anatomical feature fusion + bottleneck layer three-dimensional attention enhancement, and fuses the multi-scale anatomical prior features and the original image features in each corresponding layer of the encoder in the channel, instead of simple input level or output level fusion. This deep fusion ensures that the anatomical prior information can run through the entire feature extraction process. More importantly, a hierarchical three-dimensional attention module is introduced at the deepest layer (bottleneck layer) of the encoder. The module uses a multi-head three-dimensional self-attention mechanism to model the long-range spatial dependency relationship of the low-resolution feature map fused with the global anatomical context. This compensates for the limited receptive field of traditional convolutional networks such as 3DU-Net, enabling the model to see the structural association of the entire liver region, thereby significantly improving the perception and positioning ability of small, low-contrast and fuzzy boundary lesions; In view of the problems of extreme class imbalance, hard example dominated performance bottleneck, etc. in liver lesion segmentation, the present application adopts a triple-weighted dynamic compound loss function. The function not only includes the standard Dice loss to optimize the overall segmentation region consistency, but also innovatively combines the focal cross-entropy loss (automatically reduces the weight of easy-to-segment regions and focuses on difficult-to-segment regions) and the hard region adaptive loss (dynamically identifies and strengthens the voxels in the hard region with the largest prediction error in each training iteration). This loss design forms a closed-loop difficult sample mining and strengthening mechanism, forcing the model to continuously focus on the most challenging segmentation regions, thereby substantially improving the segmentation robustness in complex clinical scenarios; The method of the present application is stable under various CT / MRI devices and scanning protocols, and has good generalization ability and clinical transformation potential. BRIEF DESCRIPTION OF DRAWINGS

[0016] In order to more clearly illustrate the technical solutions of the exemplary embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments. It should be understood that the following drawings only show some embodiments of the present application, and therefore should not be considered as limiting the scope. For those skilled in the art, other related drawings can also be obtained without creative labor. In the drawings: Figure 1 A flow chart of a multi-scale anatomical prior and attention enhanced liver lesion segmentation method in an embodiment of the present application. DETAILED DESCRIPTION

[0017] In order to make the objectives, technical solutions and advantages of the present application clearer, the following will further describe the present application in detail with embodiments and drawings. The exemplary embodiments of the present application and their descriptions are only used to explain the present application, and should not be considered as limiting the present application.

[0018] As a possible implementation, as shown in Figure 1 The present embodiment provides a multi-scale anatomical prior and attention enhanced liver lesion segmentation method. The method first extracts a liver region of interest from an abdominal CT or MRI image, constructs a supervised training set containing a small amount of labeled samples and an unsupervised training set containing a large number of unlabeled samples; then, a three-dimensional convolutional denoising autoencoder is trained using unsupervised data to extract multi-scale prior anatomical features at four different resolution levels; further, a three-dimensional attention enhanced segmentation network with clear structure is constructed, which deeply fuses the original image with the prior anatomical features at the corresponding level during the encoding-decoding process, and enhances the global context modeling ability of the lesion area through the three-dimensional attention mechanism; the segmentation training uses a composite loss function composed of Dice loss and focal cross-entropy loss, which effectively improves the segmentation accuracy of small, low-contrast and fuzzy boundary lesions; finally, for the image to be segmented, anatomical prior is extracted through the autoencoder, and then the trained segmentation network is jointly input to output high-precision liver lesion segmentation results. The present embodiment can significantly reduce the dependence on large-scale labeled data by using a semi-supervised learning strategy, and greatly improve the generalization, robustness and segmentation accuracy of the neural network model in the clinical real scene of medical image recognition, image extraction and image semantic segmentation by using anatomical structure prior guidance and three-dimensional attention enhancement. It can be widely used in clinical tasks such as liver cancer screening, preoperative planning and efficacy evaluation.

[0019] The specific implementation process of the present embodiment is as follows: Step (1): Construct a mixed training data set; The liver region of interest (ROI) is extracted from the abdominal CT or MRI image by a liver segmentation model or manual delineation. A small number of samples are finely annotated with lesions to generate corresponding binary masks (true labels), constituting a supervised training dataset; the remaining large number of unannotated samples constitute an unsupervised training dataset.

[0020] Step (2): training a three-dimensional convolutional denoising autoencoder to extract anatomical priors; The unsupervised training dataset is input into a specially designed three-dimensional convolutional denoising autoencoder for image reconstruction training. The autoencoder not only restores the image content, but more importantly, through its hierarchical encoding structure, implicitly learns the inherent anatomical structure rules of the liver region and outputs multi-scale feature representations with semantic levels. Specifically, the autoencoder includes the following core components: Noise generation module: randomly add Gaussian noise to the input liver ROI image to simulate common imaging degradation (such as low-dose artifacts, motion blur, etc.) in clinical images, thereby forcing the model to learn more robust structural representations; Encoder module: composed of 4 resolution modules and 3 three-dimensional max-pooling layers stacked alternately. Each resolution module contains two consecutive three-dimensional convolutional layers followed by a group normalization (Group Normalization) layer and a ReLU activation function. This double convolution structure can fully extract local texture and morphological features at each scale, while group normalization effectively alleviates the distribution shift problem under small batch training, improving feature stability; Decoder module: adopts a symmetric structure with the encoder, reconstructs the original image through three-dimensional transpose convolution upsampling; loss module: adopts mean square error (MSE) loss function to measure the voxel-level difference between the reconstructed image and the original noise-free image: ; wherein, N is the total number of image voxels, is the i-th voxel value of the original image, is the corresponding voxel value of the reconstructed image, the i-th voxel value.

[0021] The four-level structure of the encoder compresses the spatial dimension while abstracting multi-scale anatomical semantic information from local edge details (high-resolution layers) to overall organ morphology and spatial layout (low-resolution layers) layer by layer.

[0022] The training image is input into a noise generation module to obtain a noise image and input into an encoder module, and four prior anatomical features F1, F2, F3 and F4 of different resolutions are obtained by the encoder module, wherein F1 has the highest resolution, F4 has the lowest resolution, and multi-scale anatomical semantic information from local details to global structure is contained. These features not only retain the normal anatomical structure constraints of the liver (such as blood vessel running, liver lobe boundary, etc.), but also effectively suppress the interference of non-liver tissues or artifacts, providing strong prior guidance for the subsequent segmentation network, and significantly improving the anatomical rationality and spatial consistency of lesion positioning. Then the prior anatomical features F1, F2, F3 and F4 are input into a decoder module to obtain a reconstructed image; the reconstructed image and the input training image are input into a mean square error loss module to calculate a loss value, and network training is performed through back propagation.

[0023] Step (3): constructing and training a three-dimensional attention enhanced segmentation network; In order to overcome the performance limitation of existing segmentation models in clinical complex scenarios such as annotation scarcity, small lesions or blurred boundaries, the present application constructs a three-dimensional attention enhanced segmentation network specially used for liver lesion segmentation, and the core structure thereof includes: 7 resolution modules (each module has the same structure as the resolution module in the autoencoder): each module is composed of two layers of three-dimensional convolution, group normalization (Group Normalization) and ReLU activation function, and is used for extracting multi-scale spatial features step by step. Compared with the traditional U-Net which only relies on image information itself, in the encoding stage, the present embodiment splices the original image or the intermediate feature map with the multi-scale anatomical prior feature of the corresponding level in the channel dimension, so that the network can perceive the inherent anatomical constraints of the liver at each scale, thereby effectively suppressing the false segmentation of non-liver regions or non-lesion regions; 3 three-dimensional maximum pooling layers (kernel size 2x2x2, step 2) and 3 three-dimensional deconvolution layers (transposed convolution, kernel size 2x2x2, step 2): constitute a typical encoder-decoder symmetric structure, realize the reconstruction from high-dimensional semantics to fine spatial positioning. The key innovation is that in the upsampling process of the decoder, not only the skip connection features of the encoding path itself are fused, but also the anatomical prior knowledge obtained by pre-training of the autoencoder is implicitly inherited, which significantly improves the segmentation boundary accuracy and structural consistency; 1 hierarchical three-dimensional attention module: deployed in the deepest layer (the lowest resolution layer) of the encoder, integrating multi-head three-dimensional self-attention mechanism and feedforward neural network. This module can model the long-range spatial dependency between any two voxels in the entire liver volume, and is especially suitable for global context understanding of diffuse, multiple or irregular-shaped lesions. Compared with two-dimensional attention or local attention mechanism, three-dimensional self-attention can completely capture the three-dimensional correlation of lesions in coronal, sagittal and transverse planes, avoiding missed detection or fragmentation caused by isolated processing of slices; 1 output layer: composed of a single layer of three-dimensional convolution + sigmoid activation, output single-channel lesion probability map, directly corresponding to the possibility of lesion existence; 1 segmentation loss module: adopts the weighted combination of Dice loss, focal cross-entropy loss and hard region adaptive loss. Among them, Dice loss alleviates the extreme class imbalance between lesions and background; focal cross-entropy focuses on difficult samples (such as low-contrast edges); hard region adaptive loss dynamically identifies "difficult voxels" with large prediction errors in each training round, forcing the model to continuously optimize the segmentation of weak areas. The synergistic effect of the three significantly improves the robust segmentation ability of the model for small (<1cm), fuzzy or heterogeneous lesions.

[0024] Based on the above 3D attention enhanced segmentation network, the prior anatomical features and the original image are input into the 3D attention enhanced segmentation network for network training, and the specific training process is as follows: The original image I and its corresponding real mask Y in the supervised training set are input into the process; The multi-scale prior features F1-F4 of I are extracted by using the trained autoencoder; In the encoding stage, the original image or the intermediate feature map and the corresponding level of prior features are spliced in the channel dimension and then input into the resolution module; A hierarchical three-dimensional attention module is introduced after the lowest resolution layer (corresponding to F4), and an enhanced feature map is output; In the decoding stage, the spatial resolution is recovered step by step by deconvolution upsampling and splicing with the feature map of the corresponding level of the encoder; The specific processing process of the image is as follows: Four prior anatomical features F1, F2, F3, F4 of different resolution levels are obtained from the trained denoising autoencoder model, wherein F1 has the highest resolution and F4 has the lowest resolution; The original training image I and the prior anatomical feature F1 are spliced in the channel dimension and then input into the first resolution module to obtain the feature map E1; the feature map E1 enters the first maximum pooling layer to obtain the feature map P1; The feature map P1 and the prior anatomical feature F2 are spliced and then input into the second resolution module to obtain the feature map E2; the feature map E2 enters the second maximum pooling layer to obtain the feature map P2; The feature map P2 and the prior anatomical feature F3 are spliced and then input into the third resolution module to obtain the feature map E3; the feature map E3 enters the third maximum pooling layer to obtain the feature map P3; The feature map P3 and the prior anatomical feature F4 are spliced and then input into the fourth resolution module to obtain the feature map E4; the feature map E4 is input into the hierarchical three-dimensional attention module to obtain the enhanced feature map A4; The enhanced feature map A4 is input into a first three-dimensional deconvolution layer to obtain an up-sampling feature map U1; the U1 is spliced with the feature map E3 and input into a fifth resolution module to obtain a feature map D1; The feature map D1 is input into a second three-dimensional deconvolution layer to obtain an up-sampling feature map U2; the U2 is spliced with the feature map E2 and input into a sixth resolution module to obtain a feature map D2; The feature map D2 is input into a third three-dimensional deconvolution layer to obtain an up-sampling feature map U3; the U3 is spliced with the feature map E1 and input into a seventh resolution module to obtain a feature map D3; the feature map D3 enters an output layer module, and finally outputs a predicted mask , and a composite segmentation loss is calculated with a real mask Y L seg, the network parameters are optimized by back propagation, and a final segmentation model is obtained: ; wherein, is an adjustable balance parameter, used to coordinate the contribution weight of each loss in training; the composite loss design aims to comprehensively cope with the challenges in medical image segmentation, such as extreme class imbalance, difficult sample recognition difficulty and local boundary blur: the Dice loss term guarantees the coincidence degree of the overall segmentation region, the focal cross-entropy loss term strengthens the attention to low confidence or easy-to-mistakenly-classified voxels, and the difficult-to-segment region adaptive loss term dynamically focuses on the difficult regions with large prediction errors in the current training round, thereby significantly improving the segmentation robustness and accuracy of the model for small lesions and complex boundaries.

[0025] The segmentation loss module adopts a composite loss function to optimize and train the segmentation network; the composite loss function is composed of a Dice loss term, a focal cross-entropy loss term and a difficult-to-segment region adaptive loss term, and each loss is defined as follows: Dice loss (solves class imbalance): ; wherein, N is the total number of voxels in the image, is the probability value of the predicted mask at the i-th voxel, is the binary label of the corresponding real mask at the i-th voxel, taking value 0 or 1; this loss term effectively alleviates the class imbalance problem caused by the extremely small proportion of liver lesion area relative to background voxels, and promotes the model to pay more attention to the overall structural integrity of the lesion area during the training process.

[0026] Focal cross-entropy loss (focus on difficult samples), the focal cross-entropy loss term reduces the gradient weight of easy-to-segment samples by introducing a focusing mechanism, so that the model focuses more on the learning of difficult samples: ; wherein,N is the total number of voxels in the image, is the binary label of the real mask at the i-th voxel, is the probability value of the predicted mask at the i-th voxel, is the focus parameter and , is a small positive number to prevent the divergence of logarithmic operation; this loss term effectively suppresses the dominant role of a large number of background voxels on the loss function, significantly enhancing the model's sensitivity to low-contrast, fuzzy boundary or micro-lesion regions.

[0027] Difficult region adaptive loss (dynamic attention to difficult regions): ; wherein, is the set of voxels in the difficult region whose prediction error is greater than the preset threshold, which is dynamically updated according to the prediction confidence of the current model in each training round; through this loss term, the model can continuously focus on the segmentation difficult region (such as the lesion edge, low-enhanced area or artifact interference area), achieving fine optimization of local details, thereby further improving the boundary accuracy and clinical usability of the segmentation result.

[0028] Step (4): inference on the image to be segmented; For a new three-dimensional image of the liver ROI to be segmented, first input the trained denoising autoencoder to extract its multi-scale prior anatomical features F1-F4; then input the original image and these prior features into the trained three-dimensional attention-enhanced segmentation network to output a high-precision liver lesion segmentation result.

[0029] As a possible implementation, the embodiment provides an image processing instance: Data acquisition and preprocessing: 500 cases of abdominal contrast-enhanced CT scan data from three first-class hospitals are collected, covering different equipment manufacturers (GE, Siemens, Philips) and different scanning protocols (slice thickness 1-3 mm, voltage 80-140 kV, and different reconstruction algorithms) to improve the model's generalization ability. Image format: the original data is in DICOM format, and the spatial resolution ranges from 0.6x0.6x1.0mm³ to 0.9x0.9x3.0mm³.

[0030] Liver ROI extraction: use a publicly available high-performance liver segmentation model (such as the nnU-Net pre-trained model) to automatically extract the liver region from all 500 CT images to generate a liver mask; for the 23 cases that failed to segment, a radiology resident physician manually corrects them.

[0031] Lesion annotation: Two chief radiologists with more than 10 years of experience annotated liver lesions (including hepatocellular carcinoma, metastasis, hemangioma, etc.) in 50 images layer by layer to generate binary lesion masks as the supervised training set; the remaining 450 images only retained the liver ROI to form the unsupervised training set.

[0032] Data standardization: Intensity normalization (window width [-100, 400] HU) was performed on all liver ROI images, and they were resampled to a uniform size of 128x128x64 (isotropic voxel size of about 1.5 mm3) using bilinear interpolation.

[0033] Unsupervised autoencoder training: A three-dimensional convolutional denoising autoencoder was constructed. The encoder contained 4 resolution modules (channel numbers were 32→64→128→256 in turn), each module contained two layers of 3D convolution (kernel 3x3x3), GroupNorm, and ReLU; the middle was down-sampled through 3 2x2x2 max pooling. Noise injection: Gaussian noise with a mean of 0 and a standard deviation of 0.1 was added to the input image to simulate clinical image noise. Training settings: The Adam optimizer (learning rate 1e−3, β1=0.9, β2=0.999) was used, the batch size was 4, and the training was performed for 100 epochs; the loss function was mean square error (MSE). Output features: After training, four levels of prior anatomical features {F1, F2, F3, F4} could be extracted for any liver ROI input, corresponding to the original resolution, 1 / 2, 1 / 4, and 1 / 8 scales, respectively, containing anatomical semantics from local texture to overall morphology.

[0034] Segmentation network training: Network architecture: A three-dimensional attention-enhanced segmentation network was constructed, containing 7 resolution modules, 3 up / down sampling layers, 1 hierarchical three-dimensional attention module (based on multi-head 3D self-attention, number of heads = 8), and a Sigmoid output layer. Feature fusion strategy: In the encoding stage, the original image or intermediate feature map was concatenated with the corresponding level of prior features Fi in the channel dimension before being input into the resolution module.

[0035] Loss function: A composite loss was used: The Dice loss alleviated the extreme imbalance between positive and negative samples; The focal cross-entropy (focus parameter γ = 2) strengthened the learning of low confidence areas; The hard region adaptive loss dynamically mined voxels with large segmentation errors (threshold set to 0.5); Total loss: .

[0036] Training details: Input size 128x128x64, batch size 2, learning rate 5e−4, training 200 epochs, early stopping mechanism monitoring validation set Dice.

[0037] Finally, the independent test set (80 CT data from the fourth hospital that did not participate in training) was inferred: Extract the liver ROI; input the trained autoencoder to obtain {F1, F2, F3, F4}; input the original image and prior features into the segmentation network to output the lesion probability map; the probability map is binarized by threshold 0.5 to obtain the final segmentation result. Evaluation indicators: Dice coefficient, sensitivity (Recall), 95% Hausdorff distance (HD95). The experimental results are shown in Table 1:

[0038] Subgroup analysis: For micro lesions with a diameter of <1 cm (a total of 37), the Dice of this method was 76.4%, significantly better than nnU-Net (63.8%) and 3D U-Net (58.1%), proving its advantage in identifying small, low-contrast lesions.

[0039] As a possible implementation, the embodiment provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor implements a multi-scale anatomical prior and attention enhanced liver lesion segmentation method when executing the program.

[0040] As a possible implementation, the embodiment provides a computer readable storage medium having a computer program stored thereon, and the program is executed by a processor to implement a multi-scale anatomical prior and attention enhanced liver lesion segmentation method.

[0041] The above specific embodiments further illustrate the purpose, technical solutions and advantages of the present application. It should be understood that the above description is only a specific embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. within the spirit and principles of the present application should be included in the protection scope of the present application.

Claims

1. A method for multi-scale anatomical prior and attention enhanced liver lesion segmentation, comprising: The method comprises the following specific steps: obtaining an unsupervised training data set and a supervised training data set of original images; inputting the unsupervised training data set into a three-dimensional convolutional denoising autoencoder for image reconstruction training to obtain a trained denoising autoencoder model; inputting the supervised training data set into the trained denoising autoencoder model to obtain prior anatomical features of each image at four different resolution levels; constructing a 3D attention-enhanced segmentation network, inputting the prior anatomical features and the original image into the 3D attention-enhanced segmentation network for network training: inputting the original image and the prior anatomical features of the corresponding resolution into the network after being spliced in the channel dimension, the network outputs a liver lesion probability map based on the attention mechanism according to the image details and the anatomical prior, calculates the loss and reversely propagates, and outputs a trained segmentation model; inputting a three-dimensional image of a liver region to be segmented into the denoising autoencoder model to obtain prior anatomical features of the liver region to be segmented, inputting the prior anatomical features of the liver region to be segmented and the original image of the corresponding liver region to be segmented into the trained segmentation model to generate a liver lesion segmentation result.

2. The multi-scale anatomical prior and attention enhanced liver lesion segmentation method of claim 1, wherein, The obtaining step of the unsupervised training data set and the supervised training data set comprises: extracting a liver region of interest from abdominal CT / MRI cross-sectional images to obtain a liver ROI image; annotating the liver region of interest with lesions to generate a corresponding binary mask, which constitutes the supervised training data set; the unlabeled samples in the liver region of interest constitute the unsupervised training data set.

3. The multi-scale anatomical prior and attention enhanced liver lesion segmentation method of claim 2, wherein, The inputting of the unsupervised training data set into the three-dimensional convolutional denoising autoencoder for image reconstruction training specifically comprises: before each training iteration, randomly adding Gaussian noise to the input liver ROI image through a noise generation module to obtain a noisy image; inputting the noisy image into an encoder module, the encoder being composed of 4 resolution modules and 3 three-dimensional maximum pooling layers alternately stacked, and gradually extracting and down-sampling the input image to obtain multi-scale features with semantic levels; inputting the deepest features output by the encoder into a decoder module, the decoder adopting a structure symmetrical to the encoder, and gradually up-sampling through three-dimensional transpose convolution to reconstruct an image with the same size as the original image; using a loss module to calculate the mean square error loss between the reconstructed image and the original noise-free image, and updating the network parameters by minimizing the loss, to complete the image reconstruction training of the denoising autoencoder.

4. The multi-scale anatomical prior and attention enhanced liver lesion segmentation method of claim 1, wherein, The 3D attention-enhanced segmentation network specifically comprises: at least 7 resolution modules, wherein the resolution module comprises two layers of three-dimensional convolution, group normalization and ReLU activation function, and is used for gradually extracting multi-scale spatial features; 3 three-dimensional maximum pooling layers, the pooling kernel and 3 three-dimensional deconvolution layers constituting an encoder-decoder symmetrical structure; 1 hierarchical three-dimensional attention module, which is deployed at the lowest resolution layer of the encoder and is used for integrating multi-head three-dimensional self-attention mechanism and feedforward neural network; 1 output layer: composed of a single layer of three-dimensional convolution and a Sigmoid function, and used for outputting a single-channel lesion probability map; 1 segmentation loss module: adopting multi-loss weighted combination.

5. The multi-scale anatomical prior and attention enhanced liver lesion segmentation method according to claim 3 or 4, characterized in that, Each resolution module comprises: Two consecutive three-dimensional convolution layers, a group normalization layer and a ReLU activation function are sequentially connected; The maximum pooling layer adopts a three-dimensional maximum pooling operation with a step size of 2 and a kernel size of 2*2*2 The three-dimensional deconvolution layer adopts a transpose convolution operation with a step size of 2 and a kernel size of 2*2*2.

6. The multi-scale anatomical prior and attention enhanced liver lesion segmentation method of claim 1 or 4, wherein, The 3D attention enhanced segmentation network is trained, specifically including: Four prior anatomical features F1, F2, F3 and F4 of different resolution levels are obtained from the trained denoising autoencoder model, wherein F1 has the highest resolution and F4 has the lowest resolution; The original image and the prior anatomical feature F1 of the corresponding resolution are spliced in the channel dimension to input the first resolution module, and a feature map E1 is obtained; the feature map E1 enters the first maximum pooling layer to obtain a feature map P1; The feature map P1 and the prior anatomical feature F2 are spliced to input the second resolution module, and a feature map E2 is obtained; the feature map E2 enters the second maximum pooling layer to obtain a feature map P2; The feature map P2 and the prior anatomical feature F3 are spliced to input the third resolution module, and a feature map E3 is obtained; the feature map E3 enters the third maximum pooling layer to obtain a feature map P3; The feature map P3 and the prior anatomical feature F4 are spliced to input the fourth resolution module, and a feature map E4 is obtained; the feature map E4 is input into the hierarchical three-dimensional attention module to obtain an enhanced feature map A4; The enhanced feature map A4 is input into the first three-dimensional deconvolution layer to obtain an up-sampling feature map U1; U1 and the feature map E3 are spliced to input the fifth resolution module to obtain a feature map D1; The feature map D1 is input into the second three-dimensional deconvolution layer to obtain an up-sampling feature map U2; U2 and the feature map E2 are spliced to input the sixth resolution module to obtain a feature map D2; The feature map D2 is input into the third three-dimensional deconvolution layer to obtain an up-sampling feature map U3; U3 and the feature map E1 are spliced to input the seventh resolution module to obtain a feature map D3; the feature map D3 enters the output layer module to obtain a predicted mask; The predicted mask and the real mask are input into the segmentation loss module to calculate the segmentation loss value, and back propagation is performed to train the network.

7. The multi-scale anatomical prior and attention enhanced liver lesion segmentation method of claim 1, wherein, The segmentation loss is composed of a Dice loss term, a focal cross-entropy loss term and a difficult segmentation region adaptive loss term; The Dice loss term is used to ensure the coincidence degree of the overall segmentation region; The focal cross-entropy loss term is used to strengthen the attention to low confidence or easy-to-mistakenly-classified voxels; The difficult segmentation region adaptive loss term is used to dynamically focus on difficult regions with large prediction errors in the current training round.

8. The multi-scale anatomical prior and attention enhanced liver lesion segmentation method of claim 7, wherein, The Dice loss calculation process specifically includes: Input the to-be-segmented image into the constructed segmentation network to obtain the predicted probability of each voxel belonging to the foreground; Each voxel is labeled as foreground or background according to the real mask to obtain the corresponding binary label; For foreground voxels, the power of the predicted probability minus 1 is used as the dynamic weight, and for background voxels, the power of the predicted probability is used as the dynamic weight, respectively reducing the contribution of high-confidence easy-to-segment samples; The weighted foreground branch loss value and the background branch loss value are added and averaged to obtain the focal cross-entropy loss value.

9. The multi-scale anatomical prior and attention enhanced liver lesion segmentation method of claim 7, wherein, The focal point cross-entropy calculation process specifically comprises the following steps. The image to be segmented is input into the constructed segmentation network to obtain a predicted probability of each voxel belonging to the foreground; Each voxel is marked as foreground or background according to a real mask to obtain a corresponding binary label; Point-by-point product sums, predicted probability squares and real label squares of the predicted probability and the real label are calculated respectively; The Dice loss value is obtained by dividing the double product sum by the sum of the predicted square sum and the real square sum, and then subtracting the quotient by a constant.

10. The multi-scale anatomical prior and attention enhanced liver lesion segmentation method of claim 7, wherein, The difficult segmentation region adaptive loss calculation process specifically comprises the following steps. The image to be segmented is input into the constructed segmentation network to obtain a predicted confidence of each voxel; Difficult segmentation region sets for this round of training are formed by dynamically screening voxels with errors exceeding a preset threshold according to the error between the current predicted confidence and the real label; The voxels in the difficult segmentation region set are subjected to weighted cross-entropy calculation alone to obtain a difficult segmentation region adaptive loss value.

Citation Information

Cited By

  • Anatomical correlation prior driven intracranial hematoma segmentation method and system

    CN122244077A