Lung feature classification system based on lightweight neural network model and mobile device

By introducing lightweight neural network model and attention mechanism into the lung feature classification system, the problems of high computing requirements and low feature recognition efficiency in lung detection are solved, and efficient lung feature classification and real-time diagnosis are achieved in resource-constrained environments.

CN120047712APending Publication Date: 2025-05-27Wenling Medical Big Data and Artificial Intelligence Research Institute
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411886810.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-19
Publication Date
2025-05-27

AI Technical Summary

Technical Problem

Traditional CNN models face high computing needs in lung detection, huge model size, and inefficiency in identifying the most relevant features in complex medical images, making it difficult to achieve real-time deployment and efficient diagnosis in clinical settings.

Method used

A lung feature classification system based on lightweight neural network model is proposed, including feature extraction layer, attention layer and feature classification layer. The system optimizes feature extraction and classification through channel and spatial attention mechanisms, reduces computational complexity, and enables efficient operation in resource-constrained environments.

Benefits of technology

On the premise of ensuring the accuracy of lung feature classification, the calculation cost is significantly reduced, allowing the system to operate efficiently on devices with limited processing capabilities, real-time diagnosis, and improving the accessibility of fast and reliable results in clinical applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120047712A_ABST
    Figure CN120047712A_ABST
Patent Text Reader

Abstract

The lung feature classification system based on the lightweight neural network model comprises an image acquisition module, a model construction module and a classification module. The model construction module is used for constructing a lightweight neural network model for classifying lung medical image features. The lightweight neural network model comprises a feature extraction layer, an attention layer and a feature classification layer; the feature extraction layer comprises a plurality of convolution modules which are connected in sequence and is used for performing feature extraction on the lung medical image data; the attention layer adjusts weights between channels of the features output by the feature extraction layer through a channel attention mechanism to form a feature map, and adjusts weights between feature image pixels through a space attention mechanism to form feature vectors; the feature classification layer classifies the lung features by calculating the classification probability of feature vectors. The method has the advantages that on the premise that the lung feature classification precision is guaranteed, the calculation requirement is reduced, and the method is suitable for real-time lung detection in various clinical scenes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical fields of image processing and computer vision, and particularly to a lung feature classification system and a mobile device based on a lightweight neural network model. Background Art

[0002] The rapid progress of deep learning in the medical field has established the convolutional neural network (CNN) as a leading tool for automated medical image analysis, especially in complex tasks such as lung detection. With its ability to automatically learn and accurately extract hierarchical features of images, the CNN has shone in image classification tasks. In the field of medical imaging, the CNN can directly extract knowledge from massive data without cumbersome manual feature extraction, thereby improving the accuracy of diagnosis. This advantage has led to its widespread application.

[0003] Diverse CNN architectures such as VGG, ResNet, and Inception have demonstrated extraordinary strength in the field of medical image analysis, especially in the detection and classification of diseases such as the lungs. These models are usually pre-trained on large-scale datasets such as ImageNet to accumulate general features, and then fine-tuned for specific medical tasks to further improve the classification accuracy with the help of transfer learning. However, despite the remarkable achievements of these traditional CNN models in improving classification performance, they still face a series of severe challenges in medical practice, especially in lung detection based on computed tomography (CT) images.

[0004] High computational intensity is a major pain point of traditional CNN models. Models such as VGG and ResNet are large in size and have numerous parameters, so they require a huge amount of memory and computing resources to support. This results in high computational costs and an extreme dependence on powerful processing capabilities, making it difficult to deploy these models in real time in a clinical environment. For resource-constrained environments such as mobile devices, edge computing platforms, and small medical clinics, this problem is particularly intractable because the processing capabilities and memory resources in these places are often in short supply. Therefore, although these models perform well in classification accuracy, due to their lack of flexibility and high resource consumption characteristics, they are difficult to be competent for those diagnostic tasks that require quick responses, and these tasks are crucial for the timely treatment of patients.

[0005] In addition, traditional CNNs have obvious deficiencies in dynamically capturing the most critical features in images. In the field of medical imaging, especially in CT scans, the features closely related to diagnosis are often scattered in different corners of the image, and their importance may change with the development of the disease. However, traditional CNNs are difficult to explicitly prioritize or emphasize these key regions, resulting in low processing efficiency. Because the model may waste valuable computing resources on processing unimportant parts of the image, which not only slows down the processing speed but may also reduce the accuracy of the results.

[0006] Although CNNs have demonstrated powerful capabilities in feature extraction, their lack of interpretability and neglect of key regions may undermine their effectiveness in clinical settings. In lung detection, understanding where the model focuses in the image (such as potential tumor regions) is crucial for validating the results and revealing the logic behind classification decisions. However, traditional CNNs often lack sufficient attention to key regions in CT images, making these models seem like "black box" systems, thus reducing their credibility and practicality in high-risk clinical environments.

[0007] Furthermore, the bloated and complex hierarchical structures of traditional CNN architectures, along with the large number of parameters, impose extremely high requirements on memory bandwidth. This poses an additional challenge in real-time application scenarios. For example, in a clinical setting, real-time processing of CT scans requires rapid calculations and extremely low latency. However, the large size of pre-trained models makes it difficult for them to perform well in such situations. This may lead to delays in diagnosis, which in turn may affect the formulation and execution of time-sensitive treatment decisions.

[0008] In summary, although existing deep learning models have achieved remarkable results in terms of accuracy, their high computational costs, large sizes, and deficiencies in capturing key features still limit their widespread application in real-time clinical diagnosis. Summary of the Invention

[0009] In view of the computational challenges and inherent limitations faced by existing Convolutional Neural Networks (CNNs) in lung detection, although traditional CNN models have demonstrated excellent performance in the field of medical image analysis, especially in lung feature classification tasks, their high computational requirements, large model size, and inefficiency in identifying the most relevant features in complex medical images (such as CT scans) have severely hindered their widespread application in actual clinical settings. To overcome these problems, the present invention proposes a lung feature classification system and a mobile device based on a lightweight neural network model, which can reduce computational requirements while ensuring the accuracy of lung feature classification, making it applicable to real-time lung detection in various clinical scenarios, from large hospitals to small medical facilities. It provides a scalable, efficient, and accurate tool for early detection and classification of lung cancer, thus contributing to better clinical decision-making and improving the treatment outcomes of patients.

[0010] The lung feature classification system based on a lightweight neural network model disclosed in the present invention at least includes:

[0011] An image acquisition module, configured to acquire lung medical image data, perform preprocessing, and construct a labeled data set;

[0012] A model construction module, configured to construct a lightweight neural network model for classifying lung medical image features, and train the lightweight neural network model based on the data set;

[0013] The lightweight neural network model at least includes:

[0014] A feature extraction layer, which includes several sequentially connected convolutional modules for extracting features from the lung medical image data;

[0015] An attention layer, which adjusts the weights between channels of the features output by the feature extraction layer through a channel attention mechanism to form a feature map, and adjusts the weights between pixels of the feature image through a spatial attention mechanism to form a feature vector;

[0016] A feature classification layer, which classifies lung features by calculating the classification probability of the feature vector;

[0017] A classification module, configured to classify the features of the input lung medical image based on the trained lightweight neural network model.

[0018] In a preferred embodiment, the feature extraction layer includes three sequentially connected convolutional modules, and any one of the convolutional modules includes a 3×3 convolutional layer, a ReLU activation function layer, a batch normalization layer, and a max pooling layer connected in sequence.

[0019] A preferred embodiment, the attention layer adjusts the weights between channels of the features output by the feature extraction layer through a channel attention mechanism to form a feature map, which specifically includes the following steps:

[0020] Step S101, perform global average pooling on the features output by the feature classification layer to obtain a first feature result, and obtain a second feature result through global max pooling, and summarize the first feature result and the second feature result to form a third feature result;

[0021] Step S102, input the third feature result into a first fully connected layer, an activation function layer, and a second fully connected layer connected in sequence, and normalize it through a Sigmoid function to obtain a first weight parameter;

[0022] Step S103, perform a weighting operation on the features output by the feature classification layer by element-wise multiplication with the first weight parameter to obtain a feature map.

[0023] A preferred embodiment, the first feature result and the second feature result are summarized to obtain a third feature result in a manner of parallel summarization or weighted summarization.

[0024] A preferred embodiment, the weights between the pixels of the feature image are adjusted through a spatial attention mechanism to form a feature vector, which specifically includes the following steps:

[0025] Step S201, perform global average pooling on the feature map to obtain a fourth feature result, and obtain a fifth feature result through global max pooling, and splice the fourth feature result and the fifth feature result to form a sixth feature result;

[0026] Step S202, perform feature extraction on the sixth feature result through a 7×7 convolutional layer, and normalize it through a Sigmoid function to obtain a second weight parameter;

[0027] Step S203, after performing a weighting operation on the feature map by element-wise multiplication with the second weight parameter, reduce the dimension through a max pooling layer, and obtain a one-dimensional feature vector through a flattening operation.

[0028] A preferred embodiment, the dimensions of the fourth feature result and the fifth feature result are two-dimensional, and the fourth feature result and the fifth feature result are spliced in the channel dimension.

[0029] A preferred embodiment, the feature classification layer includes a third fully-connected layer connected to the output end of the attention layer, having 64 units and a ReLU activation function, a dropout layer connected to the output end of the third fully-connected layer, and a softmax layer connected to the output end of the dropout layer. The Dropout rate of the dropout layer is set to 0.5.

[0030] A preferred embodiment, the lightweight neural network model uses categorical cross-entropy as the loss function and is optimized using the Adam optimizer with a learning rate of 0.001. The batch size of the lightweight neural network model is set to 4, and the number of training epochs is set to 50.

[0031] A preferred embodiment, the pulmonary medical image data includes pulmonary computed tomography images. After preprocessing, the size of the pulmonary computed tomography images is set to 224×224×3. The labels of the pulmonary computed tomography images include benign, malignant, and normal.

[0032] The present invention also provides a mobile device configured with one or several combinations of the image acquisition module, model construction module, or classification module of the pulmonary feature classification system based on the lightweight neural network model as described above.

[0033] Compared with the prior art, the pulmonary feature classification system based on the lightweight neural network model disclosed by the present invention has the following beneficial effects:

[0034] (1) The present invention discloses an efficient pulmonary feature classification system based on a lightweight neural network. The system consists of three core parts: an image acquisition module, a model construction module, and a classification module. In the model construction module, a lightweight neural network model for pulmonary medical image feature classification is constructed. This model integrates a feature extraction layer, an attention layer, and a feature classification layer, jointly constituting a lightweight architecture.

[0035] The feature extraction layer, as the basis of the model, consists of a series of closely connected convolutional modules that focus on precisely extracting key features from pulmonary medical data while ensuring that the entire neural network architecture remains lightweight and efficient.

[0036] The attention layer utilizes channel attention mechanism and spatial attention mechanism to deeply optimize the features output by the feature extraction layer. The channel attention mechanism calculates the importance weights of each channel, and these weights are used to adjust the intensity of each channel in the original feature map, enabling the model to focus more on the channel features that are most crucial for lung disease diagnosis, which is of vital significance for accurately distinguishing malignant, benign, and normal tissues. The spatial attention mechanism assigns a weight reflecting its importance to each pixel or pixel block. The calculation of this weight often depends on the correlation between local features and global context information. By introducing the spatial attention mechanism, the model can more accurately locate the key regions in lung medical images, such as lesion locations, lung lobe boundaries, etc., thereby improving the accuracy and reliability of diagnosis. More importantly, the attention layer adopts a sequential attention mechanism - a strategy of channel first and then space, constructing a hierarchical and gradually refined feature processing process. This innovative method not only improves the priority of feature processing but also greatly reduces the computational complexity, achieving the goal of lightweight computing. At the same time, this mechanism can be implemented through weighting or masking, enabling the model to more accurately locate and analyze important clinical features, and improving the credibility and interpretability of CNN in CT image analysis.

[0037] The lightweight neural network model significantly reduces the computational cost while ensuring the accuracy of lung feature classification, ensuring that it can operate efficiently on devices with limited processing capabilities without sacrificing performance. This reduction in computational complexity enables the system to provide rapid diagnosis in real time, which is a key requirement for fast and reliable results in clinical applications, especially crucial for timely decision-making and treatment planning.

[0038] (2) In the lightweight neural network model constructed by the model construction module in the lung feature classification system based on the lightweight neural network disclosed in the present invention, the feature extraction layer includes three sequentially connected convolutional modules, and these modules work together to ensure that while retaining the most relevant information in lung medical images, the computational burden is minimized. Each convolutional module contains a series of convolutional layer structures to achieve efficient and accurate feature extraction.

[0039] Each convolution module uses a 3×3 convolution layer as the receiving end. This convolution layer applies a series of learnable filters to the input image in a sliding window manner to capture local features in the image. The 3×3 convolution kernel size can capture enough local information without causing excessive computation. Next, the output of the convolution layer is passed to a ReLU (Rectified Linear Unit) activation function layer. The ReLU function is a nonlinear activation function that can perform a nonlinear transformation on the output of the convolution layer, increasing the expressive power of the model while maintaining the simplicity of the calculation. With the introduction of the ReLU function, the model can learn more complex feature representations.

[0040] To further improve the stability and convergence speed of the model, each convolution module also includes a batch normalization layer. The batch normalization layer normalizes the input data so that the data maintains a stable distribution during training, which helps to speed up the convergence of the model and reduce the risk of overfitting. Each convolution module ends with a maximum pooling layer. The maximum pooling layer reduces the resolution of the feature map by selecting the maximum value in each pooling window, thereby reducing the amount of calculation and extracting more robust features. This step not only helps to reduce the computational burden of the model, but also improves the robustness of the model to small changes in the image.

[0041] Through these three sequentially connected convolution modules, the feature extraction layer can efficiently extract key features in lung medical images while keeping the entire neural network model lightweight. This design not only ensures the accuracy of the model when processing complex medical images, but also enables the model to run efficiently in a resource-constrained environment, providing strong support for real-time and accurate lung feature classification.

[0042] (3) The feature classification layer includes a third fully-connected layer connected to the output end of the attention layer, which has 64 units and a ReLU activation function, a dropout layer connected to the output end of the third fully-connected layer, and a softmax layer connected to the output end of the dropout layer. The Dropout rate of the dropout layer is set to 0.5. The third fully-connected layer is closely connected to the output end of the attention layer, has 64 neuron units, and adopts a ReLU activation function. Such a design can efficiently integrate the key features refined by the attention layer, and at the same time use the non-linear characteristics of ReLU to further enhance the expression ability of the model, ensuring the full utilization of feature information. After the third fully-connected layer, a dropout layer is introduced immediately. Its Dropout rate is carefully set to 0.5. This means that during the training process, each neuron has a 50% probability of being randomly discarded and not participating in the forward propagation and backward update. This mechanism can effectively prevent the model from overfitting to the training data, improve the generalization ability of the model, and enable the model to perform well on unseen data. At the end of the feature classification layer, a softmax layer is connected. The softmax layer can convert the original scores output by the dropout layer into a probability distribution. The probability value of each category is between 0 and 1, and the sum of the probabilities of all categories is 1. In this way, the model can accurately classify the input pulmonary medical images according to these probability values, distinguishing malignant, benign, and normal tissues. The design of the feature classification layer is both simple and efficient, without redundant layer structures or complex calculation operations. Each layer undertakes a clear task and works together to ensure that the entire neural network model can achieve high-precision pulmonary feature classification while maintaining light weight. Description of the Drawings

[0043] Figure 1 Schematic flowchart of the lightweight neural network model of the embodiment of the pulmonary feature classification system based on the lightweight neural network model of the present invention;

[0044] Figure 2 Schematic structural diagram of the lightweight neural network model of the embodiment of the pulmonary feature classification system based on the lightweight neural network model of the present invention. Detailed Embodiments

[0045] In order to make the objectives, technical solutions, and advantages of the present invention clearer and more understandable, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0046] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although some embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. On the contrary, these embodiments are provided to more thoroughly and completely understand the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not used to limit the protection scope of the present disclosure.

[0047] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the technical field to which this application belongs. The terms used in the description of this application herein are only for the purpose of describing specific embodiments and are not intended to limit this application. The term "or / and" used herein includes any and all combinations of one or more of the related listed items.

[0048] In addition, in the present invention, descriptions such as "first" and "second" are only for descriptive purposes and do not particularly refer to the order or sequence, nor are they used to limit the present invention. They are only used to distinguish components or operations described with the same technical terms and should not be construed as indicating or implying their relative importance or implicitly indicating the quantity of the indicated technical features. Thus, features defined with "first" and "second" may explicitly or implicitly include at least one of such features. In addition, the technical solutions between various embodiments can be combined with each other, but it must be based on the ability of those of ordinary skill in the art to implement. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such a combination of technical solutions does not exist and is not within the protection scope required by the present invention.

[0049] The lung feature classification system based on the lightweight neural network model of this embodiment at least includes an image acquisition module, a model construction module, and a classification module.

[0050] The image acquisition module is used to obtain lung medical image data, perform preprocessing, and construct a labeled data set. In this embodiment, the lung medical image data obtained by the image acquisition module is a lung computed tomography image. Preprocessing the lung computed tomography image mainly includes image data cleaning, normalization processing, and data augmentation. Image data cleaning, deleting damaged or irrelevant image data, can ensure that the image data is of high quality and relevant to the task, which helps the neural network model learn more effective features and sets the image data size to 224×224×3. The labels of the lung computed tomography images include benign, malignant, and normal.

[0051] The model construction module is used to construct a lightweight neural network model for classifying lung medical image features and train the lightweight neural network model based on the data set.

[0052] Lightweight neural network models, such as Figure 1 and Figure 2 shown, at least include a feature extraction layer, an attention layer, and a feature classification layer.

[0053] The feature extraction layer includes several sequentially connected convolutional modules for extracting features from pulmonary medical image data, ensuring that the entire neural network architecture remains lightweight and efficient.

[0054] In this embodiment, the feature extraction layer includes three sequentially connected convolutional modules. Any convolutional module includes a 3×3 convolutional layer, a ReLU activation function layer, a batch normalization layer, and a max pooling layer connected in sequence. Each convolutional module takes a 3×3 convolutional layer as the receiving end. This convolutional layer applies a series of learnable filters to the input image in a sliding window manner to capture local features in the image. The 3×3 convolutional kernel size can capture sufficient local information without causing excessive computational complexity. Immediately afterwards, the output of the convolutional layer is passed to a ReLU (Rectified Linear Unit) activation function layer. The ReLU function is a non-linear activation function that can perform non-linear transformation on the output of the convolutional layer, increasing the expressive power of the model while maintaining computational simplicity. By introducing the ReLU function, the model can learn more complex feature representations.

[0055] To further improve the stability and convergence speed of the model, each convolutional module also includes a batch normalization layer. The batch normalization layer normalizes the input data, making the data maintain a stable distribution during training, which helps to accelerate the convergence speed of the model and reduce the risk of overfitting. Each convolutional module ends with a max pooling layer. The max pooling layer reduces the resolution of the feature map by selecting the maximum value in each pooling window, thereby reducing computational complexity and extracting more robust features. This step not only helps to reduce the computational burden of the model but also improves the robustness of the model to small changes in the image.

[0056] Through these three sequentially connected convolutional modules, the feature extraction layer can efficiently extract the key features in the pulmonary medical image while keeping the entire neural network model lightweight. This design not only ensures the accuracy of the model in processing complex medical images but also enables the model to operate efficiently in resource-constrained environments, providing strong support for real-time and accurate pulmonary feature classification.

[0057] Attention layer, which adjusts the weights between channels of the features output by the feature extraction layer through the channel attention mechanism to form a feature map, and adjusts the weights between pixels of the feature map through the spatial attention mechanism to form a feature vector. The channel attention mechanism and the spatial attention mechanism are used to deeply optimize the features output by the feature extraction layer. The channel attention mechanism calculates the importance weights of each channel, and these weights are used to adjust the intensity of each channel in the original feature map, enabling the model to focus more on the channel features that are most critical for the diagnosis of lung diseases, which is of crucial significance for accurately distinguishing malignant, benign, and normal tissues. The spatial attention mechanism assigns a weight reflecting its importance to each pixel or pixel block. The calculation of this weight often depends on the correlation between local features and global context information. By introducing the spatial attention mechanism, the model can more accurately locate key regions in lung medical images, such as lesion locations and lung lobe boundaries, thereby improving the accuracy and reliability of diagnosis. More importantly, the attention layer adopts a sequential attention mechanism - a strategy of channel first and then space, constructing a hierarchical and gradually refined feature processing process. This innovative method not only improves the priority of feature processing but also greatly reduces the computational complexity, achieving the goal of lightweight calculation. At the same time, this mechanism can be implemented through weighting or masking, enabling the model to more accurately locate and analyze important clinical features, and improving the credibility and interpretability of CNN in CT image analysis.

[0058] The attention layer adjusts the weights between channels of the features output by the feature extraction layer through the channel attention mechanism to form a feature map, specifically including the following steps:

[0059] Step S101, perform global average pooling on the features output by the feature classification layer to obtain a first feature result, and obtain a second feature result through global max pooling, and aggregate the first feature result and the second feature result to form a third feature result.

[0060] Perform average pooling on the feature map of each channel through global average pooling to obtain the average feature value of the channel. This helps to capture the overall information of the channel. Perform max pooling on the features of each channel to obtain the maximum feature value of the channel. This helps to capture the most significant information in the channel. Through these two pooling operations, two different global feature representations can be extracted from each channel.

[0061] Step S102, input the third feature result into a first fully connected layer, an activation function layer, and a second fully connected layer connected in sequence, and normalize it through the Sigmoid function to obtain a first weight parameter;

[0062] In this embodiment, the first fully-connected layer is used to reduce the channel dimension of the third feature result to one-eighth of the original dimension. This step helps reduce the number of parameters, lower the computational complexity, and may extract more advanced feature representations. The activation function layer uses the ReLU (Rectified Linear Unit) activation function to introduce non-linearity. The mathematical expression of the ReLU function is:

[0063] f(x) = max(0, x)

[0064] When the input x is greater than 0, the output of the ReLU function is x itself; when the input x is less than or equal to 0, the output of the ReLU function is 0. This non-linear transformation not only increases the expressive power of the model but also enables the lightweight neural network model to better fit complex non-linear relationships.

[0065] The second fully-connected layer is used to restore the channel dimension of the activation function layer to the size of the original dimension and normalize it through the Sigmoid function to obtain the first weight parameter that matches the original number of channels. The Sigmoid function restricts the first weight parameter between 0 and 1 for subsequent element-wise multiplication operations. The mathematical expression of the Sigmoid function is:

[0066]

[0067] where x is the channel attention score output by the second fully-connected layer, and σ(x) is the first weight parameter normalized by the Sigmoid function.

[0068] Step S103, perform a weighted operation on the features output by the feature classification layer by element-wise multiplying the first weight parameter to obtain a feature map.

[0069] In this embodiment, for each channel, multiply its feature map by the corresponding attention weight to obtain a weighted feature map. Channels with larger first weight parameters will be enhanced, while channels with smaller first weight parameters will be suppressed. While retaining the original feature information, the feature map highlights the information of key channels more prominently, enabling the model to focus on the most relevant channels, especially those representing key anatomical features (such as tumors or abnormalities).

[0070] The first feature result and the second feature result are aggregated to obtain the third feature result by means of parallel aggregation or weighted aggregation. In this embodiment, the first feature result and the second feature result are directly concatenated in the channel dimension. In this way, for each channel, there is an average value and a maximum value. This method can simultaneously capture the average activation level and the maximum activation level of the channel, thus more comprehensively reflecting the importance of the channel.

[0071] Adjust the weights between the pixels of the feature map through the spatial attention mechanism to form a feature vector, which specifically includes the following steps:

[0072] Step S201: Perform global average pooling on the feature map to obtain a fourth feature result, and perform global max pooling on the feature map to obtain a fifth feature result, and concatenate the fourth feature result and the fifth feature result to form a sixth feature result.

[0073] In this embodiment, global pooling is performed on the input feature map in the channel dimension. Performing global average pooling on the feature map to obtain a fourth feature result, calculating the average value at each spatial position, and capturing the overall spatial importance (average importance) of each position. Performing global max pooling on the feature map to obtain a fifth feature result, calculating the maximum value at each spatial position, and capturing the overall most significant feature (maximum importance) of each position.

[0074] In this embodiment, the dimensions of the fourth feature result and the fifth feature result are two-dimensional, and the fourth feature result and the fifth feature result are concatenated in the channel dimension. In this way, each spatial position now has a combined representation composed of average and maximum eigenvalue, which more comprehensively reflects the spatial importance of this position.

[0075] Step S202: Extract features from the sixth feature result through a 7×7 convolutional layer, and normalize it through the Sigmoid function to obtain a second weight parameter.

[0076] Extract features from the sixth feature result through a 7×7 convolutional layer to learn the relationship between spatial positions. Since the 7×7 convolutional kernel has a large receptive field, it can capture a wider range of spatial context information. Process the output of the 7×7 convolutional layer through the Sigmoid activation function. The Sigmoid activation function can compress the output value to between (0, 1), thereby generating a second weight parameter. This second weight parameter represents the degree of importance of each position in the input feature map, which helps the model to pay more attention to important feature regions in subsequent processing.

[0077] Step S203: After performing a weighted operation on the feature map by element-wise multiplication with the second weight parameter, the dimension is reduced through a max pooling layer, and a one-dimensional feature vector is obtained through a flattening operation. This ensures that the model can focus more on those spatial regions (such as tumor regions or abnormal tissue structures) that are considered important for the lung feature classification task, while reducing the attention to irrelevant background regions. The max pooling layer reduces the dimension of the result by selecting the maximum value in each small region, while retaining important feature information. This helps to reduce the computational amount and the number of parameters in the subsequent layers, while extracting more significant features. The max pooling layer has a certain invariance to small translations of the input. Even if the input image is slightly shifted, the output after passing through the pooling layer will not change significantly. This helps to improve the robustness of the model to changes in the input image. By reducing the dimension of the feature map and extracting key features, the max pooling layer helps to reduce the risk of overfitting and improve the generalization ability of the model.

[0078] Feature classification layer: The feature classification layer classifies the lung features by calculating the classification probabilities of the feature vectors. The lightweight neural network model significantly reduces the computational cost while ensuring the accuracy of lung feature classification, ensuring that it can operate efficiently on devices with limited processing capabilities without sacrificing performance. This reduction in computational complexity enables the system to provide rapid diagnosis in real time, which is a key requirement for fast and reliable results in clinical applications, especially crucial for timely decision-making and treatment planning.

[0079] In this embodiment, the feature classification layer includes a third fully connected layer with 64 units and a ReLU activation function connected to the output end of the attention layer, a dropout layer connected to the output end of the third fully connected layer, and a softmax layer connected to the output end of the dropout layer. The Dropout rate of the dropout layer is set to 0.5. The third fully connected layer is closely connected to the output end of the attention layer, has 64 neuron units, and uses the ReLU activation function. Such a design can efficiently integrate the key features extracted by the attention layer, and at the same time use the non-linear characteristics of ReLU to further enhance the expression ability of the model, ensuring the full utilization of feature information. After the third fully connected layer, a dropout layer is introduced immediately, and its Dropout rate is carefully set to 0.5. This means that during the training process, each neuron has a 50% probability of being randomly discarded and not participating in the forward propagation and backward update. This mechanism can effectively prevent the model from overfitting to the training data, improve the generalization ability of the model, and enable the model to perform well on unseen data. At the end of the feature classification layer, a softmax layer is connected. The softmax layer can convert the original scores output by the dropout layer into a probability distribution, where the probability value of each category is between 0 and 1, and the sum of the probabilities of all categories is 1. In this way, the model can accurately classify the input pulmonary medical images according to these probability values, distinguishing malignant, benign, and normal tissues. The design of the feature classification layer is both simple and efficient, without redundant layer structures or complex calculation operations. Each layer undertakes a clear task and works together to ensure that the entire neural network model can achieve high-precision pulmonary feature classification while maintaining light weight.

[0080] On the premise of ensuring the accuracy of pulmonary feature classification, the lightweight neural network model significantly reduces the computational cost, ensuring that it can operate efficiently on devices with limited processing capabilities without sacrificing performance. This reduction in computational complexity enables the system to provide rapid diagnosis in real time, which is a key requirement for fast and reliable results in clinical applications, especially crucial for timely decision-making and treatment planning.

[0081] In this embodiment, the lightweight neural network model uses categorical cross-entropy as the loss function and is optimized using the Adam optimizer with a learning rate of 0.001. The batch size of the lightweight neural network model is set to 4, and the number of training epochs is set to 50.

[0082] A classification module for performing feature classification on the input pulmonary medical images based on the trained lightweight neural network model.

[0083] This embodiment also provides a mobile device, which is configured with one or several combinations of the image acquisition module, model construction module, or classification module of the lung feature classification system based on the lightweight neural network model as described above. The lightweight neural network model is optimized and can be deployed on the mobile device. Through techniques such as model quantization, the computational burden is reduced. This system can directly perform real-time lung feature classification on the mobile device, making it suitable for clinical environments or telemedicine scenarios with limited resources.

[0084] The mentioned lightweight neural network model is carefully designed and deeply optimized to ensure that while maintaining high-precision lung feature classification ability, the demand for computing resources is minimized.

[0085] Specifically, through the built-in image acquisition module of the mobile device, it can conveniently capture the lung imaging data of patients, such as X-ray films or CT scan images. Subsequently, this data will be directly fed into the lightweight neural network model and efficiently processed using the optimized model trained by the model construction module. The classification module is responsible for quickly and accurately giving the classification information of lung features based on the output results of the model, such as whether there are abnormalities, lesion types, etc.

[0086] This innovative mobile device solution greatly improves the flexibility and convenience of lung health monitoring. It enables real-time lung feature classification to be no longer limited to fixed medical facilities or high-performance computing platforms, but can be widely applied to clinical environments with limited resources, such as clinics in remote areas, emergency sites, etc. At the same time, in the telemedicine scenario, patients can obtain professional lung health assessments simply through the mobile device, effectively shortening the diagnosis time and improving the accessibility and efficiency of medical services.

[0087] The mobile device provided in this embodiment and its integrated lung feature classification system based on the lightweight neural network model not only demonstrate the technological advancement but also reflect the profound understanding and positive response to the actual needs in the field of medical health, making an important contribution to promoting the intelligent and portable development of medical services.

[0088] In summary, the above are only the preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, and improvements made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.

Claims

1. A lung feature classification system based on a lightweight neural network model, characterized in that: At least: An image acquisition module, used to acquire lung medical image data, perform preprocessing, and construct a labeled data set; A model building module, used to build a lightweight neural network model for classifying lung medical image features, and train the lightweight neural network model based on the data set; The lightweight neural network model at least includes: A feature extraction layer, the feature extraction layer comprising a plurality of sequentially connected convolution modules, for extracting features from the lung medical image data; An attention layer, wherein the attention layer adjusts the weights between channels of the features output by the feature extraction layer through a channel attention mechanism to form a feature map, and adjusts the weights between pixels of the feature map through a spatial attention mechanism to form a feature vector; A feature classification layer, wherein the feature classification layer classifies lung features by calculating the classification probability of the feature vector; A classification module is used to perform feature classification on an input lung medical image based on the trained lightweight neural network model.

2. The lung feature classification system based on a lightweight neural network model according to claim 1, characterized in that: The feature extraction layer includes three convolution modules connected in sequence, and any of the convolution modules includes a 3×3 convolution layer, a ReLU activation function layer, a batch normalization layer and a maximum pooling layer connected in sequence.

3. The lung feature classification system based on a lightweight neural network model according to claim 1 or 2, characterized in that: The attention layer adjusts the weights between channels of the features output by the feature extraction layer through a channel attention mechanism to form a feature map, specifically comprising the following steps: Step S101, performing global average pooling on the features output by the feature classification layer to obtain a first feature result, performing global maximum pooling to obtain a second feature result, and aggregating the first feature result and the second feature result to form a third feature result; Step S102, inputting the third feature result into the first fully connected layer, the activation function layer, and the second fully connected layer which are connected in sequence, and normalizing them by a Sigmoid function to obtain a first weight parameter; Step S103, performing a weighted operation on the first weight parameter and the feature output by the feature classification layer through element-wise multiplication to obtain a feature map.

4. The lung feature classification system based on a lightweight neural network model according to claim 3, characterized in that: The first feature result and the second feature result are aggregated by parallel aggregation or weighted aggregation to obtain a third feature result.

5. The lung feature classification system based on a lightweight neural network model according to claim 4, characterized in that: The step of adjusting the weights between pixels of the feature map to form a feature vector by using a spatial attention mechanism specifically includes the following steps: Step S201, performing global average pooling on the feature map to obtain a fourth feature result, performing global maximum pooling on the feature map to obtain a fifth feature result, and concatenating the fourth feature result and the fifth feature result to form a sixth feature result; Step S202, performing feature extraction on the sixth feature result through a 7×7 convolution layer, and normalizing it through a Sigmoid function to obtain a second weight parameter; Step S203, after performing a weighted operation on the second weight parameter and the feature map through element-level multiplication, the dimension is reduced through a maximum pooling layer, and a one-dimensional feature vector is obtained through a flattening operation.

6. The lung feature classification system based on a lightweight neural network model according to claim 5, characterized in that: The dimensions of the fourth feature result and the fifth feature result are two-dimensional, and the fourth feature result and the fifth feature result are spliced ​​in the channel dimension.

7. The lung feature classification system based on a lightweight neural network model according to any one of claims 1-2 or 4-6, characterized in that: The feature classification layer includes a third fully connected layer with 64 units and a ReLU activation function connected to the output end of the attention layer, a dropout layer connected to the output end of the third fully connected layer, and a softmax layer connected to the output end of the dropout layer, and the Dropout rate of the dropout layer is set to 0.

5.

8. The lung feature classification system based on a lightweight neural network model according to any one of claims 1-2 or 4-6, characterized in that: The lightweight neural network model adopts category cross entropy as the loss function and is optimized using the Adam optimizer with a learning rate of 0.

001. The batch size of the lightweight neural network model is set to 4 and the training rounds are set to 50.

9. The lung feature classification system based on a lightweight neural network model according to any one of claims 1-2 or 4-6, characterized in that: The lung medical image data includes a lung computed tomography image. After preprocessing, the size of the lung computed tomography image is set to 224×224×3. The labels of the lung computed tomography image include benign, malignant and normal.

10. A mobile device, characterized in that: It is configured with one or more combinations of an image acquisition module, a model building module or a classification module of the lung feature classification system based on a lightweight neural network model as described in any one of claims 1 to 9.

Citation Information

Patent Citations

  • Gastric cancer fine-grained classification method based on attention mechanism

    CN113192633A

  • Method for improving performance of convolutional neural network based on weight attention

    CN115511051A

  • Medical image classification method based on improved attention mechanism

    CN117409232A

  • Breast cancer pathology image classification method based on deep transfer learning

    CN118429774A

  • CBAM mechanism-based residual network medical image auxiliary detection method

    WO2024016575A1