High-definition diffusion MR image breast cancer detection method and system

By applying the residual classification network model of multi-scale multi-head attention and the YOLOv8 object detection model in high-definition diffuse MR images, the shortcomings in sensitivity and specificity of traditional breast imaging examination methods are solved, and high-precision detection and positioning of breast cancer lesions are achieved, and diagnostic efficiency is improved.

CN120107650APending Publication Date: 2025-06-06WUHAN JULEI TECH CO LTD +1
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202510062520.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-15
Publication Date
2025-06-06

AI Technical Summary

Technical Problem

Traditional breast imaging methods have shortcomings in sensitivity and specificity, especially in the detection of dense breasts, young patients, postoperative tumor recurrence, and multifocal and multicenter lesions.

Method used

High-definition diffuse MR images combined with multi-scale multi-head attention residual classification network model and YOLOv8 object detection model were used to classify and locate lesions through breast area segmentation and standardized processing.

Benefits of technology

It improves the detection accuracy of breast cancer lesion areas, reduces false positives and missed tests, enhances the identification ability of lesions of different sizes and shapes, and improves diagnostic efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120107650A_ABST
    Figure CN120107650A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of medical image processing, in particular to a high-definition diffusion MR image breast cancer detection method and system, and the method comprises the steps: dividing an obtained historical mammary gland high-definition diffusion MR image data set into a training set and a verification set according to a preset distribution proportion; for each divided image, carrying out breast region segmentation, and carrying out standardization processing on the segmented image to obtain a pre-processed image; the preprocessed training set and verification set are input into a residual error classification network model based on multi-scale multi-head attention for model training, and the residual error classification network model comprises a front convolutional layer, an MSAA-ResNet composite module fusing a multi-scale attention mechanism and residual error learning, and a global feature association module introducing the multi-head attention mechanism; inputting the obtained real-time mammary gland high-definition diffusion MR image into the trained residual error classification network model to obtain a focus classification result; and based on a focus classification result, inputting the real-time mammary gland high-definition dispersion MR image corresponding to the focus into the YOLOv8 target detection model to obtain focus region position information.
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 in particular to a method and system for detecting breast cancer using high-definition diffusion MR images. Background Art

[0002] Breast cancer is a malignant tumor with a high incidence rate among women worldwide, posing a major threat to women's health. With the improvement of living standards and the advancement of medical technology, the screening and early diagnosis of breast cancer have become increasingly important. However, although traditional breast imaging methods, such as mammography and breast ultrasound, are widely used in clinical practice, they are insufficient in sensitivity and specificity, especially in the detection of dense breasts, young patients, postoperative tumor recurrence, and multifocal and multicentric lesions.

[0003] At present, with the development of deep learning, some researchers have applied deep learning models to the analysis of high-definition diffusion breast magnetic resonance (MR) images, such as convolutional neural networks (CNN) and transfer learning. These models classify or detect breast cancer lesions by extracting feature areas in high-definition diffusion MR images, while YOLOv8 has excellent real-time detection performance, can quickly identify and locate breast cancer lesions in high-definition diffusion MR images, and can improve the detection accuracy of small lesions through the anchor-free mechanism of YOLOv8, which can reduce false detection and missed detection. However, related studies have also shown that the detection accuracy of YOLOv8 for lesions is significantly reduced when there are a large number of images without lesions. Therefore, it is necessary to classify the images with lesions while maintaining high classification accuracy, and then input them into the YOLOv8 target detection model for target detection, so as to reduce the impact of false positives on detection accuracy, improve detection accuracy, and ultimately assist doctors in improving diagnostic efficiency. Summary of the invention

[0004] In order to improve the detection accuracy of lesion areas in high-definition diffusion MR images, the purpose of the present invention is to provide a method and system for breast cancer detection in high-definition diffusion MR images. The technical solutions adopted are as follows:

[0005] In a first aspect, the present application discloses a method for detecting breast cancer using high-definition diffusion MR images, the method comprising:

[0006] S1. Dividing the acquired historical breast high-definition diffusion MR image dataset into a training set and a validation set according to a preset allocation ratio;

[0007] S2, for each image obtained by segmentation, performing breast region segmentation and standardization processing on the segmented image to obtain a preprocessed image;

[0008] S3, inputting the preprocessed training set and the validation set into a residual classification network model based on multi-scale multi-head attention for model training, wherein the residual classification network model includes a pre-convolutional layer, an MSAA-ResNet composite module integrating a multi-scale attention mechanism and residual learning, and a global feature association module introducing a multi-head attention mechanism;

[0009] S4, inputting the acquired real-time breast high-definition diffusion MR image into the trained residual classification network model to obtain the lesion classification result;

[0010] S5. Based on the lesion classification results, the real-time breast high-definition diffusion MR image corresponding to the lesion is input into the YOLOv8 target detection model to obtain the lesion area location information.

[0011] Furthermore, in step S1, the historical breast high-definition diffusion MR image dataset is divided into a training set and a validation set according to an allocation ratio of 8:2.

[0012] Furthermore, in step S2, for each image obtained by segmentation, breast region segmentation and normalization of the segmented image are performed to obtain a pre-processed image, including:

[0013] S21, dividing the left and right breast regions in the image into halves, and segmenting the corresponding breast regions from the segmented image using an image segmentation algorithm to obtain a breast region segmentation image;

[0014] S22. Performing standardization processing on each breast region segmentation image obtained based on pixel value standardization technology to obtain a pre-processed image whose image grayscale value presents a standard normal distribution.

[0015] Furthermore, in step S3, during the model training process, the pre-convolutional layer is used to perform a 3×3 convolution operation on the input image, and the obtained initial feature map is batch normalized and ReLU activated in sequence to obtain an enhanced feature map.

[0016] Furthermore, in step S3, the MSAA-ResNet composite module is composed of multiple core components stacked in sequence, and each component integrates the functions of the MSAA multi-scale attention module and the ResBlock residual block, wherein: the MSAA multi-scale attention module is used to fuse feature information of different scales and introduce an attention mechanism to enhance feature representation, and the ResBlock residual block is used for deep feature learning.

[0017] Furthermore, in step S3, after the input image is processed by the pre-convolution layer to obtain an enhanced feature map, the first component in the MSAA-ResNet composite module performs multi-scale feature extraction and fusion on the enhanced feature map, and introduces an attention mechanism through the following steps:

[0018] Performing a 1×1 convolution operation and average pooling followed by two 1×1 convolution operations on the enhanced feature map to obtain an intermediate feature map and a channel attention feature map, wherein a ReLU activation function for increasing nonlinearity is inserted between the two 1×1 convolution operations;

[0019] Based on a plurality of convolution kernels of different sizes, multi-scale fusion is performed on the intermediate feature map to obtain a multi-scale fused feature map;

[0020] Based on the multi-scale fusion feature map, a pooling operation is performed and a 7×7 convolution followed by a sigmoid activation function is performed, and after superimposing the multi-scale fusion feature map for spatial aggregation, a multi-scale spatial fusion feature map is obtained;

[0021] After performing a 1×1 convolution on the multi-scale spatial fusion feature map, the obtained convolution feature map is element-wise multiplied and superimposed on the channel attention feature map to obtain a comprehensive feature map that combines channel attention and spatial attention; the comprehensive feature map is superimposed and merged with the enhanced feature map to obtain a fused enhanced feature map.

[0022] Furthermore, in step S3, after the first component in the MSAA-ResNet composite module performs multi-scale feature extraction and fusion, and introduces the attention mechanism, deep feature learning is performed through the following steps:

[0023] Perform 3×3 convolution operations on the input fusion feature maps to obtain the first initial feature map and the second initial feature map;

[0024] The first initial feature map is subjected to batch normalization and ReLU activation in sequence to obtain a first intermediate feature map; a 3×3 convolution operation is performed again on the first intermediate feature map to further extract and fuse features, and the obtained convolution result feature map is subjected to batch normalization to obtain a second intermediate feature map;

[0025] The second intermediate feature map and the second initial feature map are added together, and ReLU activation is performed to obtain a fused and activated output feature map.

[0026] Furthermore, in step S3, a multi-head attention mechanism is applied to the ResBlock residual block of the last component in the MSAA-ResNet composite module to integrate global features and enhance the correlation between features.

[0027] Furthermore, in step S3, the calculation formula of the multi-head attention mechanism includes:

[0028] X attn =LayerNorm(X flat +Dropout(MultiHead(Q,K,V)));

[0029] Among them, X attn represents the normalized attention feature map, X flat Represents the input feature map X∈R C×D×H×W In the form of spatial sequence formed by flattening, C, D, H, and W represent the number of channels, depth, height, and width of the feature map, respectively; Q, K, and V represent query, key, and value matrices, respectively, and for each attention head i, there are Q i =X flat W i Q , K i =X flat W i K 、V i =X flat W i V ;Q i , K i 、V i denote the query vector, key vector, and value vector of the i-th attention head, respectively, and W i Q , W i K , W i V They represent the weight matrices corresponding to the i-th attention head, which are mainly used to linearly transform the input Q, K, and V matrices into different subspaces; MultiHead(Q,K,V)=Concat(Attention(Q 1 ,K 1 ,V 1 ),…,Attention(Q h ,K h ,V h ))W Orepresents the output of the multi-head attention mechanism obtained by concatenating the outputs of the i-th attention head to the h-th attention head in the feature dimension. Concat represents the concatenation operation used to concatenate the outputs of h attention heads together. W O Represents the output weight matrix used to linearly transform the concatenated result to the final output space; represents the output of the i-th attention head, d k It represents the dimension of the key vector, softmax represents the conversion of the dot product result into a probability distribution, LayerNorm represents layer normalization, which is used to normalize the input, and Dropout represents the regularization operation, which is used to reduce overfitting.

[0030] In a second aspect, the present application discloses a high-definition diffusion MR image breast cancer detection system, the system comprising a data set partitioning module, an image preprocessing module, a residual classification network training module, a lesion classification module, and a lesion area location prediction module, wherein:

[0031] The data set division module is used to divide the acquired historical breast high-definition diffusion MR image data set into a training set and a verification set according to a preset allocation ratio;

[0032] The image preprocessing module is used to perform breast region segmentation and standardization processing on the segmented image for each image obtained by segmentation to obtain a preprocessed image;

[0033] The residual classification network training module is used to input the preprocessed training set and the verification set into the residual classification network model based on multi-scale multi-head attention for model training, wherein the residual classification network model includes a pre-convolutional layer, an MSAA-ResNet composite module integrating a multi-scale attention mechanism and residual learning, and a global feature association module introducing a multi-head attention mechanism;

[0034] The lesion classification module is used to input the acquired real-time breast high-definition diffusion MR image into the trained residual classification network model to obtain the lesion classification result;

[0035] The lesion area location prediction module is used to input the real-time breast high-definition diffusion MR image corresponding to the lesion into the YOLOv8 target detection model based on the lesion classification result to obtain the lesion area location information.

[0036] The present invention has the following beneficial effects:

[0037] 1) Breast region segmentation and normalization processing help remove irrelevant information in the image and reduce noise interference, thereby improving the accuracy of subsequent classification;

[0038] 2) On the one hand, the MSAA-ResNet composite module integrates multi-scale attention mechanism and residual learning, which can process feature information of different scales and enhance the model's ability to identify lesions of different sizes and shapes; on the other hand, the multi-head attention mechanism can process multiple feature subsets in parallel, improving the model's ability to capture complex features and increasing the robustness of the model;

[0039] 3) After obtaining the lesion classification results, the YOLOv8 target detection model is used to extract the lesion area location information from the real-time breast high-definition diffusion MR images corresponding to the lesions. Combined with the high efficiency and accuracy of YOLOv8 in target detection, accurate positioning of the lesions is achieved. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0041] Figure 1 A flow chart of a method for detecting breast cancer using high-definition diffusion MR images provided by one embodiment of the present invention;

[0042] Figure 2 It is a schematic diagram of the overall structure of the residual classification network model based on multi-scale multi-head attention;

[0043] Figure 3 This is a system structure diagram of a high-definition diffusion MR image breast cancer detection system provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0044] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the high-definition diffusion MR image breast cancer detection method and system proposed by the present invention, its specific implementation, structure, features and effects, in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.

[0045] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.

[0046] The specific scheme of a high-definition diffusion MR image breast cancer detection method and system provided by the present invention is described in detail below with reference to the accompanying drawings.

[0047] See also Figure 1 , which shows a method flow chart of a method for detecting breast cancer using high-definition diffusion MR images provided by an embodiment of the present invention, the method comprising:

[0048] Step S1, dividing the acquired historical breast high-definition diffusion MR image dataset into a training set and a validation set according to a preset allocation ratio.

[0049] Specifically, this application divides the data set according to an 8:2 allocation ratio to obtain a training set and a validation set. The training set is used to train the deep learning model, that is, to let the model learn the ability to extract features from historical breast high-definition diffusion MR images and classify them; the validation set is used to evaluate the performance of the model, that is, during the training process, the validation set is used to test the generalization ability of the model. Through the results of the validation set, the model can be tuned to improve its accuracy in real application scenarios.

[0050] Step S2: for each image obtained by segmentation, perform breast region segmentation and normalization processing on the segmented image to obtain a pre-processed image.

[0051] Specifically, the present application firstly divides the left and right breasts in the acquired image into halves to process the image data of the left and right breasts separately. Then, the Otsu method (i.e., an adaptive threshold determination method) is used to segment the breast area from the segmented image to reduce the interference of irrelevant areas on the classification. After that, for the segmented image, the present application uses a linear scaling method to scale the pixel value range from the original [a, b] (where a and b are the maximum and minimum values ​​of the image pixel values, respectively) to [0, 1], so that the image data remains within a reasonable and easy-to-process numerical range. In order to further improve the training efficiency of the model, the present application also normalizes the scaled image so that the grayscale value of the image maintains a zero mean and standardized distribution, thereby reducing the convergence time in the model training and improving the accuracy of the model. This process involves calculating the mean and standard deviation of the grayscale value of the image, and subtracting the mean from each pixel value and dividing it by the standard deviation to obtain a grayscale value image under a standard normal distribution. Such processing makes the image data more stable and efficient when training a deep learning model, which helps to improve the classification performance of the model.

[0052] Step S3, input the preprocessed training set and the validation set into the residual classification network model based on multi-scale multi-head attention for model training, wherein the residual classification network model includes a pre-convolutional layer, an MSAA-ResNet composite module that integrates multi-scale attention mechanism and residual learning, and a global feature association module that introduces a multi-head attention mechanism.

[0053] For details, please refer to Figure 2 During the model training process, this application will extract basic features from the pre-processed breast high-definition diffusion MR images through the pre-convolutional layer; then, the MSAA multi-scale attention module in the MSAA-ResNet composite module will fuse feature information of different scales, and introduce the attention mechanism to enhance feature representation. At the same time, the ResBlock residual block is superimposed after the MSAA multi-scale attention module, which mainly performs deep feature learning and downsampling on the feature map enhanced by the attention mechanism to retain more feature details.

[0054] Please note that, please refer to Figure 2 The aforementioned MSAA multi-scale attention module superimposed on the ResBlock residual block structure will be repeatedly stacked three times to further deepen the network, improve the hierarchy of features and the complexity of the model, thereby enhancing the model's ability to extract image features. In order to further improve the model's global feature capture capability and the correlation between features, after the last ResBlock residual block, this application also applies a multi-head attention mechanism to enhance the correlation between features by integrating global features.

[0055] In one embodiment, during the training process, the present application uses the ADAM optimizer to update and optimize the model parameters, and the initial learning rate is set to 1×10 -3 , the batch size (bach_size) is set to 16, and the number of training rounds (epoch) is set to 100. This configuration aims to quickly and stably adjust the model parameters through the efficiency and adaptability of the ADAM optimizer to minimize the loss function.

[0056] In one embodiment, the present application uses a cross entropy loss function to measure the difference between the model prediction result and the actual label, wherein the calculation formula of the cross entropy loss function is:

[0057]

[0058] Among them, N is the number of training samples, y i is the true label of the i-th training sample, p i is the predicted probability of the i-th training sample. This formula measures the classification error of the model by calculating the difference between the actual label and the predicted probability. During the training process, the goal of the model is to minimize the cross entropy loss function to improve the classification accuracy.

[0059] In one of the embodiments, when verifying the model performance, the present application uses accuracy (ACC) as an indicator for saving the model. Specifically, during the model training process, each evaluation on the validation set will calculate the current accuracy, and then compare and record the model with the highest accuracy in the validation set. Finally, the model with the highest accuracy is saved for subsequent model reasoning.

[0060] It should be noted that the accuracy rate indicates the proportion of samples predicted correctly by the model to the total number of samples. The closer the accuracy rate is to 1, the better the overall performance of the model. The accuracy rate calculation formula is as follows:

[0061]

[0062] Among them, TP (TruePositive) represents true positive examples, that is, the number of samples correctly predicted as positive (the category of interest, hope to detect or predict); TN (TrueNegative) represents true negative examples, that is, the number of samples correctly predicted as negative (the category of no interest or hope to exclude); FP (FalsePositive) represents false positive examples, that is, the number of negative samples that are wrongly predicted as positive; FN (FalseNegative) represents false negative examples, that is, the number of positive samples that are wrongly predicted as negative. In actual calculation, the accuracy is calculated by adding the number of true positive examples (TP) and true negative examples (TN) and then dividing by the total number of samples.

[0063] Step S4, inputting the acquired real-time breast high-definition diffusion MR image into the trained residual classification network model to obtain a lesion classification result.

[0064] Specifically, real-time breast high-definition diffusion MR images will first undergo a preprocessing step (the same as during training, including breast region segmentation, normalization, etc.) to ensure that the data format and quality of the input model are consistent. Then, the preprocessed images will be sent to the already trained residual classification network model based on multi-scale multi-head attention. The model will use the learned feature extraction and classification capabilities to analyze the input image and ultimately output a lesion classification result, that is, to determine whether there is a lesion in the image and the type of lesion (such as benign, malignant, etc., the specific classification depends on the label setting during training).

[0065] Step S5: Based on the lesion classification result, the real-time breast high-definition diffusion MR image corresponding to the lesion is input into the YOLOv8 target detection model to obtain the lesion area location information.

[0066] Specifically, after obtaining the lesion classification results, this application will further filter out those images classified as having lesions. Then, these images will be sent to the YOLOv8 target detection model after appropriate preprocessing (including resizing, etc., to meet the input requirements of the YOLOv8 target detection model). The YOLOv8 model will use its powerful target detection capabilities to locate and mark the specific location of the lesion area in the image, including the bounding box coordinates, size and other information of the lesion. This information will be used for subsequent medical analysis and treatment decisions.

[0067] In one of the embodiments, in order to evaluate the final detection performance, the present application uses accuracy (Precision), recall (Recall) and average precision (AP) as evaluation indicators, and verifies the detection performance of intersection over union (IoU) in the validation set. Among them, the intersection over union (IoU) is the degree of overlap between the predicted bounding box and the true bounding box. In this application, it is set that when the value of IoU is greater than 0.5, the lesion is considered to be correctly detected. It should be noted that the present application does not improve the calculation formulas of accuracy (Precision), recall (Recall) and average precision (AP). The calculation formulas of these indicators belong to the scope of the prior art, and the present application will not be repeated here. Finally, it can be seen from the results in Table 1 below that the results of this application are significantly better than the simple YOLOv8 detection method in terms of the three key evaluation indicators of accuracy (Precision), recall (Recall) and average precision (AP). This result fully demonstrates the effectiveness and superiority of the method of this application.

[0068] Table 1

[0069] method Precision Recall AP YOLOv8 0.777 0.767 0.826 This application 0.902 0.918 0.945

[0070] As can be seen from the above, a high-definition diffusion MR image breast cancer detection method disclosed in the present application helps to remove irrelevant information in the image and reduce noise interference through breast area segmentation and standardization processing, thereby improving the accuracy of subsequent classification; on the one hand, the MSAA-ResNet composite module integrates multi-scale attention mechanism and residual learning, which can process feature information of different scales and enhance the model's recognition ability for lesions of different sizes and shapes; on the other hand, the multi-head attention mechanism can process multiple feature subsets in parallel, improve the model's ability to capture complex features, and increase the robustness of the model; after obtaining the lesion classification result, the YOLOv8 target detection model is used to extract the lesion area position information of the real-time breast high-definition diffusion MR image corresponding to the lesion, and combined with the high efficiency and accuracy of YOLOv8 in target detection, the precise positioning of the lesion is achieved.

[0071] In one of the embodiments, in step S1, the historical breast high-definition diffusion MR image dataset is divided into a training set and a validation set according to an allocation ratio of 8:2.

[0072] Specifically, this application will first obtain the total number of images in the historical breast high-definition diffusion MR image dataset, and determine the number of images that should be included in the training set and the validation set according to the distribution ratio of 8:2. Afterwards, in order to ensure the randomness of the data, this application adopts random sampling to extract images from the historical breast high-definition diffusion MR image dataset. During this process, this application will assign a unique identifier to each image in the dataset, and use a random number generator to generate a random sequence equal to the total number of images. Afterwards, according to the generated random sequence, the images corresponding to the first 80% of the random numbers are further assigned to the training set, and the images corresponding to the remaining 20% ​​of the random numbers are assigned to the validation set.

[0073] In one embodiment, in step S2, for each image obtained by segmentation, performing breast region segmentation and normalization processing on the segmented image to obtain a pre-processed image includes:

[0074] Step S21, the left and right breast regions in the image are divided into halves, and the corresponding breast regions are segmented from the segmented image using an image segmentation algorithm to obtain a breast region segmentation image.

[0075] Specifically, the present application will first determine the dividing line based on the width of the image and the approximate position of the breast; then use the image cropping function in the image processing software to crop the image along the dividing line, and divide the image into two left and right parts containing each breast and its surrounding tissue to obtain a segmented image. Afterwards, the threshold segmentation algorithm based on the Otsu method is used to calculate the global threshold of the image and compare the grayscale value of each pixel in the segmented image with the threshold. In this process, the present application will identify the area with a pixel grayscale value higher than the threshold as the breast area, and vice versa as the background area. In this way, through such comparison, judgment and classification, the breast area is separated from the background area to obtain a breast area segmentation image.

[0076] Step S22, performing standardization processing on each breast region segmentation image obtained based on pixel value standardization technology to obtain a pre-processed image whose image grayscale value presents a standard normal distribution.

[0077] Specifically, the present application will normalize the value of each pixel in each breast region segmentation image to the interval [0,1] in a linear normalization manner to obtain a corresponding scaled image. After that, the scaled image is subjected to Z-score normalization to obtain a preprocessed image whose grayscale value is in a standard normal distribution.

[0078] In one embodiment, the present application determines the maximum and minimum values ​​of pixels in the breast region segmentation image, and normalizes the value of each pixel in the image to the interval [0,1] according to the linear normalization formula (original pixel value - maximum value) / (maximum value - minimum value).

[0079] In one of the embodiments, the present application calculates the mean and standard deviation of all pixels in the scaled image, and converts the value of each pixel in the scaled image into a standard normal distribution value according to the Z-score normalization formula, i.e., Z-score = (image pixel value - mean) / standard deviation, thereby reducing the convergence time in model training and improving the accuracy of the model.

[0080] In the above embodiment, the breast region segmentation image is standardized based on the pixel value standardization technology, so that the image gray value is in a standard normal distribution, thereby eliminating the difference in gray value distribution between different images, which is beneficial to subsequent image analysis and processing.

[0081] In one of the embodiments, in step S3, during the model training process, the pre-convolutional layer is used to perform a 3×3 convolution operation on the input image, and the obtained initial feature map is batch normalized and ReLU activated in sequence to obtain an enhanced feature map.

[0082] Specifically, the pre-convolutional layer transforms the input image X through the following formula: input Processing is performed to obtain the enhanced feature map X conv :

[0083] X conv =ReLU(BN3D(Conv3D 3×3 (X input )));

[0084] Among them, Conv3D 3×3 (*) indicates a 3×3 three-dimensional convolution operation on “*”, BN3D(*) indicates a three-dimensional batch normalization operation on “*”, and ReLU(*) indicates a ReLU activation operation on “*”.

[0085] It should be noted that ReLU activation is the activation function of the Rectified Linear Unit, and its mathematical expression is f(x) = max(0,x). When the input x is greater than 0, the ReLU function outputs x itself; when the input x is less than or equal to 0, the ReLU function outputs 0. This nonlinear transformation helps the model learn more complex feature representations.

[0086] In one of the embodiments, in step S3, the MSAA-ResNet composite module is composed of multiple core components stacked in sequence, and each component integrates the functions of the MSAA multi-scale attention module and the ResBlock residual block, wherein: the MSAA multi-scale attention module is used to fuse feature information of different scales and introduce an attention mechanism to enhance feature representation, and the ResBlock residual block is used for deep feature learning.

[0087] For details, please refer to Figure 2 , the first component contains an MSAA multi-scale attention module, which is used to fuse the multi-scale information in the input feature map and enhance the key features through the attention mechanism. It is followed by a ResBlock residual block, which receives the output of the MSAA module as input, performs deep feature learning, and maintains the flow of information through residual connections. The middle component has the same structure as the first component and also contains an MSAA multi-scale attention module and a ResBlock residual block. This component is used to further extract and enhance features while using residual learning to maintain the gradient stability of the network. The last component again contains an MSAA multi-scale attention module and a ResBlock residual block. The output of this component will be used as the output of the entire MSAA-ResNet composite module, providing a feature map that has been deeply feature extracted and enhanced.

[0088] In one embodiment, in step S3, after the input image is processed by the pre-convolution layer to obtain an enhanced feature map, the first component in the MSAA-ResNet composite module performs multi-scale feature extraction and fusion on the enhanced feature map, and introduces an attention mechanism through the following steps: performing a 1×1 convolution operation and average pooling followed by two 1×1 convolution operations on the enhanced feature map to obtain an intermediate feature map and a channel attention feature map, wherein a ReLU activation function for increasing nonlinearity is inserted between the two 1×1 convolution operations; based on multiple convolution kernels of different sizes, the enhanced feature map is subjected to a 1×1 convolution operation and an average pooling operation followed by two 1×1 convolution operations to obtain an intermediate feature map and a channel attention feature map. The intermediate feature maps are multi-scale fused to obtain a multi-scale fused feature map; based on the multi-scale fused feature map, a pooling operation is performed and a 7×7 convolution is performed followed by a sigmoid activation function, and after superimposing the multi-scale fused feature maps for spatial aggregation, a multi-scale spatial fused feature map is obtained; after performing a 1×1 convolution on the multi-scale spatial fused feature map, the obtained convolution feature map is element-wise multiplied and superimposed on the channel attention feature map to obtain a comprehensive feature map that combines channel attention and spatial attention; the comprehensive feature map is superimposed and merged with the enhanced feature map to obtain a fused enhanced feature map.

[0089] Specifically, when performing multi-scale fusion, the present application will perform multi-scale fusion on the intermediate feature maps based on three different-sized convolution kernels of 3×3, 5×5 and 7×7, and fuse the obtained three convolution feature maps through addition operations to obtain a multi-scale fused feature map M. For details, please refer to the formula: M = ∑ k∈{3,5,7} C k×k (X) to understand, where C k×k (X) represents the convolution operation on the input intermediate feature map X based on the convolution kernel of size k×k.

[0090] Furthermore, in the process of spatial aggregation, this application will reduce the resolution of the feature map based on the pooling operation to reduce the amount of calculation, and further extract features through 7×7 convolution to obtain a feature map containing richer contextual information. Then, this feature map is normalized to between 0 and 1 through the sigmoid activation function to generate a spatial attention weight map. Finally, the obtained spatial attention weight map is superimposed on the generated multi-scale fusion feature map by element-by-element multiplication to obtain a multi-scale spatial fusion feature map. The above process can be understood by referring to the following formula: Among them, M sa represents the multi-scale spatial fusion feature map, Pool(*) represents the pooling operation on “*”, C 7×7 (*) indicates a 7×7 convolution of “*”, σ indicates the sigmoid activation function, Represents the element-by-element multiplication formula.

[0091] Furthermore, the generated multi-scale spatial fusion feature map M sa After 1×1 convolution, this application will combine it with the channel attention feature map M ca The channel attention feature map M is superimposed in the form of element-by-element multiplication to obtain a comprehensive feature map that combines channel attention and spatial attention. ca It is obtained by the following formula: M ca =C 1×1 (ReLU(C 1×1 (AvgPool(X 1 )))), AvgPool(*) means average pooling operation on “*”, C 1×1 (*) indicates a 1×1 convolution of “*”. In summary, the generation process of the comprehensive feature map can be understood by referring to the following formula:

[0092]

[0093] It should be further explained that after obtaining the comprehensive feature map, the present application will superimpose and merge it with the input enhanced feature map X in the form of element-by-element addition, that is, combining the original features with the features processed by the complex attention mechanism to make full use of the information of both. By adding the elements one by one, the feature values ​​at each position will be enhanced accordingly, thereby obtaining a fused enhanced feature map.

[0094] In summary, the process of deep feature extraction and attention mechanism fusion processing of the input enhanced feature map X by the MSAA-ResNet composite module can be referred to the following formula:

[0095]

[0096] Where M = ∑ k∈{3,5,7} C k×k , M ca =C 1×1 (ReLU(C 1×1 (AvgPool(X)))), y 1 is the resulting fusion enhanced feature map.

[0097] In one embodiment, in step S3, after the first component in the MSAA-ResNet composite module performs multi-scale feature extraction and fusion, and introduces the attention mechanism, deep feature learning is performed through the following steps: a 3×3 convolution operation is performed on the input fused feature map to obtain a first initial feature map and a second initial feature map; the first initial feature map is batch normalized and ReLU activated in turn to obtain a first intermediate feature map; the first intermediate feature map is again subjected to a 3×3 convolution operation to further extract and fuse features, and the obtained convolution result feature map is batch normalized to obtain a second intermediate feature map; the second intermediate feature map and the second initial feature map are added, and ReLU activation is performed to obtain a fused and activated output feature map.

[0098] Specifically, the present application first performs batch normalization on the first initial feature map to accelerate the training process and improve the stability of the model. Then, the normalized feature map is nonlinearly transformed through the ReLU activation function to increase the nonlinearity of the network, thereby obtaining the first intermediate feature map.

[0099] Furthermore, the present application applies another 3×3 convolution kernel to the first intermediate feature map for convolution operation to further extract features. Then, the obtained convolution result feature map is batch normalized to eliminate internal covariate shift, thereby obtaining a second intermediate feature map.

[0100] Furthermore, the present application adds the second intermediate feature map and the second initial feature map element by element to fuse the feature information of the two. Then, the result of the addition is nonlinearly transformed through the ReLU activation function to obtain a fused and activated output feature map.

[0101] To sum up, the calculation process of the aforementioned output feature map can be specifically referred to the following formula:

[0102] X res =ReLU(Conv3D 3×3 (X 2 )+BN3D(Conv3D 3×3 (ReLU(BN3D(Conv3D 3×3 (X 2 ))))));

[0103] Among them, X 2 is the input fusion feature map, X res is the output feature map after fusion and activation. Since the relevant parameters in the formula have been explained in the above embodiments, this application will not repeat them here.

[0104] In one of the embodiments, in step S3, a multi-head attention mechanism is applied to the ResBlock residual block of the last component in the MSAA-ResNet composite module to integrate global features and enhance the correlation between features.

[0105] Specifically, this application will split the feature map output by the ResBlock residual block into multiple attention heads, each of which contains a part of the feature channel. For each attention head, this application will generate queries, keys, and values ​​through linear transformations. Through these operations, each attention head can capture the correlation between different positions in the feature map. Finally, after completing the self-attention calculation, the outputs of each attention head are spliced ​​in the feature dimension to form a large feature vector.

[0106] In one embodiment, in step S3, the calculation formula of the multi-head attention mechanism includes:

[0107] X attn =LayerNorm(X flat +Dropout(MultiHead(Q,K,V)));

[0108] Among them, X attn represents the normalized attention feature map, X flat Represents the input feature map X∈R C×D×H×WIn the form of spatial sequence formed by flattening, C, D, H, and W represent the number of channels, depth, height, and width of the feature map, respectively; Q, K, and V represent query, key, and value matrices, respectively, and for each attention head i, there are Q i =X flat W i Q , K i =X flat W i K 、V i =X flat W i V ;Q i , K i 、V i denote the query vector, key vector, and value vector of the i-th attention head, respectively, and W i Q , W i K , W i V They represent the weight matrices corresponding to the i-th attention head, which are mainly used to linearly transform the input Q, K, and V matrices into different subspaces; MultiHead(Q,K,V)=Concat(Attention(Q 1 ,K 1 ,V 1 ),…,Attention(Q h ,K h ,V h ))W O represents the output of the multi-head attention mechanism obtained by concatenating the outputs of the i-th attention head to the h-th attention head in the feature dimension. Concat represents the concatenation operation used to concatenate the outputs of h attention heads together. W O Represents the output weight matrix used to linearly transform the concatenated result to the final output space; represents the output of the i-th attention head, d k It represents the dimension of the key vector, softmax represents the conversion of the dot product result into a probability distribution, LayerNorm represents layer normalization, which is used to normalize the input, and Dropout represents the regularization operation, which is used to reduce overfitting.

[0109] Please refer to Figure 3 The present application discloses a high-definition diffusion MR image breast cancer detection system, the system comprising a data set partitioning module, an image preprocessing module, a residual classification network training module, a lesion classification module, and a lesion area location prediction module, wherein:

[0110] The data set division module is used to divide the acquired historical breast high-definition diffusion MR image data set into a training set and a verification set according to a preset allocation ratio.

[0111] The image preprocessing module is used to perform breast region segmentation and standardization processing on the segmented image for each image obtained by segmentation to obtain a preprocessed image.

[0112] The residual classification network training module is used to input the preprocessed training set and the verification set into the residual classification network model based on multi-scale multi-head attention for model training, wherein the residual classification network model includes a pre-convolutional layer, an MSAA-ResNet composite module that integrates multi-scale attention mechanism and residual learning, and a global feature association module that introduces a multi-head attention mechanism.

[0113] The lesion classification module is used to input the acquired real-time breast high-definition diffusion MR image into the trained residual classification network model to obtain the lesion classification result.

[0114] The lesion area location prediction module is used to input the real-time breast high-definition diffusion MR image corresponding to the lesion into the YOLOv8 target detection model based on the lesion classification result to obtain the lesion area location information.

[0115] In one embodiment, the above modules are also used to implement a high-definition diffusion MR image breast cancer detection method as described in any one of the above method embodiments, which is not limited in this application.

[0116] As can be seen from the above, a high-definition diffusion MR image breast cancer detection system disclosed in the present application helps to remove irrelevant information in the image and reduce noise interference through breast area segmentation and standardization processing, thereby improving the accuracy of subsequent classification; on the one hand, the MSAA-ResNet composite module integrates multi-scale attention mechanism and residual learning, which can process feature information of different scales and enhance the model's recognition ability for lesions of different sizes and shapes; on the other hand, the multi-head attention mechanism can process multiple feature subsets in parallel, improve the model's ability to capture complex features, and increase the robustness of the model; after obtaining the lesion classification result, the YOLOv8 target detection model is used to extract the lesion area position information of the real-time breast high-definition diffusion MR image corresponding to the lesion, and combined with the high efficiency and accuracy of YOLOv8 in target detection, the precise positioning of the lesion is achieved.

[0117] It should be noted that the sequence of the above embodiments of the present invention is only for description and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0118] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.

Claims

1. A method for detecting breast cancer using high-definition diffusion MR images, characterized in that: The method comprises: S1. Dividing the acquired historical breast high-definition diffusion MR image dataset into a training set and a validation set according to a preset allocation ratio; S2, for each image obtained by segmentation, performing breast region segmentation and standardization processing on the segmented image to obtain a preprocessed image; S3, inputting the preprocessed training set and the validation set into a residual classification network model based on multi-scale multi-head attention for model training, wherein the residual classification network model includes a pre-convolutional layer, an MSAA-ResNet composite module integrating a multi-scale attention mechanism and residual learning, and a global feature association module introducing a multi-head attention mechanism; S4, inputting the acquired real-time breast high-definition diffusion MR image into the trained residual classification network model to obtain the lesion classification result; S5. Based on the lesion classification results, the real-time breast high-definition diffusion MR image corresponding to the lesion is input into the YOLOv8 target detection model to obtain the lesion area location information.

2. The method according to claim 1, characterized in that: In step S1, the historical breast high-definition diffusion MR image dataset is divided into a training set and a validation set according to an allocation ratio of 8:

2.

3. The method according to claim 1, characterized in that In step S2, for each image obtained by segmentation, breast region segmentation and segmented image standardization are performed to obtain a pre-processed image, including: S21, dividing the left and right breast regions in the image into halves, and segmenting the corresponding breast regions from the segmented image using an image segmentation algorithm to obtain a breast region segmentation image; S22. Performing standardization processing on each breast region segmentation image obtained based on pixel value standardization technology to obtain a pre-processed image whose image grayscale value presents a standard normal distribution.

4. The method according to claim 1, characterized in that: In step S3, during the model training process, the pre-convolution layer is used to perform a 3×3 convolution operation on the input image, and the obtained initial feature map is batch normalized and ReLU activated in sequence to obtain an enhanced feature map.

5. The method according to claim 1, characterized in that In step S3, the MSAA-ResNet composite module is composed of multiple core components stacked in sequence, and each component integrates the functions of the MSAA multi-scale attention module and the ResBlock residual block, wherein: the MSAA multi-scale attention module is used to fuse feature information of different scales and introduce an attention mechanism to enhance feature representation, and the ResBlock residual block is used for deep feature learning.

6. The method according to claim 5, characterized in that In step S3, after the input image is processed by the pre-convolution layer to obtain an enhanced feature map, the first component in the MSAA-ResNet composite module performs multi-scale feature extraction and fusion on the enhanced feature map and introduces an attention mechanism through the following steps: Performing a 1×1 convolution operation and average pooling followed by two 1×1 convolution operations on the enhanced feature map to obtain an intermediate feature map and a channel attention feature map, wherein a ReLU activation function for increasing nonlinearity is inserted between the two 1×1 convolution operations; Based on a plurality of convolution kernels of different sizes, multi-scale fusion is performed on the intermediate feature map to obtain a multi-scale fused feature map; Based on the multi-scale fusion feature map, a pooling operation is performed and a 7×7 convolution followed by a sigmoid activation function is performed, and after superimposing the multi-scale fusion feature map for spatial aggregation, a multi-scale spatial fusion feature map is obtained; After performing a 1×1 convolution on the multi-scale spatial fusion feature map, the obtained convolution feature map is element-wise multiplied and superimposed on the channel attention feature map to obtain a comprehensive feature map that combines channel attention and spatial attention; The comprehensive feature map and the enhanced feature map are superimposed and merged to obtain a fused enhanced feature map.

7. The method according to claim 5, characterized in that In step S3, after the first component in the MSAA-ResNet composite module performs multi-scale feature extraction and fusion and introduces the attention mechanism, deep feature learning is performed through the following steps: Perform 3×3 convolution operations on the input fusion feature maps to obtain the first initial feature map and the second initial feature map; Performing batch normalization and ReLU activation on the first initial feature map in sequence to obtain a first intermediate feature map; Performing a 3×3 convolution operation on the first intermediate feature map again to further extract and fuse features, and performing batch normalization processing on the obtained convolution result feature map to obtain a second intermediate feature map; The second intermediate feature map and the second initial feature map are added together, and ReLU activation is performed to obtain a fused and activated output feature map.

8. The method according to claim 5, characterized in that In step S3, a multi-head attention mechanism is applied to the ResBlock residual block of the last component in the MSAA-ResNet composite module to integrate global features and enhance the correlation between features.

9. The method according to claim 8, characterized in that In step S3, the calculation formula of the multi-head attention mechanism is include: X attn =LayerNorm(X flat +Dropout(MultiHead(Q,K,V))); Among them, X attn represents the normalized attention feature map, X flat Represents the input feature map X∈R C×D×H×W In the form of spatial sequence formed by flattening, C, D, H, and W represent the number of channels, depth, height, and width of the feature map, respectively; Q, K, and V represent query, key, and value matrices, respectively, and for each attention head i, there are Q i =X flat W i Q , V i =X flat W i V ;Q i , K i 、V i denote the query vector, key vector, and value vector of the i-th attention head, respectively, and W i Q , W i V They represent the weight matrices corresponding to the i-th attention head, which are mainly used to linearly transform the input Q, K, and V matrices into different subspaces; MultiHead(Q,K,V)=Concat(Attention(Q1,K1,V1),…,Attention(Q h ,K h ,V h ))W O represents the output of the multi-head attention mechanism obtained by concatenating the outputs of the i-th attention head to the h-th attention head in the feature dimension. Concat represents the concatenation operation used to concatenate the outputs of h attention heads together. W O Represents the output weight matrix used to linearly transform the concatenated result to the final output space; represents the output of the i-th attention head, d k It represents the dimension of the key vector, softmax represents the conversion of the dot product result into a probability distribution, LayerNorm represents layer normalization, which is used to normalize the input, and Dropout represents the regularization operation, which is used to reduce overfitting.

10. A high-definition diffusion MR image breast cancer detection system, characterized in that: The system includes a data set division module, an image preprocessing module, a residual classification network training module, a lesion classification module, and a lesion area location prediction module, wherein: The data set division module is used to divide the acquired historical breast high-definition diffusion MR image data set into a training set and a verification set according to a preset allocation ratio; The image preprocessing module is used to perform breast region segmentation and standardization processing on the segmented image for each image obtained by segmentation to obtain a preprocessed image; The residual classification network training module is used to input the preprocessed training set and the verification set into the residual classification network model based on multi-scale multi-head attention for model training, wherein the residual classification network model includes a pre-convolutional layer, an MSAA-ResNet composite module integrating a multi-scale attention mechanism and residual learning, and a global feature association module introducing a multi-head attention mechanism; The lesion classification module is used to input the acquired real-time breast high-definition diffusion MR image into the trained residual classification network model to obtain the lesion classification result; The lesion area position prediction module is used to input the real-time breast high-definition diffusion MR image corresponding to the lesion into the YOLOv8 target detection model based on the lesion classification result to obtain the lesion area position information.

Citation Information

Cited By

  • Multi-time-sequence hepatocellular carcinoma curative effect prediction system based on twin network and storage medium

    CN121256336A

  • Method and system for predicting postoperative recurrence risk of embedded attention-enhancing PELD

    CN121709272A

  • Knee meniscus injury detection method and system fusing multiple sequences and contrast learning

    CN121767758A