A class prediction method and related device applied to medical images

Through deep dynamic fusion module layer groups and dynamic convolution technology, combined with global and local features, it solves the problem of difficult long-distance and fine-grained feature extraction in medical image classification, and improves model performance and accuracy.

CN118196543BActive Publication Date: 2024-09-27SHENZHEN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410618848.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-17
Publication Date
2024-09-27
Estimated Expiration
2044-05-17

AI Technical Summary

Technical Problem

Existing medical image classification methods have problems such as difficulty in long-distance feature extraction and insufficient fine-grained feature extraction when processing medical images, which affects model performance.

Method used

It uses a deep dynamic fusion module layer group to perform feature fusion through a dynamic sparse attention mechanism and a local attention module. It combines global and local features and uses dynamic convolution to complete feature fusion, avoiding the difference in expression ability caused by the static characteristics of traditional convolution. .

Benefits of technology

The performance of the medical image classification model is improved, rich information of medical images can be extracted more effectively, and the accuracy and robustness of the model are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118196543B
    Figure CN118196543B
Patent Text Reader

Abstract

The embodiments of the present application belong to the field of image processing technology, and relate to a category prediction method and related equipment applied to medical images, the method comprising: receiving a category prediction request carrying a medical image to be predicted sent by a user terminal; inputting the medical image to be predicted into a deep dynamic fusion module layer group for feature fusion operation to obtain a target fusion feature; inputting the target fusion feature into a fully connected classification layer for category prediction operation to obtain a category prediction result; and sending the category prediction result to the user terminal. Compared with the prior art, the present application innovatively proposes a dynamic fusion method, using dynamic convolution to complete the fusion of global and local features, thereby avoiding the difference in expression ability with the attention mechanism caused by the static characteristics of traditional convolution, avoiding the impact on model performance, and thus improving model performance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence image processing technology, and in particular to a category prediction method and related equipment applied to medical images. Background Art

[0002] Medical image classification is a key technology to assist in disease diagnosis. It involves automatically classifying medical images into different categories and plays an important role in clinical diagnosis and treatment planning. Traditional medical image classification methods rely on doctors' experience and knowledge, but there are subjective influences and a high risk of misdiagnosis. Therefore, using computer technology to automatically complete medical image classification has always been a hot topic in the field of medical image analysis.

[0003] With the development of deep learning methods, it plays an important role in the field of medical image analysis. At present, there are two main model architectures in medical image classification tasks: the ViT architecture based on the self-attention mechanism and the convolutional neural network (CNN) architecture based on convolution. However, existing methods still have great limitations in processing medical images. The ViT network has obvious advantages in extracting long-distance features. However, due to the lack of inductive bias, it often has great difficulties in extracting fine-grained features, such as local subtle lesions, and is prone to focusing on features that are not related to the classification task; convolutional neural networks have advantages in extracting fine-grained features due to their inherent inductive bias, but due to the inherent receptive field size of their convolution kernels, it is difficult to focus on long-distance features, resulting in poor performance when facing similar images with large differences. Although the problem of insufficient receptive field size can be alleviated by increasing the stacking of convolutional layers, the huge number of parameters brought by deep networks easily leads to the emergence of gradient diffusion. In addition, medical images often have high internal complexity and similarity in layout between images (for example, lung CT scans, fundus images, etc., the positions and shapes of organs in the images are similar). The static convolution kernels used in traditional convolutional neural networks cannot fully and effectively extract the feature representation of such images.

[0004] In order to combine the advantages of both, some methods fuse the features generated by the two types of models so that the model can focus on both long-distance features and fine-grained local information. However, the applicant found that simple feature fusion cannot fully utilize the rich information of medical images, and traditional convolution kernels often use static weights and cannot dynamically adapt to changes in input, while the self-attention mechanism uses dynamic calculations of the correlation between each region. The difference between the two causes the difference in representation capabilities between convolutional neural networks and ViT. It can be seen that traditional medical image classification methods will seriously affect the performance of the model. Summary of the invention

[0005] The purpose of the embodiments of the present application is to propose a category prediction method, apparatus, computer equipment and storage medium applied to medical images to solve the problem that traditional medical image classification methods will seriously affect the performance of the model.

[0006] In order to solve the above technical problems, the present application embodiment provides a category prediction method applied to medical images, which adopts the following technical solution:

[0007] receiving a category prediction request carrying a medical image to be predicted sent by a user terminal;

[0008] Inputting the medical image to be predicted into a deep dynamic fusion module layer group for feature fusion operation to obtain target fusion features, wherein the deep dynamic fusion module layer group is composed of N layers of deep dynamic fusion module layers, and each layer of the deep dynamic fusion module layer is composed of M global sparse modules using a dynamic sparse attention mechanism, M local attention modules and 1 deep dynamic fusion module, where N and M are integers greater than or equal to 1;

[0009] Inputting the target fusion features into the fully connected classification layer to perform a category prediction operation to obtain a category prediction result;

[0010] Sending the category prediction result to the user terminal.

[0011] Furthermore, the step of inputting the medical image to be predicted into the deep dynamic fusion module layer group to perform feature fusion operation to obtain the target fusion feature specifically includes the following steps:

[0012] Performing a convolution downsampling operation on the medical image to be predicted to obtain a first downsampling image feature;

[0013] Inputting the first down-sampled image feature into a first global sparse module to perform a global feature extraction operation to obtain a first global image feature;

[0014] Inputting the first down-sampled image feature into a first local attention module to perform a local feature extraction operation to obtain a first local image feature;

[0015] Inputting the first global image feature, the first local image feature and the previous layer fusion feature into the first deep dynamic fusion module for feature fusion operation to obtain the first fusion image feature, wherein if the current deep dynamic fusion module layer is the first level, only the first global image feature and the first local image feature are input into the first deep dynamic fusion module for feature fusion operation;

[0016] Determine whether the module of the next level is the fully connected classification layer;

[0017] If the module of the next level is the fully connected classification layer, determining the first fused image feature as the target fused feature;

[0018] If the module of the next level is not the fully connected classification layer, a convolution downsampling operation is performed on the first global image feature, the first local image feature and the first fused image feature to obtain a second global downsampling feature, a second local downsampling feature and a second fused downsampling feature, and the second global downsampling feature is input into the global sparse module of the next level for global feature extraction operation, and the second local downsampling feature is input into the local attention module of the next level for local feature extraction operation to obtain a second global image feature and a second local image feature, and the second global image feature, the second local image feature and the second fused downsampling feature are input into the deep dynamic fusion module of the next level for feature fusion operation to obtain a second fused image feature, and it is re-determined whether the next level is the fully connected classification layer until the next level is the fully connected classification layer.

[0019] Furthermore, the step of inputting the first down-sampled image feature into a first global sparse module for performing a global feature extraction operation to obtain a first global image feature specifically includes the following steps:

[0020] Inputting the first down-sampled image features into a linear layer for matrix generation operation to obtain a matrix Q, a matrix K, and a matrix V;

[0021] Multiplying the matrix Q and the matrix K to obtain correlation response data;

[0022] According to the correlation response data, the matrix K and the matrix V are filtered to obtain the matrix And the matrix ;

[0023] For the matrix Q, the matrix And the matrix Perform an attention calculation operation to obtain the first global image feature.

[0024] Furthermore, the step of inputting the first down-sampled image feature into a first local attention module for performing a local feature extraction operation to obtain a first local image feature specifically includes the following steps:

[0025] Generate a parameter matrix A corresponding to the first down-sampled image features;

[0026] Input the parameter matrix A into a weight generation module for weight generation operation to obtain a weight W, wherein the weight generation module is composed of multiple layers of convolution, layer normalization, and activation function;

[0027] A convolution operation is performed on the first down-sampled image feature according to the weight W to obtain the first local image feature.

[0028] Furthermore, the step of inputting the first global image feature, the first local image feature, and the previous layer fusion feature into the first deep dynamic fusion module for feature fusion operation to obtain the first fusion image feature specifically includes the following steps:

[0029] Inputting the first global image feature into the channel attention layer to perform a first irrelevant feature filtering operation, and inputting the output data of the channel attention layer into the dynamic sparse attention layer to perform a second irrelevant feature filtering operation to obtain a first global processing feature;

[0030] Inputting the first local image feature into the spatial attention layer to perform a receptive field enlargement operation, and performing a dynamic convolution operation on the output data of the spatial attention layer to obtain a first local processing feature;

[0031] Performing a splicing operation on the first global processing feature, the first local processing feature, and the previous layer fusion feature to obtain a first preliminary fusion feature;

[0032] The first preliminary fused features are input into the residual connection feed-forward layer to obtain the first fused image features.

[0033] In order to solve the above technical problems, the embodiment of the present application further provides a category prediction device applied to medical images, which adopts the following technical solution:

[0034] A request acquisition module, used for receiving a category prediction request carrying a medical image to be predicted sent by a user terminal;

[0035] A feature fusion module, used for inputting the medical image to be predicted into a deep dynamic fusion module layer group for feature fusion operation to obtain a target fusion feature, wherein the deep dynamic fusion module layer group is composed of N layers of deep dynamic fusion module layers, each of which is composed of M global sparse modules using a dynamic sparse attention mechanism, M local attention modules and 1 deep dynamic fusion module, where N and M are integers greater than or equal to 1;

[0036] A category prediction module is used to input the target fusion feature into the fully connected classification layer to perform a category prediction operation to obtain a category prediction result;

[0037] A result output module is used to send the category prediction result to the user terminal.

[0038] Furthermore, the feature fusion module includes:

[0039] A downsampling submodule, used for performing a convolution downsampling operation on the medical image to be predicted to obtain a first downsampling image feature;

[0040] A global feature extraction submodule, used for inputting the first down-sampled image feature into a first global sparse module to perform a global feature extraction operation to obtain a first global image feature;

[0041] A local feature extraction submodule, used for inputting the first down-sampled image feature into a first local attention module to perform a local feature extraction operation to obtain a first local image feature;

[0042] A feature fusion submodule, used for inputting the first global image feature, the first local image feature, and the fusion feature of the previous layer into the first deep dynamic fusion module for feature fusion operation to obtain the first fusion image feature, wherein if the current deep dynamic fusion module layer is the first level, only the first global image feature and the first local image feature are input into the first deep dynamic fusion module for feature fusion operation;

[0043] A fully connected classification layer judgment submodule, used to judge whether the module at the next level is the fully connected classification layer;

[0044] a first judgment result submodule, configured to determine the first fused image feature as the target fused feature if the next-level module is the fully connected classification layer;

[0045] The second judgment result submodule is used for, if the module of the next level is not the fully connected classification layer, performing convolution downsampling operations on the first global image feature, the first local image feature and the first fused image feature respectively to obtain second global downsampling features, second local downsampling features and second fused downsampling features, respectively inputting the second global downsampling features into the global sparse module of the next level for global feature extraction operations, inputting the second local downsampling features into the local attention module of the next level for local feature extraction operations to obtain second global image features and second local image features, and inputting the second global image features, the second local image features and the second fused downsampling features into the deep dynamic fusion module of the next level for feature fusion operations to obtain second fused image features, and re-judging whether the next level is the fully connected classification layer until the next level is the fully connected classification layer.

[0046] Furthermore, the global feature extraction submodule includes:

[0047] A matrix generation unit, used for inputting the first down-sampled image features into a linear layer to perform a matrix generation operation to obtain a matrix Q, a matrix K and a matrix V;

[0048] A correlation data acquisition unit, used for multiplying the matrix Q and the matrix K to obtain correlation response data;

[0049] A filtering unit is used to filter the matrix K and the matrix V according to the correlation response data to obtain a matrix And the matrix ;

[0050] An attention calculation unit is used to calculate the matrix Q and the matrix And the matrix Perform an attention calculation operation to obtain the first global image feature.

[0051] In order to solve the above technical problems, the embodiment of the present application further provides a computer device, which adopts the following technical solution:

[0052] The invention comprises a memory and a processor, wherein the memory stores computer-readable instructions, and the processor implements the steps of the above-mentioned category prediction method applied to medical images when executing the computer-readable instructions.

[0053] In order to solve the above technical problems, the embodiment of the present application further provides a computer-readable storage medium, which adopts the following technical solution:

[0054] The computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the steps of the category prediction method applied to medical images as described above are implemented.

[0055] The present application provides a category prediction method applied to medical images, including: receiving a category prediction request carrying a medical image to be predicted sent by a user terminal; inputting the medical image to be predicted into a deep dynamic fusion module layer group for feature fusion operation to obtain a target fusion feature, wherein the deep dynamic fusion module layer group is composed of N layers of deep dynamic fusion module layers, and each layer of the deep dynamic fusion module layer is composed of M global sparse modules using a dynamic sparse attention mechanism, M local attention modules and 1 deep dynamic fusion module, and N and M are integers greater than or equal to 1; inputting the target fusion feature into a fully connected classification layer for category prediction operation to obtain a category prediction result; and sending the category prediction result to the user terminal. Compared with the prior art, the present application innovatively proposes a dynamic fusion method, using dynamic convolution to complete the fusion of global and local features, thereby avoiding the difference in expression ability between the static characteristics of traditional convolution and the attention mechanism, avoiding the impact on model performance, and thus improving model performance. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] In order to more clearly illustrate the scheme in the present application, a brief introduction is given below to the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0057] Figure 1 is an exemplary system architecture diagram to which the present application may be applied;

[0058] Figure 2 is a flow chart of the implementation of the category prediction method applied to medical images provided in the first embodiment of the present application;

[0059] Figure 3 This is a flowchart for implementing dynamic sparse attention provided in Example 1 of the present application;

[0060] Figure 4 This is a flowchart of the implementation of local feature extraction based on variance perception provided in Example 1 of the present application;

[0061] Figure 5 This is a flowchart of the implementation of the deep dynamic fusion module provided in Example 1 of the present application;

[0062] Figure 6 is a schematic diagram of the structure of a category prediction device applied to medical images provided in Embodiment 2 of the present application;

[0063] Figure 7 It is a structural diagram of an embodiment of a computer device according to the present application. DETAILED DESCRIPTION

[0064] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of the present application; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "including" and "having" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.

[0065] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0066] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.

[0067] like Figure 1 As shown, the system architecture 100 may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0068] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, 103, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.

[0069] Terminal devices 101, 102, 103 can be various electronic devices with display screens and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III), MP4 (Moving Picture Experts Group Audio Layer IV) players, laptop computers and desktop computers, etc.

[0070] The server 105 may be a server that provides various services, such as a background server that provides support for web pages displayed on the terminal devices 101 , 102 , and 103 .

[0071] It should be noted that the category prediction method applied to medical images provided in the embodiments of the present application is generally executed by a server / terminal device, and accordingly, the category prediction device applied to medical images is generally set in the server / terminal device.

[0072] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0073] Continue to refer Figure 2 , shows a flow chart of an embodiment of a method for class prediction applied to medical images according to the present application. The method for class prediction applied to medical images comprises: step S201, step S202, step S203 and step S204.

[0074] In step S201, a category prediction request carrying a medical image to be predicted is received from a user terminal.

[0075] In the embodiments of the present application, the user terminal refers to a terminal device used to execute the image processing method for preventing document abuse provided by the present application. The user terminal can be a mobile terminal such as a mobile phone, a smart phone, a laptop computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a navigation device, etc., as well as a fixed terminal such as a digital TV, a desktop computer, etc. It should be understood that the examples of user terminals here are only for the convenience of understanding and are not used to limit the present application.

[0076] In an embodiment of the present application, the input image is a medical image that needs to be classified, and the output is the category to which the image belongs.

[0077] In terms of qualitative requirements, draw the ROC curve of the model and observe its AUC size.

[0078] In terms of quantitative requirements, various indicators in the field of medical image classification are used to evaluate the medical image classification model.

[0079] The main evaluation indicators are:

[0080] 1. Accuracy: Accuracy refers to the ratio of the number of samples that the model predicts correctly to the total number of samples. In other words, accuracy measures the model's ability to predict correctly. The accuracy value range is usually between 0 and 1, where 1 means that the model prediction is completely correct and 0 means that the model prediction is completely wrong.

[0081]

[0082] 2. Precision: Precision is the proportion of the positive class predicted by the model. The value range of precision is usually between 0 and 1, where 1 means that the model prediction is completely correct and 0 means that the model prediction is completely wrong.

[0083]

[0084] 3. Recall, which measures the proportion of all actual positive classes that are correctly predicted as positive by the model. The range of the recall value is usually between 0 and 1, where 1 means that the model prediction is completely correct and 0 means that the model prediction is completely wrong.

[0085]

[0086] 4. F1-score. The F1 score is the harmonic mean of precision and recall, and is a performance metric that takes both metrics into account. The value range of the F1 score is 0 to 1, where 1 indicates perfect precision and recall, and 0 indicates poor performance. One advantage of the F1 score is that it penalizes extreme differences between precision and recall, so it is a metric that balances the two metrics.

[0087]

[0088] 5. AUC (Area Under Curve): AUC is the area under the ROC (Receiver Operating Characteristic Curve) curve and the coordinate axis, and is usually used to measure the performance of the model in a binary classification problem. The value range of AUC is between 0.5 and 1, where 1 means that the model prediction is completely correct and 0.5 means that the model prediction effect is the worst and has no application value. AUC can be interpreted as the probability that the model will rank a randomly selected positive sample before a randomly selected negative sample.

[0089] In step S202, the medical image to be predicted is input into the deep dynamic fusion module layer group for feature fusion operation to obtain the target fusion feature, wherein the deep dynamic fusion module layer group is composed of N deep dynamic fusion module layers, each deep dynamic fusion module layer is composed of M global sparse modules using a dynamic sparse attention mechanism, M local attention modules and 1 deep dynamic fusion module, and N and M are integers greater than or equal to 1.

[0090] In step S203, the target fusion feature is input into the fully connected classification layer to perform a category prediction operation to obtain a category prediction result.

[0091] In step S204, the category prediction result is sent to the user terminal.

[0092] In an embodiment of the present application, a category prediction method applied to medical images is provided, including: receiving a category prediction request carrying a medical image to be predicted sent by a user terminal; inputting the medical image to be predicted into a deep dynamic fusion module layer group for feature fusion operation to obtain a target fusion feature, wherein the deep dynamic fusion module layer group is composed of N layers of deep dynamic fusion module layers, each layer of deep dynamic fusion module layer is composed of M global sparse modules using a dynamic sparse attention mechanism, M local attention modules and 1 deep dynamic fusion module, and N and M are integers greater than or equal to 1; inputting the target fusion feature into a fully connected classification layer for category prediction operation to obtain a category prediction result; and sending the category prediction result to the user terminal. Compared with the prior art, the present application innovatively proposes a dynamic fusion method, using a dynamic convolution method to complete the fusion of global and local features, thereby avoiding the difference in expression ability between the static characteristics of traditional convolution and the attention mechanism, avoiding the impact on model performance, and thus improving model performance.

[0093] In some optional implementations of this embodiment, the above step S202 specifically includes the following steps:

[0094] Performing a convolution downsampling operation on the medical image to be predicted to obtain a first downsampling image feature;

[0095] Inputting the first down-sampled image feature into a first global sparse module to perform a global feature extraction operation to obtain a first global image feature;

[0096] Inputting the first down-sampled image feature into a first local attention module to perform a local feature extraction operation to obtain a first local image feature;

[0097] Inputting the first global image feature, the first local image feature, and the previous layer fusion feature into the first deep dynamic fusion module for feature fusion operation to obtain the first fusion image feature, wherein if the current deep dynamic fusion module layer is the first level, only the first global image feature and the first local image feature are input into the first deep dynamic fusion module for feature fusion operation;

[0098] Determine whether the next-level module is a fully connected classification layer;

[0099] If the module at the next level is a fully connected classification layer, the first fused image feature is determined as the target fused feature;

[0100] If the module of the next level is not a fully connected classification layer, convolution down-sampling operations are performed on the first global image feature, the first local image feature and the first fused image feature to obtain the second global down-sampling feature, the second local down-sampling feature and the second fused down-sampling feature, and the second global down-sampling feature is input into the global sparse module of the next level for global feature extraction operation, and the second local down-sampling feature is input into the local attention module of the next level for local feature extraction operation to obtain the second global image feature and the second local image feature, and the second global image feature, the second local image feature and the second fused down-sampling feature are input into the deep dynamic fusion module of the next level for feature fusion operation to obtain the second fused image feature, and it is re-determined whether the next level is a fully connected classification layer until the next level is a fully connected classification layer.

[0101] In an embodiment of the present application, a dynamic sparse attention mechanism is adopted in the global branch. First, the Q, K, and V matrices required for the self-attention mechanism are obtained by the linear layer, and then the matrices Q and K are multiplied to obtain the correlation between different regions of the input image; by different correlations, the regions with high correlation in the matrices K and V can be screened out, thereby ignoring the influence of irrelevant features on the model; at the same time, a variance-aware separable deep convolution is adopted in the local branch, and a convolution kernel covering the global input is generated by the initialized parameter matrix A, so that different regions of the input correspond to specific convolution kernels, thereby completing the attention to a specific layout; in order to make more full use of global and local features, compared with traditional feature fusion methods, this method innovatively proposes a dynamic fusion method, and uses a dynamic convolution method to complete the fusion of global and local features, thereby avoiding the difference in expression ability between the static characteristics of traditional convolution and the attention mechanism, avoiding the impact on model performance, and thus improving model performance.

[0102] In some optional implementations of this embodiment, the step of inputting the first down-sampled image feature into the first global sparse module to perform a global feature extraction operation to obtain the first global image feature specifically includes the following steps:

[0103] Input the first down-sampled image feature into the linear layer for matrix generation operation to obtain matrix Q, matrix K and matrix V;

[0104] Multiply the matrix Q and the matrix K to obtain the correlation response data;

[0105] According to the correlation response data, the matrix K and the matrix V are filtered to obtain the matrix And the matrix ;

[0106] For matrix Q, matrix And the matrix Perform an attention calculation operation to obtain a first global image feature.

[0107] In the embodiment of the present application, the global branch is mainly composed of a combination of dynamic sparse modules, the core of which is a dynamic sparse attention mechanism, such as Figure 3 First, the matrices Q, K and V for the attention mechanism are obtained through the linear layer, and their mathematical expressions are as follows:

[0108]

[0109] In the above calculation, , and Represents the weights of the linear layer, which are obtained by matrix multiplication with the input.

[0110] By multiplying the matrix Q and K, we can get the correlation response between the two, and then we can filter out the features related to the classification task according to the size of the response value. The mathematical expression of this process is as follows:

[0111]

[0112]

[0113] in, It means flattening. represents average pooling, Indicates the correlation area corresponds.

[0114] Then, according to the response value of the correlation area, the area with a larger response value can be selected to filter out irrelevant features.

[0115]

[0116]

[0117] in, Represents the input region index, , The matrices K and V are corresponding to the regions with large response values. Indicates selecting the corresponding element of the matrix according to the index value.

[0118] Finally, the matrix By using the attention mechanism for calculation, we can obtain the output of the dynamic sparse global branch, which effectively filters out the influence of irrelevant features on the model.

[0119]

[0120] in, represents the activation function, Y represents the output, C represents the matrix Q, , The dimension of .

[0121] In some optional implementations of this embodiment, the step of inputting the first down-sampled image feature into the first local attention module to perform a local feature extraction operation to obtain the first local image feature specifically includes the following steps:

[0122] Generate a parameter matrix A corresponding to the first down-sampled image features;

[0123] Input the parameter matrix A into the weight generation module for weight generation operation to obtain the weight W, where the weight generation module consists of multiple layers of convolution, layer normalization and activation function;

[0124] A convolution operation is performed on the first down-sampled image feature according to the weight W to obtain the first local image feature.

[0125] In the embodiments of the present application, Figure 4 As shown, the present application designs a variance-aware separable deep convolution-based variance-aware block to process local features, so that the extraction of local features focuses on the image layout, thereby improving the feature extraction capability for subtle lesion areas.

[0126] First, generate the parameter matrix A for generating the convolution kernel. Generating weights in this way can effectively reduce the number of trainable parameters and avoid the occurrence of gradient vanishing or gradient exploding.

[0127]

[0128] in, Represents the weight generation module, which consists of multiple layers of convolution, layer normalization, and activation functions. W represents the generated weight. It assigns different parameters to different parts and layouts of the global image, and gives similar treatment to the same parts or layouts of different images.

[0129] The generated weight W can be used to perform convolution on the input:

[0130]

[0131] in, Indicates the use of weight W for convolution operation, Representation layer normalization, Represents a convolution with a kernel size of 1. In order to avoid gradient disappearance, a residual connection is used here.

[0132] In some optional implementations of this embodiment, the step of inputting the first global image feature, the first local image feature, and the previous layer fusion feature into the first deep dynamic fusion module for feature fusion operation to obtain the first fusion image feature specifically includes the following steps:

[0133] Input the first global image feature to the channel attention layer for a first irrelevant feature filtering operation, and input the output data of the channel attention layer to the dynamic sparse attention layer for a second irrelevant feature filtering operation to obtain a first global processing feature;

[0134] Inputting the first local image feature into the spatial attention layer to perform a receptive field enlargement operation, and performing a dynamic convolution operation on the output data of the spatial attention layer to obtain a first local processing feature;

[0135] Performing a splicing operation on the first global processing feature, the first local processing feature, and the previous layer fusion feature to obtain a first preliminary fusion feature;

[0136] The first preliminary fused features are input into the residual connection feed-forward layer to obtain the first fused image features.

[0137] In the embodiment of the present application, in order to more fully extract the rich information contained in the global and local features of medical images, the present method proposes a new deep dynamic fusion module. Figure 5 As shown in the figure, the module mainly consists of channel attention, spatial attention and deep residual feedforward layer.

[0138] This method first uses channel attention to process global features. In the process of global feature extraction, it can be found that the information of different channels lacks interaction. Therefore, using channel attention to realize the interaction and selection of information from different channels can improve the representation ability of the model. The calculation process is as follows:

[0139]

[0140] in, Represents a weight-shared linear layer. That is, the linear layers used in processing the maximum pooling and average pooling features have the same weights; This represents the maximum pooling operation. The calculation of is as follows:

[0141]

[0142] After using channel attention, dynamic sparse attention is used here to further reduce the model's attention to irrelevant features:

[0143]

[0144] Here This means using the dynamic sparse attention described previously.

[0145] At the same time, this method uses spatial attention to process local features, thereby increasing the receptive field and improving feature extraction capabilities. The calculation process is as follows:

[0146]

[0147] in, represents a convolution operation with a kernel size of 7, Represents concatenation of two tensors along the channel dimension.

[0148] In order to make the extracted local features dynamic, this method uses dynamic convolution to eliminate the representation difference between static convolution and attention mechanism, thus avoiding the degradation of model performance:

[0149] Y=

[0150] in, represents dynamic convolution, and the weight generation process required for its calculation is as follows:

[0151]

[0152]

[0153]

[0154] Among them, W' is the weight used for dynamic convolution.

[0155] For the fusion features of the previous layer, this method uses splicing with global and local features to complete the initial feature interaction:

[0156]

[0157]

[0158] in, Represents the result of preliminary feature fusion. Represents a type of activation function, whose calculation process is as follows:

[0159]

[0160] represents the Gaussian error function.

[0161] Finally, the features are input into the deep residual feedforward layer to obtain the fusion output of this layer:

[0162]

[0163] In practical applications, by conducting comparative tests on the CT dataset COVID-19-CT, the X-ray dataset ChestX-ray PA, and the endoscopic image dataset Kvasir, the results obtained are as follows:

[0164] Table 1 Comparison of the proposed method and the most advanced method on the COVID-19-CT dataset. The model indicators of the proposed method are the best values.

[0165]

[0166] Table 2 Comparison of the proposed method and the most advanced method on the Chest X-ray PA dataset. The model index of the proposed method is the best value.

[0167]

[0168] Table 3 Comparison of the proposed method and the most advanced method on the Kvasir dataset. The model index of the proposed method is the best value.

[0169]

[0170] By initially observing the ROC curve, it can be found that the curve obtained by this method can obtain the maximum AUC. Through quantitative calculation, it can be found that the AUC obtained by this method is the largest on all three data sets. Especially on the COVID-19-CT data set, its ROC curve is significantly better than the results achieved by the best method currently.

[0171] Comparing the medical image classification method based on deep multi-scale feature fusion proposed in this paper with the most advanced model of medical image classification, the method in this paper achieved the best performance indicators on both COVID-19-CT and Kvasir datasets. Compared with the current best network, the accuracy on these two datasets was improved by 3.43 and 1.28 percentage points respectively.

[0172] On the Chest X-ray PA dataset, except for the Precision indicator, it outperforms the current best method in all other indicators; in terms of Precision, it is slightly lower than the current best BiFormer method, but only drops by 0.5 percentage points.

[0173] Based on the above results, compared with the most advanced models, this method shows the best performance on datasets of different modalities, and the model proposed by this method can achieve the best performance in medical image classification tasks.

[0174] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0175] The basic technologies of artificial intelligence generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. Artificial intelligence software technology mainly includes several major directions such as computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning. A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through computer-readable instructions, and the computer-readable instructions can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned storage medium can be a non-volatile storage medium such as a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

[0176] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.

[0177] Embodiment 2

[0178] Further references Figure 6 , as a response to the above Figure 2 The present application provides an embodiment of a class prediction device for medical images. Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.

[0179] like Figure 6 As shown, the category prediction device 200 applied to medical images of this embodiment includes:

[0180] A request acquisition module 210, configured to receive a category prediction request carrying a medical image to be predicted, sent by a user terminal;

[0181] A feature fusion module 220 is used to input the medical image to be predicted into the deep dynamic fusion module layer group for feature fusion operation to obtain target fusion features, wherein the deep dynamic fusion module layer group is composed of N layers of deep dynamic fusion module layers, and each layer of the deep dynamic fusion module layer is composed of M global sparse modules using a dynamic sparse attention mechanism, M local attention modules and 1 deep dynamic fusion module, where N and M are integers greater than or equal to 1;

[0182] The category prediction module 230 is used to input the target fusion feature into the fully connected classification layer to perform a category prediction operation to obtain a category prediction result;

[0183] The result output module 240 is used to send the category prediction result to the user terminal.

[0184] In this embodiment, a category prediction device 200 for medical images is provided, including: a request acquisition module 210, for receiving a category prediction request carrying a medical image to be predicted sent by a user terminal; a feature fusion module 220, for inputting the medical image to be predicted into a deep dynamic fusion module layer group for feature fusion operation to obtain a target fusion feature, wherein the deep dynamic fusion module layer group is composed of N layers of deep dynamic fusion module layers, each of which is composed of M global sparse modules using a dynamic sparse attention mechanism, M local attention modules and 1 deep dynamic fusion module, and N and M are integers greater than or equal to 1; a category prediction module 230, for inputting the target fusion feature into a fully connected classification layer for category prediction operation to obtain a category prediction result; a result output module 240, for sending the category prediction result to the user terminal. Compared with the prior art, the present application innovatively proposes a dynamic fusion method, using a dynamic convolution method to complete the fusion of global and local features, thereby avoiding the difference in expression ability between the static characteristics of traditional convolution and the attention mechanism, avoiding the impact on model performance, and thus improving model performance.

[0185] In some optional implementations of this embodiment, the feature fusion module includes:

[0186] A downsampling submodule, used for performing a convolution downsampling operation on the medical image to be predicted to obtain a first downsampling image feature;

[0187] A global feature extraction submodule, used for inputting the first down-sampled image feature into the first global sparse module to perform a global feature extraction operation to obtain a first global image feature;

[0188] A local feature extraction submodule, used for inputting the first down-sampled image feature into the first local attention module to perform a local feature extraction operation to obtain a first local image feature;

[0189] A feature fusion submodule, used for inputting the first global image feature, the first local image feature, and the fused feature of the previous layer into the first deep dynamic fusion module for feature fusion operation to obtain the first fused image feature, wherein if the current layer is the first, the first down-sampled image feature is used as the fused feature of the previous layer;

[0190] The fully connected classification layer judgment submodule is used to judge whether the next level is a fully connected classification layer;

[0191] A first judgment result submodule, used for determining the first fused image feature as a target fused feature if the next layer is a fully connected classification layer;

[0192] The second judgment result submodule is used for, if the next layer is not a fully connected classification layer, performing convolution downsampling operations on the first global image feature, the first local image feature and the first fused image feature, respectively, to obtain second global downsampling features, second local downsampling features and second fused downsampling features, respectively inputting the second global downsampling features into the global sparse module of the next layer for global feature extraction operations, inputting the second local downsampling features into the local attention module of the next layer for local feature extraction operations, to obtain second global image features and second local image features, and inputting the second global image features, the second local image features and the second fused downsampling features into the deep dynamic fusion module of the next layer for feature fusion operations to obtain second fused image features, and re-judging whether the next layer is a fully connected classification layer until the next layer is a fully connected classification layer.

[0193] In some optional implementations of this embodiment, the global feature extraction submodule includes:

[0194] A matrix generation unit, used for inputting the first down-sampled image feature into the linear layer to perform a matrix generation operation to obtain a matrix Q, a matrix K and a matrix V;

[0195] A correlation data acquisition unit, used for multiplying the matrix Q and the matrix K to obtain correlation response data;

[0196] A filtering unit, used for filtering the matrix K and the matrix V according to the correlation response data to obtain the matrix K and the matrix V;

[0197] An attention calculation unit is used to perform an attention calculation operation on the matrix Q, the matrix, and the matrix to obtain a first global image feature.

[0198] In some optional implementations of this embodiment, the local feature extraction submodule includes:

[0199] The local feature extraction unit is used to perform a convolution operation on the first down-sampled image feature according to the weight W to obtain a first local image feature.

[0200] In some optional implementations of this embodiment, the feature fusion submodule includes:

[0201] A first filtering unit is used to input the first global image feature into the channel attention layer to perform a first irrelevant feature filtering operation, and input the output data of the channel attention layer into the dynamic sparse attention layer to perform a second irrelevant feature filtering operation to obtain a first global processing feature;

[0202] A second filtering unit is used to input the first local image feature into the spatial attention layer to perform a receptive field enlargement operation, and perform a dynamic convolution operation on the output data of the spatial attention layer to obtain a first local processing feature;

[0203] A concatenation unit, configured to concatenate the first global processing feature, the first local processing feature, and the previous fusion feature to obtain a first preliminary fusion feature;

[0204] The fused image feature acquisition unit is used to input the first preliminary fused feature into the residual connection feed-forward layer to obtain the first fused image feature.

[0205] To solve the above technical problems, the present application also provides a computer device. Figure 7 , Figure 7 This is a basic structural block diagram of the computer device in this embodiment.

[0206] The computer device 300 includes a memory 310, a processor 320, and a network interface 330 that are interconnected and communicated through a system bus. It should be noted that the figure only shows a computer device 300 having components 310-330, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable gate arrays (Field-Programmable Gate Array, FPGA), digital processors (Digital Signal Processor, DSP), embedded devices, etc.

[0207] The computer device may be a desktop computer, a notebook, a PDA, a cloud server, etc. The computer device may interact with the user through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device.

[0208] The memory 310 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 310 can be an internal storage unit of the computer device 300, such as a hard disk or memory of the computer device 300. In other embodiments, the memory 310 can also be an external storage device of the computer device 300, such as a plug-in hard disk equipped on the computer device 300, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. Of course, the memory 310 can also include both the internal storage unit of the computer device 300 and its external storage device. In this embodiment, the memory 310 is generally used to store an operating system and various application software installed on the computer device 300, such as computer-readable instructions for a class prediction method for medical images. In addition, the memory 310 can also be used to temporarily store various data that have been output or are to be output.

[0209] The processor 320 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments. The processor 320 is generally used to control the overall operation of the computer device 300. In this embodiment, the processor 320 is used to run the computer-readable instructions stored in the memory 310 or process data, such as running the computer-readable instructions of the class prediction method applied to medical images.

[0210] The network interface 330 may include a wireless network interface or a wired network interface. The network interface 330 is generally used to establish a communication connection between the computer device 300 and other electronic devices.

[0211] The computer device provided in this application innovatively proposes a dynamic fusion method, using dynamic convolution to complete the fusion of global and local features, thereby avoiding the difference in expressive ability with the attention mechanism caused by the static characteristics of traditional convolution, avoiding the impact on model performance, and thus improving model performance.

[0212] The present application also provides another embodiment, namely, providing a computer-readable storage medium, wherein the computer-readable storage medium stores computer-readable instructions, and the computer-readable instructions can be executed by at least one processor to enable the at least one processor to perform the steps of the category prediction method applied to medical images as described above.

[0213] The computer-readable storage medium provided in this application innovatively proposes a dynamic fusion method, using dynamic convolution to complete the fusion of global and local features, thereby avoiding the difference in expressive ability between the static characteristics of traditional convolution and the attention mechanism, avoiding the impact on model performance, and thus improving model performance.

[0214] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0215] Obviously, the embodiments described above are only some embodiments of the present application, rather than all embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application is described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions recorded in the aforementioned specific implementation methods, or to perform equivalent replacement of some of the technical features therein. Any equivalent structure made using the contents of the specification and drawings of this application, directly or indirectly used in other related technical fields, is similarly within the scope of patent protection of this application.

Claims

1. A class prediction method applied to medical images, characterized in that: The steps include: receiving a category prediction request carrying a medical image to be predicted sent by a user terminal; The medical image to be predicted is input into the deep dynamic fusion module layer group for feature fusion operation to obtain the target fusion feature, wherein the deep dynamic fusion module layer group is composed of N layers of deep dynamic fusion module layers, and each layer of the deep dynamic fusion module layer is composed of M global sparse modules using a dynamic sparse attention mechanism, M local attention modules using variance perception, and 1 deep dynamic fusion module, N and M are integers greater than or equal to 1, wherein the local attention module is a separable deep convolution based on variance perception, specifically, firstly generate a parameter matrix A for generating a convolution kernel, and generate a weight W according to the matrix A, and perform a convolution operation on the input data according to the weight W, and the weight W is expressed as: in, represents the weight generation module, which consists of multiple layers of convolution, layer normalization and activation function, and W represents the generated weight; The convolution operation is expressed as in, Indicates the use of weight W for convolution operation, Representation layer normalization, Represents a convolution with a kernel size of 1; Inputting the target fusion features into the fully connected classification layer to perform a category prediction operation to obtain a category prediction result; Sending the category prediction result to the user terminal.

2. The class prediction method applied to medical images according to claim 1, characterized in that: The step of inputting the medical image to be predicted into the deep dynamic fusion module layer group to perform feature fusion operation to obtain the target fusion feature specifically includes the following steps: Performing a convolution downsampling operation on the medical image to be predicted to obtain a first downsampling image feature; Inputting the first down-sampled image feature into a first global sparse module to perform a global feature extraction operation to obtain a first global image feature; Inputting the first down-sampled image feature into a first local attention module to perform a local feature extraction operation to obtain a first local image feature; Inputting the first global image feature, the first local image feature and the previous layer fusion feature into the first deep dynamic fusion module for feature fusion operation to obtain the first fusion image feature, wherein if the current deep dynamic fusion module layer is the first level, only the first global image feature and the first local image feature are input into the first deep dynamic fusion module for feature fusion operation; Determine whether the module of the next level is the fully connected classification layer; If the module of the next level is the fully connected classification layer, determining the first fused image feature as the target fused feature; If the module of the next level is not the fully connected classification layer, a convolution downsampling operation is performed on the first global image feature, the first local image feature and the first fused image feature to obtain a second global downsampling feature, a second local downsampling feature and a second fused downsampling feature, and the second global downsampling feature is input into the global sparse module of the next level for global feature extraction operation, and the second local downsampling feature is input into the local attention module of the next level for local feature extraction operation to obtain a second global image feature and a second local image feature, and the second global image feature, the second local image feature and the second fused downsampling feature are input into the deep dynamic fusion module of the next level for feature fusion operation to obtain a second fused image feature, and it is re-determined whether the next level is the fully connected classification layer until the next level is the fully connected classification layer.

3. The class prediction method applied to medical images according to claim 2, characterized in that: The step of inputting the first down-sampled image feature into the first global sparse module to perform a global feature extraction operation to obtain the first global image feature specifically includes the following steps: Inputting the first down-sampled image features into a linear layer for matrix generation operation to obtain a matrix Q, a matrix K, and a matrix V; Multiplying the matrix Q and the matrix K to obtain correlation response data; According to the correlation response data, the matrix K and the matrix V are filtered to obtain the matrix And the matrix ; For the matrix Q, the matrix And the matrix Perform an attention calculation operation to obtain the first global image feature.

4. The class prediction method applied to medical images according to claim 2, characterized in that: The step of inputting the first global image feature, the first local image feature, and the previous layer fusion feature into the first deep dynamic fusion module for feature fusion operation to obtain the first fusion image feature specifically includes the following steps: Inputting the first global image feature into the channel attention layer to perform a first irrelevant feature filtering operation, and inputting the output data of the channel attention layer into the dynamic sparse attention layer to perform a second irrelevant feature filtering operation to obtain a first global processing feature; Inputting the first local image feature into the spatial attention layer to perform a receptive field enlargement operation, and performing a dynamic convolution operation on the output data of the spatial attention layer to obtain a first local processing feature; Performing a splicing operation on the first global processing feature, the first local processing feature, and the previous layer fusion feature to obtain a first preliminary fusion feature; The first preliminary fused features are input into the residual connection feed-forward layer to obtain the first fused image features.

5. A category prediction device applied to medical images, characterized in that: include: A request acquisition module, used for receiving a category prediction request carrying a medical image to be predicted sent by a user terminal; A feature fusion module is used to input the medical image to be predicted into a deep dynamic fusion module layer group for feature fusion operation to obtain a target fusion feature, wherein the deep dynamic fusion module layer group is composed of N layers of deep dynamic fusion module layers, and each layer of the deep dynamic fusion module layer is composed of M global sparse modules using a dynamic sparse attention mechanism, M local attention modules using variance perception, and 1 deep dynamic fusion module, N and M are integers greater than or equal to 1, wherein the local attention module is a separable deep convolution based on variance perception, specifically, firstly generate a parameter matrix A for generating a convolution kernel, and generate a weight W according to the matrix A, and perform a convolution operation on the input data according to the weight W, and the weight W is expressed as: in, represents the weight generation module, which consists of multiple layers of convolution, layer normalization and activation function, and W represents the generated weight; The convolution operation is expressed as in, Indicates the use of weight W for convolution operation, Representation layer normalization, Represents a convolution with a kernel size of 1; A category prediction module is used to input the target fusion feature into the fully connected classification layer to perform a category prediction operation to obtain a category prediction result; A result output module is used to send the category prediction result to the user terminal.

6. The category prediction device for medical images according to claim 5, characterized in that: The feature fusion module includes: A downsampling submodule, used for performing a convolution downsampling operation on the medical image to be predicted to obtain a first downsampling image feature; A global feature extraction submodule, used for inputting the first down-sampled image feature into a first global sparse module to perform a global feature extraction operation to obtain a first global image feature; A local feature extraction submodule, used for inputting the first down-sampled image feature into a first local attention module to perform a local feature extraction operation to obtain a first local image feature; A feature fusion submodule, used for inputting the first global image feature, the first local image feature, and the fusion feature of the previous layer into the first deep dynamic fusion module for feature fusion operation to obtain the first fusion image feature, wherein if the current deep dynamic fusion module layer is the first level, only the first global image feature and the first local image feature are input into the first deep dynamic fusion module for feature fusion operation; A fully connected classification layer judgment submodule, used to judge whether the module at the next level is the fully connected classification layer; a first judgment result submodule, configured to determine the first fused image feature as the target fused feature if the next-level module is the fully connected classification layer; The second judgment result submodule is used for, if the module of the next level is not the fully connected classification layer, performing convolution downsampling operations on the first global image feature, the first local image feature and the first fused image feature respectively to obtain second global downsampling features, second local downsampling features and second fused downsampling features, respectively inputting the second global downsampling features into the global sparse module of the next level for global feature extraction operations, inputting the second local downsampling features into the local attention module of the next level for local feature extraction operations to obtain second global image features and second local image features, and inputting the second global image features, the second local image features and the second fused downsampling features into the deep dynamic fusion module of the next level for feature fusion operations to obtain second fused image features, and re-judging whether the next level is the fully connected classification layer until the next level is the fully connected classification layer.

7. The category prediction device for medical images according to claim 6, characterized in that: The global feature extraction submodule includes: A matrix generation unit, used for inputting the first down-sampled image features into a linear layer to perform a matrix generation operation to obtain a matrix Q, a matrix K and a matrix V; A correlation data acquisition unit, used for multiplying the matrix Q and the matrix K to obtain correlation response data; A filtering unit is used to filter the matrix K and the matrix V according to the correlation response data to obtain a matrix And the matrix ; An attention calculation unit is used to calculate the matrix Q and the matrix And the matrix Perform an attention calculation operation to obtain the first global image feature.

8. A computer device, comprising a memory and a processor, wherein the memory stores computer-readable instructions, and when the processor executes the computer-readable instructions, the steps of the category prediction method applied to medical images as described in any one of claims 1 to 4 are implemented.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the steps of the category prediction method applied to medical images as described in any one of claims 1 to 4 are implemented.