Bacterial pneumonia pathogen identification method based on intelligent Raman technology

Through intelligent Raman technology and improved convolutional neural network model, the problems of long identification time and complex operation of bacterial pneumonia pathogens are solved, and rapid and accurate bacterial type identification is achieved, which significantly improves diagnostic efficiency.

CN120180294APending Publication Date: 2025-06-20HEBEI GEO UNIVERSITY
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202510118930.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-24
Publication Date
2025-06-20

AI Technical Summary

Technical Problem

The prior art has problems with long time and complex operation in the identification of pathogenic bacteria of bacterial pneumonia, making it difficult to achieve rapid and accurate identification of bacterial type.

Method used

The bacterial pneumonia pathogen identification method based on intelligent Raman technology is adopted, combined with laser microscopic confocal Raman spectroscopy technology and an improved convolutional neural network (AlexNet) model, Raman spectroscopy data acquisition and preprocessing of bacteria, and the identification of bacterial species is achieved through training classification models.

Benefits of technology

It realizes rapid identification of bacterial pneumonia pathogens, shortens the diagnosis cycle, improves identification speed and accuracy, and provides a non-invasive, efficient and reliable detection method.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120180294A_ABST
    Figure CN120180294A_ABST
Patent Text Reader

Abstract

The invention relates to a bacterial pneumonia pathogenic bacterium identification method based on an intelligent Raman technology, which comprises the following steps: S1, setting a type label according to a gram staining characteristic classification mode or the occurrence frequency of bacterial types in bacterial pneumonia infection, and selecting a known strain according to the type label, collecting Raman spectrum data of a known strain; s2, carrying out wave number extraction, background subtraction, smooth noise reduction and normalization preprocessing on the Raman spectrum data; s3, constructing a classification model according to an AlexNet model; s4, dividing the preprocessed Raman spectrum data into a training set and a verification set, and inputting the training set, the verification set and corresponding type labels into a classification model for training to obtain a trained classification model; and S5, acquiring Raman spectrum data of detected bacteria by using a Raman spectrometer, preprocessing the Raman spectrum data, and inputting the preprocessed Raman spectrum data into the trained classification model to obtain the type of the detected bacteria. The bacteria are identified by establishing the classification model, so that the operation complexity is reduced, and the identification time is shortened.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a bacterial classification model, and more particularly to a method for identifying pathogenic bacteria of bacterial pneumonia based on intelligent Raman technology. Background Art

[0002] Bacterial pneumonia is a lung inflammation caused by bacterial infection and is a common respiratory disease. It can affect people of all ages, especially the elderly, infants, immunocompromised individuals, and patients with chronic diseases. The cause of bacterial pneumonia is usually caused by specific bacteria that enter the lungs and trigger an immune response. As a common pulmonary infectious disease, bacterial pneumonia involves a wide range of clinical manifestations, diagnostic methods, and treatment methods. With the increasing severity of antibiotic resistance, early diagnosis, effective treatment, and the development of new drugs for this disease have become even more important.

[0003] The cause of bacterial pneumonia is usually caused by specific bacteria that enter the lungs and trigger an immune response. Different bacteria have different sensitivities to antibiotics. Identifying the type of bacteria makes it easier to achieve precise drug use. Gram staining is not only a basic tool for bacterial classification but also an extremely important diagnostic method in the fields of clinical and public health. In clinical microbiology, Gram staining is very important for the preliminary identification of bacteria, which is crucial for selecting appropriate antibiotics and treatment strategies. Gram-positive bacteria and Gram-negative bacteria have different sensitivities to antibiotics. The outer membrane of Gram-negative bacteria usually makes them naturally resistant to certain antibiotics, while the cell wall of Gram-positive bacteria is relatively weak and is usually more easily attacked by certain antibiotics (such as penicillin antibiotics). For relatively common bacteria, there are different effective drugs for different bacteria. For example, for Streptococcus pneumoniae, the effective drugs are penicillin or cephalosporin antibiotics. Therefore, identifying the type of bacteria helps to select the appropriate antibiotics.

[0004] The traditional etiological test method is microbial culture, which can obtain direct etiological results. However, this method is time-consuming, and it takes at least 24 - 48 hours to obtain a complete positive identification report. Moreover, it is difficult to culture pathogenic microorganisms that are not easily grown or grow slowly and have demanding culture conditions, which often delays the best treatment opportunity. Raman spectroscopy has been used to analyze the types of bacteria in patients with cystic fibrosis. Rusciano et al. combined Raman spectroscopy technology and principal component analysis method to achieve the identification of bacteria in patients' sputum, including Pseudomonas aeruginosa and Staphylococcus aureus, etc., which is crucial for preventing cross-infection and protecting lung function, but the accuracy is still relatively low. Summary of the Invention

[0005] The object of the present invention is to provide a method for identifying pathogenic bacteria of bacterial pneumonia based on intelligent Raman technology, so as to solve the problems of long time consumption and complex operation existing in the existing methods for identifying the types of bacteria causing bacterial pneumonia.

[0006] The object of the present invention is achieved as follows:

[0007] A method for identifying pathogenic bacteria of bacterial pneumonia based on intelligent Raman technology, comprising the following steps:

[0008] S1. Set type tags according to the Gram staining characteristic classification method or the frequency of bacteria species in clinical infections of bacterial pneumonia, select known strains according to the type tags, and use a Raman spectrometer to collect Raman spectral data of the known strains;

[0009] S2. Perform preprocessing on the Raman spectral data, including wave number extraction, background subtraction, smoothing and noise reduction, and normalization;

[0010] S3. Remove the third convolutional layer to the fifth convolutional layer in the AlexNet model, and replace the ReLU activation function in the AlexNet model with the Leaky ReLU activation function to obtain a classification model;

[0011] S4. Take the preprocessed Raman spectral data as samples, and divide them into a training set and a validation set. Input the samples and the corresponding type tags in the training set and the validation set into the classification model for training to obtain a classification model for identifying pathogenic bacteria of bacterial pneumonia, and the classification model corresponds to the target classification method;

[0012] S5. Collect the bacteria to be measured, use a Raman spectrometer to collect Raman spectral data of the bacteria to be measured, and perform wave number extraction, background subtraction, smoothing and noise reduction, and normalization preprocessing; input the preprocessed Raman spectral data of the bacteria to be measured into the trained classification model to obtain the probability corresponding to the type tag, and determine the type of the bacteria to be measured according to the probability corresponding to the type tag.

[0013] Further, when the target classification method is the Gram staining characteristic classification, the type tags include Gram-positive bacteria and Gram-negative bacteria;

[0014] When the target classification method is the frequency of bacteria in clinical pneumonia, the type tags include: Acinetobacter baumannii, Staphylococcus epidermidis, Escherichia coli, Pseudomonas putida, Klebsiella pneumoniae, Enterococcus faecalis, Staphylococcus aureus, Staphylococcus haemolyticus, Enterococcus faecium, Stenotrophomonas maltophilia, Pseudomonas aeruginosa, Streptococcus agalactiae, Enterobacter cloacae, and Serratia marcescens.

[0015] Further, the specific method for collecting the Raman spectral data of known strains using a Raman spectrometer in step S1 is as follows:

[0016] The Raman spectrometer emits laser light with a laser power of 50 mW and a grating of 300 l / mm to known strains, and 100 Raman spectral data are collected for each strain.

[0017] Further, the specific method for preprocessing the Raman spectral data in step S3 is as follows:

[0018] S3-1. Select the fingerprint region of the Raman spectral data at 400 - 1800 cm -1 ;

[0019] S3-2. Use the asymmetric least squares method to remove the background from the selected Raman spectral data;

[0020] S3-3. Use a window of size 11 points and a Savitzky-Golay smoothing filter with a third-order polynomial fit to smooth the high-frequency noise of the Raman spectral data after background removal;

[0021] S3-4. Perform maximum normalization on each smoothed spectral data.

[0022] Further, the specific method for training the classification model in step S5 is as follows:

[0023] The initial learning rate is set to 0.001, and it is set to 1000 epochs during the training process. The batch size is adjusted to 20 and the Dropout rate is 0.1 through cross-validation.

[0024] The present invention combines the laser confocal Raman spectroscopy technology with an improved convolutional neural network (AlexNet) model. This method not only overcomes the limitations of existing bacterial drug resistance detection technologies, such as low time efficiency and complex operation, but also provides a non-invasive, efficient and reliable detection means, realizes efficient Gram classification and bacterial species identification, and significantly improves the recognition speed and accuracy.

[0025] Aiming at the problem of long clinical bacterial identification time, the present invention applies Raman technology to the detection of bacteria in bacterial pneumonia and realizes the identification of bacteria by using spontaneous Raman technology. The present invention can complete bacterial identification within 3.5 hours by using Raman spectroscopy identification combined with a classification model. This high efficiency is expected to shorten the diagnostic cycle. Compared with traditional and biochemical identification methods, Raman technology has the advantages of fast speed, convenience, non-destructiveness and high precision. It enables clinicians to select appropriate treatment plans faster. Description of the Drawings

[0026] Figure 1 is the flowchart of the method of the present invention.

[0027] Figure 2 They are the Raman spectrograms of Escherichia coli and Enterococcus faecium after background subtraction and background fitting; among them, A is the effect diagram of spectral background fitting of Escherichia coli, B is the Raman spectrogram of Escherichia coli after background subtraction, C is the effect diagram of spectral background fitting of Enterococcus faecium, and D is the Raman spectrogram of Enterococcus faecium after background subtraction.

[0028] Figure 3 They are the Raman spectrograms of Escherichia coli and Enterococcus faecium after smoothing noise reduction and normalization; among them, A is the Raman spectrogram of Escherichia coli after background subtraction and smoothing noise reduction, B is the Raman spectrogram of Escherichia coli after normalization, C is the Raman spectrogram of Enterococcus faecium after background subtraction and smoothing noise reduction, and D is the Raman spectrogram of Enterococcus faecium after normalization.

[0029] Figure 4 They are the Raman spectrograms of 14 strains after preprocessing.

[0030] Figure 5 Figure A in it is the confusion matrix of the Gram classification result of AlexNet.

[0031] Figure 5 Figure B in it is the ROC curve of the Gram classification result.

[0032] Figure 5 Figure C in it is the accuracy on the training set and the validation set.

[0033] Figure 5 Figure D in it is the loss function on the training set and the validation set.

[0034] Figure 6 Figure A in it is the confusion matrix of the classification results of 14 strains of AlexNet.

[0035] Figure 6 Figure B in it is the accuracy on the training set and the validation set.

[0036] Figure 6 Figure C in it is the loss function on the training set and the validation set.

[0037] Figure 6 Figure D in it is the ROC curve of the classification results of 14 strains.

[0038] Figure 7 It is the confusion matrix of the Gram classification result using the principal component analysis method. Specific implementation manners

[0039] The present invention will be further described in detail below.

[0040] Raman technology is a non-destructive spectroscopic analysis method that uses a laser to excite the vibration modes of sample molecules and then determines the chemical composition and molecular structure of the sample by measuring the frequency shift and intensity change of the scattered light of the sample. Due to the very high chemical and structural resolution of Raman spectroscopy, high-precision composition analysis and molecular structure characterization of the sample can be carried out. In bacterial identification, Raman technology has been widely used. By measuring the spectral characteristics of different bacteria, different types of bacteria can be identified quickly and accurately. Compared with traditional and biochemical identification methods, Raman technology has the advantages of being fast, convenient, non-destructive and having high precision.

[0041] As Figure 1 shown, the present invention provides a method for identifying pathogenic bacteria of bacterial pneumonia based on intelligent Raman technology, including the following steps:

[0042] S1. Set type tags according to the Gram staining characteristic classification method or the frequency of occurrence of bacterial species in clinical infections of bacterial pneumonia, and select known strains according to the type tags, and use a Raman spectrometer to collect Raman spectral data of the known strains.

[0043] The classification methods of bacteria include Gram staining characteristic classification, bacterial pathogenicity classification, and the frequency of occurrence of bacteria in clinical infections of bacterial pneumonia. When the strains are classified according to the Gram staining characteristic classification, the type tags of the strains include Gram-positive bacteria and Gram-negative bacteria; when the strains are classified according to the frequency of occurrence of bacteria in clinical infections of bacterial pneumonia, the type tags of the strains include: Acinetobacter baumannii (A.baumannii), Staphylococcus epidermidis (S.epidermidis), Escherichia coli (E.coli), Pseudomonas putida (P.putida), Klebsiella pneumoniae (K.pneumoniae), Enterococcus faecalis (E.faecalis), Staphylococcus aureus (S.aureus), Staphylococcus haemolyticus (S.haemolyticus), Enterococcus faecium (E.faecium), Stenotrophomonas maltophilia (S.maltophilia), Pseudomonas aeruginosa (P.aeruginosa), Streptococcus agalactiae (S.agalactiae), Enterobacter cloacae (E.cloacae) and Serratia marcescens (S.marcescens). The above 14 kinds of bacteria can basically cover about 77% of clinical infection cases, so the present invention can provide certain clinical support for Raman spectroscopy in the identification of bacteria in bacterial pneumonia.

[0044] When strains are classified according to the frequency of bacterial occurrence in clinical infections, the above 14 common clinical bacteria are selected, and 2 to 4 clinical isolates of each type of labeled bacteria are collected as samples. All experimental strains are clinical isolates of bacterial pneumonia patients collected by the Laboratory Department of Beijing Boai Hospital. The Raman spectrometer needs to be preheated for 30 minutes after turning on, and dimethyl sulfoxide (DMSO) standards need to be prepared before each use to calibrate the instrument. When performing spontaneous Raman testing, the sample is dripped onto a glass slide and placed on the microscope stage. A 60× water objective lens (Olympus MPLAN) is used for focusing, and the pump light wavelength as the excitation light is selected as 707nm, the power is selected as 50mW, and the internal turntable of the microscope is adjusted to enter the spontaneous Raman module. The 707nm excitation light is focused on the sample through the objective lens, and the reflected Raman signal enters the light path through the internal reflector of the microscope. After passing through the filter and lens, the Raman signal after filtering out the 707nm excitation light enters the Raman spectrometer. The integration time was 1 s, the grating was set to 300 l / mm, and 100 spectra were collected at different locations for each sample. -1 It is a Raman characteristic peak common to bacteria, which represents the vibration of the CH bond. Therefore, the laser focus and the location of bacteria can be determined based on the signal of the peak and the CCD camera. Spectral data of different batches of strains were collected. The present invention collected 5100 Raman spectra of 14 kinds of bacteria.

[0045] When bacteria are classified according to Gram staining characteristics, 2 to 4 clinical isolates are collected as samples for both Gram-positive and Gram-negative bacteria, and the Raman spectrometer parameters are set the same as the parameters for Raman spectrometer measurement of 14 bacteria. The above 14 bacteria can also be divided into Gram-positive bacteria and Gram-negative bacteria, and the collected Raman spectral data of the 14 bacteria are set with corresponding Gram labels.

[0046] In some cases, the collected sputum comes only from the patient's upper respiratory tract and is easily interfered by the bacteria colonizing the upper respiratory tract. Therefore, its diagnostic sensitivity is low and it is currently rarely used in clinical diagnosis. Raman spectroscopy has high chemical specificity and sensitivity, which can eliminate the interference of colonizing bacteria.

[0047] S2. Preprocessing of Raman spectral data includes wavenumber extraction, background subtraction, smoothing, noise reduction and normalization.

[0048] Raman spectrometer collects Raman spectral data of strains through spontaneous Raman scattering. Since spontaneous Raman is relatively weak, the measured original Raman spectrum contains a lot of background and noise information. Therefore, the original Raman spectrum needs to be preprocessed before input into the neural network for classification to reduce the impact of background or noise information on the spectrum. The preprocessing of Raman data is divided into 4 steps: wave number extraction, background subtraction, smoothing and noise reduction, and normalization.

[0049] When performing wavenumber extraction, select the fingerprint region of 400 - 1800 cm -1 . The Raman spectrum of bacteria in the range of 400 - 1800 cm -1 is the fingerprint region, which contains information on important components of bacteria, such as proteins, nucleic acids, etc. The wavenumber range of the originally collected Raman spectrum is from - 1300 to 4000 cm -1 . If all band information is directly analyzed, it will cause unnecessary waste and interference. Therefore, select to intercept the spectrum of the bacterial fingerprint region of 400 - 1800 cm -1 for analysis.

[0050] The Raman peak of water is located after 3000 cm -1 . There are no obvious peaks in the bacterial fingerprint region of 400 - 1800 cm -1 . Therefore, the influence of water on the Raman spectrum peaks of bacteria can be excluded. Glass has a strong fluorescence background, while the Raman signals of biological samples are generally very weak. So the background signal generated by glass in the bacterial fingerprint region will cover up the Raman characteristic peaks of bacteria. Therefore, if you want to obtain the pure Raman spectrum of bacteria, it is necessary to select to subtract this part of the background during preprocessing to reduce the influence of glass on the bacterial spectrum.

[0051] As Figure 2 shown, according to the original Raman spectra of Escherichia coli and Enterococcus faecium, it can be seen that the directly collected Raman spectra have baseline drift, accompanied by obvious fluorescence background signals. And due to the short integration time, it is impossible to distinguish the bacterial spectra by the naked eye alone, which has a great impact on bacterial identification. Before background subtraction, fit the background of the Raman spectral data to eliminate backgrounds such as cosmic rays and its own noise; after background subtraction, the baseline of the spectral map is basically at the same level, ensuring the consistency of conditions.

[0052] Raman spectra are often affected by various noises, such as environmental noise, equipment noise, etc. In order to reduce the influence caused by noise, this project selects the most commonly used Savitzky - Golay (S - G) filtering method to filter the noise.

[0053] As Figure 3 shown, the noise of the bacterial spectrum before noise reduction is large. After being processed by the S - G filtering algorithm, the noise is significantly reduced, and the peak at 1000 cm -1 of bacteria still exists, indicating that this algorithm can effectively retain the useful information in the spectrum and achieve an ideal smoothing and noise reduction effect.

[0054] The data collected by spectral acquisition is affected by sample differences, ambient light, temperature, or equipment performance differences, and this kind of influence will cause slight differences in the spectrum. The present invention intends to weaken this influence by normalizing the spectrum, minimizing the interference factors in the original data, so as to obtain more accurate data. The specific method is: setting the minimum value to 0 and the maximum value to 1.

[0055] As Figure 4 shown, after the spectra of 14 strains have undergone complete preprocessing, the baseline drift situation is basically eliminated, the noise is weakened, and the characteristic regions are obvious. Figure 4 Among them, 1, 2, 3, and 4 represent different spectra of the same kind of bacteria.

[0056] S3. Remove the third convolutional layer to the fifth convolutional layer in the AlexNet model, and replace the ReLU activation function in the AlexNet model with the Leaky ReLU activation function to obtain a classification model.

[0057] The present invention has made some improvements on the basis of the classical AlexNet model to adapt to the characteristics of Raman spectral data and achieve the classification of strains. The classical AlexNet model includes five convolutional units and three fully connected layers.

[0058] The present invention removes the last three convolutional units and the last fully connected layer of the AlexNet model, and replaces the ReLU activation function of the AlexNet model with the Leaky ReLU activation function. Further increases the non-linear representation ability of the network.

[0059] The classification model includes: a first convolutional unit, a second convolutional unit, a first fully connected layer, a first Dropout layer, a second fully connected layer, a second Dropout layer, a third fully connected layer, and an output layer connected in sequence.

[0060] Among them, the Dropout parameter is 0.5.

[0061] Both the first convolutional unit and the second convolutional unit include that the input data of the first convolutional unit passes through eight 3×3 convolutional kernels, a maximum pooling layer with a scale of 2×2, and a batch normalization layer in sequence and then outputs, and enters the second convolutional unit. The input data of the second convolutional unit passes through sixteen 3×3 convolutional kernels, a maximum pooling layer, and a batch normalization layer in sequence and then outputs.

[0062] The present invention uses eight 3×3 convolutional kernels to extract low-order features in Raman spectral data, such as spectral peak positions and intensities; sixteen 3×3 convolutional kernels further capture higher-order feature information in the Raman spectral data. A max pooling layer is added after the convolutional layer. The pool size of the max pooling layer is set to 2, and the maximum value of two adjacent values is selected as the output. Through pooling, the data dimension is effectively reduced, key information is retained, the computational complexity is reduced, thereby achieving data dimensionality reduction and improving the classification performance. A batch normalization layer is added after each max pooling layer. By normalizing the output of each layer, the vanishing gradient is avoided, the training stability and convergence speed of the model are improved, and the network training process is accelerated.

[0063] Batch normalization is a normalization method whose purpose is to control the input values of each layer of the neural network within the range of the standard normal distribution. This can ensure that the activation input values fall within the optimal region of the activation function, thereby ensuring a larger gradient descent.

[0064] The first layer of the fully connected layer contains 64 neurons, and the second layer contains 32 neurons. After passing through the first fully connected layer and the second fully connected layer, they are both activated by the Leaky ReLU activation function, and the parameter of the Leaky ReLU activation function is 0.1.

[0065] The present invention adds a Dropout layer between the fully connected layers, randomly discarding the connections of some neurons, thereby improving the generalization ability of the model and reducing the over-dependence on the training data. It is implemented by connecting with the SoftMax function. The sum of the output values of each classification result is 1, corresponding to the prediction probabilities of Gram-positive bacteria and Gram-negative bacteria respectively.

[0066] Leaky ReLU is a variant activation function of the Rectified Linear Unit (ReLU). It belongs to a non-saturated activation function and can effectively solve the "neuron death" problem that occurs when the input of the ReLU function is negative. At the same time, the computational amount is relatively small and the speed is fast. In the field of deep learning, Leaky ReLU is widely used. Compared with other saturated activation functions such as tanh or Sigmoid, it can more effectively solve the problem of gradient vanishing.

[0067] S4. Use the preprocessed Raman spectral data as samples, and divide them into a training set and a validation set. Input the samples and their corresponding type labels in the training set and the validation set into the classification model for training to obtain a classification model for identifying pathogenic bacteria of bacterial pneumonia.

[0068] Among them, the classification model corresponds to the target classification method.

[0069] Taking the Raman spectroscopic data as samples, they are divided into a training set and a validation set, and the ratio of the training set to the validation set is 8:2 to ensure that the training and evaluation data of the model are sufficiently diverse. Hyperparameter settings: The initial learning rate is 0.001, and a learning rate decay strategy is used to dynamically adjust the learning rate to optimize the training effect. During the training process, it is set to 1000 epochs, and the batch size (20) and Dropout rate (0.1) are adjusted through cross-validation. These optimization measures ensure the stability and efficiency of the model and significantly improve the classification performance.

[0070] When training the classification model, the data for training input into the classification model is determined according to the required classification method. For example, if it is necessary to determine which Gram-positive bacteria an unknown bacterium belongs to through the classification model, the training data used is the Raman spectroscopic data of strains classified by Gram-positive bacteria and the corresponding Gram-positive bacteria labels, and the trained model is a classification model for identifying Gram-positive bacteria; if it is necessary to determine which of the 14 clinically common bacteria an unknown bacterium belongs to through the classification model, the training data used is the Raman spectroscopic data of the 14 clinically common bacteria and the corresponding 14 type labels.

[0071] S5. Collect the bacteria to be measured, use a Raman spectrometer to collect Raman spectroscopic data of the bacteria to be measured, and perform preprocessing such as wavenumber extraction, background subtraction, smoothing and noise reduction, and normalization; input the preprocessed Raman spectroscopic data of the bacteria to be measured into the trained classification model to obtain the probabilities corresponding to the type labels, and determine the type of the bacteria to be measured according to the probabilities corresponding to the type labels.

[0072] The bacteria to be measured can be obtained from patients with bacterial pneumonia. After obtaining the classification model, when the bacteria to be measured are bacteria of unknown types, the same processing steps S1 - S2 are also required for classifying the bacteria to be measured. The Raman spectroscopic data of the bacteria to be measured are collected using a Raman spectrometer, and preprocessing such as wavenumber extraction, background subtraction, smoothing and noise reduction, and normalization is performed on the Raman spectroscopic data of the bacteria to be measured. The preprocessed Raman spectroscopic data of the bacteria to be measured are input into the classification model, and the output result is the probability of each type label. The type label with the highest probability is used as the type of the bacteria to be measured. When the classification model is a model for classifying Gram-positive bacteria, the output results are the probabilities corresponding to Gram-positive bacteria and Gram-negative bacteria respectively; when the classification model is a model for classifying 14 clinically common bacteria, the output results are the probabilities corresponding to the 14 clinically common bacteria respectively.

[0073] S6. Model evaluation.

[0074] Such as Figure 5 and Figure 6As shown in the figure, the present invention uses a confusion matrix to evaluate the effectiveness of a classification model for identifying the types of bacteria causing bacterial pneumonia. The confusion matrix is a visual evaluation method that can show the classification performance of a classifier among various categories. The confusion matrix is usually composed of an n×n matrix, which represents the prediction relationship between the true data labels and the corresponding predicted labels, where n is the number of categories in the dataset.

[0075] The relevant definitions and formulas are as follows:

[0076] Accuracy is the ratio of the number of correctly classified samples to the total number of samples, and the calculation formula is:

[0077] Accuracy = (TP + TN) / (TP + TN + FP + FN)

[0078] Among them, True positive (TP): the number of samples correctly classified as the positive class; True negative (TN): the number of samples correctly classified as the negative class; False positive (FP): the number of samples misclassified as the positive class (actually the negative class); False negative (FN): the number of samples misclassified as the negative class (actually the positive class).

[0079] Precision is the ratio of the number of samples correctly classified as the positive class to the number of all samples classified as the positive class, and the calculation formula is: Precision = TP / (TP + FP).

[0080] Recall is the ratio of the number of samples correctly classified as the positive class to the number of samples actually being the positive class, and the calculation formula is: Recall = TP / (TP + FN).

[0081] F1 Score is the harmonic mean of Precision and Recall, which is used to evaluate the performance of a classifier on an imbalanced dataset, and the calculation formula is: F1Score = 2×(Precision×Recall) / (Precision + Recall).

[0082] As Figure 5 shown, for the classification model with the classification method of Gram staining characteristics, the accuracy of the training set of the model reaches about 94% and tends to be stable, and the accuracy of the validation set is also stable at about 90%. At the same time, the loss also tends to be stable with the increase of epochs ( Figure 5 D). Obviously, the evaluation indicators such as the accuracy of the model are all improved compared with the PCA-LR results, and there is no overfitting phenomenon. Refer to Figure 5The ROC result in B shows that the model has strong classification ability for bacterial Gram type classification.

[0083] As shown in Table 1, the average accuracy, precision, recall, and F1 score of the classification model with the classification method of Gram staining characteristics are all around 91.4%.

[0084] Table 1: Evaluation of AlexNet Gram Classification Results

[0085] Precision Recall F1 Score AUC G+ 91.3% 91.4% 91.4% 0.970 G- 91.4% 91.3% 91.4% 0.970 Average 91.4% 91.4% 91.4% 0.970 Accuracy 91.4%

[0086] As Figure 6 shown, for the classification model with the classification method of the frequency of bacterial species in bacterial pneumonia infection (i.e., the classification model of 14 bacteria), the training accuracy shows a trend of fluctuating upward and stabilizes at about 70%; the validation accuracy also gradually stabilizes at an accuracy of 68%. In the loss image, the loss shows a trend of stable and fluctuating decline. Generally speaking, there is no obvious overfitting phenomenon in this model.

[0087] Table 2: Evaluation of 14 Bacteria Classification Results

[0088]

[0089]

[0090] As shown in Table 2, when the validation set data is used for classification by the trained model, the classification accuracy can reach 68.8%, and the average precision is 68.9%, the average recall is 68.8%, and the average F1 score is 68.5%. According to the ROC result performance, it can be seen that the classification model of 14 bacterial species also shows certain discrimination ability. Since AUC is a metric for binary classification problems, in this multi-classification problem, the predicted probabilities of classifying test samples into different bacterial species can be calculated.

[0091] As Figure 7 shown, the present invention is also compared with the principal component analysis method, and the Raman spectral data of the strains classified according to Gram-positive bacteria are used to discriminate the Gram type by PCA-logistic regression. The results show that the accuracy of this classifier is 89.5%, the precision is 89.2%, the recall is 89.4%, and the F1 score is 89.3%, which is lower than AlexNet.

Claims

1. A method for identifying bacterial pneumonia pathogens based on intelligent Raman technology, characterized in that: The following steps are involved: S1. Setting a type label according to the classification method of Gram staining characteristics or the frequency of occurrence of bacterial species in clinical bacterial pneumonia infection, selecting a known strain according to the type label, and collecting Raman spectral data of the known strain using a Raman spectrometer; S2. Preprocessing of Raman spectral data by wave number extraction, background subtraction, smoothing and noise reduction, and normalization; S3. Remove the third to fifth convolutional layers in the AlexNet model, replace the ReLU activation function in the AlexNet model with the Leaky ReLU activation function, and obtain a classification model; S4. The preprocessed Raman spectral data is used as a sample and divided into a training set and a validation set. The samples in the training set and the validation set and the corresponding type labels are input into a classification model for training to obtain a classification model for identifying bacterial pneumonia pathogens, wherein the classification model corresponds to a target classification method; S5. Collect the bacteria to be tested, and use a Raman spectrometer to collect Raman spectrum data of the bacteria to be tested, and perform preprocessing such as wavenumber extraction, background subtraction, smoothing and noise reduction, and normalization; input the preprocessed Raman spectrum data of the bacteria to be tested into the trained classification model to obtain the probability corresponding to the type label, and determine the type of the bacteria to be tested according to the probability corresponding to the type label.

2. The method for identifying bacterial pneumonia pathogens based on intelligent Raman technology according to claim 1, characterized in that: If the target classification method is Gram staining characteristic classification, the type labels include Gram-positive bacteria and Gram-negative bacteria; If the target classification method is the frequency of bacterial occurrence in clinical pneumonia, the type labels include: Acinetobacter baumannii, Staphylococcus epidermidis, Escherichia coli, Pseudomonas putida, Klebsiella pneumoniae, Enterococcus faecalis, Staphylococcus aureus, Staphylococcus haemolyticus, Enterococcus faecium, Stenotrophomonas maltophilia, Pseudomonas aeruginosa, Streptococcus agalactiae, Enterobacter cloacae, and Serratia marcescens.

3. The method for identifying bacterial pneumonia pathogens based on intelligent Raman technology according to claim 1, characterized in that: The specific method of using a Raman spectrometer to collect Raman spectrum data of known strains in step S1 is: The Raman spectrometer uses a laser power of 50 mW and a grating of 300 l / mm to emit laser light to known strains, and collects 100 Raman spectral data at different positions for each strain.

4. The method for identifying bacterial pneumonia pathogens based on intelligent Raman technology according to claim 1, characterized in that: The specific method of preprocessing the Raman spectrum data in step S3 is: S3-1. Select Raman spectrum data 400-1800cm -1 Fingerprint area; S3-2. Background removal of selected Raman spectral data using asymmetric least squares method; S3-3. The high-frequency noise of the Raman spectral data after background removal was smoothed using a Savitzky-Golay smoothing filter with a window size of 11 points and a third-order polynomial fitting; S3-4. Perform maximum normalization on each smoothed spectral data.

5. The method for identifying bacterial pneumonia pathogens based on intelligent Raman technology according to claim 1, characterized in that: The specific method of training the classification model in step S5 is: The initial learning rate is set to 0.001, the training process is set to 1000 epochs, the batch size is adjusted to 20 through cross-validation, and the dropout rate is 0.1.

Citation Information

Cited By

  • Bacteria real-time detection method and system

    CN120853166A

  • Bacterial real-time detection method and system

    CN120853166B

  • Rapid bacillus plant type identification method based on Raman spectrum and deep learning

    CN121453744A