A moldy bacterial identification method based on surface-enhanced Raman spectroscopy and ResNet neural network
Patent Information
- Application Number
- CN202510470833.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-15
- Publication Date
- 2026-10-23
AI Technical Summary
然而,细菌的拉曼特征峰主要来源于细菌的细胞壁成分,导致各个细菌的拉曼光谱具有高度的相似性,使识别变得困难具有挑战性
[0021]上述技术方案中的一个技术方案包括以下有益效应:传统霉腐细菌检测方法通常存在灵敏度低、设备成本大、样本干扰和便携性差等方面的局限性。同时鉴定时,需要专业人员操作,无法现场快速检测等问题。本发明提供了一种基于表面增强拉曼光谱和ResNet神经网络的无标记霉腐细菌识别方法,能够实现快速、无损且准确的检测。在检测和分析识别方面,相较于传统霉腐细菌检测和分析识别方法,该方法不需要专业操作员对数据结果进行人工解释,无需对细菌进行特殊标记或破坏,即可深入揭示样品的细菌成分变化。此外,该方法还能自动进行特征选择和提取,无需人工干预,进一步提高分析的效率和客观性。此外,目前细菌的拉曼光谱具有高度相似性,这使得识别变得困难具有挑战性。同时,为达到快速检测的要求,拉曼光谱采集时间的缩短,会使得光谱的信噪比降低,更加大了识别的难度。本发明提出的基于表面增强拉曼光谱和ResNet神经网络的霉腐细菌识别方法,能够克服传统拉曼光谱信噪比低的局限性。该方法能够通过ResNet神经网络模型直接处理短时间积分的拉曼光谱数据,降低分类识别过程的复杂性并获得高准确度的分类识别结果。
Smart Images

Figure CN122967265A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of mold and decay bacteria identification, and in particular to a method for identifying mold and decay bacteria based on surface-enhanced Raman spectroscopy and ResNet neural networks. Background Technology
[0002] Infectious diseases caused by pathogenic microorganisms have become one of the major challenges in global public health. Currently, the standard testing method for pathogenic bacteria in cosmetics in my country is the "Cosmetic Safety Technical Specifications" (2015 edition), which stipulates that thermotolerant coliforms, Pseudomonas aeruginosa, and Staphylococcus aureus must not be detected in products. Escherichia coli (a type of thermotolerant coliform) is a Gram-negative, non-spore-forming, short rod-shaped bacterium belonging to the Enterobacteriaceae family. Certain serotypes (such as Escherichia coli O157:H7) can produce toxins, causing food poisoning and other diseases, such as hemorrhagic diarrhea and hemolytic uremic syndrome. Staphylococcus aureus is a common pathogenic bacterium belonging to the Staphylococcus genus. It is one of the representative Gram-positive bacteria, producing hemolysins and enterotoxins, which can cause serious infections such as skin infections, pustules, boils, and scabs; in severe cases, it can cause sepsis. *Pseudomonas aeruginosa* is a Gram-negative bacillus and opportunistic pathogen that can invade through broken skin, causing skin infections and forming green pus in infected wounds. Cosmetic products can also be contaminated by other bacterial genera, such as *Bacillus*, *Staphylococcus*, and *Klebsiella*. *Bacillus megaterium* is a Gram-positive bacterium that, while harmless to humans, can hydrolyze lipids and proteins in cosmetics, producing pigments and odors, thus causing cosmetic spoilage. *Staphylococcus saprophyticus* is a Gram-positive coccus and opportunistic pathogen that can cause urinary tract infections, especially urethritis. Therefore, strict detection and control of microbial contamination in cosmetics is crucial for protecting consumer health and ensuring product quality. Scientific methods and standardized operations are needed to prevent and reduce these potential health risks.
[0003] In traditional microbial identification, plate culture is often a crucial step in the isolation and purification of microorganisms. However, this method requires several days of concentration, plating, identification, and the involvement of skilled personnel. Furthermore, the identification of unculturable microorganisms is challenging. While immunological techniques based on antigen-antibody interactions, including enzyme-linked immunosorbent assays (ELISA), fluorescence immunoassays, and electrochemical immunoassays, are widely used in bacterial detection, they also have limitations in sensitivity, specificity, equipment cost, sample interference, and portability. These drawbacks limit their application in certain scenarios, especially in resource-constrained environments. Molecular biology techniques can be used for DNA / RNA base identification, offering high throughput and specificity, but their high equipment cost, complex sample processing, and requirement for on-site professional personnel make them unsuitable for rapid detection needs.
[0004] Raman spectroscopy provides molecular fingerprint information of microorganisms, enabling rapid identification of microbial species, metabolic states, and even drug resistance by analyzing spectral characteristics. However, the Raman peaks of bacteria mainly originate from bacterial cell wall components, resulting in high similarity in the Raman spectra of various bacteria, making identification difficult and challenging. Furthermore, the complexity and high dimensionality of Raman spectral data pose significant challenges to traditional analysis methods. The introduction of machine learning techniques offers a new approach to solving this problem. ResNet neural networks, a deep learning model, solve the training difficulties of deep networks through residual connections, improving model performance. It can directly extract hidden features from raw data without complex preprocessing and is suitable for classifying spectral data with low signal-to-noise ratios. Summary of the Invention
[0005] To address the aforementioned shortcomings, the present invention aims to propose a method for identifying mold and decay bacteria based on surface-enhanced Raman spectroscopy and a ResNet neural network. This method achieves accurate identification of mold and decay bacteria using surface-enhanced Raman spectroscopy with an integration time of 5 seconds by training a ResNet neural network.
[0006] To achieve this objective, the present invention adopts the following technical solution:
[0007] A method for identifying mold and decay bacteria based on surface-enhanced Raman spectroscopy and a ResNet neural network model includes the following steps:
[0008] S1. Raman substrate preparation: 50nm silver nanoparticles were deposited on tin foil to prepare tin foil-AgNPs Raman substrate;
[0009] S2. Data Acquisition: Prepare mold and putrefactive bacterial solutions with a certain type of bacteria as the main component, and drop them onto the Raman substrate in step S1 respectively. Collect Raman spectra in sequence. The bacteria in the mold and putrefactive bacterial solutions are composed of five types of bacteria: Staphylococcus aureus, Escherichia coli, Pseudomonas aeruginosa, Staphylococcus saprophyticus, and Bacillus megaterium. A certain type of bacteria as the main component means that the proportion of a certain type of bacteria among the five types of bacteria is not less than 60%.
[0010] S3. Data preprocessing: Remove interference signals from the obtained Raman spectra;
[0011] S4. Constructing the dataset: Based on the principal component categories of the moldy bacterial liquid, the preprocessed Raman spectral data are classified into one category to obtain the spectral dataset, which is divided into training set, validation set and test set.
[0012] S5. Building a ResNet neural network model: Use MATLAB to build a ResNet neural network model based on surface-enhanced Raman spectroscopy;
[0013] S6. Training the ResNet neural network model: The training set and validation set described in step S4 are put into the network model described in step S5 for training. The network is continuously optimized through the propagation algorithm and parameter update of deep learning, and finally the optimized ResNet neural network model is obtained.
[0014] S7. Test the ResNet neural network model: Use the test set described in step S4 to input the optimized ResNet neural network model in step S6 for testing, and evaluate the test results.
[0015] Furthermore, 50 nm silver nanoparticles were prepared by reducing silver nitrate with sodium citrate.
[0016] Furthermore, the concentration of mold and decay bacteria solution was 10. 6 CFU / mL, which is of cosmetic origin.
[0017] Furthermore, in step S2, when acquiring Raman spectra, a 15×objective lens with a numerical aperture of 15 is selected, a 532nm argon ion laser is used, the control power is 0.54mW, the spot diameter is 5μm, the power attenuation is 0.1, the acquisition time is 5 seconds, the acquisition frequency is 1 time, and the integration is set to 5 seconds; Raman spectra in the range of 400~1800cm-1 are acquired.
[0018] Furthermore, in step S3, the obtained Raman spectrum is processed to remove interference signals, and Polynom baseline correction and Savitzky-Golay smoothing are performed using NGSLabSpec software to remove narrow cosmic rays. Then, normalization is performed using Origin software.
[0019] Furthermore, in step 4, the spectral dataset is randomly selected into training set, validation set and test set in a ratio of 7:1:2.
[0020] Further, in step S5, the Raman spectral data is converted into a 4D image format using the `reshape` function in MATLAB software. The 4D parameters, namely the number of samples, the number of color channels, the image height, and the image width, are set to 1310, 1, 1810, and 1, respectively. The converted data is then passed to a ResNet neural network model. The initial convolutional layer of this model has a kernel size of 3, a stride of 1, and padding of 1. It then passes through three residual modules, each containing two identical basic blocks with convolutional sizes of 3, 5, and 7, a stride of 1, and padding of 1, 2, and 3, respectively. The ReLU activation function is used after each layer to enhance nonlinear expression. Batch normalization is used after each layer to accelerate model convergence and reduce overfitting. Finally, a global average pooling layer and a fully connected layer map the feature vectors to the corresponding number of classes for a specific classification task. The pooling layer is of the max pooling type, with a window size of 5 and a stride of 1. The fully connected layer has 7 neurons, and the output is mapped to a probability distribution using the softmax function.
[0021] One of the above technical solutions includes the following beneficial effects: Traditional methods for detecting mold and putrefactive bacteria typically suffer from limitations such as low sensitivity, high equipment cost, sample interference, and poor portability. Furthermore, identification requires professional personnel and cannot be performed on-site quickly. This invention provides a label-free method for identifying mold and putrefactive bacteria based on surface-enhanced Raman spectroscopy and a ResNet neural network, enabling rapid, non-destructive, and accurate detection. In terms of detection and analysis, compared to traditional methods, this method eliminates the need for professional operators to manually interpret data results and avoids the need for special labeling or destruction of bacteria, thus revealing in-depth changes in the bacterial composition of the sample. Moreover, this method can automatically select and extract features without human intervention, further improving the efficiency and objectivity of the analysis. Additionally, the high similarity of bacterial Raman spectra makes identification difficult and challenging. Simultaneously, shortening the Raman spectroscopy acquisition time to achieve rapid detection reduces the signal-to-noise ratio, further increasing the difficulty of identification. The mold and putrefactive bacteria identification method based on surface-enhanced Raman spectroscopy and a ResNet neural network proposed in this invention overcomes the limitation of low signal-to-noise ratio in traditional Raman spectroscopy. This method can directly process short-time integral Raman spectral data through the ResNet neural network model, reducing the complexity of the classification and recognition process and obtaining highly accurate classification and recognition results. Attached Figure Description
[0022] Figure 1 This is a flowchart of an embodiment of the present invention;
[0023] Figure 2The average Raman spectra of mold and putrefactive bacteria (including Staphylococcus aureus, Escherichia coli, Pseudomonas aeruginosa, Staphylococcus saprophyticus, and Bacillus megaterium) from cosmetics are shown.
[0024] Figure 3 This is a schematic diagram based on surface-enhanced Raman spectroscopy and a ResNet neural network model.
[0025] Figure 4 The training and validation accuracy curves for 100 training iterations based on surface-enhanced Raman spectroscopy and a ResNet neural network model;
[0026] Figure 5 Training and validation loss curves for 100 training iterations based on surface-enhanced Raman spectroscopy and a ResNet neural network model;
[0027] Figure 6 The ROC curves for each category are based on surface-enhanced Raman spectroscopy and the ResNet neural network model, where the AUC is greater than 0.97.
[0028] Figure 7 The classification performance for each category is based on surface-enhanced Raman spectroscopy and a ResNet neural network model;
[0029] Figure 8 This is the confusion matrix of the test set during the training process based on surface-enhanced Raman spectroscopy and the ResNet neural network model. Detailed Implementation
[0030] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or components having similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and are not to be construed as limiting the present invention.
[0031] like Figure 1 As shown, a method for identifying mold and decay bacteria based on surface-enhanced Raman spectroscopy and ResNet neural network includes the following steps:
[0032] S1. Raman substrate preparation: 50nm silver nanoparticles were prepared by reducing silver nitrate with sodium citrate. The silver nanoparticles were then deposited on tin foil to prepare a tin foil-AgNPs substrate.
[0033] S2. Data acquisition: Prepare 10 solutions with a specific bacterium as the main component according to Table 1. 6 A CFU / mL solution of cosmetic-derived mold and putrefactive bacteria (including Staphylococcus aureus, Escherichia coli, Pseudomonas aeruginosa, Staphylococcus saprophyticus, and Bacillus megaterium) was added dropwise to the Raman substrate prepared in step S1, and Raman spectra were acquired using a Raman spectrometer. Figure 2 As shown, a 15×objective lens was selected for data acquisition. A suitable spot size and high resolution contribute to the stability of the Raman signal and improve the resolution and accuracy of the Raman spectrum. A 532nm argon-ion laser was chosen, as it has good light source stability, is suitable for Raman scattering experiments on various substances, has a high signal-to-noise ratio, and can obtain effective spectra in a short time. The control settings were: power 0.54mW, spot diameter 5μm, laser power attenuation 0.1 (to reduce fluorescence background), acquisition time 5 seconds, acquisition frequency once, and integration set to 5 seconds. Raman spectra were acquired in the range of 400–1800 cm⁻¹, which includes most of the Raman signals from bacteria.
[0034] Table 1. Proportion of Staphylococcus aureus, Escherichia coli, Pseudomonas aeruginosa, Staphylococcus saprophyticus, and Bacillus megaterium in each group
[0035]
[0036]
[0037] S3. Dataset preprocessing removes interference signals from the obtained Raman spectra, improving spectral quality and establishing a reliable foundation for subsequent analysis. Polynom baseline processing in NGSLabSpec software, with the highest power set to 6, removes background drift, improves spectral quality, and accurately identifies characteristic peaks. Savitzky-Golay smoothing in NGSLabSpec software removes noise with a window size of 7, removing cosmic rays, eliminating unnecessary noise, improving data stability, and enhancing data quality. Then, Origin software is used for normalization to a range of 0 to 100, making the data more comparable and readable, and more suitable for neural networks. After baseline correction, smoothing, denoising, and normalization, the Raman spectral data is cleaner and more accurate, reducing the impact of spectral intensity variations on the results and facilitating subsequent data analysis.
[0038] S4. Construct the dataset. Based on the principal components of the mold and putrefactive bacterial solutions, the preprocessed Raman spectral data are grouped into one class to obtain the spectral dataset. Samples in groups 1, 2, 3, 4, 5, and 7 have *Staphylococcus aureus* as the principal component; samples in groups 10, 12, 22, 24, 26, and 27 have *Escherichia coli* as the principal component; samples in groups 9, 11, 15, 19, 20, and 30 have *Pseudomonas aeruginosa* as the principal component; and samples in groups 8, 14, 23, 25, 28, and 29 have *Staphylococcus saprophyticus* as the principal component. Samples in groups 6, 13, 16, 17, 18, and 21 have *Bacillus megaterium* as the principal component. The spectral dataset is randomly selected in a 7:1:2 ratio to form a training set, a validation set, and a test set. The training set provides sufficient training data for learning; the validation set is used to adjust the model parameters and find the optimal model; and the independent test set is used to evaluate the model's generalization ability.
[0039] S5. Building a ResNet Neural Network Model: Using MATLAB, a network model based on surface-enhanced Raman spectroscopy and ResNet was built. First, the Raman spectral data was converted into a 4D image format using the `reshape` function in MATLAB. The 4D parameters—number of samples, number of color channels, image height, and image width—were set to 1310, 1, 1810, and 1, respectively, providing suitable input data for the ResNet neural network model. The converted data was then fed into the ResNet neural network model. After initial convolutional layers, key features were effectively extracted and data noise was reduced, providing a more refined input to the ResNet neural network model, thereby improving training efficiency and model stability. The initial convolutional layers of this model had a kernel size of 3, a stride of 1, and padding of 1. Subsequently, three deep residual modules of the ResNet neural network model were used to further optimize feature extraction, learn complex spectral features, avoid the gradient vanishing problem, and reduce the risk of overfitting. Each residual module contained two identical basic blocks with convolutional sizes of 3, 5, and 7, respectively, a stride of 1, and padding of 1, 2, and 3, respectively. Each layer uses the ReLU activation function to enhance non-linear expressive power. Batch normalization is used after each layer to accelerate model convergence and reduce overfitting. Finally, a global average pooling layer and a fully connected layer integrate the feature vectors and map them to the specific classification task, reducing the risk of overfitting. The pooling layer uses max pooling with a window size of 5 and a stride of 1; the fully connected layer has 7 neurons, and the softmax function maps the output to a probability distribution.
[0040] S6. Training the ResNet neural network model: The training and validation sets processed in step S4 are fed into the network model from step S5 for training. The network is continuously optimized through deep learning propagation algorithms and parameter updates, finally yielding the optimized ResNet neural network model. Figure 4-5 As shown, the loss of the training and validation datasets gradually decreases, the accuracy steadily improves, and the curves tend to converge, indicating that no overfitting occurs during the training process.
[0041] S7. Test the ResNet neural network model: Input the test set (not used in the neural network training in step S4) into the optimized network model obtained in step S6 for testing, and evaluate the test results. For example... Figure 6 As shown, the ROC curves for the spectra of each type of bacteria are presented, with AUC values all greater than 0.97. The closer the ROC curve is to 1, the better the recognition accuracy. These results collectively demonstrate the model's good performance in the accurate identification of mold and decay bacteria. Figure 7 As shown, precision, recall, and F1 score, as key metrics, clearly reveal the performance of the neural network model in each category. Precision indicates the accuracy of the model in predicting positive samples, recall reflects the model's ability to identify positive samples, and F1 score measures the balance between precision and recall. For each category, the model performs very well in precision, recall, and F1 score, approaching 1.0, indicating that the model has good classification performance in these categories. Figure 8 The confusion matrix presents the model's performance on five classification tasks: Staphylococcus aureus, Escherichia coli, Pseudomonas aeruginosa, Staphylococcus saprophyticus, and Bacillus megaterium. The diagonal data shows that the classification accuracy for Staphylococcus aureus, Escherichia coli, Pseudomonas aeruginosa, Staphylococcus saprophyticus, and Bacillus megaterium is 93.4%, 96.7%, 93.3%, 96.7%, and 100%, respectively. This indicates that the model has high overall classification accuracy and performs best on Bacillus megaterium.
[0042] Traditional methods for detecting mold and putrefactive bacteria typically suffer from limitations such as low sensitivity, high equipment costs, sample interference, and portability. Furthermore, identification requires professional personnel and cannot be performed on-site quickly. This invention provides a label-free method for identifying mold and putrefactive bacteria based on surface-enhanced Raman spectroscopy and ResNet networks, enabling rapid, non-destructive, and accurate detection. In terms of detection and analysis, compared to traditional methods, this method eliminates the need for professional operators to manually interpret data results and requires no special labeling or destruction of bacteria, thus revealing in-depth changes in the bacterial composition of the sample. Moreover, this method automatically selects and extracts features without human intervention, further improving the efficiency and objectivity of the analysis.
[0043] Furthermore, the high similarity of bacterial Raman spectra makes identification difficult and challenging. Simultaneously, to achieve rapid detection, shortening the Raman spectroscopy acquisition time reduces the signal-to-noise ratio, further increasing the difficulty of identification. The proposed method for identifying mold and putrefactive bacteria based on surface-enhanced Raman spectroscopy and a ResNet neural network overcomes the limitation of low signal-to-noise ratio in traditional Raman spectroscopy. This method can directly process short-time integrated Raman spectral data using a ResNet neural network model, reducing the complexity of the classification process and obtaining highly accurate classification results.
[0044] The technical principles of the present invention have been described above in conjunction with specific embodiments. These descriptions are merely for explaining the principles of the invention and should not be construed as limiting the scope of protection of the invention in any way. Based on this explanation, those skilled in the art can readily conceive of other specific embodiments of the invention without inventive effort, and these embodiments will all fall within the scope of protection of the present invention.
Claims
1. A method for identifying mold and decay bacteria based on surface-enhanced Raman spectroscopy and a ResNet neural network model, characterized in that, Includes the following steps: S1. Raman substrate preparation: 50nm silver nanoparticles were deposited on tin foil to prepare tin foil-AgNPs Raman substrate; S2. Data Acquisition: Prepare mold and putrefactive bacterial solutions with a specific bacterium as the main component, and drop them onto the Raman substrate from step S1. Collect Raman spectra sequentially. The bacteria in the mold and putrefactive bacterial solutions consist of five types of bacteria: Staphylococcus aureus, Escherichia coli, Pseudomonas aeruginosa, Staphylococcus saprophyticus, and Bacillus megaterium. A specific bacterium as the main component means that the proportion of a specific bacterium among the five types of bacteria is not less than 60%. S3. Data preprocessing: Remove interference signals from the obtained Raman spectra; S4. Constructing the dataset: Based on the principal component categories of the moldy bacterial liquid, the preprocessed Raman spectral data are classified into one category to obtain the spectral dataset, which is then divided into training set, validation set and test set. S5. Building a ResNet neural network model: Use MATLAB to build a ResNet neural network model based on surface-enhanced Raman spectroscopy; S6. Training the ResNet neural network model: The training set and validation set described in step S4 are put into the network model described in step S5 for training. The network is continuously optimized through the propagation algorithm and parameter update of deep learning, and finally the optimized ResNet neural network model is obtained. S7. Test the ResNet neural network model: Use the test set described in step S4 to input the optimized ResNet neural network model in step S6 for testing, and evaluate the test results.
2. The identification method as described in claim 1, characterized in that, Silver nanoparticles of 50 nm were prepared by reducing silver nitrate with sodium citrate.
3. The identification method as described in claim 1, characterized in that, The concentration of mold and decay bacteria solution is 10. 6 CFU / mL, which is extracted from cosmetics.
4. The identification method as described in claim 1, characterized in that, In step S2, when acquiring Raman spectra, a 15×objective lens with a numerical aperture of 15 is selected, a 532nm argon ion laser is used, the control power is 0.54mW, the spot diameter is 5μm, the power attenuation is 0.1, the acquisition time is 5 seconds, the acquisition frequency is 1 time, and the integration is set to 5 seconds; Raman spectra in the range of 400~1800cm-1 are acquired.
5. The identification method as described in claim 1, characterized in that, In step S3, the obtained Raman spectrum is processed to remove interference signals, and Polynom baseline correction and Savitzky-Golay smoothing are performed using NGSLabSpec software to remove narrow cosmic rays. Then, normalization is performed using Origin software.
6. The identification method as described in claim 1, characterized in that, In step 4, the pretreated Raman spectra are divided into five categories according to the bacterial species of the moldy bacterial solution. The Raman spectra of samples of the same species are grouped into one category to obtain the spectral dataset.
7. The identification method as described in claim 1, characterized in that, In step 4, the spectral dataset is randomly selected into training, validation, and test sets in a ratio of 7:1:
2.
8. The identification method as described in claim 1, characterized in that, In step S5, the Raman spectral data is converted into a 4D image format using the `reshape` function in MATLAB software. The 4D parameters—number of samples, number of color channels, image height, and image width—are set to 1310, 1, 1810, and 1, respectively. The converted data is then passed to a ResNet neural network model. The initial convolutional layer of this model has a kernel size of 3, a stride of 1, and padding of 1. It then passes through three residual modules, each containing two identical basic blocks with convolutional sizes of 3, 5, and 7, all with a stride of 1 and padding of 1, 2, and 3, respectively. Each layer is followed by a ReLU activation function to enhance nonlinear expression. Batch normalization is applied after each layer to accelerate model convergence and reduce overfitting. Finally, a global average pooling layer and a fully connected layer map the feature vectors to the corresponding number of classes for a specific classification task. The pooling layer uses max pooling with a window size of 5 and a stride of 1. The fully connected layer has 7 neurons, and the output is mapped to a probability distribution using the softmax function.