Block classification auxiliary diagnosis system based on self-prompt mechanism, medium and equipment
By introducing the self-hint mechanism of spatial hint vector and channel hint matrix, the feature modeling capability of medical ultrasound images is improved, the low accuracy problem of existing methods in complex environments is solved, and higher classification accuracy and robustness are achieved.
Patent Information
- Application Number
- CN202510709091.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-29
- Publication Date
- 2025-10-03
AI Technical Summary
Existing medical ultrasound image classification methods have low accuracy in complex environments, especially insufficient generalization performance under different types of organs and equipment conditions, which increases the difficulty of diagnosis.
The spatial cue vector and channel cue matrix are introduced, and the self-cue mechanism and region-aware fusion are used to highlight the key areas and improve the feature modeling ability. The Transformer encoder and cue attention conversion block are used to generate the spatial attention map and optimize the feature expression.
It improves the feature modeling capability of local fine-grained discriminative regions in medical ultrasound images, enhances classification accuracy and robustness, and is suitable for the benign and malignant classification of organs such as lymph nodes, thyroid nodules, and breast masses.
Smart Images

Figure CN120747578A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of computer-aided diagnosis, and in particular to a mass classification-aided diagnosis system, medium and equipment based on a self-prompt mechanism. Background Art
[0002] The statements in this section merely mention background art related to the present invention and do not necessarily constitute prior art.
[0003] Medical ultrasound imaging, as a non-invasive, real-time, and low-cost imaging tool, is widely used in clinical diagnosis. It plays a particularly important role in the screening and assessment of diseases such as lymph nodes, thyroid nodules, and breast masses. Accurately identifying benign or malignant lesions in ultrasound images is crucial for disease staging, treatment decisions, and prognosis assessment. In current clinical processes, the interpretation of ultrasound images relies primarily on the physician's experience and subjective judgment, which is subject to significant individual variability and uncertainty. Furthermore, ultrasound images inherently suffer from noise, blurred boundaries, and uneven grayscale, further complicating diagnostic difficulty.
[0004] Computer-aided diagnosis (CAD) is an interdisciplinary technology and a hot topic in the medical field. In recent years, CAD has achieved fruitful results in the field of medical image recognition. For medical ultrasound images, establishing a high-sensitivity and high-specificity mass classification and diagnosis system based on CAD is feasible and of great significance.
[0005] In recent years, deep learning technology has been gradually introduced into the field of medical ultrasound image analysis, enabling the development of mass classification-assisted diagnosis systems that can assist medical personnel in improving diagnostic efficiency and accuracy. However, most current methods still suffer from issues such as insufficient local fine-grained feature extraction, fragmented attention mechanisms, and significant background interference. This leads to poor robustness, limiting the accuracy of benign and malignant classification in complex ultrasound environments. In particular, the generalization performance of existing methods under different organ types and acquisition conditions using different equipment still fails to meet current clinical needs. Summary of the Invention
[0006] In order to address the shortcomings of the existing technology, the present invention provides a mass classification auxiliary diagnosis system, medium and equipment based on a self-prompt mechanism, introduces spatial prompt vectors and channel prompt matrices, highlights key areas through spatial screening operations, and then guides the direction of feature flow through channel transformation, thereby achieving dynamic attention to discriminative areas during the encoding process, which can effectively improve the feature modeling capabilities of local fine-grained discriminative areas in medical ultrasound images and improve the accuracy of the mass classification auxiliary diagnosis system.
[0007] In a first aspect, the present invention provides a mass classification auxiliary diagnosis system based on a self-prompt mechanism, comprising: An image acquisition module, configured to: acquire a medical ultrasound image; An embedding module is configured to: divide the medical ultrasound image into a number of image blocks, perform convolution and flattening on each image block to obtain a feature vector, and add a position code; A preliminary feature extraction module is configured to: extract preliminary global features based on the feature vector through several visual transformation blocks; A fusion feature extraction module is configured to obtain fusion features based on preliminary global features through several cued attention conversion blocks, wherein the cued attention conversion blocks introduce a self-cueing mechanism, which introduces a learnable spatial cue vector and a channel cue matrix, generates a spatial mask by calculating the cosine similarity between the spatial cue vector and the preliminary global features, performs a spatial filtering operation on the preliminary global features, and then applies a channel guidance operation through the channel cue matrix; A dynamic region focusing module is configured to: perform weighted adjustment on the fused features to obtain the final features; The classification module is configured as follows: the final features pass through the classification head to obtain the benign or malignant classification result.
[0008] Furthermore, the cued attention transformation block introduces region-aware fusion, which generates a spatial attention map through local-global feature interaction.
[0009] Furthermore, the prompt attention conversion block is used to take the preliminary global features or the fused features output by the previous prompt attention conversion block as input, normalize the input, obtain enhanced features through the self-prompt mechanism, and perform a residual connection operation on the input and the enhanced features to obtain a preliminary fusion result. After normalizing the preliminary fusion result, it is sequentially fused through a multi-layer perceptron and a regional perception to obtain a spatial attention map, and the spatial attention map and the preliminary fusion result are subjected to a residual connection operation to obtain a fused feature.
[0010] Furthermore, the dynamic area focusing module is specifically configured to: rearrange the fused features into a two-dimensional feature map; extract local spatial features through the convolution layer, and generate spatial attention weights through activation; expand the spatial attention weights, and perform element-by-element weighting with the fused features to obtain the final features.
[0011] In a second aspect, the present invention further provides a storage medium having a computer program stored thereon, which, when executed by a processor, implements the following steps: Acquiring medical ultrasound images; The medical ultrasound image is divided into several image blocks. After convolution and flattening of each image block, a feature vector is obtained and position coding is added. Based on the feature vector, preliminary global features are extracted through several visual transformation blocks; Based on the preliminary global features, a fusion feature is obtained through several cued attention conversion blocks. The cued attention conversion block introduces a self-cueing mechanism, which introduces a learnable spatial cue vector and a channel cue matrix. A spatial mask is generated by calculating the cosine similarity between the spatial cue vector and the preliminary global features. After performing a spatial filtering operation on the preliminary global features, a channel guidance operation is applied through the channel cue matrix. Weighted adjustment of fusion features to obtain final features; The final features pass through the classification head to obtain the benign or malignant classification results.
[0012] Furthermore, the cued attention transformation block introduces region-aware fusion, which generates a spatial attention map through local-global feature interaction.
[0013] Furthermore, the prompt attention conversion block is used to take the preliminary global features or the fused features output by the previous prompt attention conversion block as input, normalize the input, obtain enhanced features through the self-prompt mechanism, and perform a residual connection operation on the input and the enhanced features to obtain a preliminary fusion result. After normalizing the preliminary fusion result, it is sequentially fused through a multi-layer perceptron and a regional perception to obtain a spatial attention map, and the spatial attention map and the preliminary fusion result are subjected to a residual connection operation to obtain a fused feature.
[0014] In a third aspect, the present invention further provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the following steps are implemented: Acquiring medical ultrasound images; The medical ultrasound image is divided into several image blocks. After convolution and flattening of each image block, a feature vector is obtained and position coding is added. Based on the feature vector, preliminary global features are extracted through several visual transformation blocks; Based on the preliminary global features, a fusion feature is obtained through several cued attention conversion blocks. The cued attention conversion block introduces a self-cueing mechanism, which introduces a learnable spatial cue vector and a channel cue matrix. A spatial mask is generated by calculating the cosine similarity between the spatial cue vector and the preliminary global features. After performing a spatial filtering operation on the preliminary global features, a channel guidance operation is applied through the channel cue matrix. Weighted adjustment of fusion features to obtain final features; The final features pass through the classification head to obtain the benign or malignant classification results.
[0015] Furthermore, the cued attention transformation block introduces region-aware fusion, which generates a spatial attention map through local-global feature interaction.
[0016] Furthermore, the prompt attention conversion block is used to take the preliminary global features or the fused features output by the previous prompt attention conversion block as input, normalize the input, obtain enhanced features through the self-prompt mechanism, and perform a residual connection operation on the input and the enhanced features to obtain a preliminary fusion result. After normalizing the preliminary fusion result, it is sequentially fused through a multi-layer perceptron and a regional perception to obtain a spatial attention map, and the spatial attention map and the preliminary fusion result are subjected to a residual connection operation to obtain a fused feature.
[0017] Compared with the prior art, the present invention has the following beneficial effects: The present invention introduces spatial cue vectors and channel cue matrices, highlights key areas through spatial screening operations, and then guides the feature flow direction through channel transformation, thereby achieving dynamic attention to discriminative areas during the encoding process. It can effectively improve the feature modeling ability of local fine-grained discriminative areas in medical ultrasound images and improve its accuracy.
[0018] The present invention generates a spatial attention map through local-global feature interaction, highlights fine-grained important areas in ultrasound images, suppresses irrelevant background noise, and enhances robustness to complex backgrounds.
[0019] The present invention uses local convolution to generate spatial attention weights and performs weighted optimization on the fusion features to further enhance the feature expression of the lesion area and improve the model's discrimination ability.
[0020] By introducing a self-prompt mechanism and integrating it with regional perception, the model in this paper demonstrates excellent benign and malignant classification performance on different ultrasound datasets (including lymph nodes, thyroid nodules, and breast masses), and has good practical value and broad application prospects.
[0021] Additional advantages of the present invention will be partially given in the following description or learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The accompanying drawings, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.
[0023] Figure 1 This is a structural diagram of the package classification auxiliary diagnosis system based on the self-prompt mechanism of the first embodiment; Figure 2 This is a diagram of the deep learning network structure of the first embodiment; Figure 3 This is a schematic diagram of the self-prompt mechanism of the first embodiment; Figure 4 This is a schematic diagram of regional perception fusion in the first embodiment; Figure 5 This is a structural diagram of the dynamic area focusing module of the first embodiment. DETAILED DESCRIPTION
[0024] It should be noted that the following detailed descriptions are exemplary and intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which the present invention belongs.
[0025] In the absence of conflict, the embodiments of the present invention and the features thereof may be combined with each other.
[0026] All data in this embodiment is obtained in compliance with laws and regulations and based on the consent of the user, and is used legally.
[0027] Example 1 This embodiment provides a mass classification auxiliary diagnosis system based on a self-prompt mechanism.
[0028] The self-prompt mechanism-based mass classification auxiliary diagnosis system provided in this embodiment is an innovative classification method that is both robust and generalizable, so as to better assist clinicians in completing accurate diagnosis of diseases.
[0029] This embodiment provides a mass classification auxiliary diagnosis system based on a self-prompt mechanism, such as Figure 1 Shown, including: The image acquisition module is configured to acquire a medical ultrasound image.
[0030] Among them, medical ultrasound images are ultrasound images of organs such as lymph nodes, thyroid gland or breast.
[0031] The preprocessing module is configured to perform data preprocessing on the collected medical ultrasound images.
[0032] In this embodiment, the preprocessing includes: uniformly cropping the size of the medical ultrasound image to 224×224 pixels to meet the input requirements of the subsequent Transformer model.
[0033] The embedding module is configured to convert the medical ultrasound image into a token sequence using the Patch Embedding technology and superimpose positional emcoding.
[0034] Specifically, Patch Embedding technology is used to divide the entire medical ultrasound image into several fixed-size image blocks (Patches). Each patch is convolved and flattened to obtain a corresponding feature vector, namely, the image block token (Patch Tokens). In this step, the medical ultrasound image is encoded into a Tensor of size B×N×C, where B is the image block size, N is the number of patches, and C is the feature dimension; in order to retain spatial position information, position encoding (Position Embedding) is additionally added.
[0035] The embedding module is designed to convert two-dimensional medical ultrasound image data into one-dimensional sequence data suitable for Transformer processing.
[0036] The preliminary feature extraction module is configured to use the first 9 layers of Transformer encoder to perform feature modeling according to the standard self-attention mechanism to extract preliminary global features.
[0037] Specifically, Patch Tokens performs preliminary global feature modeling through 9 standard Vision Transformer Blocks (also known as visual conversion modules). At this stage, the network mainly learns the overall pattern information of the image.
[0038] The fusion feature extraction module is configured to process the preliminary global features through three sequentially connected prompt attention Transformer blocks (also known as the prompt mechanism attention transformation module) to obtain fused features.
[0039] In order to further improve the model's ability to focus on local discriminative areas, the Prompt Attention Transformer Block is introduced in the subsequent three encoder layers, such as Figure 2 As shown in the figure, it mainly includes: Self-Prompt Attention block and Region-Aware Fusion (RAF) block. The two work together inside the attention prompt transformer block to effectively guide attention to key areas and important channels.
[0040] The prompt attention transformer block is used to normalize the preliminary global features or the fused features output by the previous prompt attention transformer block, and then input them into the self-prompt mechanism (Self-Prompt) block to obtain enhanced features; the preliminary global features or the fused features output by the previous prompt attention transformer block are residually connected with the enhanced features to obtain a preliminary fusion result; the preliminary fusion result is normalized and then input into the multilayer perceptron (MLP) and region-aware fusion (RAF) blocks in sequence to obtain a spatial attention map; the spatial attention map and the preliminary fusion result are residually connected to obtain the output of the prompt attention transformer block, that is, the fused features.
[0041] like Figure 3 , which is a block structure diagram of the self-prompt mechanism (Self-Prompt) proposed in this embodiment, including space filtering (Space Filtering) operation and channel guidance (Channel Guidance) operation.
[0042] The space filtering operation includes: given input features , which is the initial global feature after normalization, and introduces a learnable spatial prompt vector (SpatialPrompt) s. After the input feature X and the spatial prompt vector s are normalized, the cosine similarity between them is calculated to generate a spatial mask (Spatial Mask), and the spatial mask value is normalized and clipped. Restricted to the interval [0,1], as follows: ; Then, the input feature X is weighted element by element according to the spatial mask to complete the spatial filtering operation and obtain the spatial filtered feature : , where ⊙ represents element-wise multiplication.
[0043] The channel guidance operation includes: introducing a learnable channel prompt matrix P (Channel Prompt Matrix) to filter the spatial features Further apply the channel guidance operation to adjust the importance of different channels, guide the features to be adaptively adjusted between channels, and output enhanced features : .
[0044] The self-hint mechanism block can effectively guide the Transformer to dynamically focus on key areas in the later stage of the encoder, while optimizing the feature channel distribution and improving the discrimination performance.
[0045] like Figure 4 The following is a structural diagram of the Region-Aware Fusion (RAF) block, which is configured to take the upper layer output features (i.e., preliminary global features or fused features output by the previous prompt attention Transformer block) that have not been processed by normalization, self-prompting mechanism, multi-layer perceptron, etc. as input features 1 , the output features that have been processed by normalization, self-prompt mechanism, multi-layer perceptron, etc. are used as input features 2 , after convolution (Conv) and batch normalization (BN) processing, the intermediate representation is obtained; the two are added element by element and activated by ReLU to introduce nonlinear expression capabilities; then the spatial attention map is generated by 1×1 convolution (Conv) and Sigmoid activation. M (Attention Map), as the output feature of the RAF block.
[0046] Among them, the spatial attention map is expressed as .
[0047] The spatial attention map is used to perform weighted processing on local features, highlight discriminative areas, and suppress irrelevant background noise. Through the interactive fusion of local and global features, the RAF block effectively enhances the information expression capability of key areas in ultrasound images.
[0048] After the Transformer encoder, this embodiment designs a dynamic region focus (DRF) module to further optimize the feature's regional focusing capability. This module generates spatial attention weights and performs weighted adjustment on the fused features. Finally, the classification head outputs the benign and malignant classification results of the medical ultrasound image.
[0049] like Figure 5 As shown in FIG, the structure of the Dynamic Region Focus (DRF) module proposed in this embodiment is schematically shown. The dynamic region focus module is configured as follows: the fused features are first rearranged (Reshaped) into a two-dimensional feature map through feature reorganization; local spatial features are extracted through a 3×3 convolutional layer (Conv), and spatial attention weights are generated through a Sigmoid activation function; then, the spatial attention weights are flattened (Flattened) to , which corresponds to the shape of Patch Tokens and is element-wise weighted (added and multiplied) with the fusion features to obtain the final features after focus optimization (also known as focus fusion features) : .
[0050] Through the DRF module, the model can adaptively adjust the feature weights in space, further highlight the lesion area, and improve the overall performance of benign and malignant classification of ultrasound images.
[0051] The classification module is configured to map the extracted features to the output space via a fully connected layer, generating a prediction score corresponding to the benign or malignant category, thereby achieving benign and malignant classification of masses (nodules or masses) in ultrasound images.
[0052] In this embodiment, during the model training process, the binary cross entropy with logits loss function is selected as the optimization criterion. This loss function combines Sigmoid activation and standard cross entropy, and can maintain good performance in numerical stability and gradient propagation, thereby effectively improving the training effect and convergence speed of the model.
[0053] In summary, the present invention effectively improves the expression ability of discriminative areas in medical ultrasound images and enhances classification accuracy and robustness through overall network architecture innovation and local feature modeling improvement. Experimental verification shows that the method of this embodiment has achieved excellent results in multiple ultrasound image classification tasks and has broad practical application prospects.
[0054] Example 2 This embodiment provides a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, the following steps are performed: Acquiring medical ultrasound images; The medical ultrasound image is divided into several image blocks, and each image block is convolved and flattened to obtain a feature vector and add a position code; Based on the feature vector, preliminary global features are extracted through several visual transformation blocks; Based on the preliminary global features, a fusion feature is obtained through several cued attention conversion blocks. The cued attention conversion block introduces a self-cueing mechanism, which introduces a learnable spatial cue vector and a channel cue matrix. A spatial mask is generated by calculating the cosine similarity between the spatial cue vector and the preliminary global features. After performing a spatial filtering operation on the preliminary global features, a channel guidance operation is applied through the channel cue matrix. The fused features are weighted and adjusted to obtain the final features. Specifically, the fused features are rearranged into a two-dimensional feature map. Local spatial features are extracted through the convolution layer, and spatial attention weights are generated through activation. After the spatial attention weights are expanded, they are weighted element-by-element with the fused features to obtain the final features. The final features pass through the classification head to obtain the benign or malignant classification results.
[0055] Furthermore, the cued attention transformation block introduces region-aware fusion, which generates a spatial attention map through local-global feature interaction.
[0056] Furthermore, the prompt attention conversion block is used to take the preliminary global features or the fused features output by the previous prompt attention conversion block as input, normalize the input, obtain enhanced features through the self-prompt mechanism, and perform a residual connection operation on the input and the enhanced features to obtain a preliminary fusion result. After normalizing the preliminary fusion result, it is sequentially fused through a multi-layer perceptron and a regional perception to obtain a spatial attention map, and the spatial attention map and the preliminary fusion result are subjected to a residual connection operation to obtain a fused feature.
[0057] Example 3 This embodiment provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the following steps are implemented: Acquiring medical ultrasound images; The medical ultrasound image is divided into several image blocks, and each image block is convolved and flattened to obtain a feature vector and add a position code; Based on the feature vector, preliminary global features are extracted through several visual transformation blocks; Based on the preliminary global features, a fusion feature is obtained through several cued attention conversion blocks. The cued attention conversion block introduces a self-cueing mechanism, which introduces a learnable spatial cue vector and a channel cue matrix. A spatial mask is generated by calculating the cosine similarity between the spatial cue vector and the preliminary global features. After performing a spatial filtering operation on the preliminary global features, a channel guidance operation is applied through the channel cue matrix. The fused features are weighted and adjusted to obtain the final features. Specifically, the fused features are rearranged into a two-dimensional feature map. Local spatial features are extracted through the convolution layer, and spatial attention weights are generated through activation. After the spatial attention weights are expanded, they are weighted element-by-element with the fused features to obtain the final features. The final features pass through the classification head to obtain the benign or malignant classification results.
[0058] Furthermore, the cued attention transformation block introduces region-aware fusion, which generates a spatial attention map through local-global feature interaction.
[0059] Furthermore, the prompt attention conversion block is used to take the preliminary global features or the fused features output by the previous prompt attention conversion block as input, normalize the input, obtain enhanced features through the self-prompt mechanism, and perform a residual connection operation on the input and the enhanced features to obtain a preliminary fusion result. After normalizing the preliminary fusion result, it is sequentially fused through a multi-layer perceptron and a regional perception to obtain a spatial attention map, and the spatial attention map and the preliminary fusion result are subjected to a residual connection operation to obtain a fused feature.
[0060] The foregoing description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Those skilled in the art will readily appreciate that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention are intended to be within the scope of protection of the present invention.
Claims
1. A mass classification auxiliary diagnosis system based on a self-prompt mechanism, characterized by: include: An image acquisition module, configured to: acquire a medical ultrasound image; An embedding module is configured to: divide the medical ultrasound image into a number of image blocks, perform convolution and flattening on each image block to obtain a feature vector, and add a position code; A preliminary feature extraction module is configured to: extract preliminary global features based on the feature vector through several visual transformation blocks; A fusion feature extraction module is configured to obtain fusion features based on preliminary global features through several cued attention conversion blocks, wherein the cued attention conversion blocks introduce a self-cueing mechanism, which introduces a learnable spatial cue vector and a channel cue matrix, generates a spatial mask by calculating the cosine similarity between the spatial cue vector and the preliminary global features, performs a spatial filtering operation on the preliminary global features, and then applies a channel guidance operation through the channel cue matrix; A dynamic region focusing module is configured to: perform weighted adjustment on the fused features to obtain the final features; The classification module is configured as follows: the final features pass through the classification head to obtain the benign or malignant classification result.
2. The mass classification auxiliary diagnosis system based on the self-prompt mechanism according to claim 1 is characterized in that: The cued attention transformation block introduces region-aware fusion, which generates a spatial attention map through local-global feature interaction.
3. The mass classification auxiliary diagnosis system based on the self-prompt mechanism according to claim 2 is characterized in that: The prompt attention conversion block is used to take the preliminary global features or the fused features output by the previous prompt attention conversion block as input, normalize the input, obtain enhanced features through the self-prompt mechanism, and perform a residual connection operation on the input and the enhanced features to obtain a preliminary fusion result. After normalizing the preliminary fusion result, it is sequentially fused through a multi-layer perceptron and a regional perception to obtain a spatial attention map, and the spatial attention map and the preliminary fusion result are subjected to a residual connection operation to obtain a fused feature.
4. The mass classification auxiliary diagnosis system based on the self-prompt mechanism according to claim 1 is characterized in that: The dynamic area focusing module is specifically configured to: rearrange the fused features into a two-dimensional feature map; extract local spatial features through the convolution layer, and generate spatial attention weights through activation; expand the spatial attention weights, and perform element-by-element weighting with the fused features to obtain the final features.
5. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by the processor, the following steps are implemented: Acquiring medical ultrasound images; The medical ultrasound image is divided into several image blocks. After convolution and flattening of each image block, a feature vector is obtained and position coding is added. Based on the feature vector, preliminary global features are extracted through several visual transformation blocks; Based on the preliminary global features, a fusion feature is obtained through several cued attention conversion blocks. The cued attention conversion block introduces a self-cueing mechanism, which introduces a learnable spatial cue vector and a channel cue matrix. A spatial mask is generated by calculating the cosine similarity between the spatial cue vector and the preliminary global features. After performing a spatial filtering operation on the preliminary global features, a channel guidance operation is applied through the channel cue matrix. Weighted adjustment of fusion features to obtain final features; The final features pass through the classification head to obtain the benign or malignant classification results.
6. A computer-readable storage medium according to claim 5, characterized in that: The cued attention transformation block introduces region-aware fusion, which generates a spatial attention map through local-global feature interaction.
7. A computer-readable storage medium according to claim 6, characterized in that: The prompt attention conversion block is used to take the preliminary global features or the fused features output by the previous prompt attention conversion block as input, normalize the input, obtain enhanced features through the self-prompt mechanism, and perform a residual connection operation on the input and the enhanced features to obtain a preliminary fusion result. After normalizing the preliminary fusion result, it is sequentially fused through a multi-layer perceptron and a regional perception to obtain a spatial attention map, and the spatial attention map and the preliminary fusion result are subjected to a residual connection operation to obtain a fused feature.
8. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the following steps are implemented: Acquiring medical ultrasound images; The medical ultrasound image is divided into several image blocks. After convolution and flattening of each image block, a feature vector is obtained and position coding is added. Based on the feature vector, preliminary global features are extracted through several visual transformation blocks; Based on the preliminary global features, a fusion feature is obtained through several cued attention conversion blocks. The cued attention conversion block introduces a self-cueing mechanism, which introduces a learnable spatial cue vector and a channel cue matrix. A spatial mask is generated by calculating the cosine similarity between the spatial cue vector and the preliminary global features. After performing a spatial filtering operation on the preliminary global features, a channel guidance operation is applied through the channel cue matrix. Weighted adjustment of fusion features to obtain final features; The final features pass through the classification head to obtain the benign or malignant classification results.
9. A computer device as claimed in claim 8, characterized in that: The cued attention transformation block introduces region-aware fusion, which generates a spatial attention map through local-global feature interaction.
10. A computer device as claimed in claim 9, characterized in that: The prompt attention conversion block is used to take the preliminary global features or the fused features output by the previous prompt attention conversion block as input, normalize the input, obtain enhanced features through the self-prompt mechanism, and perform a residual connection operation on the input and the enhanced features to obtain a preliminary fusion result. After normalizing the preliminary fusion result, it is sequentially fused through a multi-layer perceptron and a regional perception to obtain a spatial attention map, and the spatial attention map and the preliminary fusion result are subjected to a residual connection operation to obtain a fused feature.
Citation Information
Cited By
Compression method and device for image recognition network
CN121009941A
