Living carp muscle EPA + DHA content low-loss detection method based on skin characteristic wavelength
Through machine learning, the detection model is established, using the characteristic wavelength information of carp skin, the EPA and DHA content in its muscles is quickly detected, which solves the cumbersome, high cost and destructive problems in the existing technology, and achieves fast and accurate low-destructive testing.
Patent Information
- Application Number
- CN202411627813.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-14
- Publication Date
- 2025-03-21
- Estimated Expiration
- 2044-11-14
AI Technical Summary
The prior art methods for detecting the EPA and DHA content in carp meat are cumbersome and costly, and require damaged samples of carp, resulting in damage to product quality.
Through machine learning, the relationship between the characteristic wavelength of the skin of fresh carp and the content of EPA and DHA in its muscles was established, and a detection model was constructed. The model was used to input the skin of carp's characteristic wavelength information to quickly understand the content of EPA and DHA in its muscles.
The EPA and DHA content in carp muscles is achieved quickly and low-destructive testing, with high detection accuracy, and avoiding the cumbersome and destructive testing problems in the prior art.
Smart Images

Figure CN119666760A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of low-loss detection of carp, and in particular to a low-loss detection method for the EPA+DHA content in the muscle of living carp based on characteristic wavelengths of the skin. Background Art
[0002] Carp (Cyprinus carpio) mainly inhabits waters with stagnant water flow, such as the middle and lower reaches of rivers, lakes, and reservoirs, and particularly prefers nutrient-rich, bottom-layer or aquatic waters. Carp, as an economic aquatic product, can meet human food needs. The unsaturated fatty acids contained therein, such as eicosapentaenoic acid (EPA) and docosahexaenoic acid (DHA), can effectively prevent human cardiovascular diseases, lower blood cholesterol levels, and reduce the probability of thrombosis. As an edible product, especially fresh carp, quickly knowing the content of EPA and DHA in carp meat can quickly identify the product quality of fresh carp. The prior art uses gas chromatography to sample and test carp meat. The testing process is cumbersome and costly, and the carp needs to be damaged for sampling, which damages the quality of the product. Summary of the invention
[0003] Based on this, this application uses machine learning to establish the relationship between the characteristic wavelength of the skin of fresh carp and the EPA and DHA content in its muscle and construct a detection model. By inputting the characteristic wavelength information of the skin of fresh carp into the detection model, the EPA and DHA content in its muscle can be quickly known, which can not only achieve rapid and low-loss detection, but also has high detection accuracy.
[0004] To this end, the embodiments of the present application disclose at least the following technical solutions:
[0005] The embodiment discloses a method for detecting unsaturated fatty acids in fresh carp muscle. The method comprises:
[0006] Obtaining a training set, the training set comprising a plurality of training samples, each of the training samples comprising at least one wavelength information and unsaturated fatty acid information corresponding to the wavelength information;
[0007] Obtain a radial basis function neural network, the radial basis function neural network comprising an input layer, a hidden layer and an output layer, the input layer is used to receive the wavelength information, the hidden layer is used to perform non-negative nonlinear processing on the wavelength information to obtain an implicit function space, and the output layer is used to linearize the implicit function space to obtain a linearized output result;
[0008] Acquire each of the training samples to train the radial basis function neural network to determine the number, center and width of neurons in the hidden layer, and the connection weight between the hidden layer and the output layer;
[0009] Obtaining a detection model according to the determined number, center and width of neurons in the hidden layer and the determined connection weights between the hidden layer and the output layer;
[0010] Obtaining wavelength information of fresh and living carp samples to be tested;
[0011] The wavelength information of the fresh carp sample to be tested is input into the detection model to obtain the unsaturated fatty acid result. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Figure 1 The present invention is a schematic flow chart of a method for detecting unsaturated fatty acids in fresh carp muscle provided in an embodiment.
[0013] Figure 2 The original spectral image of a fresh carp provided in the embodiment.
[0014] Figure 3 For Figure 2 The hyperspectral image is obtained by preprocessing.
[0015] Figure 4 A curve of the Monte Carlo sampling number and the sampling run number when the sampling run number is 50 times is provided for the embodiment.
[0016] Figure 5 A curve of the root mean square error of the interactive verification and the number of sampling runs provided in the embodiment with the number of sampling runs being 50 is shown.
[0017] Figure 6 A curve of the spectral variable regression coefficient and the sampling run number with a sampling run number of 50 times provided in the embodiment.
[0018] Figure 7 A schematic diagram of the structure of a radial basis function neural network provided in an embodiment.
[0019] Figure 8 This is a statistical graph of unsaturated fatty acid content provided in the embodiment. In the graph, the horizontal axis is the test result through GB / T 28769-2012, and the vertical axis is the unsaturated fatty acid result of the method for testing unsaturated fatty acids in fresh carp muscle.
[0020] Fig. 9 A visualization diagram of the unsaturated fatty acid content provided in the examples.
[0021] Fig.10 A schematic flow chart of a method for obtaining wavelength information provided in an embodiment.
[0022] Fig.11 This is a schematic diagram of the method flow of step S705 provided in the embodiment. DETAILED DESCRIPTION
[0023] In order to make the purpose, technical scheme and advantages of the present application clearer, the present application is further described in detail below in conjunction with the examples. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. The reagents not described separately in detail in the present application are all conventional reagents and can be obtained from commercial channels; the methods not described in detail are all conventional experimental methods and can be obtained from the prior art.
[0024] In order to solve the problems of long cycle, high cost and lethal sampling in the above-mentioned prior art, this application establishes the relationship between the characteristic wavelength of the skin of fresh carp and the content of EPA and DHA in its muscle through machine learning and constructs a detection model. By inputting the characteristic wavelength information of the skin of fresh carp into the detection model, the content of EPA and DHA in its muscle can be quickly known, which can not only achieve rapid and low-loss detection, but also has high detection accuracy.
[0025] For this reason, Figure 1 and 7 As shown, the embodiment discloses a method for detecting unsaturated fatty acids in fresh carp muscle. The method comprises:
[0026] S10, obtaining a training set, wherein the training set includes a plurality of training samples, each of the training samples includes at least one wavelength information and unsaturated fatty acid information corresponding to the wavelength information;
[0027] S20, obtaining a radial basis function neural network, the radial basis function neural network comprising an input layer, a hidden layer and an output layer, the input layer is used to receive the wavelength information, the hidden layer is used to perform non-negative nonlinear processing on the wavelength information to obtain an implicit function space, and the output layer is used to linearize the implicit function space to obtain a linearized output result;
[0028] S30, acquiring each of the training samples to train the radial basis function neural network to determine the number, center and width of neurons in the hidden layer, and the connection weight between the hidden layer and the output layer;
[0029] S40, obtaining a detection model according to the determined number, center and width of neurons in the hidden layer, and the determined connection weight between the hidden layer and the output layer;
[0030] S50, obtaining wavelength information of the fresh and living carp sample to be tested;
[0031] S60, inputting the wavelength information of the fresh carp sample to be tested into a detection model to obtain an unsaturated fatty acid result.
[0032] In some embodiments, the wavelength information consists of hyperspectral data of 395 nm, 411 nm, 427 nm, 655 nm, 711 nm, 968 nm, 987 nm, 989 nm, 1000 nm, 1004 nm, 1028 nm, 1030 nm, 1033 nm and 1035 nm.
[0033] In some embodiments, Fig.10 As shown, in the method, the step of acquiring the wavelength information includes:
[0034] S701, obtaining a hyperspectral image of a fresh carp, wherein the hyperspectral image is a pixel map of a skin spectrum of the fresh carp, and the wavelength range of the skin spectrum is 400-1000 nm;
[0035] S702, obtaining a target area in the hyperspectral image;
[0036] S703, calculating the average reflectivity of all wavelengths within the wavelength range of 400-1000 nm in the current area;
[0037] S704, averaging the spectrum at the wavelength corresponding to the average reflectivity value;
[0038] S705: Extract the wavelength information from the average spectrum.
[0039] In some embodiments, the hyperspectral image is a 2558×960 pixel image.
[0040] In some embodiments, the target area is a 200×200 pixel area.
[0041] In some embodiments, the step of acquiring wavelength information further includes S700 before step S701: preprocessing the acquired original spectral image to obtain the hyperspectral image.
[0042] In order to eliminate the influence of factors such as equipment, samples and environment during the acquisition of raw spectral data, the original spectral image obtained by the hyperspectral imaging camera is subjected to convolution smoothing. Convolution smoothing is a preprocessing method for smoothing spectral data and reducing noise. It smoothes the data by fitting a polynomial curve in a local area, thereby eliminating or reducing random noise in the data and making the data curve smoother.
[0043] like Figure 2 The original spectrum of a fresh carp is shown in the figure. Due to the uneven surface flatness of the carp's skin after descaling and noise, the hyperspectral lines are irregular. Figure 3As shown in Figure 1, the hyperspectral image obtained by convolution smoothing the original spectrum image reduces interference such as noise and is more conducive to machine learning.
[0044] In addition, since the hyperspectral image contains a lot of variable information and there is a lot of redundant information between the variables, the modeling efficiency and accuracy of the model will be seriously affected. In order to improve the prediction accuracy of the model and improve the efficiency of the model prediction, in some embodiments, such as Fig.11 As shown, step S705 specifically includes:
[0045] S711, obtaining an average spectrum of each sample;
[0046] S712, obtaining Monte Carlo sampling from the average spectrum of each sample;
[0047] S713, obtaining at least two variable subsets from the Monte Carlo sampling;
[0048] S714, cross-validating each variable subset to obtain a root mean square error of each variable subset;
[0049] S715: If it is detected that a certain variable subset has the minimum root mean square error, extract the variables in the variable subset as the extracted wavelength information.
[0050] In step S712, the Monte Carlo sampling runs 50 times.
[0051] Figure 4 FIG. 4 shows a curve of the Monte Carlo sampling number and the sampling running number when the Monte Carlo sampling running number in step S712 is 50 times. Figure 4 It can be seen that as the number of sampling runs increases, the number of Monte Carlo sampling decreases rapidly, and the sampling frequency band decreases rapidly in the initial stage (the first 10 sampling processes), and then decreases slowly (the number of sampling runs is 10-50 times), revealing the two stages of coarse selection and fine selection in the CARS algorithm.
[0052] Figure 5 The curve of the interactive validation root mean square error and the sampling run number of the Monte Carlo in step S714 is shown as 50. When the sampling run number gradually increases to 28 times, the RMSEC value gradually decreases with the increase of the sampling number, and then gradually shows an increasing trend.
[0053] Figure 6 A plot of the regression coefficient of the spectral variable versus the number of sampling runs for 50 Monte Carlo sampling runs is shown.
[0054] This shows that after the Monte Carlo sampling runs 50 times, step S705 eliminates useless information and can more accurately extract wavelength information, which helps model training and improves the accuracy of the detection model.
[0055] In some embodiments, the wavelength information obtained is spectral information of 395 nm, 411 nm, 427 nm, 655 nm, 711 nm, 968 nm, 987 nm, 989 nm, 1000 nm, 1004 nm, 1028 nm, 1030 nm, 1033 nm and 1035 nm.
[0056] In some embodiments, the unsaturated fatty acid information is detected by the method recommended by GB / T 28769-2012 standard.
[0057] In some embodiments, 400 fresh carps are randomly sampled using the Kennard-Stone (KS) method. The wavelength information and corresponding unsaturated fatty acid information of 320 fish are extracted as a training set for training the constructed radial basis function neural network. In addition, the wavelength information and corresponding unsaturated fatty acid information of 80 fish are extracted as a validation set for validating the trained radial basis function neural network to obtain a detection model. Table 1 shows the statistical results of the sum of the absolute contents of EPA and DHA (mg / g) in the fresh carp muscle providing the training set and the validation set.
[0058] Table 1
[0059]
[0060] In some embodiments, the unsaturated fatty acid information is a normalized vector of the content of eicosapentaenoic acid and docosahexaenoic acid in the fresh carp muscle.
[0061] In some embodiments, the output expression of the radial basis function neural network is:
[0062]
[0063] Among them, J(ω) represents the objective function, N is the number of samples, M is the number of hidden layer neurons (2), ωj is the weight of the jth hidden layer neuron, xi is the wavelength information of the ith sample, and yi is the eicosapentaenoic acid and docosahexaenoic acid content of the ith sample.
[0064] Among them, radial basis function
[0065] Among them, μ jis the center vector of the jth hidden layer neuron, and σ is the width parameter of the Gaussian function, which controls the width or "radius" of the function.
[0066] In some embodiments, the radial basis function neural network is initialized before training, including initializing the training speed, initializing the training error and initializing the number of training iterations. For example, the training speed is initialized to 0.01, and the training error is initialized to 1×10 -6 , the number of training iterations is initialized to 1000.
[0067] In some embodiments, the training of the radial basis function neural network further includes detecting that the training is completed when the determination coefficient of the training set is the highest, the root mean square error is the lowest, and the mean absolute error is the lowest. Root mean square error Mean absolute error Among them, n represents the number of samples, xi and yi represent the estimated value and the measured value respectively, and denote the average of the estimated and measured values, respectively.
[0068] In some embodiments, the method further comprises validating the trained radial basis function neural network.
[0069] like Figure 8 As shown, the unsaturated fatty acid results are statistical graphs.
[0070] Table 3 shows the results of using the detection model to predict the samples in the training set and the validation set. Among them, the R2 of the training set and the validation set were 0.9934 and 0.9913 respectively; the root mean square error was 0.3326 and 0.3352 respectively; the mean absolute error was 0.2704 and 0.2659 respectively. This shows that the method provided in the embodiment can quickly and low-loss detect the sum of EPA content and DHA content in fresh carp muscle.
[0071] Table 3
[0072]
[0073] In addition, different machine learning models are trained using the samples of the above embodiments, and the error results of the training set and the validation set are shown in Table 3. As shown in Table 3, the radial basis function neural network provided by the present application is used for training to obtain the detection model, and the error is the lowest.
[0074] In some embodiments, the unsaturated fatty acid result is a pixel image composed of R, G, and B components, the pixel image displays the whole fresh carp through a first pixel or a dot matrix composed of the first pixel, and the pixel image displays the unsaturated fatty acids through a second pixel or a dot matrix composed of the second pixel. The levels of the components in the first pixel or its dot matrix are different from those in the second pixel or its dot matrix.
[0075] Furthermore, the pixel image displays the content of the unsaturated fatty acid through the levels of the R, G, and B components in the second pixel or its dot matrix.
[0076] like Fig. 9 As shown, for example, the first pixel is a green to light yellow pixel composed of RGB components, so in the pixel image, the fresh carp is displayed as a region displayed in any color between green and light yellow. For example, the second pixel is a region displayed in any color between red and dark red composed of RGB separation. For example, the darker the red displayed by the second pixel, the higher the content of unsaturated fatty acids in the fresh carp muscle in this region.
[0077] In this way, through the visualized pixel image, the user can directly observe the distribution and content of unsaturated fatty acids in the muscles of fresh carp.
[0078] The method for detecting unsaturated fatty acids in fresh carp muscle provided in the embodiment of the present application can be performed by a device for detecting unsaturated fatty acids in fresh carp muscle, or a control unit in the device for detecting unsaturated fatty acids in fresh carp muscle for performing the method for detecting unsaturated fatty acids in fresh carp muscle. In the embodiment of the present application, the device for detecting unsaturated fatty acids in fresh carp muscle provided in the embodiment of the present application is taken as an example to illustrate the device for detecting unsaturated fatty acids in fresh carp muscle provided in the embodiment of the present application.
[0079] Optionally, an embodiment of the present application also provides an electronic device, including a processor, a memory, and a program or instruction stored in the memory and executable on the processor. When the program or instruction is executed by the processor, each process of the above-mentioned method embodiment for detecting unsaturated fatty acids in fresh carp muscle is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.
[0080] The above is only a preferred specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by any technician familiar with the technical field within the technical scope disclosed in the present application should be covered within the protection scope of the present application.
Claims
1. The method for detecting unsaturated fatty acids in fresh carp muscle includes: Obtaining a training set, the training set comprising a plurality of training samples, each of the training samples comprising at least one wavelength information and unsaturated fatty acid information corresponding to the wavelength information; Obtain a radial basis function neural network, the radial basis function neural network comprising an input layer, a hidden layer and an output layer, the input layer is used to receive the wavelength information, the hidden layer is used to perform non-negative nonlinear processing on the wavelength information to obtain an implicit function space, and the output layer is used to linearize the implicit function space to obtain a linearized output result; Acquire each of the training samples to train the radial basis function neural network to determine the number, center and width of neurons in the hidden layer, and the connection weight between the hidden layer and the output layer; Obtaining a detection model according to the determined number, center and width of neurons in the hidden layer and the determined connection weights between the hidden layer and the output layer; Obtaining wavelength information of fresh and living carp samples to be tested; as well as The wavelength information of the fresh carp sample to be tested is input into the detection model to obtain the unsaturated fatty acid result.
2. The method according to claim 1, wherein the unsaturated fatty acids include eicosapentaenoic acid and docosahexaenoic acid, and the unsaturated fatty acid results include the sum of the contents of eicosapentaenoic acid and docosahexaenoic acid, and the distribution of the eicosapentaenoic acid and docosahexaenoic acid in the fresh carp individuals.
3. The method according to claim 1, wherein the step of acquiring the wavelength information comprises: Obtaining a hyperspectral image of a fresh carp, wherein the hyperspectral image is a pixel map of the skin spectrum of the fresh carp, and the wavelength range of the skin spectrum is 400-1000nm; Obtaining a target area in the hyperspectral image; Calculate the average reflectivity of all wavelengths in the wavelength range of 400-1000nm in the current area; According to the average spectrum at the wavelength corresponding to the average reflectivity value; The wavelength information is extracted from the average spectrum.
4. According to the method of claim 3, the hyperspectral image is a 2558×960 pixel image, and the target area is a 200×200 pixel area.
5. The method according to claim 3, wherein the step of "extracting the wavelength information from the average spectrum" comprises: Obtain the average spectrum of each sample; Obtaining Monte Carlo sampling from the average spectrum of each of the samples; obtaining at least two subsets of variables from the Monte Carlo sampling; Perform cross validation on each variable subset to obtain the root mean square error of each variable subset; If it is detected that a certain subset of the variables has the minimum root mean square error, the variables in the subset of the variables are extracted as the extracted wavelength information.
6. According to any one of the methods of claims 3 to 5, the wavelength information obtained is spectral information of 395nm, 411nm, 427nm, 655nm, 711nm, 968nm, 987nm, 989nm, 1000nm, 1004nm, 1028nm, 1030nm, 1033nm and 1035nm.
7. The method according to claim 1, further comprising initializing the training speed, training error and number of training iterations of the radial basis function neural network before training the radial basis function neural network.
8. The method according to claim 1, wherein training the radial basis function neural network further comprises: When it is detected that the determination coefficient trained using the training set is the highest, the root mean square error is the lowest, and the mean absolute error is the lowest, the training is confirmed to be completed.
9. The method according to claim 1, wherein the unsaturated fatty acid result is a pixel image composed of R, G, and B components, the pixel image displays the whole fresh carp through a first pixel or a dot matrix composed of the first pixel, and the pixel image displays the unsaturated fatty acids through a second pixel or a dot matrix composed of the second pixel, wherein: The levels of components in the first pixel or its dot matrix are different from those in the second pixel or its dot matrix.
10. The method according to claim 9, wherein the pixel image displays the unsaturated fatty acid content through the levels of the R, G, and B components in the second pixel or its dot matrix.
Citation Information
Patent Citations
Method and device for fish flesh detection
CN103278464A
Hyperspectral-data-fusio-based fast non-contact fish fat oxidation monitoring method
CN104655586A
Device and method for controlling treatment for skin conditions using tracers
CN115802930A
Method and system for detecting unsaturated fatty acid content of milk powder
CN115808397A
Grass carp muscle unsaturated fatty acid content nondestructive testing method based on scale characteristic wavelength
CN119623535A
