A Non-destructive Detection Method and System for Microparticle Disease in Silkworm Based on Deep Learning
Patent Information
- Application Number
- CN202310289482.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-23
- Publication Date
- 2026-09-01
- Estimated Expiration
- 2043-03-23
AI Technical Summary
然而,母蛾镜检工序复杂、检测时间长且检测结果受检测人员技术水平及经验等诸多主观因素影响,已经不能满足如今的生产需求;
[0048] The beneficial effects of the method and system of this invention are as follows: This invention collects Raman spectral data from silkworm egg samples. Raman spectroscopy can provide fingerprint information of macromolecules in organisms, such as proteins, carbohydrates, and lipids. Furthermore, by performing data augmentation processing on the collected Raman spectral data of silkworm egg samples, the data amplification eliminates the extreme imbalance between positive and negative samples, enabling the classifier to correctly identify most samples and improving the generalization ability of the model. Finally, by constructing the R-DenseNet deep learning classification model, the Raman spectral dataset of silkworm microparticle disease is classified and trained. The accuracy of R-DenseNet is comparable to that of ResNet, but the number of parameters for model training is only 1/3 of that of ResNet, which greatly saves computational costs, significantly improves the model's recognition efficiency, and is more conducive to network training and deployment.
Smart Images

Figure CN116364275B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of Raman spectroscopy data classification technology, and in particular to a non-destructive detection method and system for silkworm microparticle disease based on deep learning. Background Technology
[0002] Silkworm microsporidiosis is a silkworm disease caused by infection and parasitism of silkworm microspores (Nosema Bombycis, Nb), primarily transmitted through ingestion and embryo-seed transmission. Silkworm microsporidiosis poses a devastating threat to silk production and is listed as the sole legally mandated inspection target for silkworm seed production. Microscopic examination of the mother moth is an effective measure to prevent the transmission of microsporidiosis pathogens through embryo-seed transmission and is currently the most commonly used method for detecting silkworm microsporidiosis. However, the microscopic examination of the mother moth is complex, time-consuming, and the results are susceptible to subjective factors such as the skill level and experience of the testing personnel, and therefore no longer meets current production needs.
[0003] Raman spectroscopy can provide fingerprint information of macromolecules in organisms, such as proteins, carbohydrates, and lipids. However, the original Raman signal is weak, easily affected by noise, and the Raman spectra of the same substance are very similar, making it difficult to identify by humans. Therefore, traditional machine learning methods are widely used in spectral classification applications. Existing methods include using near-infrared diffuse transmission spectroscopy to establish partial least squares discriminant analysis (PLS_DA), backpropagation neural network (BPNN), and support vector machine classification (SVM) models to quickly and non-destructively identify the sex of silkworm pupae inside cocoons. A PLS_DA model based on autofluorescence spectroscopy, Raman spectroscopy, and mixed spectroscopy has been established to achieve rapid detection of citrus Huanglongbing (HLB). Furthermore, there is a feature selection method based on support vector machine bootstrap reweighted sampling (BRS-SVM) to select characteristic wavelengths of the near-infrared spectrum and then use SVM for modeling. When selecting a small number of features, BRS-SVM outperforms other feature selection algorithms. However, the classification effect of traditional machine learning methods mainly depends on the spectral preprocessing strategy, and the optimal preprocessing strategy is often found based on human experience, which is not efficient. Summary of the Invention
[0004] To address the aforementioned technical problems, the present invention aims to provide a non-destructive detection method and system for silkworm microsporidiosis based on deep learning. By constructing a deep learning classification model based on R-DenseNet, the Raman spectrum of silkworm microsporidiosis can be rapidly, accurately, and non-destructively detected.
[0005] The first technical solution adopted in this invention is: a non-destructive detection method for silkworm microparticle disease based on deep learning, comprising the following steps:
[0006] Raman spectral data of silkworm egg samples were collected and preprocessed to construct a Raman spectral dataset of silkworm microparticle disease.
[0007] By introducing densely connected blocks and transformation layers, a deep learning classification model based on R-DenseNet is constructed.
[0008] The deep learning classification model based on R-DenseNet was trained to classify the Raman spectroscopy dataset of silkworm microparticle disease, and the classification learning results of silkworm microparticle disease were obtained.
[0009] Furthermore, the step of collecting Raman spectral data from silkworm egg samples and performing data preprocessing to construct a Raman spectral dataset for silkworm microparticle disease specifically includes:
[0010] Obtain silkworm egg samples;
[0011] The silkworm egg samples were placed on a glass slide, and Raman laser acquisition was performed on the silkworm egg samples using a laser confocal micro Raman spectrometer to obtain the Raman spectral data of the silkworm egg samples.
[0012] The silkworm egg samples collected by Raman laser were placed in an artificial climate chamber with a temperature of 25.5-26.5℃ and a relative humidity of more than 85% for incubation treatment to obtain ant-like silkworms and dead eggs;
[0013] The silkworm ants and dead eggs were placed in a mortar and ground with water to prepare sample tablets.
[0014] The sample slides were examined under a microscope. Based on the microscopic examination results, the silkworm eggs were labeled to obtain labeled silkworm egg samples. The labeled silkworm egg samples included samples of silkworms with microparticle disease and healthy control samples.
[0015] Based on the Raman spectral data of silkworm egg samples, data enhancement processing was performed on the labeled silkworm egg samples to obtain a Raman spectral dataset of silkworm microparticle disease.
[0016] Furthermore, the step of performing data enhancement processing on the labeled silkworm egg samples based on the Raman spectral data of silkworm egg samples to obtain the silkworm microparticle disease Raman spectral dataset specifically includes:
[0017] Based on the Raman spectral data of silkworm egg samples, the labeled silkworm egg samples were subjected to translational spectral enhancement processing to obtain a translational amplified Raman spectral dataset of silkworm microparticle disease.
[0018] Random noise was added to the Raman spectral data of silkworm egg samples to obtain a noisy amplified Raman spectral dataset of silkworm microparticle disease.
[0019] Using a random scaling factor that sums to 1, the Raman spectral data curves of multiple silkworm egg samples of the same type are linearly superimposed to obtain the superimposed Raman spectral dataset of silkworm microparticle disease. The same type of sample refers to silkworm microparticle disease samples or healthy control samples.
[0020] By combining the translation-amplified Raman spectrum dataset of silkworm microparticle disease, the noise-amplified Raman spectrum dataset of silkworm microparticle disease, and the superimposed Raman spectrum dataset of silkworm microparticle disease, a Raman spectrum dataset of silkworm microparticle disease is obtained.
[0021] Furthermore, the step of introducing densely connected blocks and transformation layers to construct a deep learning classification model based on R-DenseNet specifically includes:
[0022] The constructed R-DenseNet-based deep learning classification model includes an initial convolutional layer, four densely connected blocks, three transformation layers, an average pooling layer, and a fully connected layer. The network layer structure of the R-DenseNet-based deep learning classification model is as follows: initial convolutional layer, first densely connected block, first transformation layer, second densely connected block, second transformation layer, third densely connected block, third transformation layer, fourth densely connected block, average pooling layer, and fully connected layer.
[0023] The initial convolutional layer has 64 convolutional kernels, each kernel size is 1×5, the stride is set to 2, and the padding strategy is edge padding.
[0024] A conversion layer is provided between two densely connected blocks. This conversion layer compresses the number of feature channels output by the previous densely connected block and then transmits them to the next densely connected block.
[0025] The conversion layer consists of a convolutional kernel with a stride of 1 and a size of 1×1, and an average pooling layer with a stride of 2 and a size of 1×2.
[0026] The average pooling layer has a size of 1×7, a step size of 2, and an edge filling strategy.
[0027] Furthermore, the basic structure in the dense connection block includes a first batch normalization layer, a first ReLU activation function, a 1×1 convolutional layer, a second batch normalization layer, a second ReLU activation function, and a 1×3 convolutional layer. The first dense connection block consists of one basic structure, the second dense connection block consists of two basic structures, the third dense connection block consists of ten basic structures, and the fourth dense connection block consists of sixteen basic structures.
[0028] Furthermore, the step of training the R-DenseNet-based deep learning classification model to classify the silkworm microsporidiosis Raman spectroscopy dataset and obtaining the classification learning results for silkworm microsporidiosis specifically includes:
[0029] The Raman spectroscopy dataset of silkworm microparticle disease was input into a deep learning classification model based on R-DenseNet;
[0030] The initial convolutional layer of the deep learning classification model based on R-DenseNet performs convolution kernel calculation on the input silkworm microparticle disease Raman spectrum dataset to obtain the feature information of the silkworm microparticle disease Raman spectrum data.
[0031] The densely connected blocks of the R-DenseNet deep learning classification model are used to perform dense connection processing on the feature information of the Raman spectral data of silkworm microparticle disease, and output the number of feature channels of the Raman spectral data of silkworm microparticle disease.
[0032] The transformation layer of the deep learning classification model based on R-DenseNet compresses the number of feature channels in the Raman spectral data of silkworm microparticle disease, and outputs the number of feature channels in the compressed Raman spectral data of silkworm microparticle disease.
[0033] The average pooling layer of the deep learning classification model based on R-DenseNet is used to average the feature matrix of the feature channels of the compressed Raman spectral data of silkworm microparticle disease to obtain the compressed feature matrix.
[0034] The fully connected layer of the R-DenseNet-based deep learning classification model connects all nodes of the compressed feature matrix to obtain comprehensive feature information.
[0035] The comprehensive feature information is mapped using the softmax function to the (0, 1) interval, and the classification learning result of silkworm microparticle disease is output.
[0036] Furthermore, the step of densely connecting the feature information of the Raman spectral data of silkworm microparticle disease using the densely connected blocks of the R-DenseNet-based deep learning classification model to output the feature channel number of the silkworm microparticle disease Raman spectral data specifically includes:
[0037] The feature information of the Raman spectral data of silkworm microparticle disease is input into the dense connection block of the deep learning classification model based on R-DenseNet;
[0038] The batch normalization layer based on densely connected blocks forces the characteristic information of the Raman spectral data of silkworm microparticle disease to a uniform data distribution;
[0039] The ReLU activation function based on densely connected blocks is used to map the data output from the batch normalization layer.
[0040] The convolutional layer based on densely connected blocks performs feature extraction processing on the mapped Raman spectral data of silkworm microparticle disease, and outputs the number of feature channels of the Raman spectral data of silkworm microparticle disease.
[0041] Furthermore, the batch normalization layer of the densely connected block uses cross-entropy as the loss function during model training, and its expression is as follows:
[0042]
[0043] In the above formula, x i Represents the i-th spectral sample; y i The label represents the i-th spectral sample; y i,k This indicates that the predicted category k of the i-th sample is p; i,k This represents the probability of predicting the i-th sample as class k; N represents the number of samples; and K represents the number of classes.
[0044] The second technical solution adopted in this invention is: a non-destructive detection system for silkworm microparticle disease based on deep learning, comprising:
[0045] The acquisition module is used to collect Raman spectral data of silkworm egg samples and perform data preprocessing to construct a Raman spectral dataset of silkworm microparticle disease.
[0046] The building blocks are used to introduce densely connected blocks and transformation layers to build a deep learning classification model based on R-DenseNet;
[0047] The classification module uses a deep learning classification model based on R-DenseNet to train the classification of the silkworm microparticle disease Raman spectroscopy dataset, and obtains the classification learning results of silkworm microparticle disease.
[0048] The beneficial effects of the method and system of this invention are as follows: This invention collects Raman spectral data from silkworm egg samples. Raman spectroscopy can provide fingerprint information of macromolecules in organisms, such as proteins, carbohydrates, and lipids. Furthermore, by performing data augmentation processing on the collected Raman spectral data of silkworm egg samples, the data amplification eliminates the extreme imbalance between positive and negative samples, enabling the classifier to correctly identify most samples and improving the generalization ability of the model. Finally, by constructing the R-DenseNet deep learning classification model, the Raman spectral dataset of silkworm microparticle disease is classified and trained. The accuracy of R-DenseNet is comparable to that of ResNet, but the number of parameters for model training is only 1 / 3 of that of ResNet, which greatly saves computational costs, significantly improves the model's recognition efficiency, and is more conducive to network training and deployment. Attached Figure Description
[0049] Figure 1 This is a flowchart of the steps of a non-destructive detection method for silkworm microparticle disease based on deep learning according to the present invention;
[0050] Figure 2 This is a structural block diagram of a deep learning-based non-destructive testing system for silkworm microparticle disease according to the present invention;
[0051] Figure 3 This is a schematic diagram of the Raman spectral data classification process based on R-DenseNet of this invention;
[0052] Figure 4 This is a schematic diagram of a silkworm egg sample collected by the present invention;
[0053] Figure 5 This is a schematic diagram of the process for constructing the silkworm microparticle disease dataset of this invention;
[0054] Figure 6 This is a schematic diagram of the Raman spectroscopy data acquisition platform of the present invention;
[0055] Figure 7 This is a schematic diagram of the individual fertilization of silkworm eggs in an artificial climate chamber culture box according to the present invention;
[0056] Figure 8 This is a schematic diagram of silkworm microspores displayed under a microscope after the silkworm eggs of this invention have been induced to hatch;
[0057] Figure 9 This is a schematic diagram of the curve obtained by amplifying the Raman spectral data of silkworm microparticle disease through left and right translation in this invention;
[0058] Figure 10 This is a schematic diagram of the Raman spectral data of silkworm microparticle disease amplified by adding noise of different intensities according to the present invention;
[0059] Figure 11 This is a schematic diagram of the curve obtained by linearly superimposing Raman spectral data of silkworm microparticle disease according to the present invention;
[0060] Figure 12 This is a schematic diagram of the existing connection mechanism between ResNet and DenseNet;
[0061] Figure 13 This is a schematic diagram of the existing DenseNet network structure using DenseBlock+Transition;
[0062] Figure 14 This is a schematic diagram of the network structure of the deep learning classification model based on R-DenseNet in this invention;
[0063] Figure 15This is a schematic diagram of the mean and standard deviation of healthy samples and diseased samples in a specific embodiment of the present invention;
[0064] Figure 16 This is a schematic diagram showing the comparison of the accuracy of different algorithms before and after baseline correction in a specific embodiment of the present invention;
[0065] Figure 17 This is a schematic diagram comparing the recognition accuracy of different algorithms before and after the complete preprocessing steps in a specific embodiment of the present invention;
[0066] Figure 18 This is a schematic diagram illustrating the effect of noise intensity on the recognition accuracy of different algorithms in a specific embodiment of the present invention. Detailed Implementation
[0067] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments. The step numbers in the following embodiments are only for ease of explanation and do not limit the order of the steps. The execution order of each step in the embodiments can be adapted according to the understanding of those skilled in the art.
[0068] Reference Figure 1 and Figure 3 This invention provides a non-destructive detection method for silkworm microparticle disease based on deep learning, the method comprising the following steps:
[0069] S1. Collect Raman spectral data of silkworm egg samples and perform data preprocessing to construct a Raman spectral dataset of silkworm microparticle disease;
[0070] Specifically, the original maternal eggs laid by silkworm moths infected with silkworm microsporidiosis were used as the test samples in this experiment, detected by microscopic examination of the female moths. The samples included two varieties, Furong and 7532, both provided by the Guangdong Provincial Sericulture Technology Extension Center. The silkworm egg samples are as follows: Figure 4 As shown, for female moths diagnosed with silkworm microsporidiosis by microscopic examination, the Nb embryo transmission rate of their eggs is uncertain, meaning the disease status of the obtained egg samples is unknown. To address this uncertainty, the collected Raman data needs to be labeled. Therefore, a process for constructing Raman spectral data for microsporidiosis was developed, such as... Figure 5 As shown, the process steps include:
[0071] S11. Raman spectroscopy data acquisition;
[0072] Specifically, the FinderOne laser confocal micro Raman spectrometer manufactured by Beijing Zhuoli Hanguang Instrument Co., Ltd. was used, equipped with a high-performance image-corrected spectrometer and an LDC-DD technology CCD detector. The laser excitation wavelength was 785 nm. Its spectral detection range was 100–3000 cm⁻¹. -1Spectral resolution of 3cm -1 The detector is a TE deep-cooled back-sensing CCD array detector, and the Raman spectroscopy data acquisition platform is as follows: Figure 6 As shown, during spectrum acquisition, the sample to be tested is placed on a glass slide, and the Raman laser is aimed at the center of the silkworm egg to begin acquisition. The specific acquisition parameters are: laser power 40nW, a custom "silkworm egg" PL scheme is selected, grating: 3-G600 / B750, wavenumber range 800~1800cm-1, integration time 10s, and cumulative number of times 2.
[0073] S12, premature greening treatment;
[0074] Specifically, after Raman spectroscopy data collection, all silkworm eggs were individually packaged in... Figure 7 In the culture box shown, the black stripes represent silkworm larvae, the white circular shells represent eggshells, and the dark circular shells represent unhatched silkworm eggs. These are placed in an artificial climate chamber at 26℃±0.5℃ and a relative humidity of over 85% to induce hatching. During this process, the Nb concentration inside the silkworm eggs will gradually increase. Testing begins on the 8th day after hatching.
[0075] S13, Microscopic examination;
[0076] Specifically, after each silkworm egg is induced to hatch, the larvae or dead eggs are placed in a mortar, ground with a small amount of water, and pressed into a sample for testing. Microscopic examination is then performed; under a microscope, microspores can be identified based on morphology, motility, and refractive properties. Figure 8 As shown, mature microspores are round or oval in shape, with a length of 3.8-3.9 μm and a width of 2.0-2.2 μm. They move within the cell via polar filaments. Due to refraction, they appear fluorescent green under a microscope. Five fields of view were observed for each sample, and the results were statistically analyzed. After microscopic examination, a total of 283 silkworm microsporidiosis-infected eggs during the embryonic stage were collected in this experiment, including 32 labeled silkworm microsporidiosis-infected samples and 251 healthy control samples.
[0077] S14, Data Augmentation;
[0078] Specifically, due to the limitation of sample size, the existing sample size of patients with silkworm microsporidiosis cannot meet the needs of model training, and there is a data imbalance between the number of diseased samples and the number of healthy samples. Therefore, this invention uses data augmentation methods to mine more equivalent data from the known data. Data augmentation can not only increase the number of training samples and improve the generalization ability of the model, but also enhance the robustness of the model by adding noisy data. This invention designs three data augmentation methods: (1) Randomly shift the spectrum left and right by 1 to 6 wavenumbers, with the following effect: Figure 9As shown; (2) Adding random noise of different intensities to the Raman spectrum curve, the effect is as follows. Figure 10 As shown; (3) Using a random scaling factor with a sum of 1, multiple Raman spectra of the same type of sample are linearly superimposed, and the effect is as follows. Figure 11 As shown;
[0079] Using the three data augmentation methods described above, both the disease data and the healthy control data were expanded to 3,000 samples to meet the needs of model training.
[0080] S2. Introduce densely connected blocks and transformation layers to construct a deep learning classification model based on R-DenseNet;
[0081] Specifically, as neural network model architectures develop towards deeper or wider depths (such as VGGNet and GoogleNet), network training becomes more challenging. When a network reaches a certain depth, problems such as gradient explosion, gradient vanishing, and learning degradation occur, leading to a decrease in accuracy. Existing residual learning frameworks that are easier to optimize, namely Residual Neural Network (ResNet), can simplify the training of deeper networks and add residual modules to the network layers. Experimental results show that as the network becomes deeper, there are no problems such as gradient vanishing, gradient explosion, or learning degradation, and the model accuracy is further improved. There is also the DenseNet (Densely Connected Convolutional Network) model, whose core idea is similar to ResNet. The biggest difference is that DenseNet proposes to densely connect all previous layers with subsequent layers. Another important feature is that DenseNet proposes to achieve feature reuse by connecting features on the connection channels. These characteristics of DenseNet allow it to achieve better model performance than ResNet with a lower number of parameters and lower computational cost.
[0082] Unlike ResNet, DenseNet provides a more proactive dense connection mechanism: all layers are interconnected, meaning each layer receives all the layers preceding it as additional input. Figure 12 These represent the two connection mechanisms of ResNet and DenseNet, respectively. As can be seen, ResNet short-circuit-connects each layer to the previous layers using element-wise addition. In DenseNet, each layer is connected to all preceding layers along the channel dimension and serves as the input to the next layer. For an n-layer network, DenseNet contains n(n+1) / 2 connections, and the densely connected block can be represented as:
[0083] x n =H n ([x0,x1,…,x n-1 ])
[0084] In the above formula, H(·) represents a nonlinear transformation function, which can be a combination of operations, including a series of batch normalization (BN), ReLU activation function, pooling and convolution operations;
[0085] Convolutional neural networks typically reduce the size of feature maps by performing operations such as pooling and convolution. DenseNet, however, employs a densely connected strategy to maintain a constant feature map size. To address this, DenseNet uses a structure of densely connected blocks (DenseBlocks) plus transition layers. A DenseBlock is a multi-layered composite module where each layer has the same feature map, and the layers are connected by dense connections. The Transition layer connects two adjacent DenseBlocks and reduces the feature map size through pooling operations. Figure 13 This is the network structure of DenseNet. Furthermore, it should be noted that in all DenseBlocks, each layer produces n feature maps after convolution. As the number of layers increases, even if n is set very small, the input to DenseBlock will still be very large. Internally, DenseBlock uses bottleneck layers to reduce computational cost. This is mainly achieved by adding a 1×1 convolutional layer to the original structure, i.e., BN+ReLU+1×1 Conv+BN+ReLU+3×3 Conv, known as the DenseNet-B structure. This structure reduces the number of features and improves computational efficiency.
[0086] The Transition layer consists of a 1×1 convolution and a 2×2 average pooling layer, with a structure of BN+ReLU+1×1Conv+2×2AvgPooling, which can compress the model.
[0087] DenseNet leverages a combination of DenseBlock and Transition structures to reuse feature maps and compress the model, thereby improving the efficiency of feature map utilization and enhancing the efficiency of information transmission between model layers. Although the network has more fast connections, DenseNet has fewer parameters to be learned than ResNet, which allows DenseNet to achieve better model performance with less hardware resources.
[0088] Based on DenseNet, this invention proposes a network structure for detecting Raman spectra of silkworm microparticle disease, such as... Figure 14 As shown, it is called R-DenseNet (Raman-DenseNet). R-DenseNet consists of an initial convolutional layer (Conv), four dense blocks (DenseBlock), three transition layers, one average pooling layer (Avg-Pooling), and a full-connection layer.
[0089] S3. The deep learning classification model based on R-DenseNet was trained to classify the Raman spectroscopy dataset of silkworm microparticle disease, and the classification learning results of silkworm microparticle disease were obtained.
[0090] Specifically, the initial convolutional layer performs convolution kernel calculations on the input spectral data to obtain the feature information of the spectral data; the densely connected block accepts all the preceding layers as its additional input. The basic structure of each densely connected block is BN + ReLU + 1×1Conv + BN + ReLU + 1×3Conv. Here, the BN (Batch Normalization) layer forces all data to a uniform data distribution before inputting it to the next layer, making the intermediate output values of each layer more stable and accelerating the convergence speed of deep networks; the ReLU (Rectified Unified Activation Function) preserves and maps the features while saving computation. The advantages of mitigating model overfitting during training are as follows: The transformation layer connects two adjacent densely connected blocks, reducing the number of output channels of the densely connected blocks in the upper layer by half, thus avoiding excessive parameter explosion due to too many channels; the average pooling layer is used to reduce the size of the feature matrix by averaging the feature matrix of the spectral data through a sliding window to obtain a compressed feature matrix; the fully connected layer connects each node to all nodes in the previous layer to obtain information that integrates all the features of the previous layer; the initial convolutional layer has 64 convolutional kernels with a kernel size of 1×5, a stride of 2, and a padding strategy of Same Padding; the basic structure of the densely connected block is BN+ReLU+1×1Conv+BN+ReLU+1×3Conv, with a stride of 1 and a padding strategy of Same Padding. The DenseNet-121 architecture defines four densely connected blocks, each containing 6, 12, 24, and 16 basic structures, totaling 121 network layers. Raman spectroscopy, as a one-dimensional sequence without depth, is easier to train than images (multi-dimensional data). Therefore, R-DenseNet significantly reduces the number of basic structures in the densely connected blocks compared to DenseNet-121 to save computational costs. R-DenseNet sets 1, 2, 10, and 16 basic structures in the four densely connected blocks, respectively. In each basic structure containing dense connections, three feature maps are mapped to the subsequent basic structure via shortcut connections. A transformation layer is placed between two densely connected blocks, which compresses the number of feature channels output from the previous densely connected block before passing it to the next. The transformation layer consists of a 1×1 convolutional kernel with a stride of 1, a 1×2 average pooling layer with a stride of 2, followed by a 1×7 average pooling layer to compress the features before inputting them into the fully connected layer. Finally, the softmax function maps the output of the fully connected layer to the (0, 1) interval, corresponding to the label of the sample data (e.g., 0 for healthy controls, 1 for diseased individuals) and outputs the discrimination result.
[0091] In this model, a Batch Normalization (BN) layer and a ReLU activation function are sequentially applied before all convolutional layers for pre-activation. The ReLU activation function can be expressed as:
[0092]
[0093] Batch Normalization (BN) layers not only improve the convergence speed of the model but also have a certain regularization effect. Using cross-entropy as the loss function during model training, it can be expressed as:
[0094]
[0095] In the above formula, x i Represents the i-th spectral sample; y i The label represents the i-th spectral sample; y i,k This indicates that the predicted category k of the i-th sample is p; i,k This represents the probability of predicting the i-th sample as class k; N represents the number of samples; and K represents the number of classes.
[0096] Reference Figure 2 A deep learning-based non-destructive detection system for silkworm microparticle diseases includes:
[0097] The acquisition module is used to collect Raman spectral data of silkworm egg samples and perform data preprocessing to construct a Raman spectral dataset of silkworm microparticle disease.
[0098] The building blocks are used to introduce densely connected blocks and transformation layers to build a deep learning classification model based on R-DenseNet;
[0099] The classification module uses a deep learning classification model based on R-DenseNet to train the classification of the silkworm microparticle disease Raman spectroscopy dataset, and obtains the classification learning results of silkworm microparticle disease.
[0100] The experimental data results of the method of the present invention are analyzed as follows:
[0101] (1) Raman spectral characteristics analysis of silkworm microparticle diseased eggs;
[0102] This experiment visualized the raw data and preprocessed spectral sample data to plot the average spectra of diseased and healthy control groups. Figure 15 The results showed that the diseased and healthy controls were within the range of 800–1800 cm. -1 The average Raman spectra and standard deviations within the range were observed in both sets of average spectra, with a value of 1279 cm⁻¹. -1 1450cm -1 1520cm -1 1565cm -1 1672cm -1 Characteristic peaks appear at [location], with the high-intensity characteristic peak at 1279 cm⁻¹. -1Represents the amide III band, 1450 cm⁻¹ -1 1672 represents the base deformation vibration (CH) and sugar deformation vibration (CH), and 1672 represents the amide II band. Peaks of moderate to high intensity appear at 1510 cm⁻¹. -1 and 1565cm -1 The peaks at 1459 cm⁻¹ represent base stretching vibrations and amide II bands, respectively. Literature review indicates that the 1459 cm⁻¹ peak primarily reflects characteristic lipid peaks (lipid CH₂ shear vibrations), suggesting a relatively abundant presence of lipids in silkworm eggs. The peak at 1645 cm⁻¹... -1 ~1690cm -1 The band representing amide I can be attributed to the characteristic peak of proteins, with a higher Raman intensity at 1672 cm⁻¹ observed in both diseased and healthy samples. -1 The peak value suggests that during the silkworm egg incubation process, abundant protein-like substances are synthesized, fully preparing the silkworms for hatching. Figure 15 It can be seen that the spectra of healthy controls and diseased eggs show no significant differences in peaks and waveforms, with only slight differences in intensity at some shift points. Therefore, it is difficult to identify the disease status of silkworm eggs based on characteristic peak assignments and spectral images. An efficient and stable algorithm is needed to extract key features from the spectral data and perform analysis.
[0103] (2) Analysis of the results of data augmentation;
[0104] Partial Least Squares Discriminant Analysis (PLS_DA) is a commonly used spectral classification algorithm. In the preliminary experiments, PLS_DA was used to model the raw data without data augmentation, and the recognition accuracy was 81.48%. However, by observing the confusion matrix results in Table 1, it was found that all diseased samples were identified as healthy samples. However, due to the severe imbalance between the amount of diseased samples and healthy samples, even if misclassification occurs, the impact on the accuracy is not significant, thus showing an "artificially high" accuracy. The trained classifier cannot meet the actual detection needs.
[0105] Table 1. Confusion matrix of PLS_DA before data augmentation
[0106]
[0107] To address this, three data augmentation methods proposed in this invention were employed to expand the original 32 diseased samples to 3000 and the original 251 healthy samples to 3000. A random selection algorithm was used to partition the dataset in a 7:3 ratio, resulting in 4200 data points in the training set and 1800 data points in the test set. The PLS_DA test set results after data augmentation showed an accuracy rate of 83.06%, an improvement compared to before data augmentation. Furthermore, observation of the confusion matrix in Table 2 revealed that data augmentation eliminated the extreme imbalance between positive and negative samples, enabling the classifier to correctly identify most samples and improving the model's generalization ability.
[0108] Table 2. Confusion matrix of PLS_DA after data augmentation
[0109]
[0110] (3) Comparative analysis of R-DenseNet with other models;
[0111] This study examines the effectiveness of R-DenseNet in Raman spectroscopy classification by comparing it with classic Raman spectroscopy classification algorithms PLS_DA and SVM. Since traditional classification methods often require preprocessing of Raman spectral data such as smoothing, noise reduction, and baseline correction, this experiment uses five sets of Raman data—original spectral data, SG smoothing, airPLS baseline correction, first derivative (1-Der), and complete preprocessing (SG smoothing + airPLS + 1-Der)—as research objects to compare the classification accuracy of different methods and explore the impact of various preprocessing strategies on their classification performance. The experiment classifies the Raman spectral dataset using five classification methods: PLS_DA, SVM(linear), SVM(rbf), ResNet, and R-DenseNet. The detection results for the test set are shown in Table 3.
[0112] Table 3. Accuracy results of different classification algorithms
[0113]
[0114] The results show that the R-DenseNet model achieves the best classification performance on the original dataset, with an accuracy of 97.44%, while other traditional classification algorithms have lower accuracy. After a series of preprocessing steps on the spectral signals, the recognition accuracy of the three traditional classification algorithms is improved to varying degrees. Among them, airPLS baseline correction has a significant effect on improving the recognition accuracy of traditional classification methods. Figure 16As shown, the recognition accuracies of PLS_DA, SVM(linear), and SVM(rbf) are 87.38%, 87.62%, and 91.67%, respectively. Furthermore, SVM(rbf) achieves the best recognition accuracy, indicating that the detection accuracy is significantly improved after the airPLS baseline correction process.
[0115] Figure 17 This comparison examines the recognition accuracy of five algorithms before and after the complete Raman spectroscopy preprocessing step. After the complete Raman spectroscopy preprocessing step, the recognition accuracies of PLS_DA, SVM(linear), SVM(rbf), ResNet, and R-DenseNet models are 88.21%, 89.31%, 90.40%, 94.37%, and 96.53%, respectively. All of these models can accurately distinguish between Raman spectral data of diseased and healthy samples, achieving effective identification. Figure 17 As shown, spectral preprocessing significantly improves the PLS_DA, SVM(linear), and SVM(rbf) models. The ResNet and R-DenseNet models achieved high recognition accuracies of 94.29% and 97.44% on the original spectral dataset, respectively. However, after the complete preprocessing steps, the recognition accuracy of R-DenseNet was 96.53%, which was slightly lower.
[0116] Analysis of the experimental data revealed that traditional spectral classification algorithms rely on spectral preprocessing. During Raman spectral data preprocessing, essential information is inevitably lost or altered, leading to a decrease in the recognition accuracy of R-DenseNet. Therefore, R-DenseNet can directly utilize Raman spectra for modeling and classification without complex preprocessing, saving both time and computational cost.
[0117] (4) Stability analysis of the R-DenseNet model;
[0118] During Raman spectral acquisition, uncontrollable interferences such as environmental noise, autofluorescence, and radiation are common, severely impacting the accuracy of classifiers. Therefore, when used in field Raman acquisition equipment, classification models require higher noise resistance and robustness to adapt to more complex field detection conditions. To investigate the stability of the R-DenseNet model, this invention adds Gaussian white noise of varying intensities to the original spectral signal, then uses the proposed R-DenseNet model for classification, observing the impact of different noise intensities on the model's classification accuracy. Simultaneously, the same signal is used as input data for PLS_DA, SVM(linear), SVM(rbf), and ResNet models for comparison.
[0119] During the experiment, Gaussian white noise with intensities of 20 dB, 30 dB, 40 dB, 50 dB, and 60 dB was added to the Raman spectral data. For each group, measurements were performed five times, and the average accuracy was recorded. The experimental results are shown in Table 4.
[0120] Table 4. The impact of random noise on the recognition accuracy of different classification algorithms
[0121]
[0122] Experimental results show that when weak noise is added to the original Raman signal, ResNet, R-DenseNet, and traditional machine learning classification algorithms after complete preprocessing can all achieve high recognition accuracy. However, as the intensity of random noise increases, the recognition accuracy of each classification algorithm is affected to varying degrees, and the accuracy shows a downward trend.
[0123] The curves showing the change in recognition accuracy of different classification methods as noise intensity increases are as follows: Figure 18 As shown, the classification accuracy of PLS_DA, SVM(linear), and SVM(rbf) is significantly affected by noise. The accuracy of the classifiers decreases more drastically as the noise intensity added to the Raman signal increases. When the noise intensity exceeds 60 dB, the classification accuracy of PLS_DA, SVM(linear), and SVM(rbf) drops below 73%, with PLS_DA achieving only 57.33%, essentially rendering it unusable. In contrast, ResNet and R-DenseNet are less affected by noise when performing classification tasks. R-DenseNet exhibits better noise resistance. Figure 18 As can be seen, even with 60dB of random noise added to the Raman spectral signal—a high-intensity noise exceeding the strength of the Raman signal—the R-DenseNet model can still learn the characteristics and patterns of the Raman signal, achieving a recognition accuracy of 93.66%. This fully demonstrates R-DenseNet's powerful learning ability in complex environments, exhibiting stronger stability, greater generalization ability, and more reliable classification results when handling spectral classification tasks.
[0124] The results above show that ResNet and R-DenseNet models have good recognition accuracy and robustness in convolutional neural network models, with R-DenseNet exhibiting better model performance. Subsequently, the number of network parameters and computation time during model training were compared between ResNet and R-DenseNet, as shown in Table 5. Compared to ResNet, R-DenseNet reduced the number of network parameters from 99,636 to 35,811. Running both models on the same server using CPU and GPU (CPU: i7-10700F, GPU: NVIDIA GeForce RTX3080), R-DenseNet's runtime on both CPU and GPU was slightly longer than ResNet's.
[0125] Table 5 Performance Comparison of ResNet and R-DenseNet Models
[0126] ResNet 99636 490 321 R-DenseNet 35811 738 543
[0127] Thanks to R-DenseNet's densely connected blocks and transformation layer structure, the dense connections improve gradient backpropagation, allowing each layer to directly reach the final error signal, mitigating the gradient vanishing problem. The Batch Normalization (BN) layers in each densely connected block make the network easier to train and provide a degree of regularization. Feature reuse allows each layer to utilize features from all previous layers. Instead of having the model learn redundant features multiple times, feature reuse is a more efficient feature extraction method, especially suitable for scenarios with relatively scarce training data, providing excellent anti-overfitting performance. If we consider the features extracted by each layer as a non-linear transformation of the input data, the complexity of the transformation gradually increases with depth due to the combination of more non-linear functions. Compared to typical convolutional neural network classifiers that directly rely on the features of the most complex last layer, R-DenseNet comprehensively utilizes the less complex features of shallower layers, thus more easily obtaining a smooth decision function with better generalization performance. However, because feature reuse significantly increases the number of feature maps compared to ResNet, the computational cost during convolution is much higher, resulting in a longer runtime than ResNet. Based on this, on the same dataset, R-DenseNet only requires about one-third of the network parameters of ResNet and has less computational cost, while achieving better model accuracy than ResNet.
[0128] In summary, this invention proposes an R-DenseNet network model based on dense connections and feature reuse for processing Raman spectral data to achieve non-destructive detection of silkworm microsporidiosis. Raman spectra of infected silkworm eggs during the embryonic stage are collected, and a silkworm microsporidiosis Raman dataset is constructed through steps such as incubation and microscopic examination. To address the issue of imbalanced dataset samples, a data augmentation algorithm is proposed to expand the data and meet the needs of model training. Preliminary experiments compare the impact of data augmentation on the classifier. Subsequently, the Raman spectra of silkworm microsporidiosis samples and healthy control groups are compared and analyzed, and peak assignment analysis is performed. Comparative experiments are designed to test the classification performance of R-DenseNet compared with other classification algorithms and the impact of preprocessing methods on model performance. The model stability of R-DenseNet and other classifiers is compared and analyzed by adding noise signals of different intensities to the spectra. Finally, the model performance of ResNet and R-DenseNet is compared using metrics such as model parameters and runtime. The results show that R-DenseNet is convenient, efficient and accurate in handling Raman spectroscopy classification problems. At the same time, the model has stronger anti-interference ability and better stability, providing a theoretical basis and application reference for the non-destructive detection of silkworm microparticle disease.
[0129] The content of the above method embodiments is applicable to this system embodiment. The specific functions implemented in this system embodiment are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments.
[0130] The above is a detailed description of the preferred embodiments of the present invention. However, the present invention is not limited to the embodiments described. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the present invention. All such equivalent modifications or substitutions are included within the scope defined by the claims of this application.
Claims
1. A non-destructive detection method for silkworm microparticle disease based on deep learning, characterized in that, Includes the following steps: Raman spectral data of silkworm egg samples were collected and preprocessed to construct a Raman spectral dataset of silkworm microparticle disease. Specifically, it includes: Obtain silkworm egg samples; The silkworm egg samples were placed on a glass slide, and Raman laser acquisition was performed on the silkworm egg samples using a laser confocal micro Raman spectrometer to obtain the Raman spectral data of the silkworm egg samples. The silkworm egg samples collected by Raman laser were placed in an artificial climate chamber with a temperature of 25.5~26.5℃ and a relative humidity of more than 85% for incubation treatment to obtain ant-like silkworms and dead eggs. The silkworm ants and dead eggs were placed in a mortar and ground with water to prepare sample tablets. The sample slides were examined under a microscope. Based on the microscopic examination results, the silkworm eggs were labeled to obtain labeled silkworm egg samples. The labeled silkworm egg samples included samples of silkworms with microparticle disease and healthy control samples. Based on the Raman spectral data of silkworm egg samples, data enhancement processing was performed on the labeled silkworm egg samples to obtain a Raman spectral dataset of silkworm microparticle disease; specifically including: Based on the Raman spectral data of silkworm egg samples, the labeled silkworm egg samples were subjected to translational spectral enhancement processing to obtain a translational amplified Raman spectral dataset of silkworm microparticle disease. Random noise was added to the Raman spectral data of silkworm egg samples to obtain a noisy amplified Raman spectral dataset of silkworm microparticle disease. Using a random scaling factor that sums to 1, the Raman spectral data curves of multiple silkworm egg samples of the same type are linearly superimposed to obtain the superimposed Raman spectral dataset of silkworm microparticle disease. The same type of sample refers to silkworm microparticle disease samples or healthy control samples. By combining the translation-amplified Raman spectrum dataset of silkworm microparticle disease, the noise-amplified Raman spectrum dataset of silkworm microparticle disease, and the superimposed Raman spectrum dataset of silkworm microparticle disease, a Raman spectrum dataset of silkworm microparticle disease is obtained. By introducing densely connected blocks and transformation layers, a deep learning classification model based on R-DenseNet is constructed. The deep learning classification model based on R-DenseNet was trained to classify the Raman spectroscopy dataset of silkworm microparticle disease, and the classification learning results of silkworm microparticle disease were obtained.
2. The non-destructive detection method for silkworm microparticle disease based on deep learning according to claim 1, characterized in that, The step of introducing densely connected blocks and transformation layers to construct a deep learning classification model based on R-DenseNet specifically includes: The constructed R-DenseNet-based deep learning classification model includes an initial convolutional layer, four densely connected blocks, three transformation layers, an average pooling layer, and a fully connected layer. The network layer structure of the R-DenseNet-based deep learning classification model is as follows: initial convolutional layer, first densely connected block, first transformation layer, second densely connected block, second transformation layer, third densely connected block, third transformation layer, fourth densely connected block, average pooling layer, and fully connected layer. The initial convolutional layer has 64 convolutional kernels, each kernel size is 1×5, the stride is set to 2, and the padding strategy is edge padding. A conversion layer is provided between two densely connected blocks. This conversion layer compresses the number of feature channels output by the previous densely connected block and then transmits them to the next densely connected block. The conversion layer consists of a convolutional kernel with a stride of 1 and a size of 1×1, and an average pooling layer with a stride of 2 and a size of 1×2. The average pooling layer has a size of 1×7, a step size of 2, and an edge filling strategy.
3. The non-destructive detection method for silkworm microparticle disease based on deep learning according to claim 2, characterized in that, The basic structure of the dense connection block includes a first batch normalization layer, a first ReLU activation function, a 1×1 convolutional layer, a second batch normalization layer, a second ReLU activation function, and a 1×3 convolutional layer. The first dense connection block consists of one basic structure, the second dense connection block consists of two basic structures, the third dense connection block consists of ten basic structures, and the fourth dense connection block consists of sixteen basic structures.
4. The non-destructive detection method for silkworm microparticle disease based on deep learning according to claim 3, characterized in that, The step of training the R-DenseNet-based deep learning classification model to classify the silkworm microsporidiosis Raman spectroscopy dataset and obtaining the classification learning results for silkworm microsporidiosis specifically includes: The Raman spectroscopy dataset of silkworm microparticle disease was input into a deep learning classification model based on R-DenseNet; The initial convolutional layer of the deep learning classification model based on R-DenseNet performs convolution kernel calculation on the input silkworm microparticle disease Raman spectrum dataset to obtain the feature information of the silkworm microparticle disease Raman spectrum data. The densely connected blocks of the R-DenseNet deep learning classification model are used to perform dense connection processing on the feature information of the Raman spectral data of silkworm microparticle disease, and output the number of feature channels of the Raman spectral data of silkworm microparticle disease. The transformation layer of the deep learning classification model based on R-DenseNet compresses the number of feature channels in the Raman spectral data of silkworm microparticle disease, and outputs the number of feature channels in the compressed Raman spectral data of silkworm microparticle disease. The average pooling layer of the deep learning classification model based on R-DenseNet is used to average the feature matrix of the feature channels of the compressed Raman spectral data of silkworm microparticle disease to obtain the compressed feature matrix. The fully connected layer of the R-DenseNet-based deep learning classification model connects all nodes of the compressed feature matrix to obtain comprehensive feature information. The comprehensive feature information is mapped using the softmax function to the (0,1) interval, and the classification learning results of silkworm microparticle disease are output.
5. The non-destructive detection method for silkworm microparticle disease based on deep learning according to claim 4, characterized in that, The step of using the densely connected blocks of the R-DenseNet-based deep learning classification model to perform dense connection processing on the feature information of the silkworm microparticle disease Raman spectral data, and outputting the feature channel number of the silkworm microparticle disease Raman spectral data, specifically includes: The feature information of the Raman spectral data of silkworm microparticle disease is input into the dense connection block of the deep learning classification model based on R-DenseNet; The batch normalization layer based on densely connected blocks forces the characteristic information of the Raman spectral data of silkworm microparticle disease to a uniform data distribution; The ReLU activation function based on densely connected blocks is used to map the data output from the batch normalization layer. The convolutional layer based on densely connected blocks performs feature extraction processing on the mapped Raman spectral data of silkworm microparticle disease, and outputs the number of feature channels of the Raman spectral data of silkworm microparticle disease.
6. The non-destructive detection method for silkworm microparticle disease based on deep learning according to claim 5, characterized in that, The batch normalization layer of the densely connected blocks uses cross-entropy as the loss function during model training, and its expression is as follows: In the above formula, Indicates the first One spectral sample; Indicates the first Labels for each spectral sample; Indicates the first Predicted category for each sample ; Indicates the first Each sample is predicted as a category. The probability of; Indicates the number of samples; Indicates the number of categories.
7. A non-destructive testing system for silkworm microparticle disease based on deep learning, characterized in that, Includes the following modules: The acquisition module is used to collect Raman spectral data of silkworm egg samples and perform data preprocessing to construct a Raman spectral dataset of silkworm microparticle disease. Specifically, it includes: Obtain silkworm egg samples; The silkworm egg samples were placed on a glass slide, and Raman laser acquisition was performed on the silkworm egg samples using a laser confocal micro Raman spectrometer to obtain the Raman spectral data of the silkworm egg samples. The silkworm egg samples collected by Raman laser were placed in an artificial climate chamber with a temperature of 25.5~26.5℃ and a relative humidity of more than 85% for incubation treatment to obtain ant-like silkworms and dead eggs. The silkworm ants and dead eggs were placed in a mortar and ground with water to prepare sample tablets. The sample slides were examined under a microscope. Based on the microscopic examination results, the silkworm eggs were labeled to obtain labeled silkworm egg samples. The labeled silkworm egg samples included samples of silkworms with microparticle disease and healthy control samples. Based on the Raman spectral data of silkworm egg samples, data enhancement processing was performed on the labeled silkworm egg samples to obtain a Raman spectral dataset of silkworm microparticle disease; specifically including: Based on the Raman spectral data of silkworm egg samples, the labeled silkworm egg samples were subjected to translational spectral enhancement processing to obtain a translational amplified Raman spectral dataset of silkworm microparticle disease. Random noise was added to the Raman spectral data of silkworm egg samples to obtain a noisy amplified Raman spectral dataset of silkworm microparticle disease. Using a random scaling factor that sums to 1, the Raman spectral data curves of multiple silkworm egg samples of the same type are linearly superimposed to obtain the superimposed Raman spectral dataset of silkworm microparticle disease. The same type of sample refers to silkworm microparticle disease samples or healthy control samples. By combining the translation-amplified Raman spectrum dataset of silkworm microparticle disease, the noise-amplified Raman spectrum dataset of silkworm microparticle disease, and the superimposed Raman spectrum dataset of silkworm microparticle disease, a Raman spectrum dataset of silkworm microparticle disease is obtained. The building blocks are used to introduce densely connected blocks and transformation layers to build a deep learning classification model based on R-DenseNet; The classification module uses a deep learning classification model based on R-DenseNet to train the classification of the silkworm microparticle disease Raman spectroscopy dataset, and obtains the classification learning results of silkworm microparticle disease.
Citation Information
Patent Citations
Method for quickly detecting microsporidia spores
CN106770149A
Raman spectrum model establishment method for rapid nondestructive identification on diapause termination silkworm eggs
CN108802002A
Raman spectrum data classification method based on DenseNet-biAttention deep learning
CN114528905A