Tumor classification method based on convolutional neural network
By constructing a feature extraction module, a magnification adaptive module and an adaptive attention module, the problem of inaccurate tumor image classification of convolutional neural networks under different magnifications is solved, and the accuracy and diagnostic accuracy of tumor image classification are improved.
Patent Information
- Application Number
- CN202510427042.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-07
- Publication Date
- 2025-07-22
- Estimated Expiration
- 2045-04-07
AI Technical Summary
The existing convolutional neural networks have inaccurate classification due to different image magnifications in tumor image classification, which affects the diagnostic accuracy.
A feature extraction module, a magnification adaptive module and an adaptive attention module are constructed to enhance the adaptability at different magnifications through multi-scale feature extraction and attention mechanisms, and improve the accuracy of tumor image classification.
It improves the accuracy of tumor image classification, enhances the adaptability to different magnifications, and improves diagnostic accuracy.
Smart Images

Figure CN120355986A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of tumor detection, and specifically to a tumor classification method based on a convolutional neural network. Background Art
[0002] In medical diagnosis, analyzing tumor-related images (such as pathological section images, imaging images, etc.) to determine the positivity or negativity of tumors is of crucial significance for disease diagnosis and treatment.
[0003] With the rapid development of artificial intelligence technology, convolutional neural networks have been widely used in the field of medical image classification. However, when using convolutional neural networks for tumor image classification currently, there is a problem of inaccurate classification due to different magnification factors of the pictures. Tumor images obtained by different medical institutions, different imaging devices, or even the same device under different operation settings often have different magnification factors. When the magnification factor is low, some subtle features in the image may not be clearly presented, making it difficult for the convolutional neural network model to capture key information, thus affecting the classification accuracy; while when the magnification factor is too high, problems such as increased noise and blurred edges may occur in the image, which also interfere with the accurate recognition of tumor features by the convolutional neural network model. This technical problem limits the wide application of convolutional neural networks in tumor image classification and the further improvement of diagnostic accuracy.
[0004] Therefore, providing a tumor classification method based on a convolutional neural network for accurately classifying tumor images with different magnification factors has become a technical problem that urgently needs to be solved currently. Summary of the Invention
[0005] In view of the above problems, the present application is proposed, providing a tumor classification method based on a convolutional neural network for improving the classification accuracy of tumor images with different magnification factors, specifically including steps S10 to S30:
[0006] Step S10, constructing a feature extraction module to extract features from the tumor image to be recognized, generating a tumor feature map;
[0007] Step S30, constructing a magnification factor adaptive module to perform multi-layer detailed feature extraction on the tumor feature map, where each layer of detailed features includes multi-scale features, to generate an output feature map and enhance the adaptability to different magnification factors;
[0008] Step S50, constructing a classification module to perform tumor recognition based on the output feature map, generating a classification result of the tumor image to be recognized.
[0009] Preferably, the step S30 includes:
[0010] Step S31: Construct N first convolutional channels to perform multi-scale feature extraction on the tumor feature map, generating N first adaptive feature maps, where the convolutional kernel sizes in each first convolutional channel are the same, but the convolutional weights and convolutional biases are different, and N is greater than or equal to 2;
[0011] Step S32: Construct M second convolutional channels to perform detailed feature extraction on the N first adaptive feature maps, generating M second adaptive feature maps, where the convolutional kernel sizes in each second convolutional channel are the same, but the convolutional weights and convolutional biases are different, and M is greater than or equal to 2;
[0012] Step S33: Construct a pooling layer and a fully connected layer to perform pooling and fully connected processing on the N first adaptive feature maps and the M second adaptive feature maps, generating an output feature map.
[0013] Preferably, after step S30 and before step S50, the method further includes:
[0014] Step S40: Construct an adaptive attention module to multiply the output feature map by channel attention weights and spatial attention weights, generating an attention feature map.
[0015] Preferably, S40 includes:
[0016] Step S41: Construct a channel attention weight generation module to receive the output feature map and generate channel attention weights;
[0017] Step S42: Construct a first multiplication module to multiply the output feature map and the channel attention weights element-wise to obtain an intermediate feature map;
[0018] Step S43: Construct a spatial attention weight generation module to receive the intermediate feature map and generate spatial attention weights;
[0019] Step S44: Construct a second multiplication module to multiply the intermediate feature map and the spatial attention weights element-wise to obtain an attention feature map.
[0020] Preferably, the step S41 includes:
[0021] Step S411: Perform average pooling and max pooling on the output feature map, respectively generating an average pooling feature map and a max pooling feature map;
[0022] Step S412: Perform splicing and fusion processing on the average pooling feature map and the max pooling feature map to obtain a fused pooling feature map;
[0023] Step S413: Perform first convolution processing, normalization processing, GeLU activation processing, and second convolution processing on the fused pooling feature map in sequence to generate a channel feature map;
[0024] Step S414: Process the channel feature map using the Sigmoid activation function to generate channel attention weights.
[0025] Preferably, the step S43 includes:
[0026] Step S431: Perform third convolution processing, normalization processing, GeLU activation processing, and fourth convolution processing on the intermediate feature map in sequence to generate a first spatial feature map, where the third convolution processing and the fourth convolution processing use convolution kernels of sizes 1×1 and 1×1;
[0027] Step S432: Perform fifth convolution processing, normalization processing, GeLU activation processing, and sixth convolution processing on the intermediate feature map in sequence to generate a second spatial feature map, where the fifth convolution processing and the sixth convolution processing use convolution kernels of sizes 3×3 and 1×1 respectively;
[0028] Step S433: Construct a third multiplication module to perform element-wise multiplication on the first spatial feature map and the second spatial feature map to generate a fused spatial feature map;
[0029] Step S434: Process the fused spatial feature map using the Sigmoid activation function to generate spatial attention weights.
[0030] Preferably, the method further includes:
[0031] Step S60: Construct an image enhancement module to perform feature enhancement processing on the tumor image to be recognized and obtain an enhanced tumor image;
[0032] Step S70: Respectively construct an enhanced image feature extraction module, an enhanced image magnification adaption module, an enhanced image adaptive attention module, and an enhanced image classification module to perform feature extraction and multi-level detailed feature extraction on the enhanced tumor image, and perform enhanced image tumor recognition to generate an enhanced classification result of the tumor image to be recognized;
[0033] Step S80: Construct a fusion module to fuse the classification result of the aforementioned tumor image to be recognized according to the enhanced classification result of the tumor image to be recognized to obtain the final classification result of the tumor image to be recognized.
[0034] Preferably, the enhanced image feature extraction module, the enhanced image magnification adaption module, the enhanced image classification module, and the enhanced image adaptive attention module have the same structure and function as the feature extraction module, the magnification adaption module, the classification module, and the adaptive attention module.
[0035] Preferably, the final classification result of the tumor image to be recognized is:
[0036] score = δ1p1 + δ2p2
[0037] Wherein, i is equal to 1 or 2, δ1 is the weight corresponding to the classification result of the tumor image to be recognized, δ2 is the weight corresponding to the enhanced classification result of the tumor image to be recognized, p1 is the classification result of the tumor image to be recognized, p2 is the enhanced classification result of the tumor image to be recognized, w1 is the classification result in the pre-training stage, w2 is the enhanced classification result in the pre-training stage, and w * is the classification calibration value in the pre-training stage.
[0038] The tumor classification method based on a convolutional neural network provided by this application uses a magnification adaptive module to collect important information of tumor images from multiple scales and multi-layer contexts, better understand the content of tumor images, enhance the adaptability to different magnifications, and improve the accuracy of tumor image classification.
[0039] In another aspect, this application also constructs a magnification adaptive module. First, using different convolution weights and convolution biases of the first convolution channel, multi-scale feature extraction is performed on the tumor feature map to adapt to the detailed features at different magnifications. At the same time, using the second convolution channel, two layers of detailed feature extraction are constructed to further prevent the loss of detailed features and the distortion of detailed features at different magnifications. Secondly, pooling processing is used to more easily collect detailed information across different spatial dimensions, and fully connected processing is used to integrate the extracted detailed features of each layer to combine features at different abstraction levels. Finally, the ability to distinguish tumor types at different magnifications is improved, the adaptability to different magnifications is enhanced, and the accuracy of tumor image classification is improved.
[0040] In another aspect, this application also constructs an adaptive attention module, which selectively focuses on key features and ignores irrelevant features, thereby dynamically optimizing the output feature map to generate an attention feature map, further improving the accuracy of tumor image classification at different magnifications.
[0041] In another aspect, this application also constructs an image enhancement module, which generates an enhanced classification result of the tumor image to be recognized and fuses it with the classification result of the tumor image to be recognized, further improving the accuracy of tumor image classification at different magnifications. Brief Description of the Drawings
[0042] In order to more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the following drawings are some embodiments of this application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0043] Figure 1 The execution flowchart of the tumor classification method provided by an embodiment of the present application;
[0044] Figure 2 The specific schematic diagram of the magnification adaptive module provided by an embodiment of the present application;
[0045] Figure 3 The execution flowchart of the tumor classification method provided by an embodiment of the present application;
[0046] Figure 4 The execution flowchart of the adaptive attention module provided by an embodiment of the present application;
[0047] Figure 5 The specific structure diagram of the adaptive attention module provided by an embodiment of the present application;
[0048] Figure 6 The execution flowchart of enhancing image classification fusion provided by an embodiment of the present application. Detailed implementation manners
[0049] To make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are some, but not all, of the embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts shall fall within the protection scope of the present application.
[0050] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments and are not intended to limit the present application. The singular forms "a", "said" and "the" used in the embodiments of the present application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. "Plural" generally includes at least two, but does not exclude the case of including at least one.
[0051] See Figure 1 , in one embodiment, the present application provides a tumor classification method based on a convolutional neural network, including:
[0052] Step S10, construct a feature extraction module to extract features from the tumor image to be recognized, generating a tumor feature map.
[0053] Specifically, the feature extraction module is used to extract features from the input tumor image. The feature extraction module includes multiple convolutional layers, activation function layers, and pooling layers. The convolutional layers are used to extract local features of the image, the activation function layers are used to introduce non-linear factors to enhance the expressive ability of the model, and the pooling layers are used to reduce the dimension of the feature map and reduce the amount of computation.
[0054] Step S30: Construct a magnification adaptive module to perform multi-layer detailed feature extraction on the tumor feature map, where each layer of detailed features includes multi-scale features, so as to generate an output feature map and enhance the adaptability to different magnifications.
[0055] The magnification adaptive module can extract complex multi-scale features from the input image, obtain each layer of detailed features, and adopt a hierarchical structure to better identify small details and textures existing in the tumor image, improve the ability to distinguish tumor types at different magnifications, enhance the adaptability to different magnifications, and improve the accuracy of tumor image classification.
[0056] Step S50: Construct a classification module to perform tumor recognition based on the output feature map and generate a classification result of the tumor image to be recognized.
[0057] This application uses a magnification adaptive module to collect important information of tumor images from multi-scale and multi-layer contexts, better understand the content of tumor images, enhance the adaptability to different magnifications, and improve the accuracy of tumor image classification.
[0058] Specifically, in an embodiment of this application, in step S30, a magnification adaptive module is constructed to perform multi-layer detailed feature extraction on the tumor feature map, where each layer of detailed features includes multi-scale features, so as to generate an output feature map, as Figure 2 shown, including:
[0059] Step S31: Construct N first convolutional channels to perform multi-scale feature extraction on the tumor feature map and generate N first adaptive feature maps. The convolutional kernel sizes in each first convolutional channel are the same, but the convolutional weights and convolutional biases are different. N is greater than or equal to 2, where:
[0060] Z i = f(XW i + b i )
[0061] Z i is the i-th first adaptive feature map, f is the activation function of each first convolutional channel, X is the tumor feature map, W i is the convolutional weight of each first convolutional channel, and b i is the convolutional bias of each first convolutional channel.
[0062] Step S32: Construct M second convolutional channels to extract detailed features from N first adaptive feature maps, generating M second adaptive feature maps. The convolutional kernel sizes in each second convolutional channel are the same, but the convolutional weights and convolutional biases are different, where M is greater than or equal to 2. Specifically:
[0063] H j = δ(ZW j + b j )
[0064] H j is the j-th second adaptive feature map, δ is the activation function of each second convolutional channel, Z is the N first adaptive feature maps, W i is the convolutional weight of each first convolutional channel, and b i is the convolutional bias of each first convolutional channel.
[0065] Step S33: Construct a pooling layer and a fully connected layer to perform pooling and fully connected processing on the N first adaptive feature maps and the M second adaptive feature maps, generating an output feature map. Specifically:
[0066] Y = FC(P(Z, H))
[0067] Y is the output feature map, FC is the fully connected processing, P is the pooling processing, and H is the M second adaptive feature maps.
[0068] In this application, first, different convolutional weights and convolutional biases of N first convolutional channels are used to perform multi-scale feature extraction on the tumor feature map to adapt to the detailed features at different magnification factors. At the same time, M second convolutional channels are used to construct two layers of detailed feature extraction to further prevent the loss of detailed features and the distortion of detailed features at different magnification factors. Second, pooling processing is used to more easily collect detailed information across different spatial dimensions, and fully connected processing is used to integrate the extracted detailed features at each layer to combine features at different abstraction levels, ultimately improving the ability to distinguish tumor types at different magnification factors, enhancing the adaptability to different magnification factors, and improving the accuracy of tumor image classification.
[0069] Preferably, in another embodiment of this application, as Figure 3 , after step S30 and before step S50, a tumor classification method based on a convolutional neural network provided by this application further includes:
[0070] Step S40: Construct an adaptive attention module to multiply the output feature map by channel attention weights and spatial attention weights, generating an attention feature map.
[0071] Further, in step S50, a classification module is constructed to perform tumor recognition based on the output feature map, generating a tumor image classification result, including:
[0072] Construct a classification module to perform tumor recognition on the attention feature map, generating a tumor image classification result
[0073] In this application, the adaptive attention module selectively focuses on key features and ignores irrelevant features, thereby dynamically optimizing the output feature map to generate an attention feature map. The classification module performs tumor recognition on the attention feature map to generate a tumor image classification result, further improving the accuracy of tumor image classification at different magnifications.
[0074] Specifically, as Figure 4 shown, in step S40, an adaptive attention module is constructed to multiply the output feature map by a channel attention weight and a spatial attention weight to generate an attention feature map, including:
[0075] Step S41, construct a channel attention weight generation module to receive the output feature map and generate a channel attention weight.
[0076] Step S42, construct a first multiplication module to multiply the output feature map and the channel attention weight element by element to obtain an intermediate feature map.
[0077] Step S43, construct a spatial attention weight generation module to receive the intermediate feature map and generate a spatial attention weight.
[0078] Step S44, construct a second multiplication module to multiply the intermediate feature map and the spatial attention weight element by element to obtain an attention feature map.
[0079] In this application, the adaptive attention module consists of two stages: channel attention and spatial attention. Among them, the channel attention mechanism analyzes the relative importance of different feature types on each channel and adjusts their influence through the channel attention weight, assigning higher weights to the channels that capture the key information for classification. The spatial attention mechanism identifies the most useful spatial regions in the input features and generates a spatial attention weight to adjust the input features, highlighting the influential regions and suppressing the less relevant regions to emphasize the important spatial positions and suppress the less relevant regions. Therefore, this adaptive attention module can further improve the accuracy of tumor image classification at different magnifications.
[0080] Further, as Figure 5 shown, in step S41, construct a channel attention weight generation module to receive the output feature map and generate a channel attention weight, including:
[0081] Step S411, perform average pooling and max pooling on the output feature map to respectively generate an average pooling feature map and a max pooling feature map.
[0082] Step S412, perform splicing and fusion processing on the average pooling feature map and the max pooling feature map to obtain a fused pooling feature map.
[0083] Step S413, perform a first convolution process, a normalization process, a GeLU activation process, and a second convolution process on the fused pooling feature map in sequence to generate a channel feature map.
[0084] Step S414, use the Sigmoid activation function to process the channel feature map to generate channel attention weights.
[0085] In the channel attention weight generation module, the first convolution process uses a 1×1 convolution kernel to seamlessly fuse the average pooling feature map and the max pooling feature map, integrating the information of the average pooling feature map and the max pooling feature map. The GeLU activation process reduces the spatial resolution of the features and makes the output features more non-linear, thus improving the feature representation. Finally, the second convolution process uses a 1×1 convolution kernel to reduce the dimension and simplify the operation.
[0086] Further, in step S43, construct a spatial attention weight generation module that receives the intermediate feature map and generates spatial attention weights, including:
[0087] Step S431, perform a third convolution process, a normalization process, a GeLU activation process, and a fourth convolution process on the intermediate feature map in sequence to generate a first spatial feature map, where the third convolution process and the fourth convolution process use 1×1, 1×1 convolution kernels.
[0088] Step S432, perform a fifth convolution process, a normalization process, a GeLU activation process, and a sixth convolution process on the intermediate feature map in sequence to generate a second spatial feature map, where the fifth convolution process and the sixth convolution process use 3×3, 1×1 convolution kernels respectively.
[0089] Step S433, construct a third multiplication module to perform element-wise multiplication on the first spatial feature map and the second spatial feature map to generate a fused spatial feature map.
[0090] Step S434, use the Sigmoid activation function to process the fused spatial feature map to generate spatial attention weights.
[0091] In the spatial attention weight generation module, a combination of 1×1 and 3×3 convolutions is used to enhance the diversity of features and produce a richer and more comprehensive representation. In this way, the spatial attention weight generation module is more sensitive to spatial structures and relationships, highlighting influential areas and suppressing less relevant areas, and adjusting the input features to emphasize important spatial locations and suppress less relevant areas.
[0092] Preferably, in another embodiment of the present application, a tumor classification method based on a convolutional neural network provided by the present application further includes:
[0093] Step S60, constructing an image enhancement module to perform feature enhancement processing on the tumor image to be identified to obtain a tumor enhanced image;
[0094] By performing feature enhancement processing on the tumor image and obtaining a tumor enhancement image, the tumor area can be highlighted and the classification performance can be improved. Specifically, the tumor image is processed using a sharpening filter, and then the pixel value of the image is adjusted to improve the image contrast, so that the tumor area is more prominent and the tumor enhancement image is obtained.
[0095] Step S70, respectively constructing an enhanced image feature extraction module, an enhanced image magnification adaptive module, and an enhanced image classification module, performing feature extraction and multi-layer detail feature extraction on the tumor enhanced image, and performing enhanced image tumor recognition to generate an enhanced classification result of the tumor image to be recognized.
[0096] Furthermore, after constructing the enhanced image magnification adaptive module and before constructing the enhanced image classification module, it also includes constructing an enhanced image adaptive attention module to generate an enhanced image attention feature map.
[0097] Among them, the enhanced image feature extraction module, the enhanced image magnification adaptive module, the enhanced image classification module, and the enhanced image adaptive attention module have the same structure and function as the aforementioned feature extraction module, magnification adaptive module, classification module, and adaptive attention module.
[0098] Step S80, constructing a fusion module, according to the enhanced classification result of the tumor image to be identified, fusing the classification results of the tumor image to be identified, and obtaining the final classification result of the tumor image to be identified. Specifically, the final classification result of the tumor image to be identified is:
[0099] score=δ1p1+δ2p2
[0100] in, i is equal to 1 or 2, δ1 is the weight corresponding to the classification result of the tumor image to be recognized, δ2 is the weight corresponding to the enhanced classification result of the tumor image to be recognized, p1 is the classification result of the tumor image to be recognized, p2 is the enhanced classification result of the tumor image to be recognized, w1 is the classification result in the pre-training stage, w2 is the enhanced classification result in the pre-training stage, and w * is the classification calibration value in the pre-training stage.
[0101] In this embodiment, in the pre-training stage, the difference is taken between the classification result or the enhanced classification result in the pre-training stage and the classification calibration value respectively to obtain the loss value, and the Softmax function is used to normalize it to obtain the corresponding weight, capturing the complex non-linear relationship in the data so that z1 + z2 = 1; then in the recognition stage, the weights obtained by pre-training are used to fuse the classification result of the tumor image to be recognized and the enhanced classification result of the tumor image to be recognized, further improving the accuracy of tumor image classification at different magnifications.
[0102] Preferably, according to an embodiment, a program product such as a machine-readable medium is provided. The machine-readable medium may have instructions (i.e., the elements implemented in software as described above), which when executed by the machine, cause the machine to perform the various operations and functions described above in the respective embodiments of this specification in combination with Figures 1-6 the descriptions. Specifically, a system or device equipped with a readable storage medium may be provided, on which software program code for implementing the functions of any one of the above embodiments is stored, and the computer or processor of the system or device is caused to read and execute the instructions stored in the readable storage medium.
[0103] In this case, the program code read from the readable medium itself can implement the functions of any one of the above embodiments, so the machine-readable code and the readable storage medium storing the machine-readable code constitute a part of this specification.
[0104] Examples of the readable storage medium include floppy disks, hard disks, magneto-optical disks, optical disks (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD-RW), magnetic tapes, non-volatile memory cards, and ROMs. Optionally, the program code can be downloaded from a server computer or the cloud via a communication network.
[0105] Those skilled in the art should understand that the various embodiments disclosed above can be variously deformed and modified without departing from the essence of the invention. Therefore, the protection scope of this specification should be defined by the appended claims.
[0106] It should be noted that not all steps and units in the above-mentioned processes and system structure diagrams are necessary, and some steps or units can be ignored according to actual needs. The execution order of each step is not fixed and can be determined as required. The device structures described in the above embodiments can be physical structures or logical structures, that is, some units may be implemented by the same physical entity, or some units may be implemented separately by multiple physical entities, or some components in multiple independent devices may be jointly implemented.
[0107] In the above embodiments, the hardware units or modules can be implemented mechanically or electrically. For example, a hardware unit, module or processor can include permanent dedicated circuits or logic (such as a dedicated processor, FPGA or ASIC) to perform corresponding operations. The hardware unit or processor can also include programmable logic or circuits (such as a general-purpose processor or other programmable processors), which can be temporarily set by software to perform corresponding operations. The specific implementation method (mechanical method, or dedicated permanent circuit, or temporarily set circuit) can be determined based on cost and time considerations.
[0108] The specific embodiments described above in conjunction with the accompanying drawings describe exemplary embodiments, but do not represent all embodiments that can be implemented or fall within the scope of the claims. The term "exemplary" used throughout this specification means "serving as an example, instance, or illustration", and does not mean "preferred" or "advantageous" compared to other embodiments. For the purpose of providing an understanding of the described technology, the specific embodiments include specific details. However, these technologies can be implemented without these specific details. In some instances, well-known structures and devices are shown in block diagram form to avoid obscuring the concepts of the described embodiments.
[0109] The above description of the present disclosure is provided to enable any ordinary person skilled in the art to implement or use the present disclosure. Various modifications to the present disclosure are obvious to those of ordinary skill in the art, and the general principles corresponding herein can also be applied to other variations without departing from the scope of the present disclosure. Therefore, the present disclosure is not limited to the examples and designs described herein, but is consistent with the broadest scope that conforms to the principles and novel features disclosed herein.
Claims
1. A tumor classification method based on a convolutional neural network, characterized in that The method includes: Step S10, constructing a feature extraction module to extract features from the tumor image to be recognized, generating a tumor feature map; Step S30, constructing a magnification adaptive module to perform multi-level detailed feature extraction on the tumor feature map, where each level of detailed features includes multi-scale features, to generate an output feature map and enhance the adaptability to different magnifications; Step S50, constructing a classification module to perform tumor recognition based on the output feature map, generating a classification result of the tumor image to be recognized.
2. The method according to claim 1, wherein The step S30 includes: Step S31, constructing N first convolutional channels to perform multi-scale feature extraction on the tumor feature map, generating N first adaptive feature maps, where the convolutional kernel sizes in each first convolutional channel are the same, but the convolutional weights and convolutional biases are different, and N is greater than or equal to 2; Step S32, constructing M second convolutional channels to perform detailed feature extraction on the N first adaptive feature maps, generating M second adaptive feature maps, where the convolutional kernel sizes in each second convolutional channel are the same, but the convolutional weights and convolutional biases are different, and M is greater than or equal to 2; Step S33, constructing a pooling layer and a fully connected layer to perform pooling and fully connected processing on the N first adaptive feature maps and the M second adaptive feature maps, generating an output feature map.
3. The method according to claim 1, wherein After step S30 and before step S50, the method further includes: Step S40, constructing an adaptive attention module to multiply the output feature map by a channel attention weight and a spatial attention weight, generating an attention feature map.
4. The method according to claim 3, wherein The S40 includes: Step S41, constructing a channel attention weight generation module to receive the output feature map and generate a channel attention weight; Step S42, constructing a first multiplication module to multiply the output feature map and the channel attention weight element by element to obtain an intermediate feature map; Step S43, constructing a spatial attention weight generation module to receive the intermediate feature map and generate a spatial attention weight; Step S44, constructing a second multiplication module to multiply the intermediate feature map and the spatial attention weight element by element to obtain an attention feature map.
5. The method according to claim 4, characterized in that, The step S41 includes: Step S411, performing average pooling and max pooling processing on the output feature map, respectively generating an average pooling feature map and a max pooling feature map; Step S412, performing splicing and fusion processing on the average pooling feature map and the max pooling feature map to obtain a fused pooling feature map; Step S413, performing first convolutional processing, normalization processing, GeLU activation processing, and second convolutional processing on the fused pooling feature map in sequence to generate a channel feature map; Step S414, using a Sigmoid activation function to process the channel feature map to generate a channel attention weight.
6. The method according to claim 5, wherein The step S43 includes: Step S431, performing third convolutional processing, normalization processing, GeLU activation processing, and fourth convolutional processing on the intermediate feature map in sequence to generate a first spatial feature map, where the third convolutional processing and the fourth convolutional processing use convolutional kernels of sizes 1×1 and 1×1; Step S432: Perform fifth convolution processing, normalization processing, GeLU activation processing, and sixth convolution processing on the intermediate feature map in sequence to generate a second spatial feature map, where the fifth convolution processing and the sixth convolution processing use convolution kernels of sizes 3×3 and 1×1 respectively; Step S433: Construct a third multiplication module to perform element-wise multiplication on the first spatial feature map and the second spatial feature map to generate a fused spatial feature map; Step S434: Process the fused spatial feature map using the Sigmoid activation function to generate spatial attention weights.
7. The method according to any one of claims 1-6, characterized in that The method further includes: Step S60: Construct an image enhancement module to perform feature enhancement processing on the tumor image to be recognized to obtain an enhanced tumor image; Step S70: Respectively construct an enhanced image feature extraction module, an enhanced image magnification adaption module, an enhanced image adaptive attention module, and an enhanced image classification module to perform feature extraction and multi-level detailed feature extraction on the enhanced tumor image, and perform enhanced image tumor recognition to generate an enhanced classification result of the tumor image to be recognized; Step S80: Construct a fusion module to fuse the classification result of the tumor image to be recognized described above according to the enhanced classification result of the tumor image to be recognized to obtain the final classification result of the tumor image to be recognized.
8. The method according to claim 7, characterized in that The enhanced image feature extraction module, the enhanced image magnification adaption module, the enhanced image classification module, and the enhanced image adaptive attention module have the same structure and functions as the feature extraction module, the magnification adaption module, the classification module, and the adaptive attention module.
9. The method according to claim 8, wherein The final classification result of the tumor image to be recognized is: score = δ1p1 + δ2p2 where δ1 + δ2 = 1, i is equal to 1 or 2, δ1 is the weight corresponding to the classification result of the tumor image to be recognized, δ2 is the weight corresponding to the enhanced classification result of the tumor image to be recognized, p1 is the classification result of the tumor image to be recognized, p2 is the enhanced classification result of the tumor image to be recognized, w1 is the classification result in the pre-training stage, w2 is the enhanced classification result in the pre-training stage, and w * is the classification calibration value in the pre-training stage.
Citation Information
Patent Citations
Super-pixel segmentation method based on deep learning
CN112419325A
Pulse condition recognition method based on double-channel convolutional neural network fusion
CN112487945A
Attention-based CNN neural network training method
CN112949841A
Flower image classification algorithm based on feature enhancement and decision fusion
CN115099294A
Low-illumination image enhancement method based on multilevel feature extraction fusion
CN115393225A