Lesion detection method and system based on multi-scanning interactive deformable Mama
By introducing a deformable scanning mechanism and a multi-scan interaction module, the problems of morphological adaptability and computational efficiency in lesion detection in existing technologies are solved, enabling efficient and accurate detection of complex pathological patterns, and making it suitable for multi-cancer medical image analysis.
Patent Information
- Application Number
- CN202511443380.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-10
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2045-10-10
AI Technical Summary
Existing medical imaging lesion detection technologies struggle to dynamically adjust the scanning sequence when faced with tumor lesions that are irregular in shape, have blurred boundaries, or are sparsely distributed. This leads to the loss of key local structural information, making it impossible to balance local details with global semantics. Furthermore, it is difficult to balance computational efficiency with detection accuracy, thus limiting real-time clinical application.
By introducing a deformable scanning mechanism and a multi-scan interaction module, and by adaptively adjusting the scanning position and sequence, combined with dynamic weighted scanning fusion, feature extraction and fusion at multiple scales and in multiple directions are achieved, simulating lesion detection from the perspective of a pathology expert.
It significantly improves the ability to identify the boundaries of complex and heterogeneous tumors, enhances the robustness of detecting occult lesions, and achieves efficient pathological feature capture and adaptive calibration, meeting the needs of real-time clinical detection.
Smart Images

Figure CN121033009A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of medical image analysis, and particularly relates to a lesion detection method and system based on multi-scan interactive deformable Mamba. BACKGROUND
[0002] Currently, the mainstream direction of deep learning technology for medical image lesion detection includes: based on convolutional neural network (CNN), based on visual Transformer (ViT), based on visual state space model (Vi-SSM).
[0003] However, the existing medical image lesion detection has the following defects:
[0004] 1. The scanning path is rigid and lacks content adaptability: the current mainstream visual state space model (such as VMamba, SpiralMamba, QuadMamba, etc.) relies on a preset fixed scanning path (such as raster, spiral, and block scanning). When flattening 2D images into 1D sequences, the scanning order cannot be dynamically adjusted according to the image content. This limits the modeling ability of the model for spatial structures, especially when facing irregular-shaped, fuzzy-bounded, or sparsely-distributed tumor lesions, key local structural information is easily destroyed or ignored.
[0005] 2. Imbalance between spatial locality and long-range dependency modeling: the fixed scanning path destroys the natural adjacency relationship between original 2D pixels in the serialization process, making it difficult for SSM to consider both local details (such as small calcification points and burr edges) and global semantics (such as overall lesion morphology and organ context) when modeling. The existing methods such as the jump sampling of EfficientVMamba or the partition strategy of QuadMamba attempt to optimize, but still belong to static rules and cannot be adjusted adaptively for different lesions.
[0006] 3. Insufficient multi-directional structure information capture capability: single or limited direction scanning strategies (such as only horizontal / spiral) cannot fully capture the multi-directional spatial correlation of lesions, especially for tumors with radial, lobulated, or infiltrative edges, important pathological clues are easily missed.
[0007] 4. Lack of dynamic weight adjustment in feature fusion, easily disturbed by noise or background: the existing scanning fusion strategy (such as simple splicing or average pooling) treats the features extracted by different scanning paths equally, without considering the information confidence difference of each path in a specific image area, resulting in background noise or low information area interference in the final decision.
[0008] 5. It is difficult to balance computational efficiency and detection accuracy, which limits clinical application: Although SSM has the advantage of linear complexity, the existing Vi-SSM often adds complex modules (such as multi-scale windows and spiral stacking) to compensate for scanning defects, which increases the number of parameters and inference delay, making it difficult to meet the real-time requirements of clinical applications.
[0009] Therefore, there is a need for a method or device that can solve the problem of balancing morphological heterogeneity representation and computational efficiency, and achieve comprehensive capture and adaptive calibration of pathological features, in order to solve the above-mentioned technical problems. Summary of the Invention
[0010] This invention introduces a Deformable Scanning (DS) mechanism, enabling the model to dynamically adjust the spatial sampling position and sequence processing order based on image content, thereby upgrading the traditional static sequence processor into a content-aware intelligent two-dimensional visual navigator. A parallel multi-scan SSM interaction (MSPI) module captures complex pathological patterns, and a Dynamic Weighted Scan Fusion (DWSF) module achieves feature adaptive calibration. This invention possesses four core characteristics: morphological adaptation, computational efficiency, multi-cancer generalization, and clinical deployability. Validated in two major clinical scenarios—oral cancer and lung nodules—it significantly improves detection accuracy and robustness while maintaining low parameter count and low latency, establishing a new paradigm for next-generation, clinically applicable intelligent medical image analysis technology.
[0011] This invention provides the following technical solution: a lesion detection method based on multi-scan interactive deformable Mamba, comprising the following steps:
[0012] Step 1, Image Patch Embedding: An adaptive image patch embedding strategy is adopted in the image segmentation process to divide the original medical image into uniformly sized, non-overlapping image patch regions; in the image patch embedding process, each image patch is converted into a fixed-dimensional embedding vector through a linear projection layer to form a serialized feature representation;
[0013] Step 2, Multi-scale feature extraction and interaction in the parallel scanning backbone network: The image patch is input into the parallel scanning backbone network containing the adaptive scanning network (ASN), and multi-scale feature extraction of the image is performed through the hierarchically deployed ASN modules.
[0014] Step 3: Feature pyramid optimization based on dynamic weighted scanning fusion: The hierarchical features C3-C5 output from the backbone network are aggregated into the feature pyramid network through a top-down strategy to fuse high-level semantic information and low-level spatial details.
[0015] Step 4, Multi-scale fusion: The decoupled detection head receives the scale-specific feature map output by the path aggregation feature pyramid network and performs detection tasks in parallel at multiple scales to achieve the identification and localization of cancer lesions of different sizes.
[0016] Preferably, in step 1, during image segmentation, the input image is divided into image blocks of fixed size according to the image resolution and task requirements to adapt to the feature scale of different modal medical images.
[0017] Preferably, in step 2, the ASN module is formulated using the residual learning framework as follows:
[0018]
[0019] in, Let B be the input tensor, where B represents the batch index, C represents the number of channels of the input feature, H represents the height, and W represents the width. For layer normalization operation, MSPI is a disease-specific feedforward network and a parallel multi-scan SSM interactive structure module.
[0020] The core expression for MSPI is:
[0021]
[0022] in, For feature fusion function, For the characteristic modulation function, For context transformation functions, Histological texture feature extraction is enhanced by depthwise separable convolution. SSM is a state-space model, and Z represents the normalized input feature.
[0023] More preferably, the SSM employs three scanning modes: forward, backward, and deformable. The deformable scanning DS mode is implemented through a content-adaptive sequence formation mechanism, specifically:
[0024] Step 2-1: Generate an adaptive offset field using a shared offset network. This network uses depthwise convolutions with varying kernel sizes. (K varies with the stage).
[0025] Step 2-2: Obtain the input tensor through bilinear interpolation. The deformation location features were sampled and relative displacements were added. Modulated learning bias .
[0026] Steps 2-3: Determine the replacement index through sorting operations. The spatial sampling features are reshaped into a sequence and reordered to generate a content-adaptive 1D sequence. .
[0027] More preferably, in step 2-1, the predicted offset field Split into point offset predictor and token index offset predictor The point offset predictor calculates the normalized point offset. Deformable points are obtained. for:
[0028]
[0029] In the formula, The normalized point offset, where the subscript... Batch index ,high and The value at that location, It is the hyperbolic tangent function. A point offset predictor used to calculate point offsets. , For deformable points, The reference point coordinate grid Indicates height and width ;
[0030] In step 2-2, the token index offset predictor generates the normalized token index offset. Calculate the deformable token index for:
[0031]
[0032] In the formula, For normalized tag index offset, For the tag index offset predictor, For deformable tag indexes, For reference marker index sequences, usually from arrive ;
[0033] The cascading architecture of SSM is implemented using the following recursive formula:
[0034]
[0035]
[0036]
[0037]
[0038] in Layer-specific timescale parameters are used to capture rapid transitions and gradual changes in tissue appearance; model parameters , and The model parameters are obtained by discretizing their continuous form. For time steps The input feature vector (or feature tensor). This is a cross-level projection matrix used to facilitate the flow of information between different levels of abstraction in organizational representation. For the first Layer in time step Hidden state (memory / intermediate representation). The final output is the output matrix representing the hidden states of all layers. The result of weighted summation.
[0039] Preferably, in step 3, the path aggregation feature pyramid network integrates a dynamic weighted scanning fusion mechanism, and the diagnostic weight calculation formula is as follows:
[0040]
[0041] in, This represents the Sigmoid activation function. This represents a set of multi-scale pooling operations. For learnable scale-specific importance weights, This represents an organ-specific regulatory function. This is the weight matrix in the first-level linear transformation. This is the weight matrix in the second-level linear transformation. For the input feature map / tensor, This is the bias vector in the first-level linear transformation. This is the bias vector in the second-level linear transformation. It is a Sigmoid weighted linear unit.
[0042] Weights complete normalization and uncertainty-aware calibration in a single step:
[0043]
[0044] in, To control the weight entropy, The diagnostic weight corresponding to the i-th scan mode. This is the entropy term.
[0045] The final fused output is calculated through an integrated transformation of the weighted scan mode and higher-order cross-scan interactions:
[0046]
[0047]
[0048]
[0049] in, This indicates forward, backward, and deformable scan outputs. To control the contribution of different scanning modes across this mechanism, To represent the weighted scan mode output through get, This represents the output from forward, backward, and deformable scan operations. , This represents the output obtained under different scanning modes. The weight matrix in the linear transformation, For the bias term in the linear transformation, This represents the feature matrix after the scan outputs the interaction.
[0050] Preferably, in step 4, the decoupled detection head adopts a three-way parallel processing architecture, corresponding to the P3, P4, and P5 feature maps output by the path aggregation feature pyramid network, respectively. Each feature map undergoes feature enhancement and detection task execution through an independent decoupled processing module.
[0051] The P3 layer is a small-sized lesion detection layer. The P3 layer feature map has the highest resolution and is used to detect small lesions. The P3 layer detection head can capture subtle texture changes and edge features of lesions through high-resolution feature maps.
[0052] The P4 layer is a medium-sized lesion detection layer. The P4 layer feature map has a medium resolution and is used to detect medium-sized lesions. By balancing resolution and receptive field, the P4 layer detection head can effectively handle morphological changes and internal structural features of lesions.
[0053] The P5 layer is used for detecting large lesions. The P5 layer feature map has the lowest resolution and is used to detect large lesions. The P5 layer detection head utilizes the characteristics of a large receptive field to capture the overall morphology of the lesion and its relationship with the surrounding tissue.
[0054] Preferably, in step 4, the decoupled detection head employs a loss function combination strategy, including:
[0055] Classification loss: An improved Focal Loss is adopted, which adaptively adjusts the weights of easy and difficult samples, making the model pay more attention to lesion samples that are difficult to classify.
[0056] Bounding box regression loss: The GIoU loss function is used, which considers not only the overlapping area of the bounding boxes, but also the shape and orientation of the bounding boxes, making the lesion localization more accurate.
[0057] AT focus loss: dynamically adjusts the classification threshold based on the size, morphological characteristics, and tissue type of the lesion.
[0058] The present invention also discloses a lesion detection system based on multi-scan interactive deformable Mamba, which is used to implement the above-mentioned lesion detection method based on multi-scan interactive deformable Mamba. The detection system includes: an adaptive scanning network architecture module, a parallel multi-scan SSM interactive structure module, and a content-aware deformable scanning mechanism module.
[0059] The adaptive scanning network architecture module is used to dynamically couple the state space model with organ-specific scanning pathways to construct multi-scale, multi-directional feature extraction pathways.
[0060] The parallel multi-scan SSM interactive structure module is used to integrate three parallel paths—forward scan, backward scan, and deformable scan—in the cascaded state space module, and to perform tensor outer product and channel attention weighted fusion on the hidden states output by different scan paths.
[0061] The content-aware deformable scanning mechanism module includes...
[0062] A lightweight scanning attention prediction head is used to predict spatial offsets in real time based on local semantic features and dynamically adjust the position of the next scan point.
[0063] The sequence reordering controller is used to dynamically adjust the subsequent scanning order based on the confidence feedback of the current scanning path, so as to achieve focused scanning from easy to difficult and from coarse to fine.
[0064] Preferably, the adaptive scanning network architecture module adaptively activates different scanning modes at each level based on the semantics of the input image, and dynamically models the local-global spatial dependency relationship through the state transition matrix, thereby effectively modeling cross-regional pathological associations while preserving high-resolution local lesion features, and significantly improving the ability to identify the boundaries of complex heterogeneous tumors.
[0065] The parallel multi-scan SSM interactive structure module simulates the clinical thinking of pathologists in comprehensively judging lesions from multiple sections, enabling the model to automatically learn the nonlinear coupling relationship of tissue response under different scanning perspectives, thereby enhancing the robustness of detecting occult and diffuse lesions.
[0066] The beneficial effects of this invention are:
[0067] 1. This invention utilizes an adaptive hierarchical scanning network architecture to dynamically couple a state-space model with organ-specific scanning paths, constructing a multi-scale, multi-directional feature extraction pathway. At each level, different scanning modes (such as radial, spiral, and edge-tracking) are adaptively activated based on the semantics of the input image, effectively modeling local-global spatial dependencies and significantly improving the ability to identify the boundaries of complex and heterogeneous tumors. This design preserves high-resolution local lesion features while avoiding the loss of spatial structural information caused by fixed scanning strategies in traditional methods, achieving a dual improvement in morphological representation capabilities and computational efficiency.
[0068] 2. This invention integrates three parallel paths—forward scanning, backward scanning, and deformable scanning—into a cascaded state space module through a parallel multi-scan SSM interactive structure (MSPI). The hidden states output by different scanning paths are fused by tensor extraproduct and channel attention weighting. This mechanism simulates the clinical thinking of pathologists who comprehensively judge lesions from multiple perspectives, enabling the model to automatically learn the nonlinear coupling relationship of tissue response under different scanning perspectives, significantly enhancing the robustness of detecting occult and diffuse lesions.
[0069] 3. The content-aware deformable scanning mechanism of the present invention includes a lightweight scanning attention prediction head and a sequence reordering controller. It predicts spatial offset in real time based on local semantic features and dynamically adjusts the position and order of scanning points to achieve focused scanning from easy to difficult and from coarse to fine. This mechanism is the first to jointly optimize spatial deformation and sequence modeling, enabling the model to have the "active visual exploration" capability of a radiologist and significantly improving the ability to characterize complex morphological cancerous tissues.
[0070] 4. This invention utilizes a Dynamic Weighted Scan Fusion (DWSF) mechanism, combined with organ-specific adjustment functions and entropy calibration mechanisms, to achieve adaptive calculation of diagnostic weights. This mechanism can dynamically adjust the contribution of different scanning modes according to lesion characteristics, effectively solving the problem of highly variable pathological manifestations in the diagnosis of multiple cancers. At the same time, the multi-scale fusion decoupled detection head design employs dedicated detection strategies for lesions of different sizes (small size P3, medium size P4, large size P5), avoiding the feature confusion problem of traditional single-scale detection heads when processing lesions of multiple sizes, and significantly improving the detection accuracy of cancer lesions of different sizes.
[0071] 5. This invention achieves an accuracy of 79.2%, precision of 82.3%, recall of 75.6%, and F1 score of 78.8% on the OCA oral cancer dataset. On the LUNA16 lung nodule dataset, it achieves excellent performance with a sensitivity of 94.50% per FP / scan, a CPM of 92.70%, and a mAP of 94.20%. Compared with existing technologies, this invention has only 6.8M parameters, 13.8G FLOPS of computation, and a latency as low as 7.5ms, while significantly outperforming mainstream models such as YOLOv12-N (73.9% accuracy, 73.1% F1 score) and DETR-R50 (60.3%). On the LUNA16 dataset, the number of parameters in this invention is only one-quarter of that of LN-DETR (26.2M), while maintaining high sensitivity, achieving a perfect balance between detection accuracy and computational efficiency. Attached Figure Description
[0072] Figure 1 This is an overall architecture diagram of the AdaptScanDet system for a lesion detection method and system based on multi-scan interactive deformable Mamba, as described in this invention.
[0073] Figure 2 This is a diagram of the adaptive scanning (ASN) network module of the present invention;
[0074] Figure 3 This is a block diagram of the parallel multi-scan SSM interactive structure (MSPI) of the present invention;
[0075] Figure 4 This is a diagram of the Dynamic Weighted Scan Fusion (DWSF) module of the present invention;
[0076] Figure 5 This is a schematic diagram of the adaptive offset guided scanning of the present invention;
[0077] Figure 6 This is a graph showing the analysis of detection results for oral cancer and lung nodules using different state-of-the-art (SOTA) methods of the present invention;
[0078] Figure 7 This is a schematic diagram of the method steps of the present invention. Detailed Implementation
[0079] The related technologies of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.
[0080] refer to Figures 1-7This specific embodiment provides a lesion detection method and system based on multi-scan interactive deformable Mamba, including:
[0081] (1): Adaptive Scanning Network Architecture
[0082] Existing convolutional neural networks (CNNs) and traditional state-space models (SSMs) in medical images often employ fixed receptive fields or linear scanning paths, making it difficult to adapt to the significant heterogeneity in morphology, texture, and boundaries of malignant lesions in different organs and tissues. This leads to loss of local details or misjudgment of global structures. The "adaptive hierarchical scanning network architecture" of this implementation dynamically couples the state-space model with organ-specific scanning paths to construct multi-scale, multi-directional feature extraction pathways. At each level, this architecture adaptively activates different scanning modes (such as radial, spiral, and edge-tracking) based on the semantics of the input image, and dynamically models local-global spatial dependencies through a state transition matrix. This design effectively models cross-regional pathological associations while preserving high-resolution local lesion features, significantly improving the ability to identify complex and heterogeneous tumor boundaries.
[0083] (2): Parallel Multi-Scan Product Interaction (MSPI) Structure
[0084] Existing models often employ single-direction or fixed-combination scanning strategies, failing to fully capture the characteristic interactions of lesions from different spatial perspectives, especially limiting their performance in scenarios with distorted tissue structures and irregular lesion morphologies. This implementation's "multi-scan product interaction mechanism" integrates three parallel paths—forward scanning, backward scanning, and deformable scanning—in a cascaded state space module. It performs tensor outer product and channel attention weighted fusion on the latent states output from different scanning paths. This mechanism simulates the clinical thinking of pathologists who comprehensively assess lesions from multiple cross-sections, enabling the model to automatically learn the nonlinear coupling relationships of tissue responses under different scanning perspectives, thereby enhancing its robustness in detecting occult and diffuse lesions.
[0085] (3) Content-Aware Deformable Scanning Mechanism
[0086] Traditional scanning mechanisms use fixed grids or preset paths, which cannot dynamically adjust sampling strategies based on image content, resulting in insufficient attention to key diagnostic areas (such as spiculated edges and heterogeneous enhancement areas). The "content-aware deformable scanning mechanism" of this embodiment includes two core components: (1) a lightweight scanning attention prediction head, which predicts spatial offset in real time based on local semantic features and dynamically adjusts the position of the next scanning point; (2) a sequence reordering controller, which dynamically adjusts the subsequent scanning order based on the confidence feedback of the current scanning path, realizing a focused scanning that progresses from easy to difficult and from coarse to fine. This mechanism is the first to jointly optimize spatial deformation and sequence modeling, enabling the model to have the "active visual exploration" capability of a radiologist.
[0087] The present embodiment will now be described in detail with reference to the accompanying drawings. Figure 1 The diagram shown is the overall framework of this embodiment, illustrating the complete architecture of the Adaptive and Deformable Scanning Interactive Visual State Space Model (AdaptScanDet) for multi-cancer target detection.
[0088] like Figure 1 As shown, the AdaptScanDet system proposed in this embodiment consists of three core components: a parallel scanning backbone network integrating adaptive scanning features, a path aggregation feature pyramid network (PAFPN), and a decoupled detection head (Note: the specific constituent modules of the three core components are as follows). Figure 2 , 3 (As shown in Figure 4). These components work together to achieve the goal of efficiently extracting and identifying cancer lesions from medical images. The specific steps of the segmentation process implemented by the entire architecture are as follows:
[0089] Step 1: Image Patch Embedding
[0090] In image segmentation processing, this invention employs an adaptive image patch embedding strategy. First, the original medical image is divided into uniformly sized, non-overlapping image patch regions. Specifically, based on image resolution and task requirements, the input image is divided into image patches of fixed size to adapt to the feature scales of different modalities of medical images. This partitioning method ensures that each image patch independently contains local spatial information while avoiding feature redundancy caused by overlap between adjacent image patches.
[0091] The image patch embedding process transforms each image patch into a fixed-dimensional embedding vector through a linear projection layer, forming a sequential feature representation. This process not only significantly simplifies the computational complexity of subsequent feature extraction but also lays the foundation for multi-scale pathological feature analysis by preserving the spatial structural information of the image (including the relative positional relationships between pixels). In particular, the non-overlapping partitioning strategy effectively avoids redundant computation of image information, enabling the model to process high-resolution medical images more efficiently. Simultaneously, it provides a structured input sequence for the subsequent Adaptive Scanning Network (ASN), ensuring optimal computational efficiency while maintaining spatial integrity.
[0092] Step 2: Parallel scanning of multi-scale feature extraction and interaction in the backbone network
[0093] Medical image patches, after image patch embedding, are input into a parallel scanning backbone network containing an Adaptive Scanning Network (ASN). Multi-scale feature extraction is performed on the images through hierarchically deployed ASN modules. The ASN modules at levels L1 to L4 correspond to downsampling factors of ×3, ×6, ×9, and ×12, respectively, to accommodate cancer lesion features of different sizes. Each ASN module is formulated using a residual learning framework as follows:
[0094]
[0095] in, For the input tensor, For layer normalization operation, As a disease-specific feedforward network, MSPI is a parallel multi-scan SSM interactive structure module. The MSPI module achieves feature enhancement through a multi-scan product interaction mechanism, and its core expression is:
[0096]
[0097] in, For the characteristic modulation function, For context transformation functions, Deeply separable convolutions (SSMs) enhance histological texture feature extraction, serving as a state-space model. The SSM model employs three scanning modes: forward, backward, and deformable. The deformable scanning mode (DS) is implemented through a content-adaptive sequence formation mechanism, specifically as follows: Figure 5 As shown:
[0098] First, an adaptive offset field is generated through a shared offset network. This network uses depthwise convolution (DWConv) with a kernel size of [missing information]. The phase varies, for example [9, 7, 5, 3]), channel attention (CA) module, GELU activation, layer normalization (LN), 1x1 convolution, and tanh activation function. The predicted offset field... Split into point offset predictor and token index offset predictor The point offset predictor calculates the normalized point offset. Deformable points are obtained. :
[0099]
[0100] Secondly, bilinear interpolation is used to obtain the input tensor The deformation location features were sampled and relative displacements were added. Modulated learning bias The token index offset predictor generates a normalized token index offset. Calculate the deformable token index :
[0101]
[0102] Third, determine the replacement index through sorting operations. The spatial sampling features are reshaped into a sequence and reordered to generate a content-adaptive 1D sequence. This sequence effectively reflects the spatially relevant sampling locations and data-dependent processing order, and is then input into the ASN component for sequence feature processing.
[0103] The cascaded architecture of the SSM is implemented through the following recursive formula:
[0104]
[0105]
[0106]
[0107]
[0108] in Layer-specific timescale parameters are used to capture rapid transitions and gradual changes in tissue appearance; model parameters , and It is obtained by discretizing their continuous form. The architecture employs a spatially adaptive gating mechanism. It highlights regions with significant potential pathological significance, effectively overcoming the limitations of traditional convolutional methods in handling the heterogeneous morphological features of malignant tissues from different organ systems. By dynamically selecting complementary scanning modes such as raster scanning and spiral scanning, the MSPI module achieves comprehensive characterization of complex pathological features, providing high-quality input for subsequent multi-scale feature fusion and significantly improving the detection capability of small lesions and borderline lesions.
[0109] Step 3: Feature Pyramid Optimization Based on Dynamic Weighted Scan Fusion
[0110] The hierarchical features C3-C5 output from the backbone network are input into the Feature Pyramid Network (PAFPN), which fuses high-level semantic information with low-level spatial details using a top-down strategy. PAFPN integrates a Dynamic Weighted Scan Fusion (DWSF) mechanism, and its diagnostic weight calculation formula is as follows:
[0111] in, This represents the Sigmoid activation function. This represents a set of multi-scale pooling operations (capturing pathological features at different granularities). For learnable scale-specific importance weights, This represents an organ-specific regulatory function that adapts the weighting mechanism to the unique characteristics of the anatomical region.
[0112] Weights complete normalization and uncertainty-aware calibration in a single step:
[0113]
[0114] in, By controlling the influence of weight entropy during the calibration process, the model can assign more diverse scanning patterns to regions with blurred pathological features. This formula provides a theoretically sound mechanism for handling diagnostic uncertainties, and is particularly suitable for analyzing cases with borderline lesions or atypical imaging manifestations.
[0115] The final fused output is calculated through an integrated transformation of the weighted scan mode and higher-order cross-scan interactions:
[0116]
[0117]
[0118] in, This indicates forward, backward, and deformable scan outputs. To control the contribution of different scanning modes across this mechanism and effectively address the highly variable pathological manifestations in the diagnosis of multiple cancers, organ-specific modulation functions are used. Guided by this, the model can dynamically adjust weights based on the unique features of different anatomical regions, while handling diagnostic uncertainty through an entropy calibration mechanism. Higher-order cross-scan interaction (… and The combination significantly enhances the model's ability to capture complex pathological patterns resulting from the interaction of different tissue features in various scanning directions, providing robust feature representations for multi-cancer and multimodal medical image analysis, and is particularly suitable for complex pathological scenarios with boundary lesions or atypical imaging manifestations.
[0119] Step 4: Multi-scale fusion
[0120] The decoupled detection head, as one of the core components of this invention, receives scale-specific feature maps P3, P4, and P5 from the Pyramid Attention Feature Pyramid Network (PAFPN) and performs detection tasks in parallel across multiple scales, achieving accurate identification and localization of cancer lesions of different sizes. This design overcomes the limitations of traditional single-scale detection heads. Through decoupled feature processing paths, the feature map at each scale can focus on the detection of lesions within a specific size range, significantly improving the accuracy and efficiency of multi-scale cancer detection.
[0121] The decoupled detection head of this invention adopts a three-way parallel processing architecture, corresponding to the P3, P4, and P5 feature maps output by PAFPN respectively. Each feature map undergoes feature enhancement and detection task execution through an independent decoupled processing module.
[0122] P3 layer (small lesion detection): This layer has the highest feature map resolution (1 / 8 downsampling) and is specifically designed for detecting small lesions, such as early micronodules and early metastases. The P3 layer detector uses high-resolution feature maps to capture subtle texture changes and edge features of lesions, making it particularly suitable for identifying early cancer lesions such as small lung nodules and breast microcalcifications. During training, the P3 layer detector uses a finer anchor point setting (e.g., a 16×16 pixel anchor point grid) to adapt to the spatial distribution characteristics of small lesions.
[0123] P4 layer (medium-sized lesion detection): This layer has a medium-resolution feature map (1 / 4 downsampling) and focuses on detecting medium-sized lesions, such as typical solid tumors and some lymph node metastases. By balancing resolution and receptive field, the P4 layer detector effectively handles morphological changes and internal structural features of lesions, making it particularly suitable for detecting intermediate-stage lesions in common cancers such as breast cancer and gastric cancer. For feature processing, the P4 layer uses medium-sized convolutional kernels (e.g., 5×5) to capture the local structural features of the lesions.
[0124] P5 layer (large lesion detection): This layer has the lowest feature map resolution (1 / 2 downsampling) and is used to detect large lesions, such as advanced tumors and large-area metastases. The P5 layer detector utilizes a large receptive field to capture the overall morphology of the lesion and its relationship with surrounding tissues, making it particularly suitable for detecting large lesions such as advanced liver cancer and lung cancer. In feature processing, the P5 layer uses large-scale convolutional kernels (e.g., 7×7) combined with spatial pyramid pooling to capture the global features of the lesion.
[0125] This multi-scale decoupling design not only allows each scale of the detection head to focus on lesions within a specific size range, but also avoids the feature confusion problem that traditional single-scale detection heads encounter when dealing with lesions of multiple sizes, significantly improving the detection accuracy of cancer lesions of different sizes.
[0126] Loss function combinatorial optimization
[0127] To further improve the accuracy and robustness of the model in locating and classifying various cancer lesions, the decoupled detection head of this invention employs an innovative loss function combination strategy, including:
[0128] Classification Loss: An improved Focal Loss is employed, which adaptively adjusts the weights of easy and difficult samples, allowing the model to focus more on lesion samples that are difficult to classify. This design is particularly effective in cancer detection because cancer lesions often exhibit high morphological heterogeneity, making it difficult to accurately classify some lesions.
[0129] Bounding Box Regression Loss: This loss function uses the GIoU (Generalized Intersection over Union) loss function, which considers not only the overlapping areas of the bounding boxes but also their shape and orientation, resulting in more accurate lesion localization. In cancer detection, accurate bounding box localization is crucial for determining the extent of lesions, assessing tumor size, and staging.
[0130] AT Focal Loss (Adaptive Threshold Focal Loss): This loss function dynamically adjusts the classification threshold based on the size, morphological characteristics, and tissue type of the lesion, solving the problem of fixed thresholds in traditional Focal Loss when dealing with multi-scale and multi-morphological cancer lesions.
[0131] The decoupled detection head design has significant clinical application value in cancer detection. First, its multi-scale parallel detection capability effectively addresses the high heterogeneity of tumor lesions in size and morphology, avoiding the feature confusion problem encountered by traditional single-scale detection heads when processing lesions of multiple sizes. Second, the adaptive threshold mechanism of the AT focus loss function allows the model to automatically adjust its detection strategy for different types of cancer lesions (such as breast cancer, lung cancer, and liver cancer), significantly improving the model's generalization ability. Third, while maintaining high accuracy, this design reduces computational complexity through decoupling, enabling real-time detection and meeting the needs of rapid clinical diagnosis.
[0132] Example
[0133] To verify the effectiveness of the AdaptScanDet model in multi-cancer detection tasks, this embodiment conducted a systematic comparative experiment on the OCA oral cancer dataset and the LUNA16 lung nodule dataset. The experimental results are as follows: Figure 6 As shown in Tables 1 and 2, the following is an empirical analysis of its effectiveness in detecting oral lesions and lung nodules:
[0134] OCA dataset (oral cancer lesion detection)
[0135] AdaptScanDet demonstrates significant advantages on the OCA dataset: accuracy of 79.2%, precision of 82.3%, recall of 75.6%, and F1 score of 78.8%, all significantly outperforming all comparison models. Compared to the latest YOLO model, YOLOv12-N (accuracy 73.9%, F1 score 73.1%), this embodiment improves accuracy and F1 score by 5.3 and 5.7 percentage points, respectively. Compared to Transformer-based detectors, AdaptScanDet significantly surpasses DETR-R50 (60.3%) and Deformable DETR (62.8%) in accuracy, while requiring only 6.8M parameters, 13.8G FLOPS of computation, and a latency as low as 7.5ms. Compared to the customized strategy models Gold-YOLO-N (77.4% accuracy, 76.7% F1 score) and PP-YOLOE-S (78.5% accuracy, 77.8% F1 score), this embodiment achieves comprehensive superiority across all metrics.
[0136] LUNA16 dataset (lung nodule detection)
[0137] On the LUNA16 standard benchmark for lung nodule detection, AdaptScanDet achieved optimal performance in key metrics: 1FP / scan sensitivity of 94.50%, CPM of 92.70%, and mAP of 94.20%, comprehensively surpassing MSANet (93.70% sensitivity), HND (92.40% sensitivity), and LN-DETR (93.1% mAP). This embodiment uses only 6.8M parameters, just one-quarter of LN-DETR (26.2M), while significantly reducing computational complexity while maintaining high sensitivity.
[0138] Experiments show that this embodiment effectively solves the challenges of characterizing the morphological heterogeneity of oral cancer lesions and the fine structural features of lung nodules through the adaptive scanning network (ASN) and deformable scanning (DS) mechanism, achieving a dual breakthrough in detection accuracy and computational efficiency, and providing an efficient and reliable solution for multi-cancer medical image analysis.
[0139] Figure 5. Schematic diagram of adaptive offset-guided scanning. (a) Deformable Scan (DS) illustrates the processing flow of deformable scanning. The shared offset network is divided into two prediction heads: the upper prediction head determines which locations in space the model should focus on, and the lower prediction head determines the order in which the features sampled at deformable points should be processed. The figure only shows some of the reference points used for deformation; the actual processing granularity is much finer. (b) The shared offset network generates the offsets required for the deformable sampling point locations and scanning order.
[0140] Figure 6. Analysis of detection results for oral cancer and lung nodules using different state-of-the-art (SOTA) methods. The first column represents ground truth, and columns 2 to 4 represent the latest state-of-the-art algorithms. The detection results in this embodiment are highly consistent with the ground truth.
[0141]
[0142] Table 1 compares the model performance based on the Oral Diagnosis OCA dataset. Results related to the proposed AdaptScanDet model are highlighted in gray, and suboptimal results are marked with an underline. Acc represents accuracy, Pre represents precision, and Rec represents recall; subsequent tables will follow this highlighting rule.
[0143]
[0144] Table 2 shows the comparative experiments with state-of-the-art models on the LUNA16 dataset to validate the diagnostic performance for pulmonary nodules. The Competitive Performance Metric (CPM) was calculated as the average sensitivity at seven preset false positive rates (0.125, 0.25, 0.5, 1, 2, 4, and 8 false positives / scans). The sensitivity metric was reported when the preset false positive rate was 1.
[0145] In summary, this invention effectively solves the challenges of characterizing the morphological heterogeneity of oral cancer lesions and the fine structural features of lung nodules through adaptive scanning networks and deformable scanning mechanisms, achieving a dual breakthrough in detection accuracy and computational efficiency, and providing an efficient and reliable solution for multi-cancer medical image analysis.
[0146] It should be emphasized that the above are merely preferred embodiments of the present invention and are not intended to limit the present invention in any way. Any simple modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of the present invention shall still fall within the scope of the technical solution of the present invention.
Claims
1. A lesion detection method based on multi-scan interactive deformable Mamba, characterized in that, Includes the following steps: Step 1, Image Patch Embedding: An adaptive image patch embedding strategy is adopted in the image segmentation process to divide the original medical image into uniformly sized, non-overlapping image patch regions; in the image patch embedding process, each image patch is converted into a fixed-dimensional embedding vector through a linear projection layer to form a serialized feature representation; Step 2, Multi-scale feature extraction and interaction in the parallel scanning backbone network: The image patch is input into the parallel scanning backbone network containing the adaptive scanning network (ASN), and multi-scale feature extraction of the image is performed through the hierarchically deployed ASN modules. Step 3: Feature pyramid optimization based on dynamic weighted scanning fusion: The hierarchical features output from the backbone network are aggregated into a feature pyramid network, and high-level semantic information and low-level spatial details are fused through a top-down strategy. Step 4, Multi-scale fusion: The decoupled detection head receives the scale-specific feature map output by the path aggregation feature pyramid network and performs detection tasks in parallel at multiple scales to achieve the identification and localization of cancer lesions of different sizes.
2. The lesion detection method based on multi-scan interactive deformable Mamba according to claim 1, characterized in that, In step 1, the image segmentation process divides the input image into image blocks of fixed size according to the image resolution and task requirements to adapt to the feature scale of different modal medical images.
3. The lesion detection method based on multi-scan interactive deformable Mamba according to claim 1, characterized in that, In step 2, the ASN module is formulated using the residual learning framework as follows: in, Let B be the input tensor, where B represents the batch index, C represents the number of channels of the input feature, H represents the height, and W represents the width. For layer normalization operation, MSPI is a disease-specific feedforward network and a parallel multi-scan SSM interactive structure module. The core expression of the MSPI is: in, For feature fusion function, For the characteristic modulation function, For context transformation functions, Histological texture feature extraction is enhanced by depthwise separable convolution. SSM is a state-space model, and Z represents the normalized input feature.
4. The lesion detection method based on multi-scan interactive deformable Mamba according to claim 3, characterized in that, The SSM employs three scanning modes: forward, backward, and deformable. The deformable scanning DS mode is implemented through a content-adaptive sequence formation mechanism, specifically: Step 2-1: Generate an adaptive offset field using a shared offset network. This network uses depthwise convolutions with varying kernel sizes. ; Step 2-2: Obtain the input tensor through bilinear interpolation. The deformation location features were sampled and relative displacements were added. Modulated learning bias ; Steps 2-3: Determine the replacement index through sorting operations. The spatial sampling features are reshaped into a sequence and reordered to generate a content-adaptive 1D sequence. .
5. The lesion detection method based on multi-scan interactive deformable Mamba according to claim 4, characterized in that, In step 2-1, the predicted offset field Split into point offset predictor and token index offset predictor The point offset predictor calculates the normalized point offset. Deformable points are obtained. for: In the formula, For normalized point offset, It is the hyperbolic tangent function. For point offset predictor, For deformable points, The reference point coordinate grid; In step 2-2, the token index offset predictor generates a normalized token index offset. Calculate the deformable token index for: In the formula, For normalized tag index offset, For the tag index offset predictor, For deformable tag indexes, For reference marker index sequence; The cascaded architecture of the SSM is implemented through the following recursive formula: in For layer-specific time-scale parameters, model parameters , and For model parameters, In time step The input feature vector, For cross-layer projection matrix, For the first Layer in time step The hidden state, This is the final output.
6. The lesion detection method based on multi-scan interactive deformable Mamba according to claim 1, characterized in that, In step 3, the path aggregation feature pyramid network integrates a dynamic weighted scanning fusion mechanism, and the formula for calculating the diagnostic weights is as follows: in, This represents the Sigmoid activation function. This represents a set of multi-scale pooling operations. For learnable scale-specific importance weights, This represents an organ-specific regulatory function. This is the weight matrix in the first-level linear transformation. This is the weight matrix in the second-level linear transformation. For the input feature map / tensor, This is the bias vector in the first-level linear transformation. This is the bias vector in the second-level linear transformation. For Sigmoid weighted linear units; Weights complete normalization and uncertainty-aware calibration in a single step: in, To control the weight entropy, The diagnostic weight corresponding to the i-th scan mode. For entropy terms; The final fused output is calculated through an integrated transformation of the weighted scan mode and higher-order cross-scan interactions: in, This indicates forward, backward, and deformable scan outputs. To control the contribution of different scanning modes across this mechanism, To represent the weighted scan mode output, , This represents the output obtained under different scanning modes. The weight matrix in the linear transformation, This is the bias term in the linear transformation. This represents the feature matrix after the scan outputs the interaction.
7. The lesion detection method based on multi-scan interactive deformable Mamba according to claim 1, characterized in that, In step 4, the decoupled detection head adopts a three-way parallel processing architecture, corresponding to the P3, P4, and P5 feature maps output by the path aggregation feature pyramid network. Each feature map undergoes feature enhancement and detection task execution through an independent decoupled processing module. The P3 layer is a small-sized lesion detection layer. The feature map of the P3 layer has the highest resolution and is used to detect small lesions. The P3 layer detection head can capture subtle texture changes and edge features of lesions through high-resolution feature maps. The P4 layer is a medium-sized lesion detection layer. The feature map of the P4 layer has a medium resolution and is used to detect medium-sized lesions. The P4 layer detection head can effectively handle the morphological changes and internal structural features of lesions by balancing resolution and receptive field. The P5 layer is a large-size lesion detection layer. The feature map of the P5 layer has the lowest resolution and is used to detect large-size lesions. The P5 layer detection head utilizes the characteristics of a large receptive field to capture the overall morphology of the lesion and its relationship with the surrounding tissue.
8. The lesion detection method based on multi-scan interactive deformable Mamba according to claim 1, characterized in that, In step 4, the decoupled detection head employs a loss function combination strategy, including: Classification loss: An improved Focal Loss is adopted, which adaptively adjusts the weights of easy and difficult samples, making the model pay more attention to lesion samples that are difficult to classify. Bounding box regression loss: The GIoU loss function is used, which considers not only the overlapping area of the bounding boxes, but also the shape and orientation of the bounding boxes, making the lesion localization more accurate; AT focus loss: dynamically adjusts the classification threshold based on the size, morphological characteristics, and tissue type of the lesion.
9. A lesion detection system based on multi-scan interactive deformable Mamba, characterized in that, The detection system is used to implement any of the lesion detection methods based on multi-scan interactive deformable Mamba according to claims 1 to 8. The detection system includes: an adaptive scanning network architecture module, a parallel multi-scan SSM interactive structure module, and a content-aware deformable scanning mechanism module. The adaptive scanning network architecture module is used to dynamically couple the state space model with the organ-specific scanning path to construct a multi-scale, multi-directional feature extraction pathway. The parallel multi-scan SSM interactive structure module is used to integrate three parallel paths—forward scan, backward scan, and deformable scan—in the cascaded state space module, and to perform tensor outer product and channel attention weighted fusion on the hidden states output by different scan paths. The content-aware deformable scanning mechanism module includes: A lightweight scanning attention prediction head is used to predict spatial offsets in real time based on local semantic features and dynamically adjust the position of the next scan point. The sequence reordering controller is used to dynamically adjust the order of subsequent scans based on the confidence feedback of the current scan path, thereby achieving focused scanning.
10. A lesion detection system based on multi-scan interactive deformable Mamba according to claim 9, characterized in that, The adaptive scanning network architecture module adaptively activates different scanning modes at each level based on the semantics of the input image, and dynamically models the local-global spatial dependency relationship through the state transition matrix. The parallel multi-scan SSM interactive structure module simulates the clinical thinking of pathologists who comprehensively judge lesions from multiple sections, enabling the model to automatically learn the nonlinear coupling relationship of tissue response under different scanning perspectives.
Citation Information
Patent Citations
Multi-person head posture estimation method and device based on multi-task loss balance
CN119919500A
Power grid infrastructure target detection method and device based on MAMBA-YOLO and medium
CN120374953A
High-resolution remote sensing image semantic segmentation method based on multidirectional parallel selective scanning
CN120599257A
General salient target detection method based on Mama
CN120635490A
Medical image fuzzy boundary segmentation method based on edge perception Mama network
CN120747143A
Cited By
Intestinal polyp segmentation method and system based on spiral scanning state space model
CN121639715A
Bidirectional Mama-based YOLOv12 ground penetrating radar underground disease identification method, apparatus and device, and medium
CN121883828A
Ground penetrating radar underground disease identification method, device and equipment based on bidirectional mamba YOLOv12 and medium
CN121883828B
