A breast cancer image recognition method based on deep learning
Patent Information
- Application Number
- CN202610987924.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-03
- Publication Date
- 2026-10-13
AI Technical Summary
临床常用乳腺钼靶、超声等影像检查手段,但其诊断高度依赖医师经验,面对海量影像数据时,存在人工判读效率低、主观性强、微小病灶易漏诊误诊等问题,难以满足大规模临床筛查的自动化、标准化需求
[0039]与现有技术相比,本发明的优点和积极效果在于,本发明通过多尺度梯度显著性提取、水平集轮廓演化精准定位图像ROI,剔除冗余干扰,大幅提升病灶初始定位精度。采用非下采样轮廓波变换与自适应增强算法,有效抑制噪声、强化病灶细节,优化图像质量。多分支特征网络结合半监督对比学习,充分利用有标签与无标签数据,高效提取全局、局部、边缘三类互补特征。自适应门控交叉注意力融合模块实现特征深度交互,避免信息损耗。最终搭配 YOLOv5 实现快速精准检测,解决人工判读效率低、主观性强、微小病灶易漏诊误诊的痛点,满足临床大规模自动化筛查需求,显著提升乳腺癌诊断的准确率与效率。
Smart Images

Figure CN122906429A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of image recognition technology, and in particular relates to a breast cancer image recognition method based on deep learning. Background Technology
[0002] Breast cancer imaging screening and accurate lesion identification are crucial for improving patient cure rates and prognosis. While mammography and ultrasound are commonly used in clinical practice, their diagnosis is highly dependent on physician experience. Faced with massive amounts of image data, manual interpretation suffers from low efficiency, strong subjectivity, and the potential for missing or misdiagnosing small lesions, making it difficult to meet the automated and standardized needs of large-scale clinical screening. Deep learning technology, with its powerful image feature extraction and analysis capabilities, provides a technological direction for automated breast lesion identification and has become a key research focus in the field of intelligent medical imaging diagnosis. Summary of the Invention
[0003] To address the technical problems existing in the above-mentioned background art, this invention proposes a breast cancer image recognition method based on deep learning.
[0004] To achieve the above objectives, the technical solution adopted by the present invention is as follows:
[0005] S1. Obtain the breast image to be identified, extract the region of interest from the breast image, and obtain the breast ROI image;
[0006] S2. Perform image processing operations on the breast ROI image;
[0007] S3. Input the processed breast ROI image into a pre-trained multi-branch feature extraction network to extract global context features, local detail features and edge texture features respectively;
[0008] S4. Construct an adaptive feature interaction and fusion module to perform cross-branch feature interaction and weighted fusion of global context features, local detail features and edge texture features to generate a fused feature map.
[0009] S5. Input the fused feature map into the lesion detection and classification network to achieve lesion identification.
[0010] Preferably, the specific implementation of extracting the region of interest (ROI) from the breast image to obtain the breast ROI image is as follows:
[0011] S11. Normalize the input image into a grayscale matrix. Where H is the number of pixels vertically and W is the number of pixels horizontally, the image is obtained by Gaussian convolution and downsampling to obtain a multi-scale decomposed image. The value of s ranges from 1 to S, where S is the total number of decomposition layers; for each scale of the image The 3×3 Sobel operator is used to calculate the transverse and longitudinal gradients, thereby obtaining the single-scale gradient magnitude. ;
[0012] S12. Normalize the gradient magnitude map at each scale to obtain a normalized gradient magnitude map. ,statistics The gradient magnitude histogram is used to count the number of pixels appearing in the g-th gradient magnitude interval. Calculate the probability of this gradient magnitude occurring: ,in, The total number of pixels; the gradient information entropy at the s-th scale is calculated based on the probability distribution. Calculate the scale-adaptive weights based on the gradient information entropy at each scale: ;satisfy The scale gradient magnitudes are then upsampled to their original size and weighted and fused to obtain a global gradient saliency map. ,in, Upsampling for bilinear interpolation;
[0013] S13. Perform SLIC superpixel clustering on the image based on the gradient saliency map. Obtain uniform superpixel segmentation results through iterative clustering. Calculate the average saliency of each superpixel block and the global saliency mean. Retain target superpixel blocks whose average saliency is greater than or equal to the global saliency mean. After filling the holes through morphological closing operation, obtain the coarsely screened target region.
[0014] S14. Using the coarsely screened region as the initial contour, the contour evolution is performed using the level set method. The contour converges towards the target edge by using the gray-level variance and gradient variance of the regions inside and outside the contour, thus initializing the level set signed distance function with the contour of the coarsely screened region. Construct the contour evolution energy functional: ,in, This is the balance coefficient, with a value ranging from 0 to 1, and , This refers to the difference in features within the contour region. , For the feature difference term of the region outside the contour ,in The variance of gray levels in the region. To update the regional gradient variance, gradient descent is used. The process continues until the change in contour overlap is less than the threshold, at which point the precise target contour is obtained.
[0015] S15. Calculate the minimum bounding rectangle and saliency score of each independent precise contour after convergence, calculate the intersection-union ratio between contours, perform non-maximum suppression with a set threshold, remove overlapping low-value regions, and output the complete ROI image.
[0016] Preferably, step S2 involves image processing of the breast ROI image, specifically including:
[0017] S21. Perform non-subsampled contour wave transform on the grayscale image of the breast ROI to decompose it into a set of low-frequency subbands and high-frequency subbands.
[0018] S22. Using the dual-threshold Otsu method, three gray-scale intervals are divided according to gray-scale characteristics. Differential adaptive gamma correction is performed on each interval to compress the background and specifically enhance the lesion area.
[0019] S23. For each high-frequency sub-band, noise and details are first distinguished by local variance. After noise is suppressed by scale-adaptive soft threshold, adaptive gain is calculated according to local variance and decomposition scale to amplify effective detail features.
[0020] S24. Reconstruct the processed subband inverse transform into a preliminary enhanced image, and dynamically fine-tune the volume contrast based on the deviation between the global contrast and the preset threshold.
[0021] S25. Finally, bilateral filtering is used to smooth the edges of the image, and the final enhanced breast ROI image is output.
[0022] Preferably, step S3, which involves inputting the processed breast ROI image into a pre-trained multi-branch feature extraction network to extract global context features, local detail features, and edge texture features, is implemented as follows:
[0023] S31. Construct a semi-supervised dataset and divide the dataset into a labeled subset and an unlabeled subset in a 7:3 ratio. The labeled subset contains labeled lesion categories and degrees, while the unlabeled subset contains unlabeled normal and abnormal images.
[0024] S32. Perform multi-view data augmentation on all samples, generating two independent augmented views for each sample. The augmentation methods include random cropping, horizontal flipping, and grayscale jittering.
[0025] S33. Initialize the multi-branch feature extraction network architecture. Use ResNet-50 pre-trained on the dataset as the shared feature backbone to extract basic visual features of the image. After the shared backbone, construct three independent feature branch heads in parallel, corresponding to the global context branch, local detail branch and edge texture branch, respectively. The weights of the branch heads are randomly initialized using a uniform distribution of Xavier, and the bias term is initialized to 0.
[0026] S34. Construct an improved dual-path semi-supervised contrastive learning loss function, and integrate intra-branch self-supervised constraints and cross-branch mutual supervision constraints to construct the total pre-training loss function;
[0027] S35. Use the AdamW optimizer to minimize the total pre-training loss and use the cosine annealing strategy to adjust the learning rate. When the total loss decreases by less than the set threshold or reaches the preset maximum number of training rounds for 10 consecutive training rounds, the pre-training is completed.
[0028] S36. Input the breast ROI image to be predicted into a pre-trained multi-branch feature extraction network to extract global context features, local detail features, and edge texture features.
[0029] Preferably, step S34, which constructs the total pre-training loss function, specifically includes:
[0030] S341. For each branch, calculate the feature similarity between the two augmented views of the same sample, while maximizing the difference with the features of other samples in the batch. Use the InfoNCE loss function. The self-supervised loss of the m-th branch is: Where N is the batch size, Let be the output features of the two augmented views of the i-th sample on the m-th branch, and let sim be the cosine similarity function. The feature output by the j-th view in the m-th branch within the batch;
[0031] S342. Utilizing the complementarity of features from different branches, the global context branch features are used as anchors to perform positive sample matching with the same sample features from the local detail branch and edge texture branch, respectively, and negative sample differentiation with other sample features. The mutual supervision loss is: ,in, These are the output features of the i-th sample in the global, local, and marginal branches, respectively;
[0032] S343. Construct the overall pre-training loss function: ,in is the deweighted coefficient of the loss term, and the sum of the two is 1.
[0033] Preferably, step S4, which constructs an adaptive feature interaction fusion module, performs cross-branch feature interaction and weighted fusion on global context features, local detail features, and edge texture features to generate a fused feature map, is specifically implemented as follows:
[0034] S41. Construct three sets of gated cross-attention interaction units to sequentially complete bidirectional feature interactions between global and local, global and edge, and local and edge. The global-local bidirectional interaction generates globally guided local features using the global spatial feature map as the query and the local feature map as the key. At the same time, it generates locally corrected global features using the local feature map as the query and the global spatial feature map as the key. The interactive global features and local features are obtained by weighted fusion with the original features through two learnable gating coefficients.
[0035] S42. The global-edge bidirectional interaction uses the global features after the interaction as the query and the edge feature map as the key to generate globally guided edge features. At the same time, it uses the edge feature map as the query and the global features after the interaction as the key to generate edge-enhanced global features. The global features and edge features after the second interaction are obtained by weighted fusion through gating coefficients.
[0036] S43. Local-edge bidirectional interaction uses the local features after the interaction as the query and the edge features after the second interaction as the key to generate local guided edge features. At the same time, it uses the edge features after the second interaction as the query and the local features after the interaction as the key to generate edge-refined local features. The final local and edge features after the interaction are obtained by weighted fusion through gating coefficients.
[0037] S44. The global features obtained after secondary interaction, the local features and edge features obtained after final interaction are weighted and fused to obtain a fused feature map.
[0038] Preferably, the lesion detection and classification network in step S5 is the YOLOv5 network.
[0039] Compared with existing technologies, the advantages and positive effects of this invention are as follows: This invention accurately locates the ROI in an image through multi-scale gradient saliency extraction and level set contour evolution, eliminating redundant interference and significantly improving the initial lesion localization accuracy. It employs non-subsampled contourlet transform and adaptive enhancement algorithms to effectively suppress noise, enhance lesion details, and optimize image quality. A multi-branch feature network combined with semi-supervised contrastive learning fully utilizes labeled and unlabeled data to efficiently extract complementary features of global, local, and edge types. An adaptive gated cross-attention fusion module enables deep feature interaction, avoiding information loss. Finally, combined with YOLOv5, it achieves rapid and accurate detection, addressing the pain points of low efficiency, strong subjectivity, and easy missed or misdiagnosed small lesions in manual interpretation, meeting the needs of large-scale automated clinical screening, and significantly improving the accuracy and efficiency of breast cancer diagnosis. Attached Figure Description
[0040] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0041] Figure 1 This is a flowchart illustrating a deep learning-based breast cancer image recognition method. Detailed Implementation
[0042] To better understand the above-mentioned objectives, features, and advantages of the present invention, the present invention will be further described below in conjunction with the accompanying drawings and embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in these embodiments can be combined with each other.
[0043] Numerous specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways than those described herein, and therefore the invention is not limited to the specific embodiments disclosed in the following specification.
[0044] In practice, existing breast cancer imaging screening and precise lesion identification commonly use imaging examinations such as mammography and ultrasound. However, these diagnostic methods are highly dependent on physician experience. When faced with massive amounts of image data, manual interpretation suffers from low efficiency, strong subjectivity, and the tendency to miss or misdiagnose small lesions, making it difficult to meet the automation and standardization requirements of large-scale clinical screening. This invention proposes a breast cancer image recognition method based on deep learning, the specific implementation steps of which are as follows: Figure 1 As shown.
[0045] First, an image of the breast tissue to be identified is acquired, and the region of interest (ROI) is extracted from the breast image to obtain the breast ROI image. Specifically, the input image is normalized into a grayscale matrix. Where H is the number of pixels vertically and W is the number of pixels horizontally, the image is obtained by Gaussian convolution and downsampling to obtain a multi-scale decomposed image. The value of s ranges from 1 to S, where S is the total number of decomposition layers; for each scale of the image The 3×3 Sobel operator is used to calculate the transverse and longitudinal gradients, thereby obtaining the single-scale gradient magnitude. Normalize the gradient magnitude map at each scale to obtain a normalized gradient magnitude map. ,statistics The gradient magnitude histogram is used to count the number of pixels appearing in the g-th gradient magnitude interval. Calculate the probability of this gradient magnitude occurring: ,in, The total number of pixels; the gradient information entropy at the s-th scale is calculated based on the probability distribution. Calculate the scale-adaptive weights based on the gradient information entropy at each scale: ;satisfy The scale gradient magnitudes are then upsampled to their original size and weighted and fused to obtain a global gradient saliency map. ,in, This is for bilinear interpolation upsampling.
[0046] SLIC superpixel clustering is performed on the image based on the gradient saliency map. Uniform superpixel segmentation results are obtained through iterative clustering. The average saliency of each superpixel block and the global saliency mean are calculated. Target superpixel blocks whose average saliency is greater than or equal to the global saliency mean are retained. After filling the holes through morphological closing operation, the coarsely screened target regions are obtained.
[0047] Using the coarsely screened region as the initial contour, the contour evolution is performed using the level set method. The contour converges towards the target edge by the gray-level variance and gradient variance of the regions inside and outside the contour, and the signed distance function of the level set is initialized with the contour of the coarsely screened region. Construct the contour evolution energy functional: ,in, This is the balance coefficient, with a value ranging from 0 to 1, and , This refers to the difference in features within the contour region. , For the feature difference term of the region outside the contour ,in The variance of gray levels in the region. To update the regional gradient variance, gradient descent is used. The process continues until the change in contour overlap is less than the threshold, at which point the precise target contour is obtained.
[0048] For the converged precise target contours, the minimum bounding rectangle and saliency score of each independent precise contour are calculated. The intersection-union ratio (IU) between contours is calculated, and non-maximum suppression (NMS) is performed with a set threshold to remove overlapping low-value regions, outputting a complete ROI image. Specifically, for the binary precise contour image obtained after convergence of the level set method, connected component analysis is first performed to extract all independent closed contours, filtering out small noise contours with a pixel area less than 20, and excluding clinically insignificant interference regions. For each retained independent precise contour, its axis-aligned minimum bounding rectangle is calculated, and the coordinates of the top-left corner, bottom-right corner, width, and height of the rectangle are accurately recorded for subsequent image cropping. At the same time, the saliency score of each contour is calculated, which is the arithmetic mean of the values of all pixels in the global gradient saliency map within the region enclosed by the contour. The higher the score, the greater the probability that the region contains a lesion. All contours are sorted in descending order of saliency score, and NMS is performed. Initialize the list of retained contours, then sequentially add the contour with the highest current score to the list. Next, calculate the Intersection over Union (IoU) of the minimum bounding rectangles of this contour and all remaining contours; this is the ratio of the area of the intersection to the area of the union of the two rectangles. Set an IoU threshold and remove all low-value contours that overlap with the currently retained contour and have an IoU greater than the threshold. Repeat this process until all contours have been filtered. Finally, for the minimum bounding rectangles corresponding to all retained contours, perform region-by-region cropping on the original breast image to obtain a complete breast ROI image. If multiple valid ROIs exist, sort them from highest to lowest significance score and output them to provide accurate target regions for subsequent image enhancement and lesion identification.
[0049] Next, image processing operations are performed on the breast ROI image. Specifically, the input breast ROI grayscale image is processed. Perform non-subsampled contourlet transform (NSCT) to decompose the sample into a low-frequency subband L and K decomposition scales, with each scale containing D high-frequency subbands in each direction. Where k=1,2,...,K are the decomposition scale indices, and d=1,2,...,D are the direction indices; the decomposition satisfies a linear superposition relationship: Where L is the low-frequency subband coefficient matrix, which represents the overall brightness and large-scale structural information of the image; The high-frequency subband at the k-th scale and d-th direction represents the edge, texture, and noise information at the corresponding scale and direction; the decomposition scale K is 3, and the number of directions D at each scale is 4, 8, and 16 respectively.
[0050] To address the layered grayscale distribution characteristics of breast tissue, an adaptive grayscale mapping was performed on the low-frequency subband L to avoid overly bright backgrounds or insufficient lesion enhancement caused by global enhancement. The grayscale histogram of the low-frequency subband was then statistically analyzed. , For grayscale values, the optimal segmentation threshold is calculated using the improved dual-threshold Otsu method. , The grayscale range is divided into three corresponding anatomical intervals: low grayscale interval Corresponding to the adipose tissue region, medium grayscale range Corresponding to glandular tissue area, high grayscale region This corresponds to calcification points and dense lesion areas. The optimal threshold is obtained by minimizing the inter-class variance and the objective function: ,in, These represent the pixel percentages in three different ranges. Given the gray-level variance of the three intervals, iterate through all... The combination of makes The minimum threshold is the optimal segmentation threshold. , Differential gamma correction functions were designed for the three intervals to achieve background compression and lesion enhancement. The correction functions are as follows: ,in, These are the adaptive gamma values for three intervals, calculated from the statistical characteristics of each interval: , , ,in, The mean value of the low grayscale range. The average value of the high grayscale range. It represents the maximum value of the gray-level variance across the three intervals.
[0051] Given the characteristics of high-frequency components in breast images, which contain a large amount of noise and weak lesion edges, each high-frequency sub-band... Noise separation and adaptive detail amplification are performed on each coefficient in the high-frequency subband. Each coefficient is the value at the i-th row and j-th column of the two-dimensional coefficient matrix of the high-frequency subband; calculate its variance within a 3×3 local window. The calculation method is as follows: ,in, This represents the mean of the coefficients within the local window.
[0052] Set scale adaptive noise threshold ,in The global variance of this high-frequency subband. The adjustment factor is 1.2 to 1.8; soft thresholding is applied to the noise figure. For the retained detail coefficients, gain amplification is applied based on their local significance. The gain coefficient is positively correlated with local variance and negatively correlated with the decomposition scale. ,in, The scale gain factor. , , The magnified detail factor is: .
[0053] Perform inverse NSCT transform on the processed low-frequency subband and all high-frequency subbands to obtain a preliminary enhanced image. ; Calculate the global contrast of the initially enhanced image ,in, For global grayscale variance, A dynamic fine-tuning factor is introduced to determine the global grayscale mean. Calibrate the overall contrast: ,in, , The image after fine-tuning, within the preset normal contrast range, is as follows: .
[0054] Finally, a bilateral filter is used. Post-processing is performed to suppress residual noise while preserving lesion edge information, ultimately outputting an enhanced breast ROI image. . ,in The filter window half-width, For the spatial domain Gaussian kernel, ; For grayscale Gaussian kernels, W is the normalization coefficient, which is the sum of the products of the spatial weights and grayscale weights of all pixels involved in the calculation within the filtering window. It is used to normalize the filtering results and ensure that the dynamic range of the output pixel values is consistent with that of the original image.
[0055] The processed breast ROI images are then input into a pre-trained multi-branch feature extraction network to extract global context features, local detail features, and edge texture features, respectively. Specifically, a semi-supervised dataset is constructed, which is divided into a labeled subset and an unlabeled subset in a 7:3 ratio. The labeled subset contains images with labeled lesion categories and degrees, while the unlabeled subset contains unlabeled normal and abnormal images. Multi-view data augmentation is performed on all samples, generating two independent augmented views for each sample. Augmentation methods include random cropping, horizontal flipping, and grayscale jittering.
[0056] A multi-branch feature extraction network architecture is initialized, using a ResNet-50 pre-trained on the dataset as a shared feature backbone to extract basic visual features from the image. Three independent feature branch heads are constructed in parallel after the shared backbone, corresponding to the global context branch, local detail branch, and edge texture branch, respectively. The branch head weights are randomly initialized using a Xavier uniform distribution, and the bias term is initialized to 0. Specifically, first, the shared feature backbone is constructed, using a ResNet-50 pre-trained on the dataset as the base network. The final global average pooling layer and fully connected layer are removed, retaining only the feature extraction part. The enhanced breast ROI image is input into this shared backbone, and after 5 downsampling iterations, the basic visual features F_base are output.
[0057] After sharing a main branch, three independent feature branches are constructed in parallel: The global context branch takes F_base as input, passes through a global average pooling layer, a 1×1 convolutional layer (outputting 256 channels), and a ReLU activation function, outputting a global context feature vector F_g, used to capture the overall semantic information of the image. The local detail branch takes F_base as input, passes through two 3×3 dilated convolutional layers, a 1×1 convolutional layer (outputting 256 channels), and a ReLU activation function, outputting a local detail feature map F_l, used to focus on the subtle morphological features of lesions. The edge texture branch takes F_base as input, first passing through a 1×1 convolutional layer to reduce the dimensionality to 256 channels, then through a fixed 3×3 Sobel convolutional layer (extracting horizontal and vertical edges), and finally through a 1×1 convolutional layer to adjust the number of channels, outputting an edge texture feature map F_e, used to enhance the boundary and texture information of lesions.
[0058] An improved dual-path semi-supervised contrastive learning loss function is constructed, fusing intra-branch self-supervised constraints and cross-branch mutual supervision constraints to build the total pre-training loss function. For each branch, the feature similarity between two augmented views of the same sample is calculated, while maximizing the difference with features of other samples within the batch. The InfoNCE loss function is used, and the self-supervised loss of the m-th branch is: Where N is the batch size, Let be the output features of the two augmented views of the i-th sample on the m-th branch, and let sim be the cosine similarity function. Let $\mathbf{j}$ be the feature output of the $\mathbf{m}$ view in the $j$-th view of the batch in the $m$-th branch. Utilizing the complementarity of features from different branches, the global context branch feature is used as an anchor point to perform positive sample matching with the same sample feature from the local detail branch and edge texture branch, respectively, and to distinguish negative samples from other sample features. The mutual supervision loss is: ,in, Let each be an output feature of the i-th sample in the global, local, and marginal branches; construct the total pre-training loss function: ,in is the deweighted coefficient of the loss term, and the sum of the two is 1.
[0059] The AdamW optimizer is used to minimize the total pre-training loss, and the learning rate is adjusted using a cosine annealing strategy. Pre-training is completed when the total loss decreases by less than a set threshold or reaches the preset maximum number of training epochs for 10 consecutive training epochs. Finally, the breast ROI image to be predicted is input into the pre-trained multi-branch feature extraction network to extract global context features, local detail features, and edge texture features.
[0060] Then, an adaptive feature interaction fusion module is constructed to perform cross-branch feature interaction and weighted fusion on global context features, local detail features, and edge texture features to generate a fused feature map. Specifically, three sets of gated cross-attention interaction units are constructed to sequentially complete bidirectional feature interactions between global and local, global and edge, and local and edge. The global-local bidirectional interaction uses the global spatial feature map as the query and the local feature map as the key to generate globally guided local features, and simultaneously uses the local feature map as the query and the global spatial feature map as the key to generate locally corrected global features. These are then weighted and fused with the original features through two learnable gating coefficients to obtain the interacted global and local features. The global-edge bidirectional interaction uses the interacted global features as the query and the edge feature map as the key to generate globally guided edge features, and simultaneously uses the edge feature map as the query and the global spatial feature map as the key to generate locally corrected global features. The query map is used to generate global features with enhanced edges, which are then weighted and fused using gating coefficients to obtain the global and edge features after the second interaction. The local-edge bidirectional interaction uses the local features after the second interaction as the query, and the edge features after the second interaction are key-value-generated locally guided edge features. Simultaneously, the edge features after the second interaction are used as the query, and the local features after the second interaction are key-value-generated edge-refined local features. These are then weighted and fused using gating coefficients to obtain the final local and edge features after the interaction. The processed global features after the second interaction and the final local and edge features after the interaction are then weighted and fused to obtain a fused feature map. The weighting coefficients for this fusion are obtained by allocating the information entropy of the features.
[0061] Finally, the fused feature map is input into the lesion detection and classification network to achieve lesion identification. Specifically, the fused feature map is input into the YOLOv5 network, and the detection head outputs the initial prediction results: each anchor box corresponds to 4 bounding box coordinate parameters (center point, width, height), 1 target confidence score, and 2 class probabilities (benign, malignant). First, predicted boxes with a target confidence score below 0.3 are filtered out. Then, non-maximum suppression (NMS) is performed on the remaining boxes, with an IoU threshold of 0.5. The predicted box with the highest class probability is retained, and redundant boxes with excessive overlap are removed. Finally, the coordinates of the retained predicted boxes are mapped back to the original breast image space, outputting the accurate bounding box, class label, and corresponding confidence score of the lesion, completing the automated identification of the lesion.
[0062] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any other way. Any person skilled in the art may make changes or modifications to the above-disclosed technical content to create equivalent embodiments for application in other fields. However, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the protection scope of the present invention.
Claims
1. A deep learning-based method for breast cancer image recognition, characterized in that, Includes the following steps: S1. Obtain the breast image to be identified, extract the region of interest from the breast image, and obtain the breast ROI image; S2. Perform image processing operations on the breast ROI image; S3. Input the processed breast ROI image into a pre-trained multi-branch feature extraction network to extract global context features, local detail features and edge texture features respectively; S4. Construct an adaptive feature interaction and fusion module to perform cross-branch feature interaction and weighted fusion of global context features, local detail features and edge texture features to generate a fused feature map. S5. Input the fused feature map into the lesion detection and classification network to achieve lesion identification.
2. The breast cancer image recognition method based on deep learning according to claim 1, characterized in that, The specific implementation of extracting the region of interest (ROI) from the breast image to obtain the breast ROI image is as follows: S11. Normalize the input image into a grayscale matrix. Where H is the number of pixels vertically and W is the number of pixels horizontally, the image is obtained by Gaussian convolution and downsampling to obtain a multi-scale decomposed image. The value of s ranges from 1 to S, where S is the total number of decomposition layers; for each scale of the image The 3×3 Sobel operator is used to calculate the transverse and longitudinal gradients, thereby obtaining the single-scale gradient magnitude. ; S12. Normalize the gradient magnitude map at each scale to obtain a normalized gradient magnitude map. ,statistics The gradient magnitude histogram is used to count the number of pixels appearing in the g-th gradient magnitude interval. Calculate the probability of this gradient magnitude occurring: ,in, The total number of pixels; the gradient information entropy at the s-th scale is calculated based on the probability distribution. Calculate the scale-adaptive weights based on the gradient information entropy at each scale: ;satisfy The scale gradient magnitudes are then upsampled to their original size and weighted and fused to obtain a global gradient saliency map. ,in, Upsampling for bilinear interpolation; S13. Perform SLIC superpixel clustering on the image based on the gradient saliency map. Obtain uniform superpixel segmentation results through iterative clustering. Calculate the average saliency of each superpixel block and the global saliency mean. Retain target superpixel blocks whose average saliency is greater than or equal to the global saliency mean. After filling the holes through morphological closing operation, obtain the coarsely screened target region. S14. Using the coarsely screened region as the initial contour, the contour evolution is performed using the level set method. The contour converges towards the target edge by using the gray-level variance and gradient variance of the regions inside and outside the contour, thus initializing the level set signed distance function with the contour of the coarsely screened region. Construct the contour evolution energy functional: ,in, This is the balance coefficient, with a value ranging from 0 to 1, and , This refers to the difference in features within the contour region. , For the feature difference term of the region outside the contour ,in The variance of gray levels in the region. To update the regional gradient variance, gradient descent is used. The process continues until the change in contour overlap is less than the threshold, at which point the precise target contour is obtained. S15. Calculate the minimum bounding rectangle and saliency score of each independent precise contour after convergence, calculate the intersection-union ratio between contours, perform non-maximum suppression with a set threshold, remove overlapping low-value regions, and output the complete ROI image.
3. The breast cancer image recognition method based on deep learning according to claim 1, characterized in that, Step S2 involves image processing of the breast ROI image, specifically including: S21. Perform non-subsampled contour wave transform on the grayscale image of the breast ROI to decompose it into a set of low-frequency subbands and high-frequency subbands. S22. Using the dual-threshold Otsu method, three gray-scale intervals are divided according to gray-scale characteristics. Differential adaptive gamma correction is performed on each interval to compress the background and specifically enhance the lesion area. S23. For each high-frequency sub-band, noise and details are first distinguished by local variance. After noise is suppressed by scale-adaptive soft threshold, adaptive gain is calculated according to local variance and decomposition scale to amplify effective detail features. S24. Reconstruct the processed subband inverse transform into a preliminary enhanced image, and dynamically fine-tune the volume contrast based on the deviation between the global contrast and the preset threshold. S25. Finally, bilateral filtering is used to smooth the edges of the image, and the final enhanced breast ROI image is output.
4. The breast cancer image recognition method based on deep learning according to claim 1, characterized in that, Step S3 involves inputting the processed breast ROI image into a pre-trained multi-branch feature extraction network to extract global context features, local detail features, and edge texture features. The specific implementation of this step is as follows: S31. Construct a semi-supervised dataset and divide the dataset into a labeled subset and an unlabeled subset in a 7:3 ratio. The labeled subset contains labeled lesion categories and degrees, while the unlabeled subset contains unlabeled normal and abnormal images. S32. Perform multi-view data augmentation on all samples, generating two independent augmented views for each sample. The augmentation methods include random cropping, horizontal flipping, and grayscale jittering. S33. Initialize the multi-branch feature extraction network architecture. Use ResNet-50 pre-trained on the dataset as the shared feature backbone to extract basic visual features of the image. After the shared backbone, construct three independent feature branch heads in parallel, corresponding to the global context branch, local detail branch and edge texture branch, respectively. The weights of the branch heads are randomly initialized using a uniform distribution of Xavier, and the bias term is initialized to 0. S34. Construct an improved dual-path semi-supervised contrastive learning loss function, and integrate intra-branch self-supervised constraints and cross-branch mutual supervision constraints to construct the total pre-training loss function; S35. Use the AdamW optimizer to minimize the total pre-training loss and use the cosine annealing strategy to adjust the learning rate. When the total loss decreases by less than the set threshold or reaches the preset maximum number of training rounds for 10 consecutive training rounds, the pre-training is completed. S36. Input the breast ROI image to be predicted into a pre-trained multi-branch feature extraction network to extract global context features, local detail features, and edge texture features.
5. The breast cancer image recognition method based on deep learning according to claim 4, characterized in that, Step S34, which constructs the total pre-training loss function, specifically includes: S341. For each branch, calculate the feature similarity between the two augmented views of the same sample, while maximizing the difference with the features of other samples in the batch. Use the InfoNCE loss function. The self-supervised loss of the m-th branch is: Where N is the batch size, Let be the output features of the two augmented views of the i-th sample on the m-th branch, and let sim be the cosine similarity function. The feature output by the j-th view in the m-th branch within the batch; S342. Utilizing the complementarity of features from different branches, the global context branch features are used as anchors to perform positive sample matching with the same sample features from the local detail branch and edge texture branch, respectively, and negative sample differentiation with other sample features. The mutual supervision loss is: ,in, These are the output features of the i-th sample in the global, local, and marginal branches, respectively; S343. Construct the overall pre-training loss function: ,in This is the deweighted coefficient of the loss term, and the sum of the two is 1.
6. The breast cancer image recognition method based on deep learning according to claim 1, characterized in that, Step S4, which constructs an adaptive feature interaction and fusion module, performs cross-branch feature interaction and weighted fusion on global context features, local detail features, and edge texture features to generate a fused feature map, is specifically implemented as follows: S41. Construct three sets of gated cross-attention interaction units to sequentially complete bidirectional feature interactions between global and local, global and edge, and local and edge. The global-local bidirectional interaction generates globally guided local features using the global spatial feature map as the query and the local feature map as the key. At the same time, it generates locally corrected global features using the local feature map as the query and the global spatial feature map as the key. The interactive global features and local features are obtained by weighted fusion with the original features through two learnable gating coefficients. S42. The global-edge bidirectional interaction uses the global features after the interaction as the query and the edge feature map as the key to generate globally guided edge features. At the same time, it uses the edge feature map as the query and the global features after the interaction as the key to generate edge-enhanced global features. The global features and edge features after the second interaction are obtained by weighted fusion through gating coefficients. S43. Local-edge bidirectional interaction uses the local features after the interaction as the query and the edge features after the second interaction as the key to generate local guided edge features. At the same time, it uses the edge features after the second interaction as the query and the local features after the interaction as the key to generate edge-refined local features. The final local and edge features after the interaction are obtained by weighted fusion through gating coefficients. S44. The global features obtained after secondary interaction, the local features and edge features obtained after final interaction are weighted and fused to obtain a fused feature map.
7. The breast cancer image recognition method based on deep learning according to claim 1, characterized in that, The lesion detection and classification network in step S5 is the YOLOv5 network.