Medical image focus detection method based on edge guidance
By employing an edge-guided approach and utilizing edge-integrated multi-scale selection and hierarchical reparameterized interactive fusion modules, the problem of insufficient edge information in lesion detection of brain MRI images is solved, improving detection accuracy and reducing model complexity. This approach is suitable for scenarios with small, imbalanced data and enables lightweight deployment.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZHEJIANG UNIV OF TECH
- Filing Date
- 2026-02-11
- Publication Date
- 2026-05-15
AI Technical Summary
Existing technologies do not make sufficient use of edge information in the detection of lesions in brain MRI images, resulting in low detection accuracy and high model complexity. They are difficult to adapt to data scenarios with small sample sizes and imbalances, and have high hardware requirements for deployment.
An edge-guided approach is adopted, which extracts edge features through the Edge Integration Multi-Scale Selection (EIMS) module and combines it with the Hierarchical Reparameterized Interactive Fusion (HRIF) module to achieve adaptive fusion of multi-scale features and lightweight lesion detection.
It significantly improved the lesion detection rate and accuracy, reduced model complexity, and enhanced the feasibility of lightweight deployment of the model in clinical practice.
Smart Images

Figure CN122048916A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of medical image processing technology, specifically to an edge-guided method for detecting lesions in medical images. Background Technology
[0002] Cardiovascular and cerebrovascular diseases, and other major brain disorders, pose a serious global public health threat to human life and health. Among these, cardiovascular and cerebrovascular diseases such as brain tumors, acute ischemic stroke, and cerebral hemorrhage are characterized by high morbidity, high disability rates, and high mortality rates. For these diseases, early, rapid, and accurate imaging diagnosis is crucial for determining treatment plans and improving patient prognosis. Magnetic resonance imaging (MRI), with its superior soft tissue resolution and non-invasive nature, has become the preferred imaging method for clinical diagnosis of brain lesions (such as ischemia, hemorrhage, and tumors).
[0003] However, traditional diagnostic procedures heavily rely on radiologists manually analyzing and interpreting massive amounts of MRI images. This process is not only time-consuming and labor-intensive, potentially delaying diagnosis and treatment in emergencies, but also susceptible to subjective factors such as physician experience and fatigue, leading to inter-observer variability. This results in a risk of misdiagnosis and missed diagnosis of early, atypical, or small lesions, especially for early-stage or small tumors, where the differences in imaging manifestations are often subtle. Examples include identifying early ischemic changes in cardiovascular and cerebrovascular diseases, or detecting small, poorly defined brain tumors.
[0004] In recent years, deep learning technology, especially convolutional neural networks (CNNs), has achieved remarkable success in the field of medical image analysis, making automated lesion detection possible. However, applying it to the detection of brain lesions faces unique challenges: 1. Lesions of cardiovascular and cerebrovascular diseases (such as acute infarction lesions) may have weak signals and low contrast with normal tissues in the early stages, and their morphology and location are variable.
[0005] 2. Brain tumors are highly heterogeneous, with their shapes, sizes, and textures varying greatly.
[0006] 3. Image noise, artifacts, and lesions of different natures may coexist, all of which hinder the model from achieving the best balance between maintaining high accuracy and high robustness.
[0007] In medical image analysis, multi-scale feature fusion typically relies on a dual attention weighting mechanism in both the spatial and channel domains, enabling the model to dynamically enhance the feature representation of lesion regions while effectively suppressing background interference. However, such methods still have significant limitations in fine-grained perception of lesion boundaries and contours. Edge information is crucial for accurately depicting the extent of lesions and distinguishing between benign and malignant regions; neglecting this aspect can easily lead to missed detection of subtle lesions or blurred boundary definitions.
[0008] Traditional methods lack explicit modeling of edge information, failing to fully utilize lesion boundary features to improve detection accuracy. Therefore, there is an urgent need for a brain MRI image lesion detection method that can effectively utilize edge information and achieve high accuracy and lightweight operation. Summary of the Invention
[0009] This invention aims to overcome the problems of insufficient utilization of edge information, low detection accuracy, and high model complexity in existing technologies, so as to adapt to data scenarios with small sample size and imbalance, while reducing the hardware requirements of the deployment machine, and provide an edge-guided medical imaging lesion detection method.
[0010] To achieve the above objectives, the present invention adopts the following technical solution: An edge-guided method for detecting lesions in medical imaging includes the following steps: Step 1: Image preprocessing. The input MRI image is preprocessed, including image normalization, resizing, format unification, and enhancement, to obtain preprocessed image data.
[0011] Furthermore, the image preprocessing in step 1 includes: Image normalization: Normalizes pixel values to the range [0,1]. Resize: Adjust the image to 640×640 pixels; Data augmentation includes Mosaic augmentation, random erasure, blurring, median blurring, grayscale conversion, and CLAHE augmentation.
[0012] Meanwhile, in step 1, the Br35H and MBTBB datasets were selected as the datasets for the brain lesion detection experiment. The Br35H dataset was divided into a training set of 500 images and a validation set of 200 images. The MBTBB dataset was divided into four categories according to tumor type: glioma, meningioma, pituitary adenoma, and normal images. Sampling studies were conducted on both datasets. The ratio of enhanced to non-enhanced images in the Br35H dataset was approximately 4:6, while the ratio in the MBTBB dataset was approximately 7:3. Furthermore, both datasets covered modalities including T1WI, T2WI, DCE-T1WI, DCE-T2WI, and T2WI-FLAIR.
[0013] Step 2: Edge Enhancement Multi-Scale Feature Extraction. The Edge Integration Multi-Scale Selection (EIMS) module is used to extract features from the preprocessed image, specifically including: 2.1 Multi-scale feature extraction: Adaptive average pooling is introduced to extract local information at different scales, capturing image features at different scale levels; 2.2 Edge Enhancement: Edge information is extracted using the EdgePrompt mechanism, and the average features after pooling are subtracted from the original input features to obtain the edge features; Furthermore, the edge enhancement process in step 2.2 specifically includes: Let the input feature map be Fin∈R^(H×W×C). Multi-level features are generated at three scales (small, medium, and large) through adaptive average pooling. Then, the context features are calculated and extracted. Finally, the edge features are obtained by subtracting the context features from the input features and then integrated into the overall forward propagation flow after convolution.
[0014] 2.3 Dynamic Multi-Domain Selection: Domain-specific selection of extracted features in the spatial and frequency domains is performed to adaptively amplify features with high task relevance.
[0015] Furthermore, the dynamic multi-domain selection in step 2.3 includes: Spatial domain selection: Max pooling and average pooling are used to compress the input features along the channel dimension, a general feature map is generated through convolutional layers, and then channel separation transformation is performed through depthwise separable convolution; Frequency domain selection: The lowest frequency information is removed to reduce low-frequency signal interference, while high-frequency information is emphasized. The final output is fused through a dynamic weighting mechanism. Step 3: Hierarchical Reparameterized Interactive Fusion (HRIF) module is used to fuse multi-scale features, specifically including: 3.1 Feature preprocessing: Dimensionality reduction is performed using 1×1 convolution to standardize the feature dimensions and reduce computational complexity; 3.2 Hierarchical Attention: A hierarchical attention mechanism is adopted to compute the attention matrix of non-overlapping patches in the spatial domain, adaptively balancing local detail preservation and global context aggregation; Furthermore, the hierarchical attention mechanism in step 3.2 specifically involves: expanding the input features into a patch sequence to calculate the attention weights. 3.3 Feature Fusion and Optimization: Multi-branch features are fused and recombined through reparameterized convolution to enhance parameter efficiency and achieve more effective multi-branch feature fusion.
[0016] Step 4: Lesion detection and localization. The fused features are input into the detection head. The classification branch and regression branch are used to predict the lesion category and location, respectively, and the bounding box and confidence score of the lesion are output.
[0017] Furthermore, the detection head in step 4 adopts a three-branch output structure, with the classification branch and regression branch decoupled, independently predicting large, medium and small-sized targets respectively, ensuring robust multi-scale detection capability.
[0018] This invention provides an edge-guided medical imaging lesion detection system, comprising: The image preprocessing module is used to preprocess the input image; The edge enhancement multi-scale feature extraction module is used to extract multi-scale features for edge enhancement. The lesion detection and localization module is used to output the category and location information of the lesions.
[0019] Compared with the prior art, the present invention has the following beneficial effects: 1. The Edge Integration (EIMS) module based on the multi-scale selection mechanism explicitly obtains edge information from the original image and its context information obtained through convolution through a simple subtraction operation and integrates it into the feature extraction process. This enhances the model's ability to perceive lesion boundaries and significantly improves the model's recall and precision for lesions.
[0020] 2. By adopting hierarchical reparameterized interactive fusion, adaptive fusion of multi-scale features is achieved, which effectively coordinates local details and global structural information, and solves the problem of low detection rate of small lesions and early lesions caused by information loss in traditional fusion methods.
[0021] 3. Compared with existing technologies, the number of model parameters and computational cost are significantly reduced, which improves the feasibility of lightweight deployment of the model in clinical practice. Attached Figure Description
[0022] Figure 1 This is an overall flowchart of the method of the present invention; Figure 2 This is a model diagram of the present invention. Detailed Implementation
[0023] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments. A brain tumor is used as an example.
[0024] Example 1
[0025] This embodiment provides a method for detecting lesions in brain MRI images based on edge guidance. The specific implementation steps are as follows: Step 1: Image Preprocessing: Acquire brain MRI image data and normalize the images, normalizing pixel values to the range [0,1]. Then, resize the image to 640×640 pixels. During training, data augmentation techniques are applied, including Mosaic enhancement (probability 1.0), random erasure (probability 0.4), blurring (probability 0.01), median blurring (probability 0.01), grayscale conversion (probability 0.01), and CLAHE enhancement (probability 0.01).
[0026] Step 2: Edge Enhancement Multi-Scale Feature Extraction: The preprocessed image is input into the Edge Integration Multi-Scale Selection (EIMS) module. First, adaptive average pooling is used to extract multi-level features at scales {3, 6, 9, 12}. Then, edge features are calculated using the EdgePrompt mechanism, and the edge features are processed through a convolutional layer and added to the original features. Next, dynamic multi-domain selection is performed. In the spatial domain, max pooling and average pooling are used to compress features, generating a spatial attention map, which is then refined using depthwise separable convolution. In the frequency domain, the lowest frequency information is removed, while high-frequency features are retained. Finally, a dynamic weighting mechanism is used to fuse the spatial and frequency domain features.
[0027] Step 3: Hierarchical Reparameterized Interactive Fusion (HRIF): The features output from the EIMS module are input into the Hierarchical Reparameterized Interactive Fusion (HRIF) module. First, the input features are reduced in dimensionality using a 1×1 convolution. Then, a hierarchical attention mechanism is employed, setting patch size parameters ps1=2 and ps2=4, to compute the attention matrix for non-overlapping patches in the spatial domain. The relationship between tokens is quantified using cosine similarity, and a linear transformation is applied to adaptively select the discriminative channel. Finally, multi-branch features are fused using reparameterized convolution to generate the final feature representation.
[0028] Step 4: Lesion Detection and Localization: The fused features are input into the detection head, which employs a three-branch output structure. The classification and regression branches are decoupled, independently predicting large, medium, and small lesion targets respectively. Duplicate detections are removed using non-maximum suppression (NMS), and the final lesion bounding box, category, and confidence score are output.
[0029] Training settings: - Optimizer: Auto-select (SGD / AdamW) - Initial learning rate: 0.01 - Final learning rate: 0.0001 - Number of training rounds: 300 - Batch size: 32 - Input image size: 640×640 - Training was performed using two NVIDIA GeForce RTX 4090 GPUs. The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Any person skilled in the art can make some modifications or alterations to the disclosed technical content to create equivalent embodiments without departing from the scope of the present invention. Any simple modifications, equivalent changes, and alterations 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 scope of the present invention.
Claims
1. A method for detecting medical imaging lesions based on edge guidance, characterized in that, Includes the following steps: Step S1: Acquire brain MRI image data and perform image preprocessing; Step S2: Design an Edge Integration Multi-Scale Selection (EIMS) module to perform edge enhancement multi-scale feature extraction on the preprocessed image; Step S3: Use hierarchical reparameterized interactive fusion to fuse the extracted multi-scale features; Step S4: Input the fused features into the detection head to classify and locate the lesions, and output the detection results.
2. The edge-guided medical imaging lesion detection method as described in claim 1, characterized in that, Step S1 specifically includes: image normalization, normalizing pixel values to the range of [0,1]; size adjustment, adjusting the image to 640×640 pixels; data enhancement, including Mosaic enhancement, random erasure, blurring, median blurring, grayscale conversion, and CLAHE enhancement.
3. The edge-guided medical imaging lesion detection method as described in claim 2, characterized in that, In step S1, the Br35H and MBTBB datasets are selected as the datasets for the brain lesion detection experiment. The Br35H dataset is divided into a training set of 500 images and a validation set of 200 images. The MBTBB dataset is divided into four categories according to tumor type: glioma, meningioma, pituitary adenoma, and normal images. The preprocessing includes image normalization, resizing to 640×640 pixels, and data augmentation operations, including one or more of the following: Mosaic enhancement, random erasure, blurring, median blurring, grayscale conversion, and CLAHE enhancement.
4. The edge-guided medical imaging lesion detection method as described in claim 1, characterized in that, The Edge Integration Multi-Scale Selection (EIMS) module in step S2 performs the following operations: 2.1 Multi-scale feature extraction: Local contextual features of the image are extracted at multiple scales through adaptive average pooling; 2.2 Edge Enhancement: The average contextual features obtained by pooling are subtracted from the original input features through the EdgePrompt mechanism to obtain edge features, and these edge features are then integrated into the forward propagation process; 2.3 Dynamic Multi-Domain Selection: Domain-specific selection of features in the spatial and frequency domains is performed. Spatial domain selection generates a spatial attention map through max pooling, average pooling, and depthwise separable convolution. Frequency domain selection emphasizes high-frequency components by removing the lowest frequency information. Finally, dual-domain features are fused through a dynamic weighting mechanism.
5. The edge-guided medical imaging lesion detection method as described in claim 1, characterized in that, The detection head in step S4 adopts a three-branch output structure, with the classification branch and regression branch decoupled, and independently predicting large, medium and small lesion targets respectively.
6. An electronic device comprising a memory and one or more processors, wherein the memory stores executable code, and the one or more processors execute the executable code to implement an edge-guided medical imaging lesion detection method as described in any one of claims 1-5.
7. A computer-readable storage medium having a program stored thereon, which, when executed by a processor, implements an edge-guided medical image lesion detection method as described in any one of claims 1-6.