Method, device and equipment for detecting germs in edible meat based on deep learning and medium

Through deep learning technology, the hyperspectral images of edible meat are processed, feature wavelengths are extracted and bacterial concentrations are detected, which solves the problem of time-consuming and labor-consuming traditional detection methods, and achieves rapid and accurate detection of germs in edible meat, which is suitable for modern industrial production need.

CN119181089APending Publication Date: 2024-12-24ZHEJIANG ACADEMY OF AGRICULTURE SCIENCES
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411262729.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-10
Publication Date
2024-12-24

AI Technical Summary

Technical Problem

Traditional edible meat microbial detection methods are time-consuming and labor-intensive. The quick inspection methods are costly and cannot achieve rapid online detection, making it difficult to meet the requirements of modern industrialization, automation and refined production.

Method used

Using a deep learning-based method, the hyperspectral image is corrected and preprocessed, the feature wavelength is extracted, and the bacterial concentration detection is performed using convolutional neural network and support vector machine model, and the model hyperparameters are optimized in combination with the particle swarm optimization algorithm.

Benefits of technology

It realizes rapid and accurate detection of bacteria in edible meat, reduces the calculation volume and cost of the detection model, and meets the needs of modern industrial production.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119181089A_ABST
    Figure CN119181089A_ABST
Patent Text Reader

Abstract

The invention discloses a method, device and equipment for detecting germs in edible meat based on deep learning and a medium, and relates to the technical field of edible meat detection.The method comprises the steps that a hyperspectral image of target edible meat is corrected, and a corrected hyperspectral image is obtained; spectral reflectivity is extracted from the corrected hyperspectral image; preprocessing the extracted spectral reflectivity by adopting a spectral preprocessing method; extracting a characteristic wavelength from the preprocessed spectral reflectivity by adopting a characteristic wavelength selection method; inputting the characteristic wavelength into a target pathogen detection model to obtain a target pathogen detection concentration; the target germ detection model is obtained by training a deep learning model. The detection speed and accuracy can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of edible meat detection, and in particular to a method, device, equipment and medium for detecting pathogens in edible meat based on deep learning. Background Art

[0002] The safety of edible meat is directly related to human health. However, meat is extremely susceptible to contamination by pathogenic microorganisms, especially Escherichia coli. Traditional microbial detection methods, such as plate culture technology, are time-consuming and labor-intensive. Compared with traditional technologies, current rapid detection methods have high sensitivity and specificity, overcoming the limitations of traditional methods. However, rapid detection methods are usually divided into molecular biology, immunology, and biosensor-based methods. There are still problems such as high cost and technical level requirements or they cannot be used for online rapid detection, making it difficult to meet the requirements of modern industrialization, automation, and refined production. Summary of the invention

[0003] The purpose of this application is to provide a method, device, equipment and medium for detecting pathogens in edible meat based on deep learning, which can improve the detection speed and accuracy.

[0004] To achieve the above objectives, this application provides the following solutions:

[0005] In a first aspect, the present application provides a method for detecting pathogens in edible meat based on deep learning, and the method for detecting pathogens in edible meat based on deep learning comprises:

[0006] Correcting the hyperspectral image of the target edible meat to obtain a corrected hyperspectral image;

[0007] Extracting spectral reflectance from the rectified hyperspectral image;

[0008] Preprocessing the extracted spectral reflectance using a spectral preprocessing method;

[0009] Extracting a characteristic wavelength from the preprocessed spectral reflectance using a characteristic wavelength selection method;

[0010] The characteristic wavelength is input into a target pathogen detection model to obtain a target pathogen detection concentration; the target pathogen detection model is obtained by training a deep learning model.

[0011] Optionally, a spectral preprocessing method is used to preprocess the extracted spectral reflectance, specifically including:

[0012] Performing second-order derivative processing on the spectral reflectance to obtain the pre-processed spectral reflectance.

[0013] Optionally, the characteristic wavelength selection method is a variable iterative space shrinkage method.

[0014] Optionally, the deep learning model is a convolutional neural network and a support vector machine connected in sequence; the convolutional neural network includes a first convolutional module, a second convolutional module, a third convolutional module, a Dropout layer, a fully connected layer, a Softmax layer and a classification layer connected in sequence; the first convolutional module, the second convolutional module and the third convolutional module all include convolution operations, batch normalization and Relu activation functions connected in sequence.

[0015] Optionally, the deep learning model is trained, specifically including:

[0016] The deep learning model is trained using a training set: when each training sample in the training set is used to train the deep learning model, a particle swarm optimization algorithm is used to optimize the hyperparameters in the deep learning model; the training sample includes input data and label data, the input data is a characteristic wavelength sample, and the label data is a target pathogen detection concentration corresponding to the characteristic wavelength sample.

[0017] Optionally, each training sample in the training set corresponds to a sample image, and each of the sample images is a hyperspectral image of a target meat sample with target pathogens of different concentrations attached thereto;

[0018] The hyperspectral image of the target meat sample is a hyperspectral image corrected from the original hyperspectral image of the target meat sample, and the correction formula is:

[0019]

[0020] Among them, R is the corrected hyperspectral image, R0 is the original hyperspectral image, W is the hyperspectral whiteboard image, and D is the hyperspectral dark background image.

[0021] Optionally, the target pathogen is Escherichia coli, and the target edible meat includes pork.

[0022] In a second aspect, the present application provides a device for detecting pathogens in edible meat based on deep learning, and the device for detecting pathogens in edible meat based on deep learning comprises:

[0023] A hyperspectral image correction module, used for correcting the hyperspectral image of the target edible meat to obtain a corrected hyperspectral image;

[0024] A spectral reflectance extraction module is used to extract spectral reflectance from the corrected hyperspectral image;

[0025] A preprocessing module, used for preprocessing the extracted spectral reflectance by using a spectral preprocessing method;

[0026] A characteristic wavelength extraction module, used for extracting a characteristic wavelength from the preprocessed spectral reflectance by using a characteristic wavelength selection method;

[0027] The target pathogen concentration detection module is used to input the characteristic wavelength into the target pathogen detection model to obtain the target pathogen detection concentration; the target pathogen detection model is obtained by training the deep learning model.

[0028] In a third aspect, the present application provides a computer device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of any of the above-mentioned methods for detecting pathogens in edible meat based on deep learning.

[0029] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the above-mentioned methods for detecting pathogens in edible meat based on deep learning.

[0030] According to the specific embodiments provided in this application, this application discloses the following technical effects:

[0031] The present application provides a method, device, equipment and medium for detecting pathogens in edible meat based on deep learning, which preprocesses the spectral reflectance of the target edible meat to improve the validity of the spectral information, and then extracts characteristic wavelengths from the preprocessed spectrum to reduce the dimension of the spectral data, thereby reducing the computational complexity of the target pathogen detection model, thereby achieving rapid and accurate detection of the target pathogen concentration. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0033] Figure 1 A schematic diagram of a process for detecting pathogens in edible meat based on deep learning provided in one embodiment of the present application;

[0034] Figure 2 A schematic diagram of the deep learning model structure provided in one embodiment of the present application;

[0035] Figure 3 A flow chart of a particle swarm optimization (PSO) algorithm provided in an embodiment of the present application;

[0036] Figure 4 A schematic diagram of a process for optimizing a deep learning model using a PSO algorithm according to an embodiment of the present application;

[0037] Figure 5 A schematic diagram of average spectra of Escherichia coli at different concentrations provided in an embodiment of the present application;

[0038] Figure 6 A schematic diagram of feature variable screening provided in one embodiment of the present application;

[0039] Figure 7 A schematic diagram of functional modules of a device for detecting pathogens in edible meat based on deep learning provided in one embodiment of the present application;

[0040] Figure 8 A schematic diagram of the structure of a computer device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0041] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0042] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.

[0043] This application provides a method for detecting pathogens in edible meat based on deep learning, such as Figure 1 As shown, the method for detecting pathogens in edible meat based on deep learning includes:

[0044] Step 101: Correcting the hyperspectral image of the target edible meat to obtain a corrected hyperspectral image.

[0045] Step 102: extracting spectral reflectance from the corrected hyperspectral image.

[0046] Step 103: preprocessing the extracted spectral reflectance using a spectral preprocessing method.

[0047] Step 104: extracting a characteristic wavelength from the preprocessed spectral reflectance using a characteristic wavelength selection method.

[0048] Step 105: Input the characteristic wavelength into a target pathogen detection model to obtain a target pathogen detection concentration; the target pathogen detection model is obtained by training a deep learning model.

[0049] The present application preprocesses the spectral reflectance of the target edible meat to improve the validity of the spectral information, and then extracts characteristic wavelengths from the preprocessed spectrum to reduce the dimension of the spectral data, thereby reducing the computational complexity of the target pathogen detection model, achieving rapid and nondestructive detection of the target pathogen, and improving the accuracy of detection.

[0050] Step 103 specifically includes: performing a second-order derivative (Second Derivative, 2 nd Der) processing to obtain the spectral reflectance after preprocessing.

[0051] Preprocessing is used to enhance the profile and shape of the peaks in the spectrum, enhance the slight differences between spectra, and is suitable for analyzing more complex spectral features such as overlapping peaks.

[0052] In order to reduce the complexity of the detection model and alleviate the variable correlation, a characteristic wavelength selection method is used to extract the characteristic wavelength, wherein the characteristic wavelength selection method is a variable iterative space shrinkage approach (VISSA).

[0053] like Figure 2 As shown, the deep learning model is a convolutional neural network (CNN) and a support vector machine (SVM) connected in sequence; the convolutional neural network includes a first convolution module, a second convolution module, a third convolution module, a Dropout layer, a fully connected layer, a Softmax layer and a classification layer connected in sequence; the first convolution module, the second convolution module and the third convolution module all include convolution operations, batch normalization and Relu activation functions connected in sequence.

[0054] SVM is a machine learning method based on statistical learning theory. It converts raw data into high-dimensional space to construct hyperplanes for classification. For nonlinear raw data, it can be converted into linear classification through kernel function mapping. Support vector machine is based on VC dimension theory and structural risk reduction theory. It effectively uses sample information to find the best balance between model complexity and learning ability to obtain the lowest generalization error.

[0055] CNN is usually used to process two-dimensional data such as images and videos. It is not very suitable for spectral data. One-dimensional CNN is suitable for one-dimensional sequence data, such as text and time series data. Since hyperspectral data has continuous bands and there is correlation between bands, that is, the reflectance response of each wavelength can be regarded as sequence data, a one-dimensional CNN model is proposed for quantitative detection of Escherichia coli concentration.

[0056] The CNN-SVM model integrates CNN and SVM. The CNN-SVM model is the deep learning model of this application. The structure of the CNN-SVM model is as follows: Figure 2 As shown: First, the input spectral data is subjected to a convolution operation (Conv) using a 3*1 convolution kernel for feature extraction. Batch normalization (BN) is then performed to enhance the robustness of the network and ensure a stable output distribution. The activation function uses the rectified linear unit (Relu) to alleviate gradient vanishing and accelerate the training process. This process is repeated three times, and then the Dropout layer is applied to discard 20% of the neurons to prevent overfitting. Next is a fully connected layer (FC) that connects each node to the previous layer, and then the output is normalized to a probability distribution through the Softmax layer to avoid extreme values. After processing by the Softmax layer, the data enters the classification layer for further feature mapping and preparation. Finally, the processed features are sent to the SVM layer for classification decisions. This structural design aims to improve the classification accuracy and generalization ability of the model.

[0057] Training the deep learning model specifically includes: using a training set to train the deep learning model: when using each training sample in the training set to train the deep learning model, using a particle swarm optimization algorithm to optimize the hyperparameters in the deep learning model; the training sample includes input data and label data, the input data is a characteristic wavelength sample, and the label data is a target pathogen detection concentration corresponding to the characteristic wavelength sample.

[0058] The particle swarm optimization algorithm is an evolutionary algorithm that simulates the foraging behavior of biological groups. Its core concept is to use all possible solutions that the current population has explored to determine the search path for new solutions. The algorithm can efficiently locate the best optimal solution in a wide search space. Its significant advantage lies in its efficient computing speed, which is due to the parallel calculation of all particles during the iteration process. In addition, its update mechanism is simple and clear. It updates according to the direction of the excellent solution. Each iterative update essentially reflects the increase in the step size of the independent variable. The flowchart of the algorithm is as follows: Figure 3 shown.

[0059] The key advantage of the training of the CNN-SVM model in this application is that it can efficiently adjust the hyperparameters of the CNN-SVM model through the particle swarm optimization algorithm to significantly improve the classification performance and generalization ability.

[0060] like Figure 4 As shown in the figure, the particle swarm optimization algorithm is used to optimize the hyperparameters in the CNN-SVM model: first, a group of particles are randomly initialized, each particle represents a potential hyperparameter combination of the CNN-SVM model, including the number of iterations, learning rate, regularization coefficient in CNN, and the kernel function and kernel penalty factor of SVM. Subsequently, by evaluating the performance of each particle in the task and optimizing the position and speed of the particle according to the historical best position, the hyperparameter combination with the best fitness is finally selected as the optimal solution, thereby improving the effect of the model in the training and testing stages. This method of integrating CNN and SVM effectively improves the performance of the model in the spectral data classification task, enabling it to perform classification and recognition tasks more accurately and reliably.

[0061] The hyperspectral image of the target edible meat is a hyperspectral image collected by a hyperspectral imager.

[0062] Each training sample in the training set corresponds to a sample image, and each of the sample images is a hyperspectral image of a target meat sample with target pathogens of different concentrations attached thereto.

[0063] The target pathogen is Escherichia coli, and the target edible meat includes pork.

[0064] In an exemplary embodiment, the present application collects hyperspectral images of fresh pork inoculated with different concentrations of Escherichia coli, processes the region of interest and extracts spectral reflectance information, and determines the pretreatment method and the characteristic wavelength selection algorithm. The present application adopts 6 pretreatment methods and 4 characteristic wavelength selection algorithms for spectral processing, selects a combination of CNN and SVM, and proposes a PSO-SVM-CNN improved by PSO to construct a target pathogen detection model, namely, a fresh pork Escherichia coli concentration detection model, to determine the effectiveness of detecting Escherichia coli in fresh pork.

[0065] Six preprocessing methods are used, including: multiplicative scatter correction (MSC), standard normal variation (SNV), SG smoothing (Savitzky-Golay Smoothing, SGS), first derivative (First Derivative, 1 st Der), Second Derivative, 2 nd Der) or mean centering (MC) processing to obtain the preprocessed spectral data.

[0066] Different methods have different effects. MSC is used to eliminate the scattering effect caused by differences in particle size, shape or optical path, making the spectrum more stable; SNV eliminates the amplitude variation caused by different spectral intensities, making different samples more comparable; SGS is used to smooth the noise in the spectrum and improve the signal-to-noise ratio; st Der highlights subtle changes and peak positions in the spectrum, which helps detect features in the spectrum; 2 nd Der is used to enhance the outline and shape of the peak in the spectrum and enhance the slight differences between spectra. It is suitable for analyzing more complex spectral features such as overlapping peaks. MC is used to eliminate the mean deviation of the data and improve accuracy.

[0067] The four characteristic wavelength selection algorithms include:

[0068] 1) The characteristic wavelength is extracted from the preprocessed spectrum using the successive projection algorithm (SPA) to obtain the first characteristic wavelength. SPA selects spectral features by stepwise projection, and finally obtains a set of characteristic wavelengths with high information content and distinguishing ability.

[0069] 2) Competitive adaptive reweighted sampling (CARS) is used to extract characteristic wavelengths from the preprocessed spectrum to obtain the second characteristic wavelength. CARS generates multiple feature subset samples through the Monte Carlo method, and performs partial least squares regression on each sample set, and finally selects a set of characteristic variables with the most predictive ability and information content.

[0070] 3) The uninformative variable elimination (UVE) method is used to extract the characteristic wavelength from the preprocessed spectrum to obtain the third characteristic wavelength. UVE calculates the correlation between each feature and the target variable and sorts them by size, gradually removing the features with the smallest correlation from the model, and ultimately improving the prediction performance of the model.

[0071] 4) The variable iterative space shrinkage method (VISSA) is used to extract characteristic wavelengths from the preprocessed spectrum to obtain the fourth characteristic wavelength. VISSA iteratively optimizes the position, width and combination of spectral intervals and finally selects a set of wavelengths with the best predictive power.

[0072] The first characteristic wavelength, the second characteristic wavelength, the third characteristic wavelength and the fourth characteristic wavelength constitute the characteristic wavelength set. The above four variable selection methods extract important wavelengths that can represent all wavelengths, effectively reducing the dimensionality of spectral data.

[0073] In an exemplary embodiment, during the process of generating a data set, the sample preparation process includes: purchasing fresh pork that is light red, shiny, and elastic from a supermarket. Under a sterile environment, the pork sample is evenly trimmed into a size of 2 cm × 2 cm × 1 cm (length × width × thickness), and a total of 120 samples are divided. Among the 120 samples obtained, the samples are packaged in sealed bags, numbered one by one with a signature pen, and refrigerated at 4°C. The inoculated strain is Escherichia coli ATCC 25922, and the stock solution concentration is 1.0×10 9 CFU / mL. Set up a control group (4 samples), and then prepare concentrations of about 2, 4, 6, and 7 log units (CFU / mL) per mL of colony formation (29 samples for each concentration). Spread the prepared bacterial solution evenly on the samples for inoculation to obtain samples with different contamination levels. Cultivate at room temperature to ensure that the bacteria adhere to the surface of pork.

[0074] A hyperspectral imager (PikaXC2, Resonon, MT, USA) was used for image acquisition, with a spectral resolution of 1.3 nm, a maximum frame rate of 165 fps, a spectral range of 400-1000 nm, a spatial channel number of 1600, and a spectral channel number of 447. First, turn on the power switch to preheat for 20 minutes, then place the focusing paper on the tray, slightly rotate the objective lens to make the blurred black lines on the image panel clear, and tighten the screws to complete the focusing. Use a black cap to cover the lens and collect dark background images; place a white board to collect white board images. Place the sample on the black tray, adjust the exposure time to 1400, the frame number to 23 fps, and the platform moves at 3.80 mm / s during the scanning process. Sepectronon software and ENVI software were used for image acquisition and spectral data extraction. The average reflectance of each sample was extracted by marking the area of ​​interest of each sample, and the original hyperspectral image was corrected using formula (1) to obtain each sample in the data set.

[0075] The hyperspectral image of the target meat sample is a hyperspectral image corrected from the original hyperspectral image of the target meat sample, and the correction formula is:

[0076]

[0077] Among them, R is the corrected hyperspectral image, R0 is the original hyperspectral image, W is the hyperspectral whiteboard image, and D is the hyperspectral dark background image. The dark background is the pure black background collected after covering the lens cap.

[0078] The data set of this application is divided into training set and test set according to the ratio of 4:1 using the SPXY method. SPXY is a method for selecting calibration samples based on the KS method. Its basic principle is to calculate the distance of the sample by considering both spectral and concentration variables. The distance formula is as follows:

[0079]

[0080] Among them, d x (p,q) is the distance between samples calculated based on the spectral variable x, d x (p,q) is the distance between samples calculated based on the E. coli concentration variable y, and N represents the spectral space.

[0081] In order to evaluate the classification performance of the target pathogen detection model, accuracy (A), precision (P), recall (R) and F1 score (F1) are used as evaluation indicators of the target pathogen detection model. The ratio of the number of correctly predicted samples to the total number of samples is called accuracy. The higher A is, the better the classification effect of the model is. It is one of the most intuitive evaluation indicators, but it may be distorted in the case of class imbalance, because even if the model simply predicts all samples as the majority class, a high accuracy rate may be obtained. P is used to describe the accuracy of the prediction results, indicating how many of the predicted positive samples are actually positive samples. R is for the original sample, indicating how many positive samples in the sample are correctly predicted. F1 is the weighted harmonic mean of P and R, which comprehensively considers the accuracy and completeness of the model. When it is necessary to balance P and R, the F1 score can be used as a comprehensive indicator. The larger the value of F1, the better the classification model. The calculation of the above four evaluation indicators is shown in formula (3)-formula (6):

[0082]

[0083] Among them, TP stands for true positive, TN stands for true negative, FP stands for false positive, and FN stands for false negative.

[0084] For the sample spectral reflectance curve, Figure 5 The average spectral curves of different concentrations of Escherichia coli (2, 4, 6, 7 LogCFU / mL) are shown. Figure 5 From the analysis, it can be seen that although the reflectance curves of E. coli at different concentrations show similar trends in overall spectral characteristics, there are obvious differences in the reflection intensity at specific wavelengths. This phenomenon shows that the different concentrations of E. coli in the sample lead to changes in the spectral reflection intensity. Although the types of substances in the samples are similar, changes in their content can affect the spectral characteristics to a certain extent. The reflectance curves between samples of different concentrations show relatively obvious differences, so they can be used to distinguish E. coli of different concentrations. However, in some bands, especially for 7Log CFU / mL and 6Log CFU / mL samples, their reflectance curves overlap. This may be because the difference between the two concentration levels is small, making the spectral characteristics difficult to distinguish.

[0085] This application uses a test set to test different models. It can be seen from Table 1 that after integrating CNN and SVM, the classification results of the test set have been significantly improved compared to a single model, with an increase of 24.46% and 10.60% respectively. On this basis, the integrated model is optimized by introducing the PSO algorithm, which further improves the classification accuracy of the test set by 2.08%. In the end, the accuracy of the optimized model on the training set reached 96.30%, and the accuracy on the test set was increased to 81.25%. This result shows that the integration of CNN and SVM and the optimization of the PSO algorithm significantly enhance the classification performance of the Escherichia coli concentration classification model, especially showing a stronger generalization ability on the test set. In Table 1, CNN-SVM means that the integrated model is not optimized by the PSO algorithm, and PSO-CNN-SVM means that the integrated model is optimized by the PSO algorithm.

[0086] Table 1 Comparison of ensemble model results

[0087]

[0088] In order to optimize the spectral data and improve the prediction performance of the model, this application uses different preprocessing methods to model the PSO-CNN-SVM model. Table 2 shows the results of different preprocessing methods based on the full spectrum in the E. coli concentration detection model. As can be seen from the table, the model preprocessed with the second-order derivative performs best on the training set and test set, with an accuracy of 94.57% and 83.33% respectively.

[0089] Table 2 Full spectrum modeling results with different pretreatments

[0090]

[0091] Four wavelength selection methods (SPA, CARS, UVE, VISSA) were used not only to identify important wavelengths in the spectral regions at different concentration levels, but also to establish simplified prediction models to achieve fast and accurate prediction of concentration levels. Figure 6 As shown in the figure, SPA, CARS, UVE, and VISSA were used to select 13, 8, 10, and 33 key wavelengths from 231 full wavelengths, respectively, and then the selected characteristic wavelengths were input into the PSO-CNN-SVM model for training.

[0092] Table 3 shows the statistical results of the combination of PSO-CNN-SVM with SPA, CARS, UVE, and VISSA. As shown in Table 3, VISSA has the best result, with 100.00% for the training set and 87.50% for the test set.

[0093] Table 3 is based on 2 nd Modeling results of different characteristic wavelengths of Der

[0094]

[0095] This application combines the PSO algorithm with the CNN and SVM models to respectively analyze the performance of MSC, SNV, SGS, and 1 st Der, 2 nd Der, MC six pre-processing methods and SPA, CARS, UVE, VISSA four characteristic wavelength selection algorithms are used to build the model. nd Der can enhance the profile and shape of the peak in the spectrum and enhance the slight differences between the spectral curves of E. coli at different concentrations, which helps to better analyze complex spectral features. In addition, the VISSA algorithm combines the characteristics of global and local search, and finally selects a set of wavelengths with the most predictive ability by iteratively optimizing the position, width and combination of spectral intervals. nd Der-VISSA-PSO-CNN-SVM has the best classification effect, with a test set accuracy of 87.50%. The research results show that this method has broad application prospects in the rapid detection of E. coli and food safety, and can provide a theoretical basis for the development of subsequent portable detection instruments, and can realize online rapid detection of edible meat.

[0096] Based on the same inventive concept, the embodiment of the present application also provides a deep learning-based edible meat pathogen detection device for implementing the deep learning-based edible meat pathogen detection method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations of one or more embodiments of the deep learning-based edible meat pathogen detection device provided below can refer to the above limitations of the deep learning-based edible meat pathogen detection method, and will not be repeated here.

[0097] In an exemplary embodiment, Figure 7 As shown, a device for detecting pathogens in edible meat based on deep learning is provided, comprising:

[0098] The hyperspectral image correction module 201 is used to correct the hyperspectral image of the target edible meat to obtain a corrected hyperspectral image.

[0099] The spectral reflectance extraction module 202 is used to extract the spectral reflectance from the corrected hyperspectral image.

[0100] The preprocessing module 203 is used to preprocess the extracted spectral reflectance using a spectral preprocessing method.

[0101] The characteristic wavelength extraction module 204 is used to extract the characteristic wavelength from the pre-processed spectral reflectance by using a characteristic wavelength selection method.

[0102] The target pathogen concentration detection module 205 is used to input the characteristic wavelength into the target pathogen detection model to obtain the target pathogen detection concentration; the target pathogen detection model is obtained by training the deep learning model.

[0103] In an exemplary embodiment, a computer device is provided. The computer device may be a server or a terminal. The internal structure diagram thereof may be as follows: Figure 8 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store pathogen detection data in edible meat based on deep learning. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for detecting pathogens in edible meat based on deep learning is implemented.

[0104] Those skilled in the art will understand that Figure 8 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components. In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.

[0105] In an exemplary embodiment, a computer-readable storage medium is provided, storing a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.

[0106] In an exemplary embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.

[0107] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0108] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM may be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0109] The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. The non-relational database may include a distributed database based on blockchain, etc., but is not limited thereto. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a data processing logic of a programmable logic device, etc., but is not limited thereto.

[0110] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0111] This article uses specific examples to illustrate the principles and implementation methods of this application. The description of the above embodiments is only used to help understand the method and core ideas of this application. At the same time, for those skilled in the art, according to the ideas of this application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting this application.

Claims

1. A method for detecting pathogens in edible meat based on deep learning, characterized in that: The method for detecting pathogens in edible meat based on deep learning includes: Correcting the hyperspectral image of the target edible meat to obtain a corrected hyperspectral image; Extracting spectral reflectance from the rectified hyperspectral image; Preprocessing the extracted spectral reflectance using a spectral preprocessing method; Extracting a characteristic wavelength from the preprocessed spectral reflectance using a characteristic wavelength selection method; The characteristic wavelength is input into a target pathogen detection model to obtain a target pathogen detection concentration; the target pathogen detection model is obtained by training a deep learning model.

2. The method for detecting pathogens in edible meat based on deep learning according to claim 1, characterized in that: The extracted spectral reflectance is preprocessed using a spectral preprocessing method, specifically including: Performing second-order derivative processing on the spectral reflectance to obtain the pre-processed spectral reflectance.

3. The method for detecting pathogens in edible meat based on deep learning according to claim 1, characterized in that: The characteristic wavelength selection method is a variable iterative space shrinkage method.

4. The method for detecting pathogens in edible meat based on deep learning according to claim 1, characterized in that: The deep learning model is a convolutional neural network and a support vector machine connected in sequence; the convolutional neural network includes a first convolutional module, a second convolutional module, a third convolutional module, a Dropout layer, a fully connected layer, a Softmax layer and a classification layer connected in sequence; the first convolutional module, the second convolutional module and the third convolutional module all include convolution operations, batch normalization and Relu activation functions connected in sequence.

5. The method for detecting pathogens in edible meat based on deep learning according to claim 1, characterized in that: Training the deep learning model includes: The deep learning model is trained using a training set: when each training sample in the training set is used to train the deep learning model, a particle swarm optimization algorithm is used to optimize the hyperparameters in the deep learning model; the training sample includes input data and label data, the input data is a characteristic wavelength sample, and the label data is a target pathogen detection concentration corresponding to the characteristic wavelength sample.

6. The method for detecting pathogens in edible meat based on deep learning according to claim 5, characterized in that: Each training sample in the training set corresponds to a sample image, and each sample image is a hyperspectral image of a target meat sample with target pathogens of different concentrations attached thereto; The hyperspectral image of the target meat sample is a hyperspectral image corrected from the original hyperspectral image of the target meat sample, and the correction formula is: Among them, R is the corrected hyperspectral image, R0 is the original hyperspectral image, W is the hyperspectral whiteboard image, and D is the hyperspectral dark background image.

7. The method for detecting pathogens in edible meat based on deep learning according to claim 1, characterized in that: The target pathogen is Escherichia coli, and the target edible meat includes pork.

8. A device for detecting pathogens in edible meat based on deep learning, characterized in that: The device for detecting pathogens in edible meat based on deep learning comprises: A hyperspectral image correction module, used for correcting the hyperspectral image of the target edible meat to obtain a corrected hyperspectral image; A spectral reflectance extraction module is used to extract spectral reflectance from the corrected hyperspectral image; A preprocessing module, used for preprocessing the extracted spectral reflectance by using a spectral preprocessing method; A characteristic wavelength extraction module, used for extracting a characteristic wavelength from the preprocessed spectral reflectance by using a characteristic wavelength selection method; The target pathogen concentration detection module is used to input the characteristic wavelength into the target pathogen detection model to obtain the target pathogen detection concentration; the target pathogen detection model is obtained by training the deep learning model.

9. A computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method for detecting pathogens in edible meat based on deep learning as described in any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, it implements the method for detecting pathogens in edible meat based on deep learning as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method for intelligently identifying quality of sausage

    CN109295159A

  • Method and system for detecting types of fusarium moniliforme in rice seeds

    CN114972804A

  • Method for detecting content of somatothrix thermosphaeroides in chilled fresh pork steak based on structured light hyperspectral imaging technology

    CN115980041A

  • Method and system for detecting fusarium moniliforme species of rice seed

    US20230349817A1