Lightweight microscope pathology image magnification recognition method
By constructing a shallow two-stream neural network and combining spatial and frequency domain features, the problem of large model parameters and high computational complexity in magnification recognition of microscopic pathological images is solved, realizing lightweight magnification recognition that is suitable for various pathological image analysis scenarios.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZHEJIANG UNIV
- Filing Date
- 2026-04-30
- Publication Date
- 2026-06-02
Smart Images

Figure CN122135361A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of medical image processing, and in particular relates to a lightweight method for identifying the magnification of microscopic pathological images. Background Technology
[0002] Pathology is the "gold standard" for disease diagnosis. With the development of digital pathology, microscope cameras and whole-slide image (WSI) scanning technology are widely used in clinical diagnosis, medical teaching, and scientific research analysis. In the process of pathological diagnosis, pathologists typically need to observe tissue samples at different magnifications. Low magnification is used to analyze the overall structure and spatial distribution of the tissue, while high magnification is used to observe detailed features such as cell morphology and nuclear atypia. Therefore, the magnification information of microscopic pathological images is of great significance in pathological analysis and computer-aided diagnosis.
[0003] However, in practical applications, the magnification information of microscopic pathological images is often missing or unclear. On the one hand, many snapshots of pathological images used for teaching, research, or publication do not retain complete magnification metadata during acquisition or storage, making it impossible to accurately determine the corresponding objective magnification. Furthermore, configuring the microscope with the appropriate objective turret to identify the objective magnification and transmit it to the software requires purchasing new equipment, which is uneconomical. This lack of magnification information directly affects image-scale-based quantitative analysis tasks, such as cell counting, tissue region segmentation, and morphological feature calculation, thus reducing the reliability of the analysis results. On the other hand, during pathological diagnosis, the pathologist's switching of magnification itself contains important diagnostic decision information; the lack of magnification information also limits the modeling and analysis of the pathological diagnostic process.
[0004] To address the aforementioned issues, recent studies have attempted to automatically identify the magnification of microscopic pathological images using deep learning-based methods. Existing methods typically rely on deep convolutional neural networks such as ResNet and DenseNet as the backbone for feature extraction, achieving magnification classification by learning spatial structure and texture features in the image. However, these methods generally suffer from large model parameter sizes and high computational complexity, which not only increases the computational overhead of model training and inference but also limits their widespread application in practical scenarios. Summary of the Invention
[0005] This invention addresses the problems of large model parameters and high computational complexity in existing methods for identifying magnification of microscopic pathological images. It provides a lightweight method for identifying magnification of microscopic pathological images by constructing a shallow two-stream neural network structure, which effectively reduces the model size and computational complexity while ensuring the accuracy of magnification identification.
[0006] To achieve the above objectives, the present invention adopts the following technical solution:
[0007] A lightweight method for identifying the magnification of microscopic pathological images includes the following steps:
[0008] Acquire pathological images of the microscope to be identified, and preprocess the pathological images;
[0009] The preprocessed pathological image is converted into a grayscale image and subjected to frequency domain transformation to generate a logarithmic amplitude spectrum image.
[0010] A shallow two-stream neural network model containing a spatial branch and a frequency branch is constructed. The spatial branch uses a shallow convolutional neural network to extract spatial semantic features from the microscopic pathological image, and the frequency branch uses a shallow convolutional neural network to extract frequency distribution features from the logarithmic amplitude spectrum image.
[0011] The weight coefficients of spatial domain features and frequency domain features are calculated using a gated attention mechanism module. Based on the weight coefficients, the spatial semantic feature vector and the frequency domain feature vector are weighted and fused to generate a multimodal scaling feature representation.
[0012] The multimodal magnification feature representation is input into the classifier, and the magnification category corresponding to the microscopic pathological image is output.
[0013] Further, the pathological images are preprocessed as follows:
[0014] The pathological image was scaled to a preset size using bilinear interpolation.
[0015] The pixel values of the pathological image are mapped to the [0,1] interval, and each color channel is normalized based on the preset channel mean and standard deviation.
[0016] Furthermore, the method for converting the preprocessed pathological image into a grayscale image and performing frequency domain transformation to generate a logarithmic amplitude spectrum image is as follows:
[0017] The color pathological image is converted into a single-channel grayscale image according to a preset weight. A two-dimensional fast Fourier transform is performed on the grayscale image to transform it from the spatial domain to the frequency domain. The obtained spectrum result is frequency shifted to concentrate the low-frequency components in the center of the spectrum. The spectrum amplitude is logarithmically transformed to compress the dynamic range. After normalizing the transformation result, the logarithmic amplitude spectrum image is generated.
[0018] Furthermore, the shallow convolutional neural network used in the spatial domain branch consists of several cascaded convolutional modules to extract the spatial semantic features of the pathological image step by step; each convolutional module sequentially includes a two-dimensional convolutional layer, a batch normalization layer, a nonlinear activation layer, and a max pooling layer; the input of the spatial domain branch is the pathological image, and the output is a spatial semantic feature vector.
[0019] Furthermore, the spatial semantic features include the shape, scale, boundary, and tissue arrangement structure information of the cell nucleus.
[0020] Furthermore, the shallow convolutional neural network used in the frequency domain branch consists of several cascaded convolutional modules and flattening layers, used to extract the frequency distribution features of the pathological image under different magnification conditions; each convolutional module sequentially includes a two-dimensional convolutional layer, a batch normalization layer, a nonlinear activation layer and a max pooling layer, and the input of the frequency domain branch is the logarithmic amplitude spectrum image, and the output is a frequency domain feature vector.
[0021] Furthermore, the frequency distribution features include texture density, energy distribution, and periodic variation information.
[0022] Furthermore, the gated attention mechanism module projects the spatial semantic feature vector and the frequency domain feature vector into the same feature space through a linear transformation layer to obtain the corresponding intermediate feature representation; the concatenated intermediate feature representation is input into a gated network composed of fully connected layers and nonlinear activation functions to generate normalized weight coefficients; the weight coefficients include attention weights corresponding to the spatial domain features. Attention weights for frequency domain features Based on the weighting coefficients, the spatial semantic feature vector V s and the frequency domain feature vector V f We perform a weighted summation to obtain the fused multimodal scaling feature representation V:
[0023] .
[0024] Furthermore, the classifier includes at least one fully connected layer and an output layer;
[0025] The fully connected layer maps the multimodal magnification features to prediction results for different magnification categories;
[0026] The output layer outputs the confidence score corresponding to each magnification category, and determines the magnification category of the pathological image according to the maximum confidence principle.
[0027] Furthermore, the shallow two-stream neural network model is trained using the Adam optimization method, and the cross-entropy between the magnification label and the model prediction result is used as the loss function. The loss function is calculated as follows:
[0028] ,
[0029] in, Indicates the number of samples. Indicates the first One sample, Indicates the first The true magnification label of each sample The model represents the first The prediction confidence of the magnification category for each sample.
[0030] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0031] This invention significantly reduces the model parameter size and computational complexity by rationally designing a shallow dual-stream network structure and introducing a frequency domain feature modeling method, while ensuring the accuracy of magnification recognition of microscopic pathological images, resulting in a highly lightweight model.
[0032] This invention extends microscopic pathological images from the spatial domain to the frequency domain for joint modeling, resulting in a highly efficient feature modeling approach. The model utilizes the global energy distribution differences exhibited by magnification variations in the frequency domain, enabling the extraction of discriminative magnification features through a shallow network structure, thus avoiding reliance on deep network structures.
[0033] This invention's method does not rely on the original magnification metadata of microscopic pathological images. It can directly and automatically identify pathological images with missing or unclear magnification information, providing a reliable magnification information foundation for subsequent quantitative analysis of pathological images, diagnostic behavior modeling, and computer-aided diagnostic tasks. This independent, lightweight model analysis is applicable to various pathological image analysis scenarios. Attached Figure Description
[0034] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0035] Figure 1 This is a flowchart of a lightweight method for identifying the magnification of microscopic pathological images according to this application;
[0036] Figure 2This is a schematic diagram of the shallow two-stream neural network model of a lightweight microscope pathological image magnification recognition method according to this application;
[0037] Figure 3 This is a schematic diagram of the microscopic pathological images and their corresponding frequency domain characteristics at different magnifications in practical applications of this application. Detailed Implementation
[0038] Embodiments of the present invention are described in detail below. Examples of these embodiments are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain the present invention, and should not be construed as limiting the present invention.
[0039] like Figures 1 to 3 The image shown is a lightweight method for identifying the magnification of microscopic pathological images according to this application, comprising the following steps:
[0040] S1) Obtain the pathological image of the microscope to be identified, and preprocess the pathological image;
[0041] S2) Convert the preprocessed pathological image into a grayscale image and perform frequency domain transformation to generate a logarithmic amplitude spectrum image;
[0042] S3) Construct a shallow two-stream neural network model that includes a spatial branch and a frequency branch. The spatial branch uses a shallow convolutional neural network to extract spatial semantic features from the microscopic pathological image, and the frequency branch uses a shallow convolutional neural network to extract frequency distribution features from the logarithmic amplitude spectrum image.
[0043] S4) Calculate the weight coefficients of spatial domain features and frequency domain features using the gated attention mechanism module, and perform weighted fusion of spatial semantic feature vector and frequency domain feature vector according to the weight coefficients to generate a multimodal scaling feature representation;
[0044] S5) Input the multimodal magnification feature representation into the classifier and output the magnification category corresponding to the microscopic pathological image.
[0045] In step S1) above, a microscopic pathological image is acquired in real time from the microscope imaging system. The pathological image is an RGB color image. To meet the requirement of consistent input size for the subsequent neural network, the pathological image of the microscope to be identified is first acquired from the microscope imaging system, and the pathological image is preprocessed. The preprocessing of the pathological image includes scaling the acquired pathological image and normalizing the pathological image. Specifically, the pathological image is scaled to a preset size using bilinear interpolation; in this scheme, it is scaled to 224×224 pixels. After image scaling, this scheme first linearly maps the image pixel values to... The interval is then standardized based on the preset channel mean and standard deviation, where the mean is... The standard deviation is By employing bilinear interpolation for size scaling and normalizing based on preset channel mean and standard deviation, the numerical distribution differences between different pathological images can be reduced, which is beneficial to the stability and convergence of the model training process, while also meeting the requirement of consistent input size for subsequent neural networks.
[0046] In step S2) above, the method of converting the preprocessed pathological image into a grayscale image and performing frequency domain transformation to generate a logarithmic amplitude spectrum image is as follows: the RGB color pathological image is converted into a single-channel grayscale image according to preset weights, and a two-dimensional fast Fourier transform is performed on the grayscale image to map the image from the spatial domain to the frequency domain. To concentrate the low-frequency components at the center of the spectrum, the Fourier transform result is frequency-shifted. Since the spectral amplitude range is large, to compress the dynamic range and enhance feature separability, a Log(x+1) logarithmic transform is performed on the spectral amplitude, and the transform result is normalized to generate a logarithmic amplitude spectrum image that can be directly input into a convolutional neural network. In this way, by converting the pathological image from the spatial domain to the frequency domain and performing frequency shifting, the low-frequency components are concentrated at the center of the spectrum, which facilitates subsequent feature extraction. At the same time, by performing a logarithmic transform on the spectral amplitude to compress the dynamic range, feature separability is enhanced, and the global differences in frequency distribution at different magnifications are highlighted, laying the foundation for shallow convolutional neural networks to extract discriminative magnification features.
[0047] In step S3) above: the shallow convolutional neural network used in the spatial domain branch consists of several levels of cascaded convolutional modules and flattening layers, used to extract the spatial semantic features of the pathological image step by step; each convolutional module sequentially includes a two-dimensional convolutional layer, a batch normalization layer, a nonlinear activation layer, and a max pooling layer; the input of the spatial domain branch is the pathological image, and the output is a spatial semantic feature vector. The shallow convolutional neural network used in the frequency domain branch consists of several levels of convolutional modules and flattening layers, used to extract the frequency distribution features of the pathological image under different magnification conditions; each convolutional module sequentially includes a two-dimensional convolutional layer, a batch normalization layer, a nonlinear activation layer, and a max pooling layer; the input of the frequency domain branch is the logarithmic amplitude spectrum image, and the output is a frequency domain feature vector.
[0048] like Figure 2 As shown: the spatial branch takes the preprocessed RGB pathological image as input, and outputs a spatial semantic feature vector after passing through multiple convolutional modules and flattening layers; the frequency branch takes the logarithmic amplitude spectrum image as input, and outputs a frequency domain feature vector after passing through multiple convolutional modules and flattening layers; the two feature vectors are adaptively weighted and fused by a gated attention mechanism module, and then fed into a classifier to obtain the magnification recognition result. In other words, a lightweight dual-stream feature extraction network is constructed, including spatial and frequency domain branches:
[0049] The spatial domain branch employs a shallow convolutional neural network as its backbone, consisting of several cascaded convolutional modules and flattening layers. Each convolutional module sequentially includes a 2D convolutional layer, a batch normalization layer, a nonlinear activation layer, and a max pooling layer, used to extract spatial semantic features from the microscopic pathological image step by step. The input to the spatial domain branch is an RGB pathological image with a size of 3×224×224. After multi-level feature extraction and pooling, the output is a data structure of length [missing information]. Spatial semantic feature vector This spatial domain branch is primarily used to characterize spatial semantic information such as the shape, scale, boundary, and tissue arrangement of cell nuclei. These spatial semantic features reflect key visual information such as tissue structure, cell morphology, and spatial arrangement in microscopic pathological images, and are important criteria for distinguishing pathological images at different magnifications. By extracting spatial semantic features such as the shape, scale, boundary, and tissue arrangement of cell nuclei, the differences in spatial visual information of pathological images at different magnifications are fully utilized, providing important spatial domain feature basis for magnification discrimination and improving the model's ability to perceive changes in tissue morphology.
[0050] The frequency domain branch employs a shallow convolutional neural network as its backbone, consisting of several cascaded convolutional modules and flattening layers. Each convolutional module sequentially includes a two-dimensional convolutional layer, a batch normalization layer, a nonlinear activation layer, and a max-pooling layer, with its input being a logarithmic amplitude spectrum image of size 1×224×224. Through the step-by-step extraction and aggregation of spectral texture features, a length of [missing information] is output. frequency domain feature vector This frequency domain branch is primarily used to characterize the frequency domain semantic features of images, such as texture density, energy distribution, and periodic variations, at different magnification levels. These frequency distribution features reflect the global differences in texture scale of pathological images under different magnification conditions and are important criteria for distinguishing different magnification levels. In other words, by extracting frequency distribution features such as texture density, energy distribution, and periodic variations, the model fully utilizes the global energy distribution differences presented by magnification changes in the frequency domain. This allows shallow convolutional networks to obtain discriminative magnification discrimination features, avoiding dependence on deep neural network structures and improving the model's stability under different tissue structures and texture conditions.
[0051] By employing a shallow convolutional neural network structure composed of several levels of cascaded convolutional modules, spatial semantic features of microscopic pathological images are extracted level by level. This effectively controls the network depth while ensuring feature extraction capabilities, reducing the number of model parameters and computational complexity, and achieving a lightweight design for the spatial branch. Simultaneously, by using a shallow convolutional neural network structure symmetrical to the spatial branch to process logarithmic amplitude spectrum images, lightweight extraction of frequency domain features is achieved. This maintains frequency domain feature extraction capabilities while controlling the network size, ensuring a balance in complexity between the frequency and spatial branches, which is beneficial for the overall lightweight design of the model.
[0052] In step S4) above, the gated attention mechanism module projects the spatial semantic feature vector and the frequency domain feature vector into the same feature space through a linear transformation layer to obtain the corresponding intermediate feature representation. Subsequently, the intermediate feature representations are concatenated, and the concatenated intermediate feature representation is input into a gated network composed of fully connected layers and nonlinear activation functions to generate normalized weight coefficients. The weight coefficients include attention weights corresponding to the spatial domain features. Attention weights for frequency domain features The spatial semantic feature vector V is weighted according to the weight coefficients. s and the frequency domain feature vector V f We perform a weighted summation to obtain the fused multimodal scaling feature representation V:
[0053] .
[0054] This scheme achieves adaptive weighted fusion of spatial and frequency domain features through a gated attention mechanism. This enables the model to dynamically adjust the contribution of different modal features in the magnification discrimination process based on the differences in tissue morphology and texture features of the input pathological image. This achieves dynamic adjustment of the contribution of spatial and frequency domain features, thereby improving the robustness and accuracy of the model in magnification recognition under different tissue structures and texture scales.
[0055] In step S5 above, the classifier includes at least one fully connected layer and an output layer. The fully connected layer maps the multimodal magnification features to prediction results for different magnification categories. The output layer outputs the confidence score corresponding to each magnification category and determines the magnification category of the pathological image based on the maximum confidence principle. Thus, by employing a classifier structure consisting of a fully connected layer and an output layer, the fused multimodal magnification features are effectively mapped to magnification category prediction results, and the final magnification category is determined based on the maximum confidence principle. This achieves an effective conversion from feature representation to category decision, ensuring the accuracy and interpretability of magnification recognition.
[0056] Furthermore, the shallow two-stream neural network model is trained using the Adam optimization method. Specifically, the Adam optimization method is used to train the magnification recognition network for microscopic pathological images, and the cross-entropy between the magnification label and the model's prediction results is used as the loss function. The formula for calculating the loss function is as follows:
[0057] ,
[0058] in, Indicates the number of samples. Indicates the first One sample, Indicates the first The true magnification label of each sample The model represents the first The prediction confidence of the magnification category for each sample.
[0059] This scheme employs the Adam optimization method for network training and uses cross-entropy as the loss function to effectively optimize the shallow two-stream neural network model. This enables the model to accurately learn the mapping relationship between magnification features and category labels, ensuring the stability and convergence of model training and providing optimization assurance for obtaining a high-precision magnification recognition model.
[0060] Through the above technical solution, the present invention can automatically extract discriminative features related to the magnification of the microscope objective lens from the input microscopic pathological image without relying on image metadata, and achieve accurate identification of the magnification of the pathological image.
[0061] This invention introduces a shallow dual-stream feature extraction structure that combines spatial and frequency domain features, effectively fusing information from both spatial structural and frequency distribution dimensions of microscopic pathological images. This allows the model to maintain high magnification recognition accuracy while significantly reducing network parameter size and computational complexity. Compared to existing mainstream ResNet-based magnification recognition methods, the number of parameters in this invention's model is reduced from approximately 23.52M to approximately 0.44M, about 1 / 53 of existing models, and the floating-point operation cost is reduced by 78.69%, demonstrating the significant advantages of this invention in terms of model size and computational efficiency.
[0062] Furthermore, since magnification changes exhibit globally consistent energy distribution differences in the frequency domain, this invention extends microscopic pathological images from the spatial domain to the frequency domain for joint modeling, resulting in a highly efficient feature modeling approach. This model utilizes the global energy distribution differences in the frequency domain exhibited by magnification changes, enabling the extraction of discriminative magnification features through a shallow network structure. This avoids dependence on deep neural network structures and improves the model's stability under different tissue structures and textures.
[0063] Meanwhile, this invention introduces a gated attention mechanism to adaptively weight and fuse spatial and frequency domain features, enabling the model to dynamically adjust the contribution of different modal features in the magnification discrimination process based on the differences in tissue morphology and texture features of the input pathological image, thereby enhancing the robustness and generalization ability of the model in complex pathological scenarios.
[0064] like Figure 3 As shown, microscopic pathological images at different magnifications and their corresponding frequency domain characteristics are illustrated, wherein: Figure 3 (a) is a pathological image at a lower magnification, showing dense cells and complex texture; Figure 3 (b) in the middle is Figure 3 The logarithmic amplitude spectrum of (a) shows dispersed high-frequency energy and a wide distribution of bright spots; Figure 3 (c) in the image shows a pathological image at a higher magnification with a smooth structure and few details; Figure 3 (d) in the middle is Figure 3 The (c) logarithmic amplitude spectrum shows energy concentrated in the central low-frequency region. (Compare) Figure 3 (b) and Figure 3 As can be seen in (d), the spectral energy distribution is more dispersed at low magnification, while the energy is more concentrated in the low-frequency region at high magnification, indicating that different magnifications have distinguishable global distribution differences in the frequency domain.
[0065] Because the magnification recognition model constructed in this invention has a simple structure, small parameter scale, and low computational overhead, it can complete the task of magnification recognition of microscopic pathological images without relying on high-performance computing resources. It can directly and automatically identify pathological images with missing or unclear magnification information, and is applicable to various microscopic imaging systems and digital pathology application scenarios, providing a reliable basis for subsequent pathological image analysis and processing.
[0066] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the above embodiments do not limit the present invention in any way, and all technical solutions obtained by equivalent substitution or equivalent transformation fall within the protection scope of the present invention.
Claims
1. A lightweight method for identifying the magnification of microscopic pathological images, characterized in that, Includes the following steps: Acquire pathological images of the microscope to be identified, and preprocess the pathological images; The preprocessed pathological image is converted into a grayscale image and subjected to frequency domain transformation to generate a logarithmic amplitude spectrum image. A shallow two-stream neural network model containing a spatial branch and a frequency branch is constructed. The spatial branch uses a shallow convolutional neural network to extract spatial semantic features from the microscopic pathological image, and the frequency branch uses a shallow convolutional neural network to extract frequency distribution features from the logarithmic amplitude spectrum image. The weight coefficients of spatial domain features and frequency domain features are calculated using a gated attention mechanism module. Based on the weight coefficients, the spatial semantic feature vector and the frequency domain feature vector are weighted and fused to generate a multimodal scaling feature representation. The multimodal magnification feature representation is input into the classifier, and the magnification category corresponding to the microscopic pathological image is output.
2. The lightweight method for identifying the magnification of microscopic pathological images according to claim 1, characterized in that, The pathological images are preprocessed as follows: The pathological image was scaled to a preset size using bilinear interpolation. The pixel values of the pathological image are mapped to the [0,1] interval, and each color channel is normalized based on the preset channel mean and standard deviation.
3. The lightweight method for identifying the magnification of microscopic pathological images according to claim 1, characterized in that, The method for converting the preprocessed pathological image into a grayscale image and performing frequency domain transformation to generate a logarithmic amplitude spectrum image is as follows: The color pathological image is converted into a single-channel grayscale image according to a preset weight. A two-dimensional fast Fourier transform is performed on the grayscale image to transform it from the spatial domain to the frequency domain. The obtained spectrum result is frequency shifted to concentrate the low-frequency components in the center of the spectrum. The spectrum amplitude is logarithmically transformed to compress the dynamic range. After normalizing the transformation result, the logarithmic amplitude spectrum image is generated.
4. The lightweight method for identifying the magnification of microscopic pathological images according to claim 1, characterized in that, The shallow convolutional neural network used in the spatial domain branch consists of several cascaded convolutional modules and flattening layers to extract the spatial semantic features of the pathological image step by step. Each convolutional module includes a two-dimensional convolutional layer, a batch normalization layer, a nonlinear activation layer, and a max pooling layer. The input of the spatial domain branch is the pathological image, and the output is a spatial semantic feature vector.
5. The lightweight method for identifying the magnification of microscopic pathological images according to claim 4, characterized in that, The spatial semantic features include the shape, size, and boundary of the cell nucleus, as well as information on the tissue arrangement structure.
6. The lightweight method for identifying the magnification of microscopic pathological images according to claim 1, characterized in that, The shallow convolutional neural network used in the frequency domain branch consists of several cascaded convolutional modules and flattening layers, used to extract the frequency distribution features of the pathological image under different magnification conditions; each convolutional module includes a two-dimensional convolutional layer, a batch normalization layer, a nonlinear activation layer and a max pooling layer in sequence, and the input of the frequency domain branch is the logarithmic amplitude spectrum image, and the output is a frequency domain feature vector.
7. The lightweight method for identifying the magnification of microscopic pathological images according to claim 6, characterized in that, The frequency distribution features include texture density, energy distribution, and periodic variation information.
8. The lightweight method for identifying the magnification of microscopic pathological images according to claim 1, characterized in that, The gated attention mechanism module projects the spatial semantic feature vector and the frequency domain feature vector to the same feature space through a linear transformation layer to obtain the corresponding intermediate feature representation; The concatenated intermediate feature representations are input into a gated network consisting of fully connected layers and nonlinear activation functions to generate normalized weight coefficients; the weight coefficients include attention weights corresponding to spatial features. Attention weights for frequency domain features Based on the weighting coefficients, the spatial semantic feature vector V s and the frequency domain feature vector V f We perform a weighted summation to obtain the fused multimodal scaling feature representation V: 。 9. The lightweight method for identifying the magnification of microscopic pathological images according to claim 1, characterized in that, The classifier includes at least one fully connected layer and an output layer; The fully connected layer maps the multimodal magnification features to prediction results for different magnification categories; The output layer outputs the confidence score corresponding to each magnification category, and determines the magnification category of the pathological image according to the maximum confidence principle.
10. The lightweight method for identifying the magnification of microscopic pathological images according to claim 1, characterized in that, The shallow two-stream neural network model is trained using the Adam optimization method, and the cross-entropy between the magnification label and the model prediction result is used as the loss function. The formula for calculating the loss function is as follows: , in, Indicates the number of samples. Indicates the first One sample, Indicates the first The true magnification label of each sample The model represents the first The prediction confidence of the magnification category for each sample.