Medical image detection method based on cross-channel and cell density adaptive mechanism
By constructing a cross-channel cell density adaptive attention method for detecting tumor sprouting in colorectal cancer, the problems of insufficient adaptability to changes in cell density and instability of cross-scale target detection in existing technologies are solved, achieving efficient and accurate tumor sprouting detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- JIANGNAN UNIV
- Filing Date
- 2025-12-26
- Publication Date
- 2026-05-01
AI Technical Summary
Existing technologies for detecting budding in colorectal tumors suffer from insufficient adaptability to changes in cell density, inadequate utilization of semantic information between channels, and instability in cross-scale target detection at multiple magnifications, making it difficult to meet the needs of efficient and accurate clinical diagnosis.
A method for detecting tumor sprouting in colorectal cancer based on cross-channel cell density adaptive attention is constructed. By embedding a cell density adaptive attention module, a cross-channel feature enhancement module, and a multi-scale detection head network, accurate detection of pathological images is achieved.
It significantly improves the accuracy and robustness of tumor budding detection, can adapt to the detection needs under different cell densities and magnifications, and improves detection efficiency and consistency.
Smart Images

Figure CN121414749B_ABST
Abstract
Description
Medical image detection method based on cross-channel and cell density adaptive mechanism Technical Field
[0001] This invention relates to the field of medical image processing and artificial intelligence interdisciplinary application technology, and in particular to a medical image detection method based on cross-channel and cell density adaptive mechanisms. Background Technology
[0002] Colorectal malignant proliferative histiocytosis (CPD) is a type of disease with high incidence and mortality worldwide. Early assessment of its disease progression characteristics is crucial for optimizing the effectiveness of subsequent interventions. In this histopathological analysis, tumor budding is a core indicator reflecting the invasiveness and metastatic potential of the lesion tissue, specifically manifested as a single abnormal cell or small cluster of cells at the lesion infiltration front.
[0003] Currently, tumor budding assessment primarily relies on pathologists manually observing and counting tumor buds under high-powered microscopes on immunohistochemically stained full-field pathological sections. However, full-field pathological sections have extremely high resolution (up to 150,000 × 150,000 pixels), complex tissue structures, and uneven cell density. Furthermore, the diverse morphologies and sparse distribution of tumor buds make them easily confused with inflammatory cells or background tissue. This results in manual assessment being not only time-consuming and labor-intensive but also susceptible to subjective experience, leading to poor consistency, low efficiency, and low accuracy. In addition, the lack of unified standards across laboratories in staining, scanning, and image sampling makes traditional algorithms based on color segmentation or basic morphological features difficult to reliably adapt to multi-sample scenarios, severely limiting both detection accuracy and robustness.
[0004] Deep learning technology has provided a breakthrough approach for intelligent analysis of histopathological images. End-to-end target detection frameworks, such as YOLO, can efficiently achieve multi-scale feature extraction and rapid target localization, opening up new directions for automated detection of tumor sprouting. However, existing technologies still have many limitations, specifically:
[0005] First, when faced with ultra-high resolution full-field slices, the manual delineation and counting of areas of interest is not only time-consuming and laborious, but also leads to low consistency of results among different evaluators due to subjective factors, making it difficult to meet the needs of efficient clinical diagnosis.
[0006] Second, traditional image processing or shallow machine learning methods are too sensitive to parameters such as staining intensity and cell morphology boundaries, have poor generalization ability across experimental conditions, and are prone to missed detections and false detections.
[0007] Third, despite the high accuracy of deep learning detection, it still faces three challenges in the tumor sprouting task: First, the fixed-parameter self-attention mechanism cannot dynamically adjust the feature response with cell density, resulting in an imbalance in feature extraction between high and low density regions; second, traditional convolutional networks are difficult to capture deep semantic relationships between feature channels and cannot fully explore the potential information of lesions; and third, the tumor sprouting scale is significantly heterogeneous, and single-scale detection modules are prone to missing small targets and falsely detecting large targets, affecting the overall detection performance.
[0008] Fourth, existing improved YOLO models have significant limitations in their adaptive design for medical pathology scenarios. Most schemes only make local adjustments at the level of network layers or loss function, lacking systematic optimization for the core characteristics of pathological images such as "high resolution, high density, and high heterogeneity". It is difficult to ensure detection speed while taking into account the detection accuracy of different magnification and cell density regions, which seriously limits its clinical application value.
[0009] Based on this, we have developed an intelligent analysis method that can adapt to changes in cell density, integrate cross-channel semantic features, and meet the needs of multi-scale detection. This method is of great significance for improving the accuracy of colorectal tumor sprout detection and enhancing its clinical practical value. Summary of the Invention
[0010] Therefore, the technical problem to be solved by this invention is to overcome the technical problems of insufficient adaptability to changes in cell density, insufficient utilization of semantic information between channels, and instability of cross-scale target detection at multiple magnifications in existing pathological image detection. Thus, this invention provides a method for detecting budding colorectal cancer tumors based on cross-channel cell density adaptive attention, specifically including:
[0011] Acquire image data of the target region in a clinical pathology slide;
[0012] A target detection model is constructed, which includes a backbone feature extraction network, a neck feature fusion network, and a head detection network. The target detection model is trained and optimized through multiple rounds of iterative training using the image data. After training, the optimal training parameter set is obtained.
[0013] The optimal training parameter set is used to load the target detection model, perform forward inference on the pathological image to be detected, and obtain the final target detection result.
[0014] Specifically, a pre-designed cell density adaptive attention module is embedded in the feature extraction path of the backbone feature extraction network. The feature enhancement process of this module is as follows:
[0015] The multi-channel feature map output from the previous layer of the module is subjected to channel dimension mean pooling dimensionality reduction processing, the mean of all channel features is calculated, the multi-channel information is initially integrated, and a single-channel aggregated feature map is generated.
[0016] The single-channel aggregated feature map is convolved using a Laplacian convolution kernel to capture the texture features and gray-level change features of cell boundaries within the tissue region, thereby obtaining a gray-level gradient energy map.
[0017] Based on the gray-level gradient energy map, the energy features therein are converted into quantified cell spatial distribution density to obtain a normalized cell density map.
[0018] Based on the pixel-by-pixel density values of the cell density map, the pixel-by-pixel attention temperature coefficient is calculated using a preset temperature mapping function;
[0019] The original feature map output from the previous layer of the module is projected into the query matrix, key matrix, and value matrix required by the multi-head attention module, and the attention weight is calculated by combining the pixel-by-pixel attention temperature coefficient.
[0020] The features of the value matrix are weighted and aggregated using the attention weights to generate a one-dimensional attention-enhanced feature vector, which is then reshaped into a multi-channel enhanced feature map with the same dimension as the module input feature map.
[0021] The neck feature fusion network receives the enhanced feature map output by the backbone feature extraction network, performs depth extraction and dimension adaptation on features at different levels, and generates multi-scale enhanced feature maps.
[0022] The detection head network performs classification and regression operations on the multi-scale enhanced feature map, and finally outputs the category and spatial location information of the target in the pathological image through classification score filtering and bounding box coordinate regression.
[0023] In one embodiment of the present invention, a method for converting the energy features of the gray-level gradient energy map into a quantized cell spatial distribution density to obtain a normalized cell density map includes:
[0024] A 3×3 convolution operation is performed on the grayscale gradient energy map, and local correlation features are initially extracted through the local receptive field of the convolution kernel;
[0025] The local associated features are nonlinearly transformed by the ReLU activation function to enhance feature expression. Then, 1×1 convolution is used to perform feature dimension adaptation and feature information aggregation. Finally, the output value after feature optimization is mapped to the [0,1] normalization interval by the Sigmoid function to obtain the cell density map. Each pixel value in the cell density map represents the relative distribution density of cells at its corresponding pathological slice position.
[0026] In one embodiment of the present invention, the original feature map output from the previous layer of the module is projected into the query matrix, key matrix, and value matrix required by the multi-head attention module, and the attention weight is calculated by combining the pixel-by-pixel attention temperature coefficient, including:
[0027] ,
[0028] in, This indicates the degree of attention the i-th pixel pays to the features of the j-th pixel. The feature dimension of a single attention head. , This represents the total dimension of the multi-head attention module. This indicates the number of heads in the multi-head attention module. This represents the query feature vector corresponding to the i-th pixel in the i-th row of the query matrix Q. Let $\mathbf{j}$ represent the key feature vector of the j-th row of the key matrix $K$, corresponding to the key feature vector of the j-th pixel. $N$ represents the total number of pixels in the feature map. This represents the exponentiation of e; This represents the attention temperature coefficient corresponding to the i-th pixel.
[0029] In one embodiment of the present invention, the attention temperature coefficient corresponding to the i-th pixel The calculation formula is as follows:
[0030] , Represents any pixel in the cell density map The relative density of cells at a given location.
[0031] In one embodiment of the present invention, a pre-built cross-channel feature correlation extraction module is embedded at at least one designated location of the neck feature fusion network, the cross-channel feature correlation extraction module including a cross-channel attention branch and a spatial attention branch;
[0032] The cross-channel attention branch, through group feature aggregation and mask learning, mines the correlation between channels of the input feature map and generates group-level channel weights that can guide channel feature selection.
[0033] The spatial attention branch mines the long-range spatial correlation of the input feature map, enhances the attention to sparse and small target regions, and obtains spatially enhanced features.
[0034] The group-level channel weights are multiplied element-wise with the intermediate fusion features of the spatial attention branch to generate the final joint weighted mask.
[0035] Based on the intermediate fusion features of the joint weighted mask and the cross-channel attention branch, a weighted cross-channel enhanced feature is generated;
[0036] The weighted cross-channel enhanced features and the spatial enhanced features are added element-wise to obtain the final output features of the cross-channel feature correlation extraction module.
[0037] In one embodiment of the present invention, the cross-channel attention branch, through grouped feature aggregation and mask learning, mines the correlation between channels of the input feature map and generates group-level channel weights that can guide channel feature selection, including:
[0038] Input features The feature is uniformly divided into G feature subgroups along the channel dimension. Each feature subgroup The number of channels is ,in, Let X be a dimensional space, where C is the number of channels of the input feature X, H is the height of the input feature X, and W is the width of the input feature X. ;
[0039] For each feature subgroup Adaptive average pooling is performed separately in the height and width directions to obtain a one-dimensional feature in the height direction. One-dimensional features in the width direction , will the and stated After dimensional alignment, the pieces are stitched together.
[0040] Perform a 1×1 convolution operation on the concatenated features to obtain group-level features; simultaneously, respectively... and stated Perform a nonlinear mapping, constrain its value to the [0,1] interval, calculate the Hadamard product of the two, and generate a group-level mask through group normalization.
[0041] The group-level mask is subjected to global average pooling to transform it into a global channel feature vector, thus obtaining the group-level channel weights.
[0042] In one embodiment of the present invention, the spatial attention branch mines the long-range spatial correlation of the input feature map, enhances the attention to sparse, small target regions, and obtains spatially enhanced features, including:
[0043] For input features Perform a 1×1 convolution operation to generate a query matrix Q, a key matrix K, and a value matrix V of the same dimension;
[0044] The query matrix Q, the key matrix K, and the value matrix V are divided into multiple attention heads along the channel dimension. L2 regularization is then performed on the query matrix Q and key matrix K of each attention head to obtain a normalized query matrix. Bond matrix ;
[0045] Based on the above and stated Calculate the spatial attention matrix : , Temperature coefficient;
[0046] Based on the spatial attention matrix Computational space augmentation features : ,in This represents the transpose operation of the value matrix V;
[0047] For the spatial enhancement features Dimensional reshaping is performed to restore the original input feature dimensions, and 1×1 convolution is used to adapt and fuse the feature dimensions, ultimately resulting in spatially enhanced features. .
[0048] In one embodiment of the present invention, the detection head network includes multiple parallel detection branches with independently optimized parameters to match the scale differences of targets in pathological sections, and its data processing procedure is as follows:
[0049] Obtain the multi-scale enhanced feature map output after optimization by the neck feature fusion network;
[0050] The enhanced features at each scale are input into the parallel detection branch, and each branch performs category classification, bounding box regression and confidence prediction for the target in the corresponding scale range.
[0051] Based on a pre-set confidence threshold, the detection results output by each branch are initially screened to obtain a set of potential target detection boxes. A cross-scale non-maximum algorithm is then used to deduplicate the set of potential target detection boxes, and redundant boxes with an intersection-union ratio exceeding the threshold are removed to obtain deduplicated candidate detection boxes.
[0052] The coordinates of the deduplicated candidate detection boxes are mapped to the scale of the original pathological slices. The category information, spatial positioning information and confidence of all candidate boxes are integrated to output the global target detection results.
[0053] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the medical image detection method based on the cross-channel and cell density adaptive mechanism as described above.
[0054] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the medical image detection method based on a cross-channel and cell density adaptive mechanism.
[0055] Compared with the prior art, the above-described technical solution of the present invention has the following advantages:
[0056] Based on the YOLO backbone architecture, this invention proposes an improved target detection model (CCTB-YOLO model). This model achieves multi-dimensional improvements in accuracy, adaptability, robustness and efficiency through the synergistic effect of three core modules: cell density adaptive attention (CDAA), cross-channel feature enhancement (C3FEB) and hierarchical multi-magnification detection head (HMMD-Head). Specifically, the CDAA module estimates local cell distribution density in real time, dynamically adjusts the attention temperature coefficient, and constructs a density-adaptive feature enhancement mechanism to effectively balance the feature response intensity of high-density and low-density tissue regions, significantly improving feature extraction accuracy in heterogeneous tissue density scenarios. The C3FEB module employs grouped feature aggregation and mask learning strategies to mine intrinsic correlations between channels, while integrating a multi-head attention mechanism to capture long-range spatial dependencies, strengthening the feature representation capabilities of sparse targets and small-scale targets, and improving the recognition and discriminability of target features. The HMMD-Head module achieves accurate cross-scale target identification through a parallel detection branch design of multi-scale feature fusion and independent parameter optimization, effectively solving the problem of missed detection of small targets and false detection of large targets caused by the heterogeneity of pathological slide magnification. In summary, this model, through the deep integration of cross-channel collaborative mechanisms and density-adaptive strategies, achieves efficient extraction, accurate fusion, and reliable detection of target features in pathological images, possessing broad adaptability to pathological scenarios. Attached Figure Description
[0057] To make the content of this invention easier to understand, the invention will be further described in detail below with reference to specific embodiments and accompanying drawings.
[0058] Figure 1 is an architecture diagram of the CCTB-YOLO model for medical image target detection provided in an embodiment of the present invention;
[0059] Figure 2 is a schematic diagram of the structure of the cell density adaptive attention module (CDAA module) provided in an embodiment of the present invention;
[0060] Figure 3 is a schematic diagram of the cross-channel feature correlation extraction module (C3FEB module) provided in an embodiment of the present invention. Detailed Implementation
[0061] The present invention will be further described below with reference to the accompanying drawings and specific embodiments, so that those skilled in the art can better understand and implement the present invention. However, the embodiments described are not intended to limit the present invention.
[0062] Example 1:
[0063] Referring to Figure 1, this invention provides a medical image detection method based on a cross-channel and cell density adaptive mechanism. Taking the clinical pathological detection scenario of colorectal cancer tumor sprouting as an example, the method specifically includes the following steps:
[0064] Acquire image data of tumor sprouting regions in clinical colorectal cancer pathological sections;
[0065] A target detection model (referred to as "CCTB-YOLO model") is constructed based on the YOLO architecture, including a backbone feature extraction network, a neck feature fusion network, and a head detection network. The target detection model is trained and its parameters are optimized through multiple rounds using the image data. After training, the optimal training parameter set is obtained.
[0066] The optimal training parameter set is loaded into the CCTB-YOLO model to perform forward inference on the colorectal cancer pathology image to be detected, and the final detection result of the tumor sprouting target is obtained.
[0067] Specifically, a pre-designed cell density adaptive attention module (CDAA module) is embedded in the feature extraction path of the backbone feature extraction network. This module adaptively adjusts the temperature parameters of the attention mechanism by estimating local cell density in real time, enabling the model to dynamically balance feature responses in both high-density and low-density tissue regions, thereby improving target focusing ability and detection robustness. The feature enhancement process is as follows:
[0068] As shown in Figure 2, the multi-channel feature map output from the previous layer of the module... ( In a dimensionality space (where C is the number of channels, H is the feature map height, and W is the feature map width), channel-dimensional mean pooling is performed for dimensionality reduction. The mean of all channel features is calculated, and multi-channel information is initially integrated to generate a single-channel aggregated feature map. This operation integrates multi-channel information, reducing the complexity of subsequent calculations.
[0069] Because the Laplacian convolution kernel is highly sensitive to grayscale changes in image edges and cellular structures, a 3×3 Laplacian convolution kernel is used. For the single-channel aggregated feature map Convolution operations are performed to capture the texture features and gray-level changes of cell boundaries within the tissue region. The absolute value of the convolution result is then taken to obtain the gray-level gradient energy map L, i.e. ;
[0070] Based on the gray-level gradient energy map L, the energy features therein are converted into quantized cell spatial distribution density to obtain a normalized cell density map D, including:
[0071] Construct a lightweight multilayer perceptron (MLP) structure containing sequentially connected 3×3 convolutional layers, ReLU activation layers, 1×1 convolutional layers, and Sigmoid activation layers;
[0072] Based on the lightweight multilayer perceptron (MLP) structure, a 3×3 convolution operation is performed on the gray-level gradient energy map 𝐿, and local correlation features are initially extracted through the local receptive field of the convolution kernel;
[0073] The local correlation features are enhanced by non-linear transformation using the ReLU activation function, followed by feature dimension adaptation and feature information aggregation using 1×1 convolution, and finally by the Sigmoid function. The feature-optimized output values are mapped to the [0,1] normalized interval to obtain the cell density map. ,Right now .
[0074] Each pixel value in the cell density map represents the relative distribution density of cells at its corresponding pathological section location. The closer the value is to 1, the higher the cell density; the closer it is to 0, the lower the cell density.
[0075] Based on the pixel-by-pixel density values of the cell density map, a preset temperature mapping function is used. Calculate the per-pixel attention temperature coefficient , Represents any pixel in the cell density map D The relative density of cells at the location N = H × W is the total number of pixels in the feature map.
[0076] when The closer the value is to 1, the better. The closer the value is to 1, the sharper the subsequent attention distribution will be, focusing on key local cell features; when... The closer the value is to 0, the better. The closer the value is to 3, the smoother the subsequent attention distribution will be, avoiding a narrow scope of attention due to sparse feature distribution.
[0077] The original feature map output from the previous layer of the module. ( (where C is the number of channels, H is the feature map height, and W is the feature map width) is projected onto the query matrix required by the multi-head attention module. Key matrix and value matrix The attention weight is calculated by combining the pixel-by-pixel attention temperature coefficient. The specific implementation steps include:
[0078] The original feature map output from the previous layer of the module. Projecting the query matrix required for a multi-head attention module Key matrix and value matrix The query matrix The key matrix and the value matrix All dimensions are , This represents the total dimension of the multi-head attention module. , Indicates the number of heads in the multi-head attention module;
[0079] Based on the query matrix and the key matrix This yields the original attention similarity matrix;
[0080] Divide the similarity value by To mitigate numerical bias caused by dimensionality issues, the result is divided by a per-pixel temperature coefficient. To achieve temperature-based similarity control;
[0081] Finally, the adjusted similarity values are normalized using the Softmax function to obtain the pixel-by-pixel attention weights. The calculation formula is as follows: , This represents the degree of attention paid by the i-th pixel to the features of the j-th pixel, enabling adaptive attention allocation to regions with different cell densities; This represents the query feature vector corresponding to the i-th pixel in the i-th row of the query matrix Q. Let $\mathbf{j}$ represent the key feature vector of the j-th row of the key matrix $K$, corresponding to the key feature vector of the j-th pixel. $N$ represents the total number of pixels in the feature map. This represents the exponentiation of e.
[0082] Through the attention weight For the value matrix The corresponding pixel features are weighted and aggregated to generate a one-dimensional attention-enhanced feature vector. Then reshape it to the same dimension as the module input feature map. Consistent multi-channel enhanced feature maps.
[0083] The neck feature fusion network receives the enhanced feature map output by the backbone feature extraction network, performs depth extraction and dimension adaptation on features at different levels, and generates multi-scale enhanced feature maps.
[0084] The detection head network performs classification and regression operations on the multi-scale enhanced feature map, and finally outputs the category and spatial location information of the tumor sprouting target in the colorectal cancer pathological image by filtering by classification score and regression of bounding box coordinates.
[0085] The aforementioned attention mechanism automatically learns the density distribution pattern during end-to-end training and can adaptively adjust the degree of attention focus, thereby significantly improving the model's feature extraction accuracy and pathological analysis capabilities in different tissue density regions.
[0086] To address the issue of sparse distribution and weak signal of colorectal cancer tumor shoots in whole-slice digital pathology images, this invention embeds a pre-built cross-channel feature correlation extraction module (referred to as the "C3FEB module") at at least one designated location in the neck feature fusion network. This module aims to enhance the perception of weak signals by jointly modeling channel dependencies and long-range spatial relationships. Further, as shown in Figure 3, the C3FEB module includes a cross-channel attention branch (referred to as "CCA") and a spatial attention branch (referred to as "SPA").
[0087] In the CCA branch, the dependency relationships between channels of the input feature map are mined through grouped feature aggregation and mask learning to generate group-level channel weights that can guide channel feature selection. The implementation steps are as follows:
[0088] Input raw features ( (where C is the number of channels, H is the feature map height, and W is the feature map width) is uniformly divided into G feature subgroups along the channel dimension. Each feature subgroup The number of channels is , Grouping operations can reduce the computational complexity of the channel dimension, while focusing on the correlation features of channels within the group;
[0089] For each feature subgroup Perform adaptive average pooling in the height (H) and width (W) directions respectively:
[0090] Each feature subgroup Compressing the H-dimensional region into one dimension yields a one-dimensional feature in the height direction. Its dimensions are ; Each feature subgroup Compressing the W-dimensional region into one dimension yields a one-dimensional feature in the width direction. Its dimensions are ;
[0091] The and stated After dimensional alignment, the components are stitched together to integrate global features in both height and width dimensions.
[0092] A 1×1 convolution operation is performed on the concatenated features to fuse and reduce the dimensionality of the features, resulting in group-level features; simultaneously, the Sigmoid function is used... For the above and stated A nonlinear mapping is performed, constraining the values to the [0,1] interval. The Hadamard product of the two is calculated, and a group-level mask is generated through group normalization (GN). Its calculation formula is This mask can characterize the correlation strength of channels within a group;
[0093] For the group-level mask Global average pooling is performed to transform the vectors into global channel feature vectors, which are then normalized using the Softmax function to obtain the group-level channel weights. The magnitude of this weight value represents the contribution of the corresponding channel subgroup to the tumor budding feature, and is used to guide the selective enhancement of channel features in the future.
[0094] In the SPA branch, long-range spatial correlations of the input feature map are mined to enhance attention to sparse, small tumor sprouting regions, resulting in spatially enhanced features. The specific steps are as follows:
[0095] For input features ( (where C is the number of channels, H is the feature map height, and W is the feature map width) Perform a 1×1 convolution operation to generate a query matrix Q, a key matrix K, and a value matrix V of the same dimension.
[0096] The query matrix Q, the key matrix K, and the value matrix V are divided along the channel dimension. There are 1 attention head, and each attention head has 1 channel. This enables parallel modeling of multi-dimensional spatial relationships;
[0097] To avoid instability in attention weights caused by differences in feature values, L2 regularization is performed on the query matrix Q and key matrix K of each attention head to obtain a normalized query matrix. Bond matrix ;
[0098] Based on the above and stated Calculate the spatial attention matrix : , The temperature coefficient represents the degree of correlation between features at different spatial locations;
[0099] Based on the spatial attention matrix This enables weighted aggregation of spatial features and computation of spatial augmentation features. : ,in This represents the transpose operation of the value matrix V;
[0100] For the spatial enhancement features Perform dimensional reshaping to restore the original input feature dimensions. Furthermore, 1×1 convolution is used to adapt and fuse feature dimensions, ultimately yielding spatially enhanced features. This feature can enhance the spatial signal of sparse tumor budding regions.
[0101] To fully integrate the complementary information of channel dependence and spatial relationship, the module performs joint weighting and fusion of the features of the two branches, as follows:
[0102] Group-level channel weights of CCA branches With intermediate features (i.e., the features output by the 1×1 convolution in the SPA branch) are multiplied element-wise, and a channel-wise and pixel-wise joint weighted mask is generated by the Sigmoid activation function. Its calculation formula is , dimension (B represents the batch size); the joint weighted mask It can achieve adaptive allocation of channel weights to spatial location;
[0103] Based on the joint weighted mask Grouping characteristics of CCA branches The weighted cross-channel enhancement features were obtained. : This operation allows the characteristics of high-contribution channels to be specifically enhanced in key spatial regions;
[0104] The weighted cross-channel enhancement feature and the spatial enhancement features Perform element-wise addition to obtain the final output features of the C3FEB module. : .
[0105] Through the above-mentioned multi-path processing and fusion process, the module can simultaneously enhance the key features of the channel dimension and the weak signals of the spatial dimension, effectively breaking through the detection bottleneck of complex backgrounds and sparse tumor sprouts in digital pathology images, and improving the detection accuracy and robustness of the model.
[0106] To address the issues of significant scale differences in tumor regions within pathological sections, substantial variations in cell cluster size with magnification, and the inability of single-scope features to fully capture targets, this invention proposes a layered multi-scope detection head (referred to as "HMMD-Head module") as an improved detection head network. This head can simultaneously process features at different scales, enabling cross-scale target detection.
[0107] Furthermore, the data processing of the HMMD-Head module can be divided into three core stages: five-scale backbone feature extraction, multi-scale feature parallel detection, and detection result fusion and optimization. The operational details and data flow logic of each stage are as follows:
[0108] The core objective of the five-scale backbone feature extraction stage is to construct a five-level feature atlas (P2, P3, P4, P5, P6) covering small cell clusters, medium-sized tumor regions, and large tumor regions. This stage is based on the mature feature hierarchy of YOLOv11 and uses customized feature enhancement strategies to strengthen the feature representation of extreme scale targets at P2 and P6. The specific feature extraction process is as follows:
[0109] 1. Acquisition of basic feature layers P3~P5
[0110] The P3-P5 feature layers directly adopt the feature generation paradigm of YOLOv11. They rely on the original features from different convolutional stages of the backbone feature extraction network and are optimized by the neck feature fusion module. The number of channels in each feature layer increases stepwise with the deepening of the feature layer, thereby achieving a gradual enhancement of semantic information, as detailed below:
[0111] The P3 feature layer is obtained by the shallow convolution output in the backbone through lightweight cross-scale fusion in the neck. In a scene with an input image of 800×800, its feature map resolution can reach 100×100, with moderate semantic information and complete detail representation capabilities. It is mainly used for feature capture of medium-scale tumor regions, and the number of channels is configured to 256.
[0112] The P4 feature layer is obtained by the output of the middle convolution of the backbone and then cross-scale fusion through the neck. The resolution is reduced to half that of P3, and its feature map resolution can reach 50×50. It achieves a balanced adaptation of semantic information and spatial details, and can effectively cover medium to large tumor areas. The number of channels is increased to 512.
[0113] The P5 feature layer is obtained by deep convolution output from the backbone and global feature fusion through the neck. The resolution is further compressed to 25×25. Its semantic representation ability is the strongest among P3~P5, but there is some loss of spatial details. It is mainly for feature extraction of large tumor regions and has 1024 channels.
[0114] 2. Obtaining the small-scale feature layer P2
[0115] To address the dual requirements of high resolution and strong semantics in detecting small cell clusters (such as tumor budding), the P2 feature layer employs a "dual-source fusion + feature extraction" strategy. The specific operation is as follows:
[0116] Step 1: Dual-source feature extraction. Extract the original P2 features (denoted as P2) from the shallowest convolutional layer of the backbone. Its resolution reaches 200×200, possessing the richest spatial details but the weakest semantic representation ability; simultaneously, it obtains preliminarily optimized P2 features (denoted as P2) from the first-level fusion module of the neck. The semantic information of this feature is enhanced after basic cross-scale fusion, but there is a slight loss of spatial details.
[0117] Step 2: Feature fusion and extraction. and Input a pre-constructed feature fusion function The function first unifies the channel number mapping between the two through 1×1 convolution, adjusting both to 128 channels. Then, it performs element-wise addition to achieve complementarity between detailed and semantic information. Finally, a feature extraction module integrating BN layers and ReLU activation functions with 3×3 convolution kernels filters out feature noise, resulting in the final fine-scale feature layer P2, whose mathematical expression is: This feature layer maintains a high resolution of 200×200, enabling precise capture of the edge contours and texture details of tiny cell clusters.
[0118] 3. Obtaining the large-scale feature layer P6
[0119] To meet the detection requirements of large tumor regions or tumor aggregates at low magnification, it is necessary to expand the feature receptive field. Therefore, a downsampling expansion strategy is implemented based on the P5 feature layer. The specific process is as follows:
[0120] Step 1: Downsampling operation. Select the P5 feature from the neck output (denoted as...). ) is used as input to the downsampling function. This function uses a 3×3 convolution with a stride of 2 to achieve downsampling, reducing the resolution of the P5 feature map from 25×25 to 12×12, while increasing the number of channels from 1024 to 2048, thereby expanding the feature receptive field and enhancing the ability to express deep semantics.
[0121] Step 2: Perform secondary purification on the downsampled features. A 3×3 convolutional module integrating a BN layer and a ReLU activation function is used to filter out high-frequency noise introduced during the downsampling process, ultimately yielding the large-scale feature layer P6, whose mathematical expression is: It can effectively cover a large target area in the image, meeting the feature detection needs of large tumors at low magnification.
[0122] The core objective of the multi-scale feature parallel detection stage is to avoid mutual interference between features of different scales. The HMMD-Head module configures independent detection branches for the five feature layers P2-P6. Each branch completes parameter customization optimization based on the detection requirements of the target at the corresponding scale, realizing a scale-specific and accurate detection mode. The overall processing flow is as follows:
[0123] All detection branches follow a unified architecture paradigm of "feature adaptation-prediction head," but the internal network parameters are adjusted in a gradient manner based on the differences in the resolution and number of channels of the input features. The specific branch design is as follows:
[0124] For the small-scale detection branch adapted to the small-scale feature layer P2, given that P2 features have high resolution (200×200) but low channel count (128 channels), the feature adaptation module of this branch adopts a combined structure of "1×1 convolution dimensionality enhancement + dual 3×3 convolution feature enhancement": first, the number of feature channels is increased from 128 to 256 through 1×1 convolution, achieving feature dimension expansion and preliminary semantic enhancement; then, two levels of 3×3 convolution are used to enhance the feature discriminativeness of small targets. The output channel dimension of its prediction head corresponds to the three major tasks of class prediction, bounding box coordinate regression, and target presence confidence, with an overall output dimension of [missing information]. ,in This indicates the number of target categories for the detection task.
[0125] For the basic scale detection branch adapted to P3~P5 features, taking into account the characteristic of progressively decreasing feature scale and increasing channel number from P3 to P5, the feature adaptation module of this type of branch adopts a step-wise expansion strategy for the number of channels. That is, the number of convolutional kernels is increased synchronously as the feature level deepens (P3→P5): for example, the number of feature channels in the P3 branch is expanded from 256 to 512, and the number of channels in the P5 branch is expanded from 1024 to 2048, thereby matching the semantic representation requirements of targets at different basic scales. The output dimension of the corresponding prediction head is compressed step by step with the feature resolution, as follows: (P3 branch) (P4 branch) (P5 branch).
[0126] For the large-scale detection branch adapted to P6 features, considering the high number of channels (2048 channels) but low resolution (12×12) of P6 features, a lightweight feature adaptation module is adopted to avoid the risk of model overfitting. Specifically, it uses a structure of "1×1 convolution dimensionality reduction + single 3×3 convolution feature purification": first, a 1×1 convolution reduces the number of channels from 2048 to 1024, achieving reasonable compression of the feature dimension; then, a single-stage 3×3 convolution completes feature purification and semantic focusing. Its prediction head output dimension is... This meets the detection and output requirements for large-scale targets.
[0127] After inputting the five feature layers P2 to P6 into the corresponding scale detection branches, each branch synchronously performs the following standardized detection operations:
[0128] By performing nonlinear transformation on the input features through convolutional layers, the feature differences between the tumor target and the complex background of the pathological section (such as normal cells, tissue gaps, etc.) are enhanced, effectively suppressing the interference of background noise on the detection results.
[0129] The prediction head outputs three core detection results simultaneously through convolution operations, including the probability distribution of the target category (such as tumor sprouting, normal cells, etc.), the four-dimensional coordinate parameters of the target bounding box (x, y, w, h), and the confidence value of the target's actual existence.
[0130] Each branch uses an independent initialization strategy for its convolutional kernel weights and BN layer parameters, and backpropagation and parameter updates are performed based on the specific loss function (CIoU loss coupled with cross-entropy loss) for the target at the corresponding scale, ensuring the adaptability of each branch to the detection of targets at a specific scale.
[0131] This multi-scale parallel detection process can be summarized by a unified mathematical formula as follows: Where D is the set of original detection results output from the five branches, This represents a composite mapping function for multi-branch parallel detection.
[0132] The core objective of the detection result fusion and optimization stage is to address the issues of redundant duplicate detections and missed detections of extreme-scale targets in the multi-scale detection branch outputs. This is achieved through a three-step strategy: detection box scale calibration, duplicate detection suppression, and scale adaptation threshold optimization. The specific implementation steps are as follows:
[0133] Because the resolutions of feature layers P2 to P6 differ significantly (from 200×200 to 12×12), the coordinates of the detection boxes output by each branch are generated based on the corresponding feature layer scale. Therefore, it is necessary to first perform original image scale calibration and confidence standardization to ensure that all detection results are in a unified computational space, including:
[0134] A mapping rule of "feature layer coordinates × downsampling factor" is adopted to backmap the bounding box coordinates (x, y, w, h) of each branch output to the scale of the original input image (e.g., 800×800). The downsampling factor is determined by the ratio of the original image to the feature layer resolution, ensuring the consistency of the spatial scale of the detection boxes in different branches. The class probability and target presence confidence of each branch output are normalized by the Sigmoid activation function, constraining the numerical range to the [0,1] interval, providing a unified quantitative benchmark for subsequent comprehensive score calculation and threshold selection.
[0135] To address the redundancy issue of repeated detection of the same tumor target across multiple scale branches, an iterative non-maximum suppression (NMS) algorithm is employed for deduplication optimization. The specific steps include:
[0136] Calculate the overall score of each detection box according to "target existence confidence × category probability", and sort all calibrated detection boxes in descending order of overall score; select the detection box with the highest score as the reference box, calculate the intersection-union ratio (IoU) of the remaining detection boxes with the reference box, and remove duplicate detection boxes with IoU greater than a preset threshold; iterate the above steps until all detection boxes have been processed to obtain the deduplicated detection results.
[0137] Considering the inherent differences in the detection confidence of targets at different scales in pathological sections—for example, the low confidence of small cell clusters detected by the P2 branch due to their low feature dimensionality, and the high confidence of large tumors detected by the P6 branch due to their strong semantic information—a scale-adaptive confidence threshold mechanism is introduced to balance the recall and precision of targets at all scales.
[0138] For small-scale branch (P2) output: Set a low confidence screening threshold (empirical value 0.2) to avoid missed detections due to low confidence of small targets;
[0139] For the output of the basic scale branch (P3~P5): a progressive threshold (0.3~0.35) is used to match the confidence distribution characteristics of medium-scale targets;
[0140] For the output of the large-scale branch (P6): set a high confidence threshold (empirical value 0.4) to filter out false positive detection results caused by background interference.
[0141] After the above threshold screening, the final output is a full-scale, accurate detection result covering small cell clusters, medium-sized tumors, and large tumor aggregates.
[0142] The HMMD-Head module constructs a complete technical chain for cross-scale target detection through a three-tiered progressive architecture: "customized extraction of five-scale features → multi-branch scale-specific detection → full-dimensional result fusion and optimization." Firstly, it overcomes the scale coverage limitations of traditional detection networks by using customized P2 / P6 feature layers, achieving effective representation of targets at extreme scales. Secondly, it avoids scale interference and enhances specific adaptability through parameter differentiation design of independent detection branches. Thirdly, it addresses redundancy and missed detection pain points through a fusion strategy of coordinate calibration, NMS deduplication, and adaptive thresholding. This architecture adapts to the core detection challenges of "variable magnification and large target scale span" in pathological slides throughout the entire process from feature representation and detection execution to result aggregation, achieving accurate identification of tumor regions across all scales.
[0143] To verify the effectiveness and robustness of the CCTB-YOLO model proposed in this invention in the task of detecting small tumor sprouting targets in high-resolution pathological images, this embodiment uses the publicly available TBCMU dataset to conduct a systematic experiment. The specific experimental design and result analysis are as follows.
[0144] The TBCMU dataset used in this experiment is a publicly available benchmark dataset in the field of colorectal cancer pathology detection. Its data composition boasts high fidelity and authoritative annotation: the dataset contains 122 CK immunohistochemically stained pathological sections from colorectal cancer patients, with precise annotations for tumor budding (TB) targeting, totaling 11,486 annotated tumor budding instances. To meet the independent data requirements for model training, validation, and testing, the dataset was divided into training, validation, and test sets according to sample distribution characteristics, with a ratio of 8:1:1. The training set contains 6,890 tumor budding instances, while the validation and test sets contain 2,326 and 2,270 instances, respectively. It is important to note that all experimental image patches were extracted from tumor infiltration regions, and all annotations were completed by professional pathologists, ensuring high accuracy and reliability of the labeled data and providing a data foundation for the validity of the experimental results.
[0145] This experiment uses the existing TB-YOLO model as a benchmark to evaluate the performance of the standardized and lightweight versions of the CCTB-YOLO model architecture proposed in this invention on the TBCMU dataset. The number of parameters, model computation (FLOPs), frame rate (FPS), and mean accuracy (mAP@50-95, with an intersection-over-union threshold of 0.50-0.95 and a step size of 0.05) are used as evaluation metrics to comprehensively quantify the model's detection accuracy and runtime efficiency. The experimental results are shown in Table 1.
[0146] Table 1 Performance comparison between CCTB-YOLO model and existing TB detection models
[0147]
[0148] Table 1 shows a performance comparison of various mainstream and proprietary detection models, including three types of detection models:
[0149] First, there are mainstream architectures in the general object detection field, such as the YOLOv8 to YOLOv12 series; second, there are medical image-specific detection models, such as the early DMT medical detection model and the TB-YOLO model customized for tumor sprouting tasks; and third, there is the CCTB-YOLO improved model proposed in this invention.
[0150] The performance characteristics of each model are as follows: As an early medical detection model, DMT has an mAP@50-95 of only 39.8%, which is not good in terms of detection accuracy. Moreover, it does not provide comparative data on the relationship between parameter quantity and computational efficiency, making it difficult to meet the dual requirements of accuracy and speed in clinical applications.
[0151] The YOLO series models cover multiple scale configurations from lightweight (marked as "n" or "tiny" in Table 1) to standard (marked as "s" in Table 1). They exhibit typical performance trade-offs in terms of parameter quantity, computational overhead, inference speed, and detection accuracy. They are highly versatile but lack targeted optimizations for medical scenarios.
[0152] TB-YOLO is a baseline model specifically for tumor budding detection. Its small version, mAP@50-95, can reach 86.2%, which has a certain degree of task adaptability. However, it suffers from high computational cost, which limits its deployment flexibility.
[0153] The CCTB-YOLO model proposed in this invention, with its lightweight version (CCTB-YOLO-n) and standard version (CCTB-YOLO-s), achieves a significant reduction in computational load while maintaining a similar or even slightly reduced number of parameters as the baseline model. At the same time, it improves mAP@50-95 to 86.3% and 86.7% respectively, building a performance advantage of synergistic optimization of accuracy and efficiency, and its overall performance is superior to all comparative models.
[0154] The experimental data in Table 1 fully demonstrate that the proposed CCTB-YOLO architecture exhibits superior overall performance in tumor budding detection. Compared to the traditional TB-YOLO model, the CCTB-YOLO architecture achieves effective reduction in computational load and significant improvement in mAP@50-95 through structural optimization, achieving a balanced optimization of accuracy and efficiency. Its lightweight version further iterates performance, achieving a steady improvement in detection accuracy while maintaining lightweight deployment characteristics. The above results verify the effectiveness, reliability, and environmental adaptability of the technical solution of this invention in high-resolution pathological image scenarios for detecting small and sparsely distributed tumor budding targets, providing technical support for the precision and efficiency of clinical pathological detection.
[0155] To quantify the contribution of each core module (CDAA module, C3FEB module, HMMD-Head module) to the overall model performance in this invention, this embodiment conducted an ablation experiment using the controlled variable method. The experiment used " The activation status of the corresponding module is indicated. The specific experimental results are shown in Table 2.
[0156] Table 2 Performance Comparison of Ablation Models
[0157]
[0158] The following conclusions can be drawn from the data in Table 2:
[0159] (1) The independent introduction of a single module can achieve positive gains in model performance. Among them, the CDAA module, C3FEB module and HMMD-Head module improved the model mAP index to 85.2%, 85.1% and 85.7% respectively, indicating that each module can enhance the target representation and detection capabilities of the model from different dimensions such as feature enhancement, feature fusion and multi-scale detection.
[0160] (2) In the dual-module combination scheme, the synergistic combination of CDAA module and HMMD-Head module performed best, with the model mAP index reaching 86.1%, which reflects the technical synergistic effect of feature adaptive enhancement and multi-scale accurate detection.
[0161] (3) When all three core modules are enabled, the model mAP index is further improved to 86.3%, reaching the optimal level of experimental evaluation.
[0162] The above ablation experiment results fully demonstrate the technical necessity of each core module of the present invention, and at the same time verify the synergistic gain effect between modules, providing direct experimental support for the advanced nature of the technical solution of the present invention.
[0163] In summary, the CCTB-YOLO model proposed in this invention, through the synergistic innovation of the CDAA, C3FEB, and HMMD-Head modules, achieves accurate and efficient target detection in the clinical pathological detection scenario of colorectal cancer tumor sprouting, fully validating its technical feasibility and application value. Furthermore, the core design of this model does not rely on specific features of any particular disease or target type. Its cross-channel feature synergy mechanism, cell density adaptive enhancement strategy, and cross-scale target adaptation capability can be flexibly transferred to other medical detection scenarios, including but not limited to pathological section detection of different tumor types, identification of small lesions in clinical imaging, cell morphology analysis, and other medical applications requiring precise capture of target features. This provides a universal, high-performance technical solution for multi-field medical detection, possessing broad clinical application prospects and practical value.
[0164] Example 2:
[0165] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the medical image detection method based on a cross-channel and cell density adaptive mechanism as described in Embodiment 1.
[0166] Example 3:
[0167] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the medical image detection method based on cross-channel and cell density adaptive mechanism described in Embodiment 1.
[0168] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0169] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in one or more blocks of the flowchart illustrations and / or one or more blocks of the block diagrams.
[0170] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means that implement the functions specified in one or more flowcharts and / or one or more block diagrams.
[0171] These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, such that the instructions, which execute on the computer or other programmable apparatus, provide steps for implementing the functions specified in one or more flowcharts and / or one or more block diagrams.
[0172] Obviously, the above embodiments are merely illustrative examples for clear explanation and are not intended to limit the implementation. Those skilled in the art will recognize that other variations or modifications can be made based on the above description. It is neither necessary nor possible to exhaustively list all possible implementations here. However, obvious variations or modifications derived therefrom are still within the scope of protection of this invention.
Claims
1. A medical image detection method based on a cross-channel and cell density adaptive mechanism, characterized in that, include: Image data of the target region in clinical pathological sections is acquired; a target detection model including a backbone feature extraction network, a neck feature fusion network, and a head detection network is constructed. The target detection model is trained and its parameters optimized through multiple rounds using the image data, resulting in an optimal training parameter set. This optimal training parameter set is then loaded into the target detection model, and forward inference is performed on the pathological image to be detected to obtain the final target detection result. A pre-designed cell density adaptive attention module is embedded in the feature extraction path of the backbone feature extraction network. The feature enhancement process of this module is as follows: the multi-channel feature map output from the previous layer of the module is subjected to channel dimension mean pooling dimensionality reduction processing, the mean of all channel features is calculated, and multi-channel information is initially integrated to generate a single-channel aggregated feature map; a Laplacian convolution kernel is used to perform convolution operations on the single-channel aggregated feature map to capture the texture features and gray-level change features of cell boundaries within the tissue region, obtaining a gray-level gradient energy map; based on the gray-level gradient energy... The energy features in the cell density map are converted into quantified cell spatial distribution density to obtain a normalized cell density map. Based on the pixel-wise density values of the cell density map, a pixel-wise attention temperature coefficient is calculated using a preset temperature mapping function. The original feature map output from the previous layer of the module is projected into the query matrix, key matrix, and value matrix required by the multi-head attention module. The attention weight is calculated by combining the pixel-wise attention temperature coefficient. The features of the value matrix are weighted and aggregated using the attention weight to generate a one-dimensional attention enhancement feature vector, which is then reshaped into a multi-channel enhancement feature map with the same dimension as the input feature map of the module. The neck feature fusion network receives the enhancement feature map output by the backbone feature extraction network, performs depth extraction and dimension adaptation on features at different levels, and generates a multi-scale enhancement feature map. The head detection network performs classification and regression branch operations on the multi-scale enhancement feature map, and finally outputs the category and spatial location information of the target in the pathological image through classification score filtering and bounding box coordinate regression.
2. The medical image detection method based on cross-channel and cell density adaptive mechanism according to claim 1, characterized in that, Based on the gray-level gradient energy map, the method for converting the energy features therein into quantized cell spatial distribution density to obtain a normalized cell density map includes: performing a 3×3 convolution operation on the gray-level gradient energy map, initially extracting local correlation features through the local receptive field of the convolution kernel; performing a nonlinear transformation on the local correlation features through the ReLU activation function to enhance feature expression, then using 1×1 convolution to perform feature dimension adaptation and feature information aggregation, and finally mapping the feature-optimized output value to the [0,1] normalization interval through the Sigmoid function to obtain the cell density map, where each pixel value in the cell density map represents the relative cell distribution density at its corresponding pathological slice location.
3. The medical image detection method based on cross-channel and cell density adaptive mechanism according to claim 1, characterized in that, The original feature map output from the previous layer of the module is projected into the query matrix, key matrix, and value matrix required by the multi-head attention module. The attention weights are then calculated using the pixel-by-pixel attention temperature coefficient, including: ,in, This indicates the degree of attention the i-th pixel pays to the features of the j-th pixel. The feature dimension of a single attention head. , This represents the total dimension of the multi-head attention module. This indicates the number of heads in the multi-head attention module. This represents the query feature vector corresponding to the i-th pixel in the i-th row of the query matrix Q. Let $\mathbf{j}$ represent the key feature vector of the j-th row of the key matrix $K$, corresponding to the key feature vector of the j-th pixel. $N$ represents the total number of pixels in the feature map. This represents the exponentiation of e; This represents the attention temperature coefficient corresponding to the i-th pixel.
4. The medical image detection method based on cross-channel and cell density adaptive mechanism according to claim 3, characterized in that, The attention temperature coefficient corresponding to the i-th pixel The calculation formula is as follows: , Represents any pixel in the cell density map The relative density of cells at a given location.
5. The medical image detection method based on cross-channel and cell density adaptive mechanism according to claim 1, characterized in that, At least one designated location of the neck feature fusion network embeds a pre-built cross-channel feature correlation extraction module, which includes a cross-channel attention branch and a spatial attention branch. The cross-channel attention branch mines the inter-channel relationships of the input feature map through grouped feature aggregation and mask learning, generating group-level channel weights that guide channel feature selection. The spatial attention branch mines the long-range spatial relationships of the input feature map, enhancing attention to sparse, small target regions to obtain spatially enhanced features. The group-level channel weights are multiplied element-wise with the intermediate fusion features of the spatial attention branch to generate a final joint weighted mask. Based on the joint weighted mask and the intermediate fusion features of the cross-channel attention branch, a weighted cross-channel enhanced feature is generated. The weighted cross-channel enhanced feature and the spatial enhanced feature are added element-wise to obtain the final output feature of the cross-channel feature correlation extraction module.
6. The medical image detection method based on cross-channel and cell density adaptive mechanism according to claim 5, characterized in that, The cross-channel attention branch, through grouped feature aggregation and mask learning, mines the correlation between channels of the input feature map and generates group-level channel weights that can guide channel feature selection, including: [the following is a list of input features]. The feature is uniformly divided into G feature subgroups along the channel dimension. Each feature subgroup The number of channels is ,in, Let X be a dimensional space, where C is the number of channels of the input feature X, H is the height of the input feature X, and W is the width of the input feature X. For each feature subgroup Adaptive average pooling is performed separately in the height and width directions to obtain a one-dimensional feature in the height direction. One-dimensional features in the width direction , will the Japanese After dimensional alignment, the features are concatenated; a 1×1 convolution operation is performed on the concatenated features to obtain group-level features; simultaneously, the features are processed separately. Japanese A nonlinear mapping is performed to constrain the values to the [0,1] interval. The Hadamard product of the two is calculated, and a group-level mask is generated through group normalization. The group-level mask is then subjected to global average pooling to transform it into a global channel feature vector, thus obtaining the group-level channel weights.
7. The medical image detection method based on cross-channel and cell density adaptive mechanism according to claim 5, characterized in that, The spatial attention branch mines long-range spatial correlations in the input feature map, enhancing attention to sparse, small target regions to obtain spatially enhanced features, including: input features Perform a 1×1 convolution operation to generate a query matrix Q, a key matrix K, and a value matrix V of the same dimension. Divide the query matrix Q, the key matrix K, and the value matrix V into multiple attention heads along the channel dimension. Perform L2 regularization on the query matrix Q and the key matrix K of each attention head to obtain a normalized query matrix. Bond matrix Based on the above Japanese Calculate the spatial attention matrix : , The temperature coefficient is based on the spatial attention matrix. Computational space augmentation features : ,in This represents the transpose operation of the value matrix V; for the spatial enhancement feature Dimensional reshaping is performed to restore the original input feature dimensions, and 1×1 convolution is used to adapt and fuse the feature dimensions, ultimately resulting in spatially enhanced features. 。 8. The medical image detection method based on cross-channel and cell density adaptive mechanism according to claim 1, characterized in that, The detection head network includes multiple parallel detection branches with independently optimized parameters to match the scale differences of targets in pathological sections. Its data processing procedure is as follows: obtain the multi-scale enhanced feature map output after optimization by the neck feature fusion network; The enhanced features at each scale are input into the parallel detection branch, and each branch performs category classification, bounding box regression and confidence prediction for the target in the corresponding scale range. Based on a pre-set confidence threshold, the detection results output by each branch are initially screened to obtain a set of potential target detection boxes. A cross-scale non-maximum algorithm is used to deduplicate the set of potential target detection boxes, removing redundant boxes with an intersection-union ratio exceeding the threshold, resulting in deduplicated candidate detection boxes. The coordinates of the deduplicated candidate detection boxes are mapped to the original pathological slice scale, and the category information, spatial location information, and confidence of all candidate boxes are integrated to output the global target detection result.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the medical image detection method based on the cross-channel and cell density adaptive mechanism as described in any one of claims 1 to 8.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the medical image detection method based on the cross-channel and cell density adaptive mechanism as described in any one of claims 1 to 8.
Citation Information
Patent Citations
Cervical abnormal cell detection method based on multi-scale feature fusion
CN120071337A
Full-view digital section pathological cell detection method based on PAC-YOLO
CN120298806A