Medical image semantic segmentation method based on attention mechanism optimization

Through the deep learning model based on attention mechanism and the Transformer module to optimize the semantic segmentation of medical images, the problems of insufficient accuracy and low efficiency in the existing technology are solved, efficient and accurate medical images are achieved, and image quality and diagnostic value are improved.

CN120496757AInactive Publication Date: 2025-08-15JIANGSU XUZHOU HIGHER VOCATIONAL & TECH SCHOOL OF FINANCE & ECONOMICS
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202510419163.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-03
Publication Date
2025-08-15
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing medical image semantic segmentation technology has insufficient accuracy, low efficiency, large calculation volume and difficult to meet real-time requirements. Traditional image preprocessing methods are difficult to effectively extract key information, and the segmentation model is prone to missegment or missegment when complex and changeable medical image data.

Method used

Using a deep learning model based on attention mechanism, through data acquisition and labeling preprocessing, an attention detection and segmentation model integrating Transformer module is built, and advanced preprocessing technologies such as adaptive denoising, contrast, brightness and color adjustment and geometric transformation are combined to optimize model structure and parameters, and improve feature extraction capabilities and robustness.

Benefits of technology

It significantly improves the accuracy and efficiency of semantic segmentation of medical images, can adaptively identify key areas, effectively remove noise, enhance image quality and diagnostic value, and improves the applicability of the model in different medical scenarios and the reliability of clinical application.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120496757A_ABST
    Figure CN120496757A_ABST
Patent Text Reader

Abstract

The invention discloses a medical image semantic segmentation method based on attention mechanism optimization, and relates to the technical field of medical image processing, and the segmentation method comprises the specific steps: S100, data collection and label preprocessing: collecting medical image data from different medical institutions and a plurality of imaging devices, according to the method, the attention mechanism is introduced to carry out deep preprocessing on the medical image data, the precision and efficiency of semantic segmentation of the medical image are remarkably improved, the attention mechanism is utilized, key areas, such as diseased regions or tissue boundaries, in the image can be recognized and enhanced, meanwhile, noise and irrelevant information are effectively removed, and the accuracy of semantic segmentation of the medical image is improved. The refined preprocessing mode not only improves the quality of the image, but also provides a more accurate data basis for subsequent image detection and segmentation, and the method is also combined with a self-adaptive denoising algorithm, dynamic adjustment of contrast, brightness and color and a geometric transformation advanced preprocessing technology, so that the availability and diagnostic value of the image are enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of medical image processing, and specifically to a medical image semantic segmentation method based on attention mechanism optimization. Background Art

[0002] Medical imaging technology, as an important means of modern medical diagnosis, provides doctors with a wealth of information about the patient's internal structure and function. With the rapid development of computer technology, the processing and analysis of medical images has gradually shifted from manual to automated and intelligent. Medical image semantic segmentation, as one of the key steps in medical image analysis, aims to divide medical images into different anatomical structures or pathological areas so that doctors can more accurately judge the patient's condition. In recent years, the rise of deep learning technology has provided new solutions for medical image semantic segmentation. Among them, the deep learning model based on the attention mechanism has attracted much attention due to its powerful feature extraction capabilities.

[0003] Although traditional medical image semantic segmentation technology has achieved certain results, it still has many shortcomings. On the one hand, traditional image preprocessing methods are often limited to simple filtering and enhancement operations, which make it difficult to effectively extract and utilize key information in medical images. On the other hand, traditional segmentation models are prone to mis-segmentation or missed segmentation when processing complex and changeable medical image data, which affects the accuracy of diagnostic results. In addition, traditional medical image semantic segmentation technology also has the problems of large computational complexity and slow processing speed, which makes it difficult to meet the real-time requirements of clinical applications.

[0004] Therefore, developing a medical image semantic segmentation method based on attention mechanism optimization not only improves the accuracy and efficiency of medical image semantic segmentation, but also provides new ideas for the intelligent analysis of medical images, which has important clinical value and application prospects. Summary of the Invention

[0005] The purpose of the present invention is to make up for the shortcomings of the existing technology and provide a medical image semantic segmentation method based on attention mechanism optimization. This method collects and preprocesses a variety of medical image data, builds and trains an attention detection and segmentation model that integrates the Transformer module to achieve accurate segmentation of medical images. By introducing the attention mechanism, this method enhances the feature extraction capability of medical images and improves the accuracy and robustness of segmentation. In addition, the method also ensures the applicability of the model in different medical scenarios through model optimization and performance evaluation adjustment.

[0006] To solve the above technical problems, the present invention provides the following technical solutions: a medical image semantic segmentation method based on attention mechanism optimization, the specific steps of the segmentation method are:

[0007] S100, Data Collection and Labeling Preprocessing: Collect medical imaging data from different medical institutions and imaging equipment, clean and normalize them, and label the lesion areas and normal tissue boundaries in the images according to medical standards;

[0008] S200, Attention Mechanism Image Preprocessing Optimization: The cleaned and annotated medical images are fed into the preprocessing model. The model uses the attention mechanism to denoise the annotated areas, enhance the image’s contrast, brightness, and color, and calculate the parameters of the geometric transformation.

[0009] S300, Attention Model Construction and Training: Build an image detection and segmentation model that integrates the attention mechanism, introduce the Transformer module into the image detection and segmentation model and adjust it, expand the labeled data through data augmentation technology, use the labeled data to train the model and adjust the model parameters;

[0010] S400, Model Optimization and Performance Evaluation Adjustment: Conduct comparative experiments on the model, introduce spatial attention, channel attention, and a hybrid mechanism combining the two, observe changes in the model's feature extraction capabilities, test the model using medical imaging datasets, and adjust the model structure and parameters based on the evaluation results;

[0011] S500, model integration for clinical assisted diagnosis: The optimized trained model is integrated into the medical image semantic segmentation system. In clinical applications, the system first pre-processes the patient image based on the attention mechanism, analyzes the lesion area and outputs visualization results. The doctor then makes a comprehensive diagnosis based on other patient information.

[0012] Furthermore, the types and collection methods of the medical imaging data collected in the step S100, data preprocessing and preliminary feature extraction, are:

[0013] The types of medical imaging data collected are: computed tomography (CT), magnetic resonance imaging (MRI), X-ray imaging, and positron emission tomography (PET) data;

[0014] Collection method: Establish cooperative relationships with major medical institutions, and export relevant imaging data in batches through the hospital information system HIS and picture archiving and communication system PACS after obtaining the patient's legal authorization.

[0015] Furthermore, in the S200, the attention mechanism image preprocessing optimization uses an adaptive denoising algorithm combined with an attention mechanism to remove noise in the medical image. Let the original medical image be I(x, y) and the denoised image be I denoised (x, y), the attention weight matrix is A(x, y), the noise estimation function is N(x, y), and the denoising formula is: I denoised(x,y)=I(x,y)-A(x,y)·N(x,y), the calculation formula of the attention weight matrix A(x,y) is: Among them, Ω(x,y) represents the neighborhood centered on the pixel point (x,y), the size of the neighborhood is 3×3, ω(m,n) is the uniform weight function of the pixels in the neighborhood, and σ is a hyperparameter that controls the intensity of attention and is used to control the smoothness of the attention weight. Its value range is [0.1, 1.0].

[0016] Furthermore, in the S200, the image preprocessing optimization of the attention mechanism is combined with the attention mechanism to adjust the contrast, brightness and color of the image, and the enhanced image is set as I enhanced (x, y), the contrast adjustment parameter is α, the brightness adjustment parameter is β, the color adjustment matrix is C∈R, which is the linear transformation matrix of the RGB channel, to achieve color space correction, used for RGB three-channel color space transformation, the image enhancement calculation formula is: I enhanced (x,y)=α·A(x,y)·I(x,y)+β+C·A(x,y), where the contrast adjustment parameter α and the brightness adjustment parameter β are adjusted based on the global histogram statistics of the image and the mean of the attention weights.

[0017] Furthermore, in the S200, the geometric transformation of the attention mechanism is combined with the attention mechanism in the image preprocessing optimization, and the geometric transformation function is set to T(x, y), and the transformed image is I transformed (x, y), the geometric transformation calculation formula is: I transformed (x,y)=I(T(x,y))·A(T(x,y)), where the geometric transformation function T(x,y) is one of the translation, rotation, and scaling transformation operations, and A(T(x,y)) is the attention weight of the corresponding position after the geometric transformation.

[0018] Furthermore, the S300, the steps of using convolutional neural network CNN to build an image detection and segmentation model that integrates attention mechanism in attention model construction and training: collecting and labeling medical imaging data and dividing the data set, performing data preprocessing, selecting basic CNN architecture and adjusting it, introducing channel, spatial or hybrid attention mechanism, building detection and segmentation module, defining detection, segmentation or joint loss function, and initializing model parameters.

[0019] Furthermore, the specific steps of introducing the Transformer module in S300, attention model construction and training are as follows:

[0020] (1) It is clear that the Transformer module consists of the basic components of the multi-head attention layer, the feedforward neural network layer, and the layer normalization layer;

[0021] (2) Analyze medical imaging data and determine the number of attention heads based on the diversity and complexity of the features of the lesion area;

[0022] (3) Determine the number of layers based on the characteristics of medical imaging data;

[0023] (4) The position encoding information PE and the local feature information LF of medical images are introduced to improve the attention mechanism. PE is encoded by sinusoidal function and LF is extracted by convolution.

[0024] (5) Determine the location and connection method of the Transformer module in the image detection model.

[0025] Furthermore, in the S300, the specific steps of using the labeled data to train the medical image detection and segmentation model based on the attention mechanism and adjust the model parameters in the attention model construction and training are as follows:

[0026] (1) Divide the annotated medical image dataset into training set, validation set, and test set according to the standard partitioning standard of the MICCAI dataset, load it into memory using the data loader, and set the batch size;

[0027] (2) Initialize the model parameters based on the attention mechanism, set the learning rate, number of training rounds, and optimizer hyperparameters;

[0028] (3) Select the cross entropy loss function to measure the difference between the model prediction and the true annotation;

[0029] (4) In each training round, the training set data is forward propagated, the loss function is calculated, and then backpropagated and the parameters are updated;

[0030] (5) After each round of training, the model is evaluated using the validation set and hyperparameters are adjusted based on the results;

[0031] (6) After training is completed, the generalization ability of the model is evaluated using the test set. The Dice coefficient of the test set is greater than or equal to 0.85. After training is completed, the Dice coefficient of the test set is less than 0.85, and the model structure is readjusted.

[0032] Compared with the existing technology, this medical image semantic segmentation method based on attention mechanism optimization has the following beneficial effects:

[0033] 1. The present invention introduces an attention mechanism to perform deep preprocessing of medical image data, significantly improving the accuracy and efficiency of medical image semantic segmentation. The present invention utilizes the attention mechanism to adaptively identify and enhance key areas in the image, such as lesions or tissue boundaries, while effectively removing noise and irrelevant information. This refined preprocessing method not only improves the quality of the image, but also provides a more accurate data basis for subsequent image detection and segmentation. In addition, the present invention also combines adaptive denoising algorithms, dynamic adjustment of contrast, brightness and color, and advanced geometric transformation preprocessing techniques to further enhance the usability and diagnostic value of the image, giving the present invention significant technical advantages and practical application value in the field of medical image processing.

[0034] 2. By introducing the Transformer module, the present invention effectively improves the model's ability to capture key information of lesion areas in medical images. At the same time, the present invention also combines the characteristics of medical imaging data to make detailed adjustments and optimizations to the Transformer module, such as determining the appropriate number of attention heads and layers and improving the calculation method of the attention mechanism, so that the medical image semantic segmentation model constructed by the present invention has achieved a qualitative leap in performance, providing strong technical support for the automated and intelligent diagnosis of medical images. In addition, the present invention also ensures the stability and generalization ability of the model through fine data division, model parameter initialization and training strategy formulation, further improving its reliability and practicality in clinical applications.

[0035] Other advantages, objects and features of the present invention will be described in part in the following description and, in part, will be apparent to those skilled in the art based on an examination of the following or may be learned from the practice of the invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] To more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. Those skilled in the art can also derive other drawings based on these drawings without inventive effort.

[0037] Figure 1 This is a flowchart of a medical image semantic segmentation method based on attention mechanism optimization;

[0038] Figure 2 A framework diagram of a medical image semantic segmentation method based on attention mechanism optimization. DETAILED DESCRIPTION

[0039] In order to further illustrate the technical means and effects adopted by the present invention to achieve the predetermined purpose of the invention, the specific implementation methods, structures, features and effects of the present invention are described in detail below in conjunction with the accompanying drawings and preferred embodiments.

[0040] Example 1:

[0041] Semantic segmentation of brain medical images based on the present invention to aid diagnosis.

[0042] Data collection and annotation preprocessing: We have established collaborations with the neurology departments of several large tertiary hospitals. Using hospital information systems (HIS) and picture archiving and communication systems (PACS), we batch-export brain computed tomography (CT) and magnetic resonance imaging (MRI) image data after obtaining detailed authorization consent signed by patients. For these images, we organize professional neurologists and medical imaging technicians to accurately annotate brain tumors, cerebral infarction lesions, and normal brain tissue boundaries based on internationally accepted medical image annotation standards to facilitate subsequent processing.

[0043] Attention mechanism image preprocessing optimization: The cleaned and annotated brain image is input into the preprocessing model, and the adaptive denoising algorithm is combined with the attention mechanism to remove image noise according to the denoising formula. Let the original medical image be I(x, y) and the denoised image be I denoised (x, y), the attention weight matrix is A(x, y), the noise estimation function is N(x, y), and the denoising formula is: I denoised (x,y)=I(x,y)-A(x,y)·N(x,y), the calculation formula of the attention weight matrix A(x,y) is: Among them, Ω(x,y) represents the neighborhood centered on the pixel point (x,y), ω(m,n) is the weight function of the pixel points in the neighborhood, and σ is a hyperparameter that controls the intensity of attention and is used to control the smoothness of the attention weight. The value range is [0.1, 1.0]. After that, the contrast, brightness, and color of the image are adjusted in combination with the attention mechanism. Let the enhanced image be I enhanced (x, y), the contrast adjustment parameter is α, the brightness adjustment parameter is β, and the color adjustment matrix is C∈R 3×3 , used for RGB three-channel color space transformation, the image enhancement calculation formula is: I enhanced (x,y)=α·A(x,y)·I(x,y)+β+C·A(x,y), where α and β are adjusted based on the global histogram statistics of the image and the mean of the attention weight. In addition, to address the problem of possible shooting angle deviation of brain images, the geometric transformation function is set to T(x,y), and the transformed image is I transformed (x, y), the geometric transformation calculation formula is: I transformed(x,y)=I(T(x,y))·A(T(x,y)), where the geometric transformation function T(x,y) is one of the translation, rotation, and scaling transformation operations, and the attention weight A(T(x,y)) is used to weight the transformed pixel values and adjust their contribution values according to the importance of the transformed pixel positions.

[0044] Attention model construction and training: Build a brain image detection and segmentation model that integrates the attention mechanism, introduce the Transformer module into the model, and determine the number of attention heads in the multi-head attention layer to be 8 by analyzing the diversity and complexity of the characteristics of the brain lesion area. At the same time, according to the characteristics of the brain image data, determine the number of layers of the Transformer module to be 6. Introduce position encoding information PE and local feature information LF of the brain image to improve the calculation method of the attention mechanism, and clarify the position and connection method of the Transformer module in the image detection model. Use the labeled brain image dataset and divide it into training set and validation set according to the standard ratio of the MICCAI dataset. The dataset and test dataset are loaded into memory and the batch size is set to 32. The model parameters are initialized, the learning rate is set to 0.001, the number of training rounds is 200, the optimizer is the Adam optimizer, and the cross entropy loss function is selected to measure the difference between the model prediction and the true annotation. In each training round, the training set data is forward propagated, the loss function is calculated, the back propagation and parameter update are performed. After each round of training, the model is evaluated using the validation set, and the hyperparameters are adjusted according to the evaluation results. After the training is completed, the generalization ability of the model is evaluated using the test set, and the final model parameters are determined based on the results. The Dice coefficient of the test set is greater than or equal to 0.85, and the training is completed. If the Dice coefficient of the test set is lower than 0.85, the model structure is readjusted.

[0045] Model optimization and performance evaluation and adjustment: Comparative experiments were conducted on the trained models. Spatial and channel attention mechanisms, as well as a hybrid mechanism combining the two, were introduced to observe changes in the model's ability to extract features from brain lesions. The model was tested using brain imaging datasets from multiple hospitals. Based on the evaluation results, the model structure and parameters were adjusted, such as the number of layers and attention heads in the Transformer module, to further improve model performance.

[0046] Model integration for clinical auxiliary diagnosis: The optimized trained model is integrated into the hospital's existing brain medical image semantic segmentation system. During clinical application, the system first pre-processes the patient's brain image based on the attention mechanism, analyzes the lesion area and outputs visualization results, such as marking brain tumors and cerebral infarction lesion areas with different colors. Doctors make a comprehensive diagnosis based on the patient's medical history, symptoms, and other examination results to improve the accuracy and efficiency of diagnosis.

[0047] In summary, in the scenario of semantic segmentation-assisted diagnosis of brain medical images, the present invention starts from data acquisition and annotation preprocessing, collects multi-source data and standardizes annotations, optimizes images through attention mechanism preprocessing, removes noise, enhances image quality, builds a model containing a Transformer module, accurately constructs detection and segmentation models and trains them reasonably, optimizes and adjusts through comparative experiments, improves model performance, and finally integrates it into the clinical system to assist doctors in diagnosis. This process makes full use of the attention mechanism, accurately focuses on the brain lesion area, enhances the model feature extraction capability, improves the accuracy and efficiency of diagnosis, and provides strong support for the diagnosis of brain diseases.

[0048] Example 2:

[0049] Semantic segmentation of lung medical images based on the present invention to aid diagnosis.

[0050] Data collection and annotation preprocessing: We collaborate with respiratory specialty hospitals and respiratory departments of general hospitals. With the help of hospital information systems (HIS) and picture archiving and communication systems (PACS), we batch-export lung computed tomography (CT) and X-ray imaging data after obtaining legal authorization from patients. We also invite respiratory experts and radiologists to annotate areas of pneumonia, lung cancer, and lung nodule lesions, as well as the boundaries of normal lung tissue, based on lung disease diagnostic standards.

[0051] Attention mechanism image preprocessing optimization: The cleaned and annotated lung image is input into the preprocessing model, and the noise is removed by using the adaptive denoising algorithm combined with the attention mechanism. Let the original medical image be I(x, y) and the denoised image be I denoised (x, y), the attention weight matrix is A(x, y), the noise estimation function is N(x, y), and the denoising formula is: I denoised (x,y)=I(x,y)-A(x,y)·N(x,y), the calculation formula of the attention weight matrix A(x,y) is: The denoising formula is applied to obtain the denoised image. To address the large difference in contrast and brightness of lung images, the contrast adjustment parameter α and the brightness adjustment parameter β are dynamically adjusted according to the overall statistical information of the image and the attention weight. The image is enhanced by the formula to adjust the contrast, brightness and color of the image. For image deformation caused by different shooting positions, the geometric transformation function is used to perform translation and scaling operations to ensure image standardization. Let the geometric transformation function be T(x, y) and the transformed image be I transformed (x, y), the geometric transformation calculation formula is: I transformed (x,y)=I(T(x,y))·A(T(x,y)).

[0052] Attention model construction and training: Build a lung image detection and segmentation model that integrates the attention mechanism, introduce the Transformer module, analyze the diversity and complexity of the characteristics of the lung lesion area, determine the number of attention heads to be 6, determine the number of layers to be 5 based on the characteristics of the lung image data, introduce position encoding information PE and local feature information LF of the lung image to improve the calculation method of the attention mechanism, determine the position and connection method of the Transformer module in the image detection model, divide the labeled lung image dataset into training set, verification set and test set according to the standard ratio of the MICCAI dataset, load it into memory and set Set the batch size to 24, initialize the model parameters, set the learning rate to 0.0005, the number of training rounds to 150, the optimizer to Adagrad optimizer, and select the cross entropy loss function to measure the difference between the model prediction and the true annotation. During the training process, the training set data is forward propagated, the loss function is calculated, the back propagation and parameter update are performed. After each round of training, the model is evaluated using the validation set, and the hyperparameters are adjusted according to the evaluation results. After the training is completed, the generalization ability of the model is evaluated using the test set. The Dice coefficient of the test set is greater than or equal to 0.85. The training is completed. If the Dice coefficient of the test set is lower than 0.85, the model structure is readjusted.

[0053] Model optimization and performance evaluation and adjustment: We conducted comparative experiments on the models, introducing spatial and channel attention mechanisms, as well as a hybrid mechanism combining the two, to observe changes in the models' ability to extract features from lung lesion areas. We used lung imaging datasets from multiple medical institutions to test the models, and adjusted the model structure and parameters based on the evaluation results. For example, we adjusted the hyperparameters of the attention mechanism and increased or decreased the number of convolutional layers to improve the model's segmentation accuracy for lung lesions.

[0054] Model integration for clinical auxiliary diagnosis: The optimized trained model is integrated into the hospital's lung medical image semantic segmentation system. During clinical application, the system first pre-processes the patient's lung images based on the attention mechanism, analyzes the lesion area and outputs visualization results, such as highlighting the location, size and shape of lung nodules. Doctors then make a comprehensive diagnosis based on the patient's symptoms, medical history and blood test results to develop a more accurate treatment plan for the patient.

[0055] In summary, the implementation process of the present invention for semantic segmentation-assisted diagnosis of lung medical images is clear. First, a variety of lung image data are collected and labeled to provide reliable data for subsequent use. Then, the attention mechanism is used to optimize preprocessing to solve image quality problems. A model that integrates the attention mechanism and the Transformer module is constructed and trained to effectively learn the characteristics of lung lesions. After performance evaluation and adjustment, it is integrated into the clinical system. This method can accurately identify lung lesions, assist doctors in decision-making, help improve the early diagnosis rate of lung diseases, and reduce missed diagnoses and misdiagnoses. It has significant application value and broad development prospects in the clinical diagnosis of lung diseases.

[0056] The above description is merely a preferred embodiment of the present invention and does not constitute any form of limitation to the present invention. Although the present invention has been disclosed as above in terms of a preferred embodiment, it is not intended to limit the present invention. Any person skilled in the art can, without departing from the scope of the technical solution of the present invention, make some changes or modifications to equivalent embodiments using the technical contents disclosed above. However, any brief modifications, equivalent changes and modifications made to the above embodiments based on the technical essence of the present invention without departing from the content of the technical solution of the present invention are still within the scope of the technical solution of the present invention.

Claims

1. A medical image semantic segmentation method based on attention mechanism optimization, characterized in that: The specific steps of this segmentation method are: S100, Data Collection and Labeling Preprocessing: Collect medical imaging data from different medical institutions and imaging equipment, clean and normalize them, and label the lesion areas and normal tissue boundaries in the images according to medical standards; S200, Attention Mechanism Image Preprocessing Optimization: The cleaned and annotated medical images are fed into the preprocessing model. The model uses the attention mechanism to denoise the annotated areas, enhance the image’s contrast, brightness, and color, and calculate the parameters of the geometric transformation. S300, Attention Model Construction and Training: Build an image detection and segmentation model that integrates the attention mechanism, introduce the Transformer module into the image detection and segmentation model and adjust it, expand the labeled data through data augmentation technology, use the labeled data to train the model and adjust the model parameters; S400, Model Optimization and Performance Evaluation Adjustment: Conduct comparative experiments on the model, introduce spatial attention, channel attention, and a hybrid mechanism combining the two, observe changes in the model's feature extraction capabilities, test the model using medical imaging datasets, and adjust the model structure and parameters based on the evaluation results; S500, model integration for clinical assisted diagnosis: The optimized trained model is integrated into the medical image semantic segmentation system. In clinical applications, the system first pre-processes the patient image based on the attention mechanism, analyzes the lesion area and outputs visualization results. The doctor then makes a comprehensive diagnosis based on other patient information.

2. A medical image semantic segmentation method based on attention mechanism optimization according to claim 1, characterized in that: The types and collection methods of the medical imaging data collected in the step S100, data preprocessing and preliminary feature extraction, are as follows: The types of medical imaging data collected are: computed tomography (CT), magnetic resonance imaging (MRI), X-ray imaging, and positron emission tomography (PET) data; Collection method: Establish cooperative relationships with major medical institutions, and export relevant imaging data in batches through the hospital information system HIS and picture archiving and communication system PACS after obtaining the patient's legal authorization.

3. The method for medical image semantic segmentation based on attention mechanism optimization according to claim 1, characterized in that: In the S200, the attention mechanism image preprocessing optimization uses an adaptive denoising algorithm combined with an attention mechanism to remove noise in the medical image. Let the original medical image be I(x, y) and the denoised image be I denoised (x, y), the attention weight matrix is A(x, y), the noise estimation function is N(x, y), and the denoising formula is: I denoised (x,y)=I(x,y)-A(x,y)·N(x,y), the calculation formula of the attention weight matrix A(x,y) is: Among them, Ω(x,y) represents the neighborhood centered on the pixel point (x,y), the size of the neighborhood is 3×3, ω(m,n) is the uniform weight function of the pixels in the neighborhood, and σ is a hyperparameter that controls the intensity of attention and is used to control the smoothness of the attention weight. Its value range is [0.1, 1.0].

4. The method for medical image semantic segmentation based on attention mechanism optimization according to claim 1, characterized in that: In the S200, the image preprocessing optimization of the attention mechanism is combined with the attention mechanism to adjust the contrast, brightness and color of the image. Let the enhanced image be I enhanced (x, y), the contrast adjustment parameter is α, the brightness adjustment parameter is β, the color adjustment matrix is C∈R, which is the linear transformation matrix of the RGB channel, to achieve color space correction, used for RGB three-channel color space transformation, the image enhancement calculation formula is: I enhanced (x,y)=α·A(x,y)·I(x,y)+β+C·A(x,y), where the contrast adjustment parameter α and the brightness adjustment parameter β are adjusted based on the global histogram statistics of the image and the mean of the attention weights.

5. The method for medical image semantic segmentation based on attention mechanism optimization according to claim 1, characterized in that: In the S200, the geometric transformation of the attention mechanism is combined with the attention mechanism in the image preprocessing optimization. Let the geometric transformation function be T(x, y), and the transformed image be I transformed (x, y), the geometric transformation calculation formula is: I transformed (x,y)=I(T(x,y))·A(T(x,y)), where the geometric transformation function T(x,y) is one of the translation, rotation, and scaling transformation operations, and A(T(x,y)) is the attention weight of the corresponding position after the geometric transformation.

6. The method for medical image semantic segmentation based on attention mechanism optimization according to claim 1, characterized in that: The S300, the steps of using the convolutional neural network CNN to build an image detection and segmentation model that integrates the attention mechanism in the attention model construction and training: collecting and labeling medical imaging data and dividing the data set, performing data preprocessing, selecting the basic CNN architecture and adjusting it, introducing channel, spatial or hybrid attention mechanisms, building detection and segmentation modules, defining detection, segmentation or joint loss functions, and initializing model parameters.

7. The method for medical image semantic segmentation based on attention mechanism optimization according to claim 1, characterized in that: The specific steps of introducing the Transformer module in S300, attention model construction and training are as follows: (1) It is clear that the Transformer module consists of the basic components of the multi-head attention layer, the feedforward neural network layer, and the layer normalization layer; (2) Analyze medical imaging data and determine the number of attention heads based on the diversity and complexity of the features of the lesion area; (3) Determine the number of layers based on the characteristics of medical imaging data; (4) The position encoding information PE and the local feature information LF of medical images are introduced to improve the attention mechanism. PE is encoded by sinusoidal function and LF is extracted by convolution. (5) Determine the location and connection method of the Transformer module in the image detection model.

8. The method for medical image semantic segmentation based on attention mechanism optimization according to claim 1, characterized in that: The specific steps of using labeled data to train the medical image detection and segmentation model built based on the attention mechanism and adjust the model parameters in S300, the attention model construction and training: (1) Divide the annotated medical image dataset into training set, validation set, and test set according to the standard partitioning standard of the MICCAI dataset, load it into memory using the data loader, and set the batch size; (2) Initialize the model parameters based on the attention mechanism, set the learning rate, number of training rounds, and optimizer hyperparameters; (3) Select the cross entropy loss function to measure the difference between the model prediction and the true annotation; (4) In each training round, the training set data is forward propagated, the loss function is calculated, and then backpropagated and the parameters are updated; (5) After each round of training, the model is evaluated using the validation set and hyperparameters are adjusted based on the results; (6) After training is completed, the generalization ability of the model is evaluated using the test set. The Dice coefficient of the test set is greater than or equal to 0.

85. After training is completed, the Dice coefficient of the test set is less than 0.85, and the model structure is readjusted.

Citation Information

Cited By

  • Medical image segmentation method based on adaptive anisotropic convolution

    CN120726076A

  • Asphalt pavement crack identification method based on joint optimization network

    CN120976218A

  • An asphalt pavement crack identification method based on joint optimization network

    CN120976218B