Medical image segmentation method and system based on local moran index residual block
The UNet model with local Moran index residual blocks solves the problems of insufficient spatial autocorrelation feature modeling and inadequate multi-scale information fusion in traditional CNNs for shoulder MRI image segmentation. It achieves accurate segmentation of shoulder anatomical structures, improves segmentation accuracy and robustness, and is suitable for intelligent diagnosis and treatment of shoulder joint diseases.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- WUHAN UNIV
- Filing Date
- 2026-04-01
- Publication Date
- 2026-07-10
AI Technical Summary
Traditional CNNs suffer from insufficient modeling of spatial autocorrelation features and inadequate fusion of multi-scale spatial information in shoulder MRI image segmentation, resulting in loss of detail or blurred boundaries at key anatomical structure boundaries and insufficient segmentation accuracy.
A UNet model based on local Moran's index residual blocks is adopted. Through local Moran's index feature extraction unit and multi-scale feature fusion module, combined with encoder-decoder architecture, accurate segmentation of shoulder MRI images is achieved, fully capturing the spatial autocorrelation features in the images and adaptively integrating spatial information at different scales.
It improves the accuracy and robustness of shoulder MRI image segmentation, reduces boundary blurring and false positives or false negatives, enhances the model's adaptability and generalization ability to complex shoulder anatomy, and supports the development of more scientific diagnosis and treatment plans for shoulder joint diseases.
Smart Images

Figure CN122368074A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of intelligent medical image segmentation technology, and relates to a UNet model for shoulder MRI image segmentation based on local Moran's index residual blocks, specifically to a medical image segmentation method and system based on local Moran's index residual blocks. Background Technology
[0002] In the field of shoulder MRI (Magnetic Resonance Imaging) image segmentation, accurate segmentation of key anatomical structures such as the rotator cuff muscles, glenohumeral joint, and labrum is crucial. This provides key decision-making support for the clinical diagnosis, surgical planning, and efficacy evaluation of shoulder injuries (such as rotator cuff tears and supraspinatus tendon ruptures). Currently, UNet and its variant models based on deep learning are the mainstream methods for this type of segmentation task. In these methods, Convolutional Neural Networks (CNNs) serve as the core feature extraction module, aiming to extract local texture, grayscale, and other features from shoulder MRI images to construct effective feature representations for subsequent segmentation tasks.
[0003] However, as a core feature extraction module in the segmentation process of shoulder MRI images, traditional CNNs exhibit two key shortcomings in practical applications: (1) Insufficient modeling of spatial autocorrelation features: Traditional CNNs mainly rely on convolution operations to extract local grayscale and texture features, and have limited ability to capture the inherent spatial autocorrelation features in shoulder MRI images (such as the spatial distribution patterns of small and narrow structures like bursae and supraspinatus tendons, and the spatial aggregation patterns of rotator cuff muscles). If the model cannot make full use of the spatial distribution information of the image, even if feature extraction is completed, the segmentation results may still have problems with loss of details or blurred boundaries at the boundaries of key anatomical structures such as bursae and supraspinatus tendons, resulting in insufficient segmentation accuracy.
[0004] (2) Insufficient fusion of multi-scale spatial information: Although the skip connections of the traditional UNet model can fuse convolutional features of different scales, they do not fully consider the differences in spatial autocorrelation features at different scales and cannot adaptively integrate multi-scale spatial information. The lack of this key capability may impair the model's segmentation accuracy and robustness for anatomical structures of different sizes and locations. In particular, in complex anatomical structures such as shoulder MRI, problems such as incomplete segmentation, false positives, or false negatives of small and narrow structures such as bursae and supraspinatus tendons are likely to occur.
[0005] Therefore, there is an urgent need to develop a new shoulder MRI image segmentation model. Summary of the Invention
[0006] The purpose of this invention is to provide a shoulder MRI image segmentation model based on local Moran's index residual blocks. By deeply extracting and adaptively fusing the spatial autocorrelation features of the images, it achieves precise segmentation of shoulder anatomical structures (deltoid, clavicle, acromion, bursa, supraspinatus, supraspinatus tendon, humeral head, and glenoid cavity), thereby improving the accuracy and robustness of shoulder MRI image segmentation. This model needs to fully capture the spatial autocorrelation features in the images during the feature extraction stage, and adaptively integrate spatial information at different scales during the multi-scale feature fusion stage. This is of great significance for improving the accuracy of shoulder MRI image segmentation, thus supporting more scientific and reliable diagnosis of shoulder joint diseases and the formulation of treatment plans.
[0007] To achieve the above objectives, the present invention provides the following technical solution: a method for segmenting shoulder MRI images based on local Moran's index residual blocks, comprising the following steps: Construction and preprocessing of shoulder MRI image dataset; A spatial autocorrelation feature extraction unit based on the local Moran index is constructed, denoted as LocalMoran2D unit, to quantify the spatial clustering pattern of anatomical structures in the image and output a local Moran index feature map. Based on the LocalMoran2D unit, a multi-scale local Moran index feature fusion module was built to realize the fusion and extraction of spatial autocorrelation features in different neighborhoods; By integrating a convolutional feature extraction unit, a multi-local Moran index feature fusion module, and a feature projection layer, a residual fusion block based on multi-scale local Moran features is constructed to achieve adaptive fusion of convolutional features and spatial autocorrelation features. A symmetric encoder-decoder architecture is adopted, with residual fusion blocks as the core feature extraction unit to replace the convolutional blocks of traditional UNet. A UNet segmentation model based on local Moran index residual blocks is constructed. Specifically, the encoder extracts deep semantic features through residual fusion blocks, the decoder recovers detailed information through upsampling and skip connections, and the terminal convolution generates a segmentation probability map with the same size as the input, achieving pixel-level segmentation of anatomical structures. The UNet segmentation model is trained using the preprocessed dataset, and the segmentation results are obtained using the trained model.
[0008] Furthermore, shoulder MRI images containing eight key anatomical sites—deltoid, clavicle, acromion, bursa, supraspinatus, supraspinatus tendon, humeral head, and glenoid fossa—were acquired as raw images and preprocessed as follows: pixel-level precise annotation of the eight key anatomical sites was achieved, generating corresponding segmentation labels; the annotated and qualified images were randomly divided into training and validation sets according to a certain ratio; resampling and grayscale normalization were performed on all images sequentially to unify the image size and map the grayscale values to... Interval; perform data augmentation operations on the training set images, including random 90° rotation, horizontal flipping, and vertical flipping.
[0009] Furthermore, the specific operations for obtaining the local Moran's I feature map include: Initialization of the neighborhood weight matrix: Initialize the neighborhood weight matrix as a matrix of all 1s, remove the weight of the central pixel in the matrix and set it to 0 to avoid interference of the central pixel on the calculation of its own neighborhood spatial autocorrelation features; Optimization processing of the weight matrix: Normalize the neighborhood weight matrix, or set the neighborhood weight matrix as a learnable parameter to adaptively adjust the neighborhood weights during the training process; Calculation of spatial autocorrelation features: Input the preprocessed shoulder MRI image feature map into the LocalMoran2D unit. First, calculate the global mean and the second-order central moment for each channel: where
[0010] is the normalized eigenvalue of pixel , and is the number of pixels in the channel; Subsequently, calculate the pixel residual , and apply the neighborhood weight to the residual, calculate the pixel-level weighted sum through convolution operation, and finally output the local Moran's I feature map:
[0011] where is the local Moran's I of pixel , and are the feature residuals of pixels and respectively, is the weight value between pixel and its neighborhood pixel .
[0012] Furthermore, the specific implementation of building a multi-scale local Moran's I feature fusion module includes: Parallel deployment of multi-scale units: Based on the LocalMoran2D unit, construct a multi-branch parallel multi-scale spatial autocorrelation feature extraction structure, and set LocalMoran2D units with neighborhood window sizes of K1, K2, and K3 respectively, corresponding to small, medium, and large spatial receptive fields, where K1 < K2 < K3; Through parallel processing of different receptive fields, adapt to the spatial feature extraction requirements of different-sized anatomical structures in shoulder MRI images, and achieve multi-scale capture of local spatial autocorrelation features; Multi-scale feature splicing and fusion: The local Moran index feature maps output from three different neighborhood receptive fields are spliced along the channel dimension to form a multi-scale spatial autocorrelation feature set.
[0013] Furthermore, the residual fusion block based on multi-scale local Moran features specifically includes: Module component integration: The residual fusion block integrates convolutional units, multi-scale local Moran's exponential feature fusion modules, and 1×1 convolutional projection layers. The convolutional unit consists of two 3×3 convolutional layers and a ReLU activation function, used to extract convolutional texture and grayscale features of the image. The 1×1 convolutional projection layer is used for feature dimension reduction and fusion, realizing the integration of multi-scale features and effective compression of high-dimensional features, thereby providing robust feature representation for subsequent residual adaptive fusion. Dual Feature Extraction: The features of the input shoulder MRI image or the fused shoulder MRI image are simultaneously input into a convolutional unit and a multi-scale local Moran's index feature fusion module. The convolutional unit extracts convolutional texture and grayscale features. Simultaneously, multi-scale Moran feature extraction is performed on the features output by the convolutional unit and the original input features of the module, respectively, to obtain the spatial autocorrelation features of the convolutional features and the spatial autocorrelation features of the original input features. Feature concatenation and dimensionality adaptation: The two types of spatial autocorrelation features mentioned above are concatenated along the channel dimension and input into a 1×1 convolutional projection layer to map the high-dimensional spatial autocorrelation features to the convolutional features. By using the same channel dimension, the fusion barrier caused by differences in channel dimension is eliminated, and the fusion spatial autocorrelation feature is output. ; Residual adaptive fusion: Introducing learnable fusion weight parameters A residual connection structure is constructed, and the convolutional texture and grayscale features are weighted and fused with the fusion spatial features to output the final fused feature map. The specific calculation formula is as follows: ,in The fused feature map The model will learn adaptively during training to achieve dynamic fusion of convolutional features and spatial autocorrelation features.
[0014] Furthermore, the encoder is composed of N levels of residual fusion blocks and max pooling layers alternately. The max pooling layer downsamples the output feature map of the previous level, thereby halving the feature map size and doubling the number of channels, thus gradually extracting the deep semantic features of the shoulder MRI image. At the same time, the feature map before each downsampling level is retained for the skip connection of the decoder and for restoring spatial details in the upsampling stage.
[0015] Furthermore, the decoder is composed of N levels of residual fusion blocks and bilinear upsampling layers alternately. The number of input channels of each residual fusion block is the sum of the number of feature channels at the corresponding encoder level and the number of output channels of the previous decoder. The size of the previous level feature map is restored by bilinear upsampling, and the upsampling result is concatenated with the retained features of the corresponding layer of the encoder in the channel dimension. The input to the residual fusion block completes feature fusion to gradually restore image details and realize the mapping from deep semantic features to pixel-level segmentation features. Furthermore, a combined loss function is used as the training objective function for the UNet segmentation model to impose pixel-level classification constraints, region overlap constraints, boundary constraints, and spatial autocorrelation consistency constraints on the segmentation results. The combined loss function is defined as follows:
[0016] in, For binary cross-entropy loss, For Dice similarity coefficient loss, For boundary constraint loss, This represents the spatial autocorrelation consistency loss. These represent the weighting coefficients for each component of the loss; Binary cross-entropy loss Used for pixel-level classification supervision of the output segmentation map; assuming the original predicted value of the i-th pixel in the output is... The predicted probability after Sigmoid activation is The actual label is The binary cross-entropy loss is defined as:
[0017] in, Total number of pixels; Dice similarity coefficient loss This is used to measure the degree of overlap between the predicted segmented region and the ground truth labeled region, thereby mitigating the problem of foreground-background class imbalance; assuming the predicted probability map is... The actual labeled image is The Dice similarity coefficient loss is defined as:
[0018] in, This is a smoothing term used to prevent the denominator from being zero; Boundary constraint loss This is used to enhance the consistency between the segmentation boundary and the true boundary; firstly, local neighborhood boundaries are extracted from the predicted probability map and the true labeled map respectively, and a predicted boundary map is constructed. and true boundary map Then, the binary cross-entropy loss is calculated for the predicted boundary map and the true boundary map:
[0019] Spatial autocorrelation consistency loss To ensure consistency between the predicted results and the ground truth annotations in local spatial autocorrelation patterns, thereby enhancing the model's ability to represent local clustering structures and spatial distribution patterns; specifically, the predicted probability map and the ground truth annotation map are input into the multi-scale local Moran's index feature fusion module to calculate the corresponding multi-scale local spatial autocorrelation feature maps. and Furthermore, the consistency loss between the predicted Moran feature map and the real Moran feature map is calculated. The loss is calculated as follows: .
[0020] The present invention also provides a shoulder MRI image segmentation system based on local Moran's index residual blocks, including a processor and a memory. The memory is used to store program instructions, and the processor is used to call the program instructions in the memory to execute the shoulder MRI image segmentation method based on local Moran's index residual blocks as described in the above technical solution.
[0021] The present invention also provides a computer-readable storage medium, including a readable storage medium on which a computer program is stored, wherein when the computer program is executed, it implements the shoulder MRI image segmentation method based on local Moran's index residual blocks as described in the above technical solution.
[0022] This invention effectively quantifies the spatial clustering patterns of key anatomical structures in shoulder MRI images by introducing multi-scale local Moran's index features, achieving precise characterization of eight types of structures: deltoid, clavicle, acromion, bursa, supraspinatus, supraspinatus tendon, humeral head, and glenoid cavity. This method overcomes the shortcomings of traditional convolutional neural networks in modeling spatial autocorrelation information, enabling the model to fully capture the spatial distribution features of small, elongated structures during the feature extraction stage.
[0023] By constructing a residual fusion block based on the multi-scale local Moran index, this invention achieves adaptive fusion of convolutional features and spatial autocorrelation features, promotes the integration of spatial information at different scales, improves the segmentation accuracy of anatomical structures of different sizes and shapes, and reduces boundary blurring, loss of details, and false positives or false negatives.
[0024] This invention deeply embeds residual Moran feature modules into the UNet architecture, and enhances the utilization of spatial features at each level of the encoder-decoder, thereby improving the model's adaptability and generalization ability to complex shoulder anatomy and making the segmentation results more robust and reliable in clinical applications.
[0025] Furthermore, the MoranUNet model constructed in this invention can achieve end-to-end automatic segmentation of shoulder MRI images without additional spatial statistical preprocessing. It has the advantages of convenient deployment and high computational efficiency, and is suitable for rapid clinical diagnosis and surgical planning. It has important application value for improving the level of intelligent diagnosis and treatment of shoulder joint diseases. Attached Figure Description
[0026] Figure 1 This is a flowchart illustrating an embodiment of the present invention; Figure 2 A schematic diagram of the network structure of the segmentation model established in this invention; Figure 3 The images shown are the original shoulder MRI images used in the embodiments of the present invention and schematic diagrams of eight key anatomical regions outlined by experts. Figure 4 This is a diagram showing the segmentation results of eight key anatomical regions in shoulder MRI images obtained based on the present invention. Detailed Implementation
[0027] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments. The illustrative embodiments and descriptions are for explaining the present invention only and are not intended to limit the present invention.
[0028] This invention provides a method for segmenting shoulder MRI images based on local Moran's index residual blocks, the operation process and network structure of which are shown in the attached figure. Figure 1 and attached Figure 2 As shown, the method includes the following steps: S1: Acquire shoulder MRI images containing eight key anatomical sites, including the deltoid, clavicle, acromion, bursa, supraspinatus, supraspinatus tendon, humeral head, and glenoid cavity, as raw images. Based on these raw images, complete dataset construction and standardized preprocessing. Specific operations include: (1) Image inclusion criteria: The selected shoulder MRI images must clearly show eight key anatomical sites, have no serious motion artifacts, uneven scan layer thickness or other quality problems, and cover samples of different ages and genders to ensure the diversity and representativeness of the dataset; (2) Pixel-level annotation: Two or more attending radiologists manually delineate the original images to achieve pixel-level accurate annotation of eight key anatomical sites, generating corresponding segmentation label maps as shown in the appendix. Figure 3 As shown, the original images and segmentation label maps are included in the dataset; (3) Data set partitioning: The labeled qualified images are randomly divided into training set and validation set in a ratio of 7:3 for model training, parameter tuning and performance verification. (4) Standardization processing: Resampling and grayscale normalization operations are performed on all images sequentially to unify the image size to 512×512 pixels, and the grayscale values are mapped to Interval. Assume that for each interval belonging to the channel... pixels Pixel value Its normalized calculation formula is:
[0029] in, and They represent channels respectively. The pixel mean and standard deviation, These are the normalized pixel values; (5) Data augmentation: Data augmentation operations are performed only on the training set images, including random 90° rotation, horizontal flipping, and vertical flipping, to improve the generalization ability of the model. The validation set is only subjected to the above standardization processing. Finally, the standardized shoulder MRI image dataset for model training and validation is constructed.
[0030] S2: Using the local Moran index as the core, a spatial autocorrelation feature extraction unit, LocalMoran2D, is constructed to achieve quantitative representation of the spatial aggregation patterns of anatomical structures. Specific operations include: (1) Initialization of neighborhood weight matrix: Initialize the neighborhood weight matrix as an all-1 matrix, remove the weight of the center pixel of the matrix and set it to 0, so as to avoid the interference of the center pixel on the calculation of its own neighborhood space autocorrelation features; (2) Weight matrix optimization: To ensure that the weighted summation of neighborhood features can be calculated using the mean, the neighborhood weight matrix needs to be optimized. Normalization. Assume the neighborhood contains... If there are 100 pixels, then the normalization formula is:
[0031] in Represents pixels The initial weights, To prevent the minimum value of denominator 0 (in this experimental example, we take...) ).
[0032] Furthermore, the weight matrix can be set as a learnable parameter, and the model can adaptively adjust the neighborhood weights during training to better adapt to the spatial distribution characteristics of MRI images, thereby enhancing the expressive power of the local Moran index in the extraction of spatial autocorrelation features. (3) Spatial autocorrelation feature calculation: The preprocessed shoulder MRI image feature map is input into the LocalMoran2D unit, and the global mean of each channel is calculated first. and second-order central moments :
[0033] in, For pixels The normalized eigenvalues, This represents the number of pixels within the channel. The pixel residual is then calculated. and neighborhood weights Applied to residuals, pixel-level weighted sums are calculated through convolution operations, ultimately outputting local Moran index feature maps:
[0034] in, For pixels The local Moran index, and Pixels and Characteristic residuals, For pixels With neighboring pixels The weight value.
[0035] S3: Based on the LocalMoran2D unit constructed in S2, a multi-scale local Moran index feature fusion module, MultiScaleMoranFeature, is built to achieve the fusion and extraction of spatial autocorrelation features in different neighborhoods. Specific operations include: (1) Parallel Deployment of Multi-Scale Units: Based on the LocalMoran2D unit, a multi-branch parallel multi-scale spatial autocorrelation feature extraction structure is constructed. LocalMoran2D units with neighborhood window sizes of 3, 5, and 7 are set respectively, corresponding to small, medium, and large spatial receptive fields. Through parallel processing of different receptive fields, the module can adapt to the spatial feature extraction requirements of different sized anatomical structures in shoulder MRI images, and realize multi-scale capture of local spatial autocorrelation features.
[0036] (2) Multi-scale feature splicing and fusion: The local Moran index feature maps output from three different neighborhood receptive fields are spliced along the channel dimension to form a multi-scale spatial autocorrelation feature set. This set can comprehensively characterize the spatial distribution features of eight key anatomical structures at different neighborhood scales, providing rich spatial information support for subsequent residual fusion blocks and deep feature fusion, and enhancing the model's ability to express complex anatomical structures and its segmentation accuracy.
[0037] S4: Integrating convolutional feature extraction units, multi-local Moran index feature fusion modules, and feature projection layers, a residual fusion block ResidualMoranBlock based on multi-scale local Moran features is constructed to achieve adaptive fusion of convolutional features and spatial autocorrelation features. Specific operations include: (1) Module component integration: In the residual fusion block, convolutional units, multi-scale local Moran's exponential feature fusion module (step S3) and 1×1 convolutional projection layer are integrated. The convolutional unit consists of two 3×3 convolutional layers and a ReLU activation function, which are used to extract the convolutional texture and grayscale features of the image; the 1×1 convolutional projection layer is used for feature dimension reduction and fusion, realizing the integration of multi-scale features and effective compression of high-dimensional features, thereby providing robust feature representation for subsequent residual adaptive fusion; (2) Dual feature extraction: The shoulder MRI image or the fused shoulder MRI image features input to the module (if it is the first layer ResidualMoranBlock, the input is the shoulder MRI image, but the input of the subsequent layers is the fused shoulder MRI image features) are simultaneously input to the convolutional unit and the multi-scale local Moran index feature fusion module, and the convolutional texture and grayscale features are extracted through the convolutional unit. Simultaneously, multi-scale Moran feature extraction is performed on the features output by the convolutional unit and the original input features of the module, respectively, to obtain the spatial autocorrelation features of the convolutional features and the spatial autocorrelation features of the original input features. (3) Feature concatenation and dimensionality adaptation: The two types of spatial autocorrelation features mentioned above are concatenated along the channel dimension and input into a 1×1 convolutional projection layer to map the high-dimensional spatial autocorrelation features to the convolutional features. With the same channel dimension, the fusion barrier caused by differences in channel dimension is eliminated, and the fused spatial features are output. ; (4) Residual adaptive fusion: Introduce learnable fusion weight parameters (In this example, the initial value is set to 0). A residual connection structure is constructed, and the convolutional texture and grayscale features are weighted and fused with the fusion spatial features to output the final fused feature map. The core calculation formula is as follows: ,in The fused feature map The model will learn adaptively during training to achieve dynamic fusion of convolutional features and spatial autocorrelation features.
[0038] S5: Employing an encoder-decoder symmetric architecture, the residual fusion block constructed in S4 is used as the core feature extraction unit, replacing the convolutional blocks of the traditional UNet, to construct a UNet segmentation model (MoranUNet) based on local Moran exponential residual blocks. The model network structure is attached. Figure 2 As shown, the specific operations include: (1) Network basic configuration: Configure five levels of feature channels, namely 64, 128, 256, 512 and 1024 respectively, to adapt to the feature extraction requirements of shoulder MRI images from superficial details to deep semantics; (2) Encoder construction: The encoder consists of five levels (the number of levels can be appropriately selected according to the image size) of residual fusion blocks alternating with 2×2 max pooling layers. The number of output channels for each level of residual fusion block is 64, 128, 256, 512 and 1024 respectively. The max pooling layer downsamples the output feature map of the previous level with a stride of 2, thereby halving the feature map size and doubling the number of channels, thus gradually extracting the deep semantic features of the shoulder MRI image. At the same time, the feature map before each downsampling is retained for the skip connections of the decoder, so as to restore spatial details in the upsampling stage; (3) Decoder Construction: The decoder consists of alternating five-level residual fusion blocks and 2×2 bilinear upsampling layers. The number of input channels for each level of residual fusion block is the sum of the number of feature channels at the corresponding encoder level and the number of output channels of the previous decoder. The size of the previous level feature map is restored through bilinear upsampling, and the upsampling result is concatenated with the preserved features of the corresponding layer of the encoder in the channel dimension, and input to the residual fusion block to complete feature fusion. This process gradually restores image details, realizing the mapping from deep semantic features to pixel-level segmentation features; (4) Output layer settings: At the last output stage of the decoder, a 1×1 convolutional layer is set to map the 1024-channel fusion features into 8 channels (corresponding to eight key anatomical structures: deltoid, clavicle, acromion, bursa, supraspinatus, supraspinatus tendon, humeral head and glenoid cavity). The output is a segmentation probability map with the same size as the input image, where each pixel value represents the probability that the pixel belongs to the corresponding anatomical structure, thus achieving pixel-level anatomical structure segmentation.
[0039] S6: Based on the standardized dataset constructed in S1, end-to-end training of the MoranUNet model in S5 is performed to optimize and solidify the model parameters. Specific operations include: (1) Loss function and optimizer configuration: A combined loss function is used as the training objective function for the MoranUNet model, applying pixel-level classification constraints, region overlap constraints, boundary constraints, and spatial autocorrelation consistency constraints to the segmentation results. The total loss function is defined as follows:
[0040] in, For binary cross-entropy loss, For Dice similarity coefficient loss, For boundary constraint loss, This represents the spatial autocorrelation consistency loss. These represent the weighting coefficients for each sub-item of loss.
[0041] Binary cross-entropy loss Used for pixel-level classification supervision of the output segmentation map. Assume the original predicted value of the i-th pixel in the output is... The predicted probability after Sigmoid activation is The actual label is The binary cross-entropy loss is defined as:
[0042] in, The total number of pixels. This loss is used to constrain the model output to maintain consistency with the true label at the individual pixel level.
[0043] Dice similarity coefficient loss This is used to measure the degree of overlap between the predicted segmented region and the ground truth labeled region, thereby mitigating the problem of foreground and background class imbalance. Assume the predicted probability map is... The actual labeled image is The Dice similarity coefficient loss is defined as:
[0044] in, This is a smoothing term used to prevent the denominator from being zero. This loss enhances the model's focus on small target regions and narrow structural regions.
[0045] Boundary constraint loss This is used to enhance the consistency between the segmentation boundary and the ground truth boundary. First, local neighborhood boundaries are extracted from both the predicted probability map and the ground truth map to construct the predicted boundary map. and true boundary map Then, the binary cross-entropy loss is calculated for the predicted boundary map and the true boundary map:
[0046] This loss is used to focus on constraining the segmentation of edge regions, improving the segmentation quality of small, narrow structures and complex boundary regions.
[0047] Spatial autocorrelation consistency loss This is used to ensure consistency between the predicted results and the ground truth annotations in local spatial autocorrelation patterns, thereby enhancing the model's ability to represent local clustering structures and spatial distribution patterns. Specifically, the predicted probability map and the ground truth annotation map are input into the multi-scale local Moran's index feature fusion module to calculate the corresponding multi-scale local spatial autocorrelation feature maps. and The consistency loss between the predicted Moran feature map and the true Moran feature map is further calculated as follows:
[0048] This loss improves the model's ability to identify and segment small, elongated, blurred-boundary, and spatially clustered structures in shoulder MRI images by constraining the difference between the predicted results and the actual annotations in multi-scale local spatial autocorrelation patterns.
[0049] (2) Training hyperparameter settings: Set the batch size to 4 and the total number of training rounds to 50; adopt an early stopping strategy, using the intersection-over-union ratio (IoU) of the validation set as the monitoring indicator. If the IoU of the validation set does not improve for 10 consecutive rounds, the training will be terminated immediately to avoid model overfitting. (3) Learning rate scheduling strategy configuration: Configure a cosine annealing learning rate scheduler to make the model converge more stably in the later stage of training and improve the generalization ability of the model. (4) Model performance evaluation: During training, the intersection-union ratio (IoU), recall and F1 score are used as the segmentation performance evaluation indicators of the model. After each round of training, the above indicators are calculated on the validation set to monitor the segmentation effect of the model in real time. (5) Model parameter solidification and storage: After training, the model with the best IoU on the validation set is selected as the final model, and all network parameters of the model are solidified, including the neighborhood weights of the LocalMoran2D units and the fusion weights of the residual fusion blocks. The weights and biases of each convolutional layer are saved in binary file format to form a shoulder MRI image segmentation model that can be directly deployed.
[0050] S7: Input the raw MRI image of the shoulder to be segmented into the MoranUNet model constructed above to complete the precise segmentation of eight key anatomical regions. The specific operations include: (1) Model forward inference: The standardized image is input into the MoranUNet model solidified by S6. After deep semantic feature extraction by the encoder, detailed feature fusion by the decoder, and auxiliary optimization of multi-scale local Moran index features, a segmentation probability map of 512×512×8 is output. (2) Generation of segmentation results: The segmentation probability map is binarized using a probability threshold of 0.5. Pixels with a probability value greater than 0.5 are identified as the corresponding anatomical sites, and pixels with a probability value less than 0.5 are identified as the background. Finally, pixel-level segmentation results of eight key anatomical sites, namely the deltoid muscle, clavicle, acromion, bursa, supraspinatus muscle, supraspinatus tendon, humeral head, and glenoid cavity, are obtained (as shown in the attached image). Figure 4(As shown in the image). The visualization results show that MoranUNet and UNet perform similarly on relatively large and well-defined anatomical structures such as the deltoid, supraspinatus, humeral head, and glenoid cavity. However, MoranUNet demonstrates significantly superior segmentation capabilities on smaller, elongated, and complex structures such as joints, clavicles, bursae, and the supraspinatus tendon. Particularly in the bursa and supraspinatus tendon regions, UNet is almost unable to effectively identify these structures, while MoranUNet can still achieve relatively accurate localization and segmentation.
[0051] Table 1 Comparison of various model indicators
[0052] Secondly, embodiments of the present invention also provide a shoulder MRI image segmentation system based on local Moran's index residual blocks, including a processor and a memory. The memory is used to store program instructions, and the processor is used to call the program instructions in the memory to execute the shoulder MRI image segmentation method based on local Moran's index residual blocks as described in the above technical solution.
[0053] Thirdly, embodiments of the present invention also provide a computer-readable storage medium, including a readable storage medium on which a computer program is stored, wherein when the computer program is executed, it implements the shoulder MRI image segmentation method based on local Moran's index residual blocks as described in the above technical solution.
[0054] It should be understood that any parts not described in detail in this specification belong to the prior art.
[0055] It should be understood that the above description of the preferred embodiments is quite detailed, but it should not be considered as a limitation on the scope of protection of this invention. Those skilled in the art, under the guidance of this invention, can make substitutions or modifications without departing from the scope of protection of the claims of this invention, and all such substitutions or modifications fall within the scope of protection of this invention. The scope of protection of this invention should be determined by the appended claims.
Claims
1. A method for segmenting shoulder MRI images based on local Moran's index residual blocks, characterized in that, It includes the following steps: Construction and preprocessing of shoulder MRI image datasets; Construct a spatial autocorrelation feature extraction unit based on the local Moran's index, denoted as the LocalMoran2D unit, which is used to quantify the spatial aggregation pattern of anatomical structures in the image and output a local Moran's index feature map; Based on the LocalMoran2D unit, build a multi-scale local Moran's index feature fusion module to achieve the fusion extraction of spatial autocorrelation features under different neighborhoods; Integrate a convolutional feature extraction unit, a multi-local Moran's index feature fusion module, and a feature projection layer to construct a residual fusion block based on multi-scale local Moran features, and achieve the adaptive fusion of convolutional features and spatial autocorrelation features; Adopt an encoder-decoder symmetric architecture, use the residual fusion block as the core feature extraction unit to replace the convolutional block of the traditional UNet, and construct a UNet segmentation model based on the local Moran's index residual block. Specifically: the encoder extracts deep semantic features through the residual fusion block, the decoder restores detailed information through upsampling and skip connections, and the final convolution generates a segmentation probability map with the same size as the input to achieve pixel-level segmentation of anatomical structures; Use the preprocessed dataset to train the UNet segmentation model and obtain the segmentation result using the trained model.
2. The shoulder MRI image segmentation method based on local Moran's index residual blocks as described in claim 1, characterized in that: MRI images of the shoulder, including eight key anatomical sites such as the deltoid, clavicle, acromion, bursa, supraspinatus, supraspinatus tendon, humeral head, and glenoid cavity, were acquired as raw images and preprocessed as follows: pixel-level precise annotation of the eight key anatomical sites was performed to generate corresponding segmentation labels; the annotated and qualified images were randomly divided into training and validation sets according to a certain ratio; resampling and grayscale normalization were performed on all images sequentially to unify the image size and map the grayscale values to... Interval; Perform data augmentation operations on the training set images, including random 90° rotation, horizontal flip, and vertical flip.
3. The shoulder MRI image segmentation method based on local Moran's index residual blocks as described in claim 1, characterized in that: The specific operations for obtaining the local Moran's index feature map include: Initialization of the neighborhood weight matrix: Initialize the neighborhood weight matrix as a matrix of all 1s,剔除 the weight of the central pixel of the matrix and set it to 0 to avoid interference from the central pixel in the calculation of its own neighborhood spatial autocorrelation features; Weight matrix optimization: The neighborhood weight matrix... Normalization, or setting the neighborhood weight matrix as a learnable parameter, allows for adaptive adjustment of the neighborhood weights during training; Spatial autocorrelation feature calculation: The preprocessed shoulder MRI image feature map is input into the LocalMoran2D unit, and the global mean of each channel is calculated first. and second-order central moments : in, For pixels The normalized eigenvalues, The number of pixels in the channel; then the pixel residual is calculated. and neighborhood weights Applied to residuals, pixel-level weighted sums are calculated through convolution operations, ultimately outputting local Moran index feature maps: in, For pixels The local Moran index, and Pixels and Characteristic residuals, For pixels With neighboring pixels The weight value.
4. The shoulder MRI image segmentation method based on local Moran's index residual blocks as described in claim 1, characterized in that: The specific implementation of building a multi-scale local Moran's index feature fusion module includes: Parallel deployment of multi-scale units: Based on the LocalMoran2D unit, construct a multi-branch parallel multi-scale spatial autocorrelation feature extraction structure, and set LocalMoran2D units with neighborhood window sizes of K1, K2, and K3 respectively, corresponding to small, medium, and large spatial receptive fields, where K1 < K2 < K3; through parallel processing of different receptive fields, adapt to the spatial feature extraction requirements of different-sized anatomical structures in shoulder MRI images, and achieve multi-scale capture of local spatial autocorrelation features; Multi-scale feature splicing and fusion: Splice the local Moran's index feature maps output under three different neighborhood receptive fields in the channel dimension to form a multi-scale spatial autocorrelation feature set.
5. The shoulder MRI image segmentation method based on local Moran's index residual blocks as described in claim 1, characterized in that: The residual fusion block based on multi-scale local Moran features specifically includes: Integration of module components: In the residual fusion block, integrate a convolutional unit, a multi-scale local Moran's index feature fusion module, and a convolutional projection layer of 1×1; the convolutional unit consists of two 3×3 convolutional layers and an ReLU activation function, which is used to extract the convolutional texture and grayscale features of the image; the 1×1 convolutional projection layer is used for feature dimension reduction and fusion, to achieve the integration of multi-scale features and the effective compression of high-dimensional features, so as to provide a robust feature representation for subsequent residual adaptive fusion; It should be noted that the Chinese character "剔除" in the original text seems to be incorrect. I translated it as "剔除" as it was in the original, but it might need to be corrected in the original context. If it is a misspelling, it should be replaced with the correct word before translation for a more accurate result. Dual Feature Extraction: The features of the input shoulder MRI image or the fused shoulder MRI image are simultaneously input into a convolutional unit and a multi-scale local Moran's index feature fusion module. The convolutional unit extracts convolutional texture and grayscale features. Simultaneously, multi-scale Moran feature extraction is performed on the features output by the convolutional unit and the original input features of the module, respectively, to obtain the spatial autocorrelation features of the convolutional features and the spatial autocorrelation features of the original input features. Feature concatenation and dimensionality adaptation: The two types of spatial autocorrelation features mentioned above are concatenated along the channel dimension and input into a 1×1 convolutional projection layer to map the high-dimensional spatial autocorrelation features to the convolutional features. By using the same channel dimension, the fusion barrier caused by differences in channel dimension is eliminated, and the fusion spatial autocorrelation feature is output. ; Residual adaptive fusion: Introducing learnable fusion weight parameters A residual connection structure is constructed, and the convolutional texture and grayscale features are weighted and fused with the fusion spatial features to output the final fused feature map. The specific calculation formula is as follows: ,in The fused feature map The model will learn adaptively during training to achieve dynamic fusion of convolutional features and spatial autocorrelation features.
6. The shoulder MRI image segmentation method based on local Moran's index residual blocks as described in claim 1, characterized in that: The encoder consists of N levels of residual fusion blocks and max pooling layers alternately. The max pooling layer downsamples the output feature map of the previous level, thereby halving the feature map size and doubling the number of channels, thus gradually extracting the deep semantic features of the shoulder MRI image. At the same time, the feature map before each downsampling level is retained for the skip connections of the decoder and for restoring spatial details during the upsampling stage.
7. The shoulder MRI image segmentation method based on local Moran's index residual blocks as described in claim 1, characterized in that: The decoder is composed of N levels of residual fusion blocks and bilinear upsampling layers alternately. The number of input channels of each level of residual fusion block is the sum of the number of feature channels of the corresponding encoder level and the number of output channels of the previous decoder. The size of the previous level feature map is restored by bilinear upsampling, and the upsampling result is concatenated with the preserved features of the corresponding layer of the encoder in the channel dimension. The result is then input into the residual fusion block to complete feature fusion, so as to gradually restore image details and realize the mapping from deep semantic features to pixel-level segmentation features.
8. The shoulder MRI image segmentation method based on local Moran's index residual blocks as described in claim 1, characterized in that: The combined loss function is used as the training objective function for the UNet segmentation model, and pixel-level classification constraints, region overlap constraints, boundary constraints, and spatial autocorrelation consistency constraints are applied to the segmentation results. The combined loss function is defined as follows: in, For binary cross-entropy loss, For Dice similarity coefficient loss, For boundary constraint loss, This represents the spatial autocorrelation consistency loss. These represent the weighting coefficients for each component of the loss; Binary cross-entropy loss Used for pixel-level classification supervision of the output segmentation map; assuming the original predicted value of the i-th pixel in the output is... The predicted probability after Sigmoid activation is The actual label is The binary cross-entropy loss is defined as: in, Total number of pixels; Dice similarity coefficient loss This is used to measure the degree of overlap between the predicted segmented region and the ground truth labeled region, thereby mitigating the problem of foreground-background class imbalance; assuming the predicted probability map is... The actual labeled image is The Dice similarity coefficient loss is defined as: in, This is a smoothing term used to prevent the denominator from being zero; Boundary constraint loss This is used to enhance the consistency between the segmentation boundary and the true boundary; firstly, local neighborhood boundaries are extracted from the predicted probability map and the true labeled map respectively, and a predicted boundary map is constructed. and true boundary map Then, the binary cross-entropy loss is calculated for the predicted boundary map and the true boundary map: Spatial autocorrelation consistency loss To ensure consistency between the predicted results and the ground truth annotations in local spatial autocorrelation patterns, thereby enhancing the model's ability to represent local clustering structures and spatial distribution patterns; specifically, the predicted probability map and the ground truth annotation map are input into the multi-scale local Moran's index feature fusion module to calculate the corresponding multi-scale local spatial autocorrelation feature maps. and Furthermore, the consistency loss between the predicted Moran feature map and the real Moran feature map is calculated. The loss is calculated as follows: 。 9. A shoulder MRI image segmentation system based on local Moran's index residual blocks, characterized in that: It includes a processor and a memory, the memory being used to store program instructions, and the processor being used to call the program instructions in the memory to execute the shoulder MRI image segmentation method based on local Moran's index residual blocks as described in any one of claims 1-8.
10. A computer-readable storage medium, characterized in that, The method includes a readable storage medium on which a computer program is stored, which, when executed, implements the shoulder MRI image segmentation method based on local Moran's index residual blocks as described in any one of claims 1-8.