Pneumonia etiology chest CT classification method based on progressive feature refining network
By improving the global perception, multi-scale feature fusion, and multi-label classification head of the YOLO architecture, and combining it with a three-stage training strategy, the problems of insufficient feature extraction, multi-class classification, and generalization ability of the YOLO architecture in the diagnosis of pneumonia in chest CT images were solved, and efficient and accurate pneumonia etiological classification was achieved.
Patent Information
- Application Number
- CN202510792009.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-13
- Publication Date
- 2025-11-14
AI Technical Summary
The existing YOLO architecture has limited feature extraction capabilities in the diagnosis of pneumonia in chest CT images, poor multi-class classification performance, lack of utilization of contextual information, and insufficient model generalization ability, resulting in inaccurate classification of pneumonia etiology.
A progressive feature refinement network is adopted, which enhances the global feature perception capability through the global perception C2 network module, performs multi-scale feature fusion through the multi-scale feature fusion module, performs fine classification through the multi-label classification head, and optimizes the model with a three-stage progressive training strategy.
It achieves efficient and accurate etiological classification of pneumonia in chest CT images, improves the identification ability of multiple types of pneumonia and the generalization ability of the model, supports multi-label diagnosis, and is suitable for PACS system-assisted clinical diagnosis.
Smart Images

Figure CN120953647A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a chest CT classification method for pneumonia pathogens based on a progressive feature refinement network, belonging to the field of image classification technology. Background Technology
[0002] Pneumonia is one of the most common respiratory diseases worldwide, with high morbidity and mortality rates, especially among the elderly, children, and those with weakened immune systems. Chest CT scans, as an important imaging modality, provide detailed information about lung lesions and are crucial for early diagnosis, disease assessment, and treatment planning of pneumonia. Traditional methods of pneumonia diagnosis rely on the experience of radiologists, manually observing CT images to determine the presence of pneumonia. This method is not only inefficient and susceptible to the influence of physician subjectivity, leading to inconsistencies in diagnostic results, but also struggles to provide accurate etiological classification. Currently, the primary method for etiological classification of pneumonia is sputum culture, but the positive rate of sputum cultures is low, and it has limitations in identifying specific pathogens such as Chlamydia psittaci, Mycoplasma, and Legionella. In recent years, NGS examination of bronchoalveolar lavage fluid under bronchoscopy has provided a solution to this problem, but it is an invasive and expensive procedure.
[0003] In recent years, with the rapid development of deep learning technology, medical image analysis methods based on convolutional neural networks (CNN) have made significant progress. The YOLO (You Only Look Once) series of algorithms, as an efficient real-time object detection framework, has been widely used in the field of computer vision. However, the existing YOLO architecture still has some limitations in handling chest CT pneumonia diagnosis tasks: (1) Limited feature extraction capability: The traditional YOLO architecture is mainly designed for two-dimensional images. Although it can extract local features in the image, it is not capable enough of extracting complex pneumonia lesion features (such as multi-scale lesions, irregular shapes, etc.) in chest CT images, and it is difficult to fully capture the detailed information of the lesion area. (2) Poor multi-class classification performance: The etiological classification of pneumonia is diverse, including Chlamydia psittaci, bacterial pneumonia, mycoplasma pneumonia, Legionnaires' disease, fungal pneumonia, viral pneumonia, etc. Different types of pneumonia have different manifestations on CT images. In multi-class classification tasks, the existing YOLO architecture has limited ability to identify subtle differences between categories, which easily leads to low classification accuracy. (3) Lack of contextual information utilization: Pneumonia lesions in chest CT images often have a certain contextual relationship with surrounding tissues, but the traditional YOLO architecture lacks effective utilization of global contextual information, resulting in inaccurate identification of lesion areas. (4) Insufficient model generalization ability: Due to the diversity and complexity of chest CT images, images acquired by different patients and different devices may vary greatly. Therefore, the existing YOLO architecture still needs to be improved in terms of generalization ability across datasets and devices. Summary of the Invention
[0004] To address the aforementioned issues, this invention provides a chest CT classification method for pneumonia etiology based on a progressive feature refinement network. This invention improves the YOLO architecture by optimizing feature extraction, enhancing multi-class classification performance, fully utilizing contextual information, and improving model generalization ability, thereby achieving efficient and accurate diagnosis of pneumonia in chest CT images through intelligent etiological classification.
[0005] To achieve the above objectives, the technical solution adopted by the present invention is as follows:
[0006] In a first aspect, the present invention provides a chest CT classification method for pneumonia pathogens, comprising the following steps:
[0007] Step 1: Acquire chest CT images, read the DICOM sequence of the chest CT scan and convert it into a readable array format;
[0008] Step 2: Construct a pneumonia classification network model based on a progressive feature refinement network. This model is used to extract features and classify the chest CT images. The pneumonia classification network model includes:
[0009] The globally aware C2 network module integrates a global context attention unit in the C2 module of the YOLOv8 backbone network, and enhances the perception capability of global features through depthwise separable convolution and cross-channel attention mechanism.
[0010] A multi-scale feature fusion module is constructed to create a three-level pyramid structure. This structure is used to fuse features at different scales, and a spatial attention mechanism is used to dynamically allocate the weights of features at each level for adaptive fusion of multi-scale features.
[0011] A multi-label classification head, which employs a hierarchical classifier guided by channel compression and spatial attention, outputs classification results for various pneumonia types;
[0012] Step 3: The pneumonia classification network model is trained and optimized using a three-stage progressive training strategy.
[0013] In one embodiment of the present invention, the specific implementation of integrating a global context attention unit in the C2 module of the YOLOv8 backbone network is as follows:
[0014]
[0015] Among them, C2base(F in The diagram () represents the input processing flow of the C2 module in the YOLOv8 backbone network. DWConv is a depthwise separable convolution used to reduce computation and the number of parameters while maintaining the effectiveness of the convolution operation. The CA module implements cross-channel attention: CA(F) = σ(Conv) 1×1 ([AvgPool(F);MaxPool(F)])) extracts global information from the feature map through global average pooling and max pooling operations, and generates channel attention weights through 1×1 convolution and sigmoid activation function to enhance the feature representation of important channels; GAP is global average pooling, used to extract global features; σ is sigmoid activation function, which maps the output value to the (0,1) interval to represent the attention weight.
[0016] In one embodiment of the present invention, the three-tiered pyramid structure includes:
[0017] Level 1: 5×5 adaptive average pooling, with an output size of 1 / 4 of the input, is used to extract large-scale global features and capture the overall structural information of pneumonia lesions;
[0018] Level 2: 3×3 deformable convolution, used to preserve the original resolution, adapt to lesion regions of different shapes, and extract local detailed features;
[0019] Level 3: Bilinear interpolation upsampling by 2 times followed by 1×1 convolution is used to enhance the expressive power of small-scale features and enrich the feature hierarchy.
[0020] In one embodiment of the present invention, the features of each level in the three-level pyramid structure are spliced through channels and then subjected to spatial attention gating:
[0021]
[0022] Where the weight w i Generated by spatial attention mechanism: w i =Softmax(Conv 1×1 (F i )).
[0023] In one embodiment of the present invention, the spatial attention-guided hierarchical classifier is:
[0024]
[0025] Spatial attention (SA) is as follows:
[0026] SA(F)=Conv{3×3}([AvgPool(F);MaxPool(F)]
[0027] Enhance compressed features through spatial attention mechanisms to highlight the characteristics of the lesion area.
[0028] In one embodiment of the present invention, the three-stage progressive training strategy includes:
[0029] Phase 1: Classification Head Initialization
[0030] Freeze the YOLOv8 backbone network parameters to maintain its pre-trained feature extraction capabilities and avoid making too many adjustments to the backbone network in the initial stage.
[0031] Focal Loss is used to optimize multi-label classification heads. The formula for Focal Loss is:
[0032]
[0033] Where, p t,i γ is the predicted probability of sample i, and γ is an adjustment parameter used to focus on samples that are difficult to classify.
[0034] Phase Two: Feature Optimization
[0035] Unfreeze some backbone network modules: Add an improved C2 module, fine-tune some modules of the backbone network, and optimize feature extraction capabilities;
[0036] Introducing label smoothing regularization: Label smoothing regularization alleviates the model's overconfidence in labels and improves the model's generalization ability; the formula for label smoothing regularization is:
[0037] q(k)=(1-∈)δ k,y +∈ / K
[0038] Where ∈ is the smoothing parameter, K is the total number of categories, and δ k,y The Kronecker function is defined as follows:
[0039] Enable hybrid loss function: combine Focal Loss and improved central loss function for optimization; the formula for hybrid loss function is:
[0040] L mix =αL focal +βL center
[0041] Here, α and β are weighting coefficients used to balance the importance of different loss functions;
[0042] Phase 3, Global Optimization:
[0043] Joint training of all parameters: Joint training of all parameters of the entire network.
[0044] In one embodiment of the present invention, the improved central loss function in stage two of the three-stage progressive training strategy is:
[0045]
[0046] Where f i This represents the feature representation of the i-th sample extracted by the model; Represents category y i The center vector; σ represents the squared Euclidean distance between the feature and the class center. i is the prediction confidence of sample i, representing the level of confidence the model has in classifying sample i; the dynamic parameter β controls the weight of difficult samples, increasing linearly with training rounds; the threshold τ = 0.8 is used to filter high-confidence samples to update the class center; N is the total number of samples in the current batch.
[0047] Secondly, the present invention provides a chest CT classification system for pneumonia pathogens, applied to the aforementioned chest CT classification method for pneumonia pathogens, the system comprising:
[0048] The chest CT image acquisition module is used to acquire chest CT images, read the DICOM sequence of the chest CT scan, and convert it into a readable array format;
[0049] A pneumonia classification network model construction module is used to construct a pneumonia classification network model based on a progressive feature refinement network. This model is used to extract features and classify the chest CT images. The pneumonia classification network model includes:
[0050] The globally aware C2 network module integrates a global context attention unit in the C2 module of the YOLOv8 backbone network, and enhances the perception capability of global features through depthwise separable convolution and cross-channel attention mechanism.
[0051] A multi-scale feature fusion module is constructed to create a three-level pyramid structure. This structure is used to fuse features at different scales, and a spatial attention mechanism is used to dynamically allocate the weights of features at each level for adaptive fusion of multi-scale features.
[0052] A multi-label classification head, which employs a hierarchical classifier guided by channel compression and spatial attention, outputs classification results for various pneumonia types;
[0053] The model training optimization module is used to train and optimize the pneumonia classification network model using a three-stage progressive training strategy.
[0054] Thirdly, the present invention provides a computer-readable storage medium storing computer instructions which are executed by a processor using the method described above.
[0055] Fourthly, the present invention provides a computer program product, the computer program product storing computer instructions, the computer instructions being executed by a processor using the method described above.
[0056] The beneficial effects achieved by this invention are as follows:
[0057] This invention provides a chest CT classification method for pneumonia pathogens based on a progressive feature refinement network. By improving the YOLO architecture, it optimizes feature extraction, enhances multi-class classification performance, fully utilizes contextual information, and improves model generalization ability, achieving efficient and accurate diagnosis of pneumonia in chest CT images through intelligent pathogen classification. In the field of intelligent pathogen classification diagnosis of pneumonia, this invention achieves fine-grained classification and multi-label joint diagnosis of multiple types of pneumonia. It can be seamlessly integrated into PACS systems to assist clinicians in rapid differential diagnosis. It has significant application value in pneumonia pathogen screening, respiratory infectious disease epidemic early warning, and the development of precise treatment plans in primary healthcare institutions, providing an intelligent solution for optimizing medical resource allocation. Attached Figure Description
[0058] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are merely embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0059] Figure 1 This is a schematic diagram of the basic process of the chest CT classification method for pneumonia pathogens provided by the present invention.
[0060] Figure 2 A schematic diagram of the globally aware C2 network module provided by the present invention.
[0061] Figure 3 This is a schematic diagram of the multi-scale feature fusion module structure provided by the present invention.
[0062] Figure 4 This is a schematic diagram of the multi-label classification head structure provided by the present invention.
[0063] Figure 5 This diagram illustrates the training process of the pneumonia classification network model based on a progressive feature refinement network provided by this invention.
[0064] Figure 6 The graph shows the decrease in training loss for the pneumonia classification network model based on progressive feature refinement network provided by this invention.
[0065] Figure 7 The confusion matrix effect diagram of the pneumonia classification network model based on progressive feature refinement network provided by the present invention is shown. Detailed Implementation
[0066] The embodiments of the technical solution of the present invention will now be described in detail with reference to the accompanying drawings. These embodiments are merely illustrative of the technical solution of the present invention and are therefore intended to limit the scope of protection of the present invention.
[0067] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains; the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the invention; the terms “comprising” and “having”, and any variations thereof, in the specification, claims, and foregoing description of the invention, are intended to cover non-exclusive inclusion.
[0068] In the description of the embodiments of this invention, technical terms such as "first" and "second" are used only to distinguish different objects and should not be construed as indicating or implying relative importance or implicitly specifying the number, specific order, or primary and secondary relationship of the indicated technical features. In the description of the embodiments of this invention, "multiple" means two or more, unless otherwise explicitly defined.
[0069] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least some embodiments of the invention. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0070] In the description of the embodiments of this invention, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this document generally indicates that the preceding and following related objects have an "or" relationship.
[0071] Example 1
[0072] This embodiment provides a chest CT classification method for pneumonia pathogens, including the following steps:
[0073] Step 1: Acquire chest CT images, read the DICOM sequence of the chest CT scan, and convert it into an array format readable by the neural network. Specifically, use medical image processing tools to read the DICOM file of the chest CT scan and convert it into a unified three-dimensional array format so that the subsequent neural network model can effectively read and process it. This step ensures the standardization and compatibility of the input data, providing a reliable data foundation for subsequent intelligent classification.
[0074] Step 2: Construct a pneumonia classification network model based on a progressive feature refinement network. This model is used to extract features and classify the chest CT images. The pneumonia classification network model includes:
[0075] The globally aware C2 network module integrates a global contextual attention unit in the C2 module of the YOLOv8 backbone network. It enhances the perception capability of global features through depthwise separable convolution and cross-channel attention mechanism, thereby better capturing the contextual information of pneumonia lesion areas in chest CT images and improving the accuracy and robustness of feature extraction.
[0076] The multi-scale feature fusion module constructs a three-level pyramid structure, which includes 5×5 adaptive average pooling, 3×3 deformable convolution, bilinear interpolation upsampling followed by 1×1 convolution. The three-level pyramid structure fuses features of different scales and dynamically allocates the weights of features at each level through a spatial attention mechanism, thereby achieving adaptive fusion of multi-scale features. This can effectively handle pneumonia lesion regions of different sizes and shapes, and improve the model's classification performance for multiple types of pneumonia.
[0077] The multi-label classification head employs a hierarchical classifier with channel compression and spatial attention guidance to output classification results for multiple pneumonia types. By using a spatial attention-guided classifier to perform refined classification of extracted features, it can simultaneously output classification results for multiple pneumonia types, meeting the needs of clinical multi-label diagnosis.
[0078] Step 3: Train and optimize the pneumonia classification network model using a three-stage progressive training strategy. The three-stage progressive training strategy includes:
[0079] Phase 1: Freeze backbone network parameters and optimize multi-label classification head using Focal Loss;
[0080] Phase 2: Unfreeze some backbone network layers and introduce dynamic center loss function and label smoothing regularization;
[0081] Phase 3: Joint training of all network parameters to improve the overall performance of the model.
[0082] Example 2
[0083] This embodiment provides a chest CT classification method for pneumonia pathogens based on a progressive feature refinement network, including the following steps:
[0084] Step 1: Acquire chest CT images of the patient to obtain basic data for predicting treatment efficacy;
[0085] Step 2: Construct a pneumonia classification network model based on a progressive feature refinement network. Use this pneumonia classification network model to extract and classify features from the chest CT images, such as... Figure 1 As shown, the pneumonia classification network model mainly consists of a globally perceptive C2 network module, a multi-scale feature fusion module, and a multi-label classification head.
[0086] The pneumonia classification network model extracts multi-dimensional features from the data based on the YOLOv8 neural network architecture. The globally aware C2 network module integrates a global context attention unit, enhancing the model's ability to perceive global features. For example... Figure 2 As shown, this process is achieved by adding a global context attention unit to the existing C2 module:
[0087]
[0088] Among them, C2base(F in The diagram () represents the input processing flow of the C2 module in the YOLOv8 backbone network. DWConv is a depthwise separable convolution used to reduce computation and the number of parameters while maintaining the effectiveness of the convolution operation. The CA module implements cross-channel attention: CA(F) = σ(Conv) 1×1 ([AvgPool(F); MaxPool(F)])) extracts global information from the feature map through global average pooling and max pooling operations, and generates channel attention weights through 1×1 convolution and sigmoid activation function to enhance the feature representation of important channels; GAP is global average pooling used to extract global features; σ is sigmoid activation function, which maps the output value to the (0,1) interval to represent attention weights; at the same time, residual connections are used to prevent the improved C2 module from forgetting the original knowledge, so that it can effectively extract global features.
[0089] like Figure 3 As shown, the multi-scale feature fusion module constructs a three-level pyramid structure. This structure (5×5 adaptive average pooling, 3×3 deformable convolution, and bilinear interpolation upsampling followed by 1×1 convolution) fuses features at different scales. A spatial attention mechanism dynamically allocates the weights of features at each level, achieving adaptive fusion of multi-scale features and improving the model's classification performance for pneumonia lesions at different scales. The three-level pyramid structure includes:
[0090] Level 1: 5×5 adaptive average pooling, with an output size of 1 / 4 of the input, is used to extract large-scale global features and capture the overall structural information of pneumonia lesions;
[0091] Level 2: 3×3 deformable convolution, used to preserve the original resolution, can flexibly adapt to lesion areas of different shapes, and extract local detailed features;
[0092] Level 3: Bilinear interpolation upsampling by 2 times followed by 1×1 convolution is used to enhance the expressive power of small-scale features and further enrich the feature hierarchy.
[0093] Features at each level are spliced through channels and then subjected to spatial attention gating:
[0094]
[0095] Where the weight w i Generated by spatial attention mechanism: w i =Sofmtax(Conv 1×1 (F i It dynamically allocates the weights of features at each level through a spatial attention mechanism, thereby achieving adaptive fusion of features at multiple scales and improving the model's classification performance for pneumonia lesions at different scales.
[0096] like Figure 4 As shown, the multi-label classification head employs a hierarchical classifier with channel compression and spatial attention guidance. Through spatial attention-guided classification, the extracted features are refined, enabling simultaneous output of classification results for multiple pneumonia types, meeting the needs of clinical multi-label diagnosis. Specifically:
[0097] By calculating the weights of each channel using global average pooling and multilayer perceptron (MLP), the channel features are compressed and selected, highlighting important feature channels and improving classification accuracy.
[0098] Spatial attention-guided classifier:
[0099]
[0100] Spatial attention (SA) is calculated as follows:
[0101] SA(f)=Conv{3×3}([AvgPool(F);MaxPool(F)]
[0102] By further enhancing the compressed features through spatial attention mechanisms, the characteristics of the lesion area are highlighted, improving the classifier's ability to identify pneumonia lesions, thereby achieving accurate classification of multiple types of pneumonia.
[0103] Step 3: The pneumonia classification network model is trained and optimized using a three-stage progressive training strategy, such as... Figure 5 As shown, the three-stage progressive training strategy includes:
[0104] Phase 1 (Classification Head Initialization):
[0105] Freeze backbone network parameters: In the early stages of training, freeze the parameters of the original YOLOv8 backbone network to maintain its pre-trained feature extraction capabilities and avoid making too many adjustments to the backbone network in the initial stage.
[0106] Optimize the classification head: Use Focal Loss to optimize the multi-label classification head, address the class imbalance problem, and improve the model's classification performance for the minority classes of pneumonia. The formula for Focal Loss is:
[0107]
[0108] Where, p t,i γ is the predicted probability of sample i, and γ is an adjustment parameter used to focus on samples that are difficult to classify.
[0109] Phase Two (Feature Tuning):
[0110] Unfreeze some backbone network modules: Add an improved C2 module, fine-tune some modules of the backbone network, and further optimize feature extraction capabilities;
[0111] Introducing label smoothing regularization: Label smoothing regularization alleviates the model's overconfidence in labels, improving the model's generalization ability. The formula for label smoothing regularization is:
[0112] q(k)=(1-∈)δ k,y +∈ / K
[0113] Where ∈ is the smoothing parameter, K is the total number of categories, and δ k,y The Kronecker function is defined as follows:
[0114] Enable hybrid loss function: Optimize by combining Focal Loss and an improved center loss function. The formula for the hybrid loss function is:
[0115] L mix =αL focal +βL center
[0116] Here, α and β are weighting coefficients used to balance the importance of different loss functions;
[0117] Phase Three (Global Optimization):
[0118] Joint training of all parameters: Jointly train all parameters of the entire network to further improve the overall performance of the model.
[0119] Optionally, the improved central loss function in stage two of the three-stage progressive training strategy is:
[0120]
[0121] Where f i This represents the feature representation of the i-th sample extracted by the model; Represents category y i The center vector; σ represents the squared Euclidean distance between the feature and the class center. i is the prediction confidence of sample i, representing the level of confidence the model has in classifying sample i; the dynamic parameter β controls the weight of difficult samples, increasing linearly with training rounds; the threshold τ = 0.8 is used to filter high-confidence samples to update the class center; N is the total number of samples in the current batch.
[0122] Example 3
[0123] To verify the effectiveness of the method of this invention, this embodiment uses chest CT images to train and test the pneumonia classification network model based on the progressive feature refinement network. The image data used comes from real chest CT images and includes four categories: normal, Chlamydia psittaci, bacterial pneumonia, and mycoplasma pneumonia. All CT images are acquired and processed in a standardized format, with an image size of 256×256 and image sampling at a 10x magnification. Each sample corresponds to one CT image.
[0124] First, the dataset was divided into a training set and a test set, with the training set containing 640 cases (approximately 80%) and the test set containing 160 cases (approximately 30%). To ensure the representativeness of the data, cases in both the training and test sets were randomly sampled, and the CT images corresponding to each sample underwent quality checks and verification after annotation.
[0125] During the model training phase, this embodiment employs the following steps:
[0126] Data preprocessing: For each CT image, data augmentation techniques (such as rotation, scaling, etc.) are used to increase the number of training samples. Then, the pixel values of all images are normalized to the [0,1] interval so that they can be input into the neural network for training.
[0127] Model Architecture: The pneumonia classification network model based on a progressive feature refinement network, as proposed in this invention, includes a globally aware C2 network module, a multi-scale feature fusion module, a multi-label classification head, and a three-stage training strategy. The globally aware C2 network module integrates a global context attention unit, enhancing the model's ability to perceive global features. The multi-scale feature fusion module constructs a pyramid-shaped feature enhancement structure, enabling adaptive fusion of multi-scale features to improve the model's classification performance for pneumonia lesions at different scales. The multi-label classification head employs a hierarchical classifier guided by channel compression and spatial attention. The spatial attention-guided classifier performs refined diagnosis of extracted features, and the three-stage training strategy facilitates stable learning.
[0128] Training process: The model is trained using the AdamW optimizer and optimized using a three-stage loss function, which includes classifier head initialization, feature tuning, and global optimization. The training process is as follows: Figure 6 As shown.
[0129] Evaluation metrics: After each training round, the model's classification performance is comprehensively evaluated on the test set using a confusion matrix. This matrix visually presents the correspondence between the model's true and predicted labels for the four types of pneumonia (normal, Chlamydia psittaci, bacterial pneumonia, and mycoplasma pneumonia). For example... Figure 7 As shown, the diagonal elements of the matrix display the number of correctly classified samples for each category, while the off-diagonal elements reflect the distribution pattern of misdiagnoses.
[0130] In summary, the pneumonia etiology chest CT classification method based on progressive feature refinement networks provided by this invention constructs a pneumonia classification network model for four types of pneumonia (normal, Chlamydia psittaci, bacterial pneumonia, and mycoplasma pneumonia) by integrating multi-scale feature enhancement and attention guidance mechanisms. The core architecture of the model includes a YOLOv8 architecture with a globally aware C2 network module, a multi-scale feature fusion module, and a spatial attention classification head. The globally aware C2 network module enhances global context awareness through depthwise separable convolution and cross-channel attention mechanisms. The multi-scale feature fusion module uses deformable convolution and an adaptive pyramid structure to achieve multi-dimensional analysis of lesion features. The spatial attention classification head achieves accurate multi-label classification through channel compression and dynamic weight allocation mechanisms.
[0131] In model training, this invention innovatively proposes a three-stage progressive optimization strategy: the first stage freezes the backbone network for specialized classification head training; the second stage unfreezes the globally perceptive C2 network module for multi-scale feature optimization; and the third stage implements global fine-tuning. The training process employs a composite loss function of Focal Loss and center loss, and introduces a cosine annealing learning rate strategy to effectively address the training oscillations caused by class imbalance and the diversity of lesion morphology.
[0132] In the field of intelligent pathogen classification and diagnosis of pneumonia, this invention realizes fine-grained classification and multi-label joint diagnosis of multiple types of pneumonia. It can be seamlessly integrated into the PACS system to assist clinicians in rapid differential diagnosis. It has important application value in the pathogen screening of pneumonia in primary medical institutions, the early warning of respiratory infectious disease outbreaks, and the formulation of precise treatment plans, and provides an intelligent solution for optimizing the allocation of medical resources.
[0133] Example 4
[0134] This embodiment provides a chest CT classification system for pneumonia pathogens, applied to the aforementioned chest CT classification method for pneumonia pathogens. The system includes:
[0135] The chest CT image acquisition module is used to acquire chest CT images, read the DICOM sequence of the chest CT scan, and convert it into a readable array format;
[0136] A pneumonia classification network model construction module is used to construct a pneumonia classification network model based on a progressive feature refinement network. This model is used to extract features and classify the chest CT images. The pneumonia classification network model includes:
[0137] The globally aware C2 network module integrates a global context attention unit in the C2 module of the YOLOv8 backbone network, and enhances the perception capability of global features through depthwise separable convolution and cross-channel attention mechanism.
[0138] A multi-scale feature fusion module is constructed to create a three-level pyramid structure. This structure is used to fuse features at different scales, and a spatial attention mechanism is used to dynamically allocate the weights of features at each level for adaptive fusion of multi-scale features.
[0139] A multi-label classification head, which employs a hierarchical classifier guided by channel compression and spatial attention, outputs classification results for various pneumonia types;
[0140] The model training optimization module is used to train and optimize the pneumonia classification network model using a three-stage progressive training strategy.
[0141] Furthermore, the present invention provides a computer-readable storage medium storing computer instructions that are executed by a processor as described in any of the above embodiments, namely, the method for classifying pneumonia pathogens using chest CT based on a progressive feature refinement network.
[0142] Computer-readable storage media may take the form of any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may, for example, include, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof. More specific examples (not an exhaustive list) of readable storage media may include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0143] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, as well as combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0144] Embodiments of the present invention may also be computer program products, comprising computer program instructions that, when executed by a processor, cause the processor to perform the steps in the chest CT classification method for pneumonia pathogens based on progressive feature refinement networks according to various embodiments of the present invention, as described in the "Exemplary Methods" section above.
[0145] The steps of the method of the present invention are not limited to the specific order described above, unless otherwise specifically stated. Furthermore, in some embodiments, the invention may also be implemented as a program recorded on a recording medium, the program comprising machine-readable instructions for implementing the method according to the invention. Therefore, the invention also covers recording media storing programs for performing the method according to the invention.
[0146] Although the invention has been described with reference to preferred embodiments, various modifications can be made and components can be replaced with equivalents without departing from the scope of the invention. In particular, the technical features mentioned in the various embodiments can be combined in any manner as long as there is no structural conflict. The invention is not limited to the specific embodiments disclosed herein, but includes all technical solutions falling within the scope of the claims.
Claims
1. A chest CT classification method for pneumonia etiology, characterized in that, Includes the following steps: Step 1: Acquire chest CT images, read the DICOM sequence of the chest CT scan and convert it into a readable array format; Step 2: Construct a pneumonia classification network model based on a progressive feature refinement network. This model is used to extract features and classify the chest CT images. The pneumonia classification network model includes: The globally aware C2 network module integrates a global context attention unit in the C2 module of the YOLOv8 backbone network, and enhances the perception capability of global features through depthwise separable convolution and cross-channel attention mechanism. A multi-scale feature fusion module is constructed to create a three-level pyramid structure. This structure is used to fuse features at different scales, and a spatial attention mechanism is used to dynamically allocate the weights of features at each level for adaptive fusion of multi-scale features. A multi-label classification head, which employs a hierarchical classifier guided by channel compression and spatial attention, outputs classification results for various pneumonia types; Step 3: The pneumonia classification network model is trained and optimized using a three-stage progressive training strategy.
2. The method for classifying pneumonia pathogens by chest CT according to claim 1, characterized in that, The specific implementation of the global context attention unit integrated in the C2 module of the YOLOv8 backbone network is as follows: Among them, C2base(F in The diagram () represents the input processing flow of the C2 module in the YOLOv8 backbone network. DWConv is a depthwise separable convolution used to reduce computation and the number of parameters while maintaining the effectiveness of the convolution operation. The CA module implements cross-channel attention: CA(F) = σ(Conv) 1×1 ([AvgPool(F);MaxPool(F)])) extracts global information from the feature map through global average pooling and max pooling operations, and generates channel attention weights through 1×1 convolution and sigmoid activation function to enhance the feature representation of important channels; GAP is global average pooling, used to extract global features; σ is sigmoid activation function, which maps the output value to the (0,1) interval to represent the attention weight.
3. The method for classifying pneumonia pathogens by chest CT according to claim 2, characterized in that, The three-tiered pyramid structure includes: Level 1: 5×5 adaptive average pooling, with an output size of 1 / 4 of the input, is used to extract large-scale global features and capture the overall structural information of pneumonia lesions; Level 2: 3×3 deformable convolution, used to preserve the original resolution, adapt to lesion regions of different shapes, and extract local detailed features; Level 3: Bilinear interpolation upsampling by 2 times followed by 1×1 convolution is used to enhance the expressive power of small-scale features and enrich the feature hierarchy.
4. The method for classifying pneumonia pathogens by chest CT according to claim 3, characterized in that, The features of each level in the three-level pyramid structure are spliced together via channels and then subjected to spatial attention gating. Where the weight w i Generated by spatial attention mechanism: w i =Softmax(Conv 1×1 (F i )).
5. The method for classifying pneumonia pathogens by chest CT according to claim 4, characterized in that, The spatial attention-guided hierarchical classifier is: Spatial attention (SA) is as follows: SA(F)=Conv{3×3}([AvgPool(F);MaxPool(F)] Enhance compressed features through spatial attention mechanisms to highlight the characteristics of the lesion area.
6. The method for classifying pneumonia pathogens by chest CT according to claim 5, characterized in that, The three-stage progressive training strategy includes: Phase 1: Classification Head Initialization Freeze the YOLOv8 backbone network parameters to maintain its pre-trained feature extraction capabilities and avoid making too many adjustments to the backbone network in the initial stage. Focal Loss is used to optimize multi-label classification heads. The formula for Focal Loss is: Where, p t,i γ is the predicted probability of sample i, and γ is an adjustment parameter used to focus on samples that are difficult to classify. Phase Two: Feature Optimization Unfreeze some backbone network modules: Add an improved C2 module, fine-tune some modules of the backbone network, and optimize feature extraction capabilities; Introducing label smoothing regularization: Label smoothing regularization alleviates the model's overconfidence in labels and improves the model's generalization ability; the formula for label smoothing regularization is: q(k)=(1-∈)δ k,y +∈ / K Where ∈ is the smoothing parameter, K is the total number of categories, and δ k,y The Kronecker function is defined as follows: Enable hybrid loss function: combine Focal Loss and improved central loss function for optimization; the formula for hybrid loss function is: L mix =αL focal +βL center Here, α and β are weighting coefficients used to balance the importance of different loss functions; Phase 3, Global Optimization: Joint training of all parameters: Joint training of all parameters of the entire network.
7. The method for classifying pneumonia pathogens by chest CT according to claim 6, characterized in that, The improved central loss function in stage two of the three-stage progressive training strategy is: Where f i This represents the feature representation of the i-th sample extracted by the model; Represents category y i The center vector; σ represents the squared Euclidean distance between the feature and the class center. i is the prediction confidence of sample i, representing the level of confidence the model has in classifying sample i; the dynamic parameter β controls the weight of difficult samples, increasing linearly with training rounds; the threshold τ = 0.8 is used to filter high-confidence samples to update the class center; N is the total number of samples in the current batch.
8. A chest CT classification system for pneumonia etiology, characterized in that, The system is applied to a chest CT classification method for pneumonia pathogens as described in any one of claims 1-7, the system comprising: The chest CT image acquisition module is used to acquire chest CT images, read the DICOM sequence of the chest CT scan, and convert it into a readable array format; A pneumonia classification network model construction module is used to construct a pneumonia classification network model based on a progressive feature refinement network. This model is used to extract features and classify the chest CT images. The pneumonia classification network model includes: The globally aware C2 network module integrates a global context attention unit in the C2 module of the YOLOv8 backbone network, and enhances the perception capability of global features through depthwise separable convolution and cross-channel attention mechanism. A multi-scale feature fusion module is constructed to create a three-level pyramid structure. This structure is used to fuse features at different scales, and a spatial attention mechanism is used to dynamically allocate the weights of features at each level for adaptive fusion of multi-scale features. A multi-label classification head, which employs a hierarchical classifier guided by channel compression and spatial attention, outputs classification results for various pneumonia types; The model training optimization module is used to train and optimize the pneumonia classification network model using a three-stage progressive training strategy.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that are executed by a processor according to any one of claims 1 to 7.
10. A computer program product, characterized in that, The computer program product stores computer instructions, which are executed by a processor according to any one of claims 1 to 7.