A rapid identification method for Porphyra yezoensis grades based on artificial intelligence
By combining deep learning algorithms with visible-near-infrared spectroscopy and image data, a convolutional neural network model was established, which solved the complexity of grade identification of Porphyra yezoensis and achieved fast and accurate grade recognition and classification, replacing manual sensory evaluation and suitable for batch identification at production and trading sites.
Patent Information
- Application Number
- CN202110559017.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-05-21
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2041-05-21
AI Technical Summary
Existing technologies make it difficult to effectively identify the grade of Porphyra yezoensis. Manual sensory evaluation is easily affected by human and environmental factors, resulting in inconsistent evaluation results. Existing pattern recognition methods find it difficult to handle the complexity and noise interference of Porphyra yezoensis, and cannot achieve fast and accurate grade identification.
A deep learning algorithm combined with visible-near-infrared spectroscopy and image data was used to establish a pattern recognition model based on convolutional neural network (CNN). Through machine vision and taste technology, linear and nonlinear factors were comprehensively processed to achieve rapid identification of the grade of Porphyra yezoensis.
The rapid and accurate identification of the grade of Porphyra yezoensis was achieved, with correlation coefficient R>0.94, determination coefficient R2>0.98, and root mean square error RMSE<0.21, which improved the objectivity and efficiency of identification and is suitable for batch identification at production and trading sites.
Smart Images

Figure CN115389447B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a method for quickly identifying the grade of Porphyra yezoensis based on artificial intelligence, and belongs to the field of food detection. Background Art
[0002] Porphyra yezoensis, a naturally occurring marine algae with high nutritional value, has a total output value of 5 billion yuan in China, and the market for seaweed is growing rapidly at 10% annually. According to current national and local standards for Porphyra yezoensis in my country, it is classified into five grades and twenty-two levels based on color, gloss, taste, and morphology. Current grading methods, both domestically and internationally, primarily rely on manual sensory evaluation, which is subject to limitations due to human and environmental factors, leading to conflicting evaluations between buyers and sellers and the possibility of adulteration.
[0003] Pattern recognition methods based on infrared or near-infrared spectral signatures resulting from chemical differences between substances have been widely applied to the quality grading and grade identification of items such as tea (CN104122225B), ham (CN106198423B), rice (CN111007040A), alfalfa hay (CN111077106A), and traditional Chinese medicine (CN111175247A). These methods offer rapid analysis, high efficiency, low cost, excellent reproducibility, no sample pretreatment, and ease of online nondestructive testing. However, the grading of Porphyra yezoensis is a result of a combination of external sensory perception and its complex internal composition. Factors influencing the quality of Porphyra yezoensis include secondary diseased spots (such as dead, stagnant, and chrysanthemum spots) formed during cultivation; undesirable algae (such as green algae and diatoms); and morphological and flavor variations caused by processing techniques, such as water spots, wrinkles, cavities, and off-flavors. The chemical composition of dried laver, sub-algae, and miscellaneous algae is very similar, and the differences between their near-infrared and infrared spectra are also very small. The morphological and flavor differences caused by the processing technology, such as water spots, wrinkles, holes, and off-flavors, cannot be identified by near-infrared and infrared technology. Due to the diversity and complexity of dried laver products, different samples have obvious differences in variety, origin, preparation process, etc., and the noise generated has a serious drowning effect on their useful spectral difference information. For dried laver samples, existing intelligent methods such as partial least squares discriminant analysis (PLS-DA) and support vector machine (SVM) have difficulty in establishing the correlation between linear factors and nonlinear factors and grades, and the identification effect cannot meet actual requirements. Therefore, there are currently no literature, patents, etc. reporting on intelligent identification and classification methods for laver grades.
[0004] Deep learning algorithms offer advantages such as multidimensional data processing capabilities, excellent feature learning capabilities, high data throughput, the ability to accept raw data input, and automatic feature extraction. Combined with recently developed artificial intelligence technologies such as machine vision and machine taste, and utilizing visible-near-infrared spectroscopy, they establish a pattern recognition model encompassing both linear and nonlinear factors, enabling rapid identification of Porphyra yezoensis grades. This approach represents a potential solution. This invention utilizes a deep learning algorithm as its computational core, using visible-near-infrared spectroscopy and image data for feature acquisition and input, to establish an artificial intelligence pattern recognition model that enables rapid identification of Porphyra yezoensis grades, filling a technological gap. Summary of the Invention
[0005] Purpose of the Invention: To address the shortcomings of Porphyra yezoensis grading methods and the drawbacks of existing pattern recognition technologies, the present invention provides an artificial intelligence-based method for rapid Porphyra yezoensis grade identification. This method avoids the subjectivity and uncertainty inherent in manual discrimination. By comprehensively utilizing the correlation between linear and nonlinear factors and grade, it enables effective identification and classification of Porphyra yezoensis grades, thus filling a gap in the relevant technology.
[0006] In order to achieve the purpose of the above invention, the present invention adopts the following technical solutions:
[0007] A method for rapid identification of the grade of Porphyra yezoensis based on artificial intelligence mainly comprises the following steps:
[0008] (1) Collect no less than 1,000 samples of Porphyra yezoensis from different manufacturers, origins, production dates, and grades, and cover samples of Porphyra yezoensis processed in various seasons;
[0009] (2) According to the current classification standards at home and abroad, it is divided into five grades and twenty-two levels, and grouped according to grade;
[0010] (3) Select a stable medium such as polytetrafluoroethylene as a reference background, place a single laver sample under the probe of a near-infrared spectrometer, scan the spectrum in the range of 200-2500 nm, with a resolution of 4-8 nm, scan 10-100 times, and take the average value as the visible-near-infrared spectrum data of the sample; use a digital image acquisition device to obtain sample image information; collect the spectrum and image information of all samples;
[0011] (4) Preprocessing the near-infrared spectrum in step (3) to eliminate noise and baseline drift, and obtain preprocessed spectrum information;
[0012] (5) Grouping the Porphyra yezoensis sample grades obtained in step (2) and the image information in step (3) respectively, and establishing associations between the data groups and the corresponding grades; randomly dividing the associated sample data into training set samples and test set samples according to a quantity ratio of 6:1, the training set is used to establish the recognition model, and the test set is used to evaluate and verify the recognition model;
[0013] (6) Grouping the grades of the Porphyra yezoensis samples obtained in step (2) and the pre-processed spectral information in step (4) respectively, and establishing associations between the data groups and the corresponding grades; randomly dividing the associated sample data into training set samples and test set samples according to a quantity ratio of 6:1, the training set is used to establish the recognition model, and the test set is used to evaluate and verify the recognition model;
[0014] (7) Using the training set data from step (5), a deep learning network was used to establish a Porphyra yezoensis grade prediction model based on image data;
[0015] (8) Using the training set data in step (6), a deep learning network was used to establish a Porphyra yezoensis grade prediction model based on spectral information;
[0016] (9) Using the test set in step (5) as an unknown sample, the prediction ability of the prediction model in step (7) is tested, and the prediction model is adjusted according to the test results to obtain the best prediction model;
[0017] (10) Using the test set in step (6) as an unknown sample, the prediction ability of the prediction model in step (8) is tested, and the prediction model is adjusted according to the test results to obtain the best prediction model;
[0018] (11) Based on Python, the spectral preprocessing algorithm is integrated with the optimal prediction model in steps (9) and (10), and the grade of Porphyra yezoensis samples can be detected in real time through direct input of near-infrared spectra and images.
[0019] Preferably, the prediction model integrated in step (11) has a weight of 3:7 for the output of the best prediction model results in step (9) and step (10).
[0020] Preferably, in step (3), the spectral data of the Porphyra yezoensis sample is collected using a near-infrared spectrometer with a scanning range of 350-2500 nm and a resolution of 6-8 nm. After scanning 30-50 times, the average value is taken as the near-infrared spectral data of the Porphyra yezoensis sample.
[0021] Furthermore, the near-infrared spectrum preprocessing method includes at least one of differentiation, multivariate scatter correction (MSC), standard normal transformation (SNV), and successive projection algorithm (SPA).
[0022] Furthermore, the recognition model establishment method in step (5) includes but is not limited to: one or more deep learning networks such as convolutional neural network (CNN), recurrent neural network (RNN), generative adversarial network (GAN), deep belief network (DBN), residual network (ResNet), etc.
[0023] Preferably, the deep learning network is a convolutional neural network (CNN).
[0024] Furthermore, the deep learning network includes an input layer, a one-dimensional convolutional layer, a fully connected layer and a Softmax layer, a batch normalization layer and an activation function layer between the one-dimensional convolutional layers, a maximum pooling layer after the first convolutional layer, and an average pooling layer after the fully connected layer, wherein the number of one-dimensional convolutional layers is ≥8.
[0025] Furthermore, the number of convolution kernels of the one-dimensional convolution layer is 64-256, the convolution kernel size of the first one-dimensional convolution layer is 6-12, and the stride is 3-8; the convolution kernel size of the other one-dimensional convolution layers is 1-7; and the activation function used in each one-dimensional convolution layer is ReLU.
[0026] The advantages and beneficial effects of the present invention are:
[0027] The present invention proposes a method for rapid identification of the grade of Porphyra yezoensis based on artificial intelligence. It proposes a method that combines machine vision with visible-near infrared spectroscopy technology, adopts a CNN artificial neural network based on deep learning, combines BP framework supervised learning, and comprehensively utilizes the linear and nonlinear factors associated with the grade of Porphyra to effectively identify and classify the grade of Porphyra yezoensis, replacing manual sensory evaluation and improving the objectivity and standardization of the evaluation process. The method for rapid identification of the grade of Porphyra yezoensis provided by the present invention has a correlation coefficient R>0.94 and a determination coefficient R>0.94 for sample identification. 2 >0.98, root mean square error RMSE <0.21, with the advantages of fast identification speed, high efficiency, low cost, good reproducibility, and no need for complicated sample processing. It is suitable for production site control and transaction site batch identification applications, filling the gap in the technology of rapid identification of laver grades. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 Example: A neural network architecture diagram for rapid identification of Porphyra yezoensis grades.
[0029] Figure 2 Example: Distribution diagram of spectral characteristic variables of Porphyra yezoensis.
[0030] Figure 3 Graph showing the identification results of the Porphyra yezoensis recognition model for unknown Porphyra samples in the test set. DETAILED DESCRIPTION
[0031] The present invention will be further described below with reference to specific embodiments, but the protection scope of the present invention is not limited thereto.
[0032] Example: A method for rapid identification of the grade of Porphyra yezoensis based on artificial intelligence, mainly comprising the following steps:
[0033] (1) Sample collection: Samples of Porphyra yezoensis from different manufacturers and origins were collected from the Ganyu Porphyra Trading Center in Lianyungang City, Jiangsu Province. The samples covered the entire production cycle from November of the current year to May of the following year.
[0034] (2) Sample grade calibration: refer to the current grade classification standards at home and abroad, and ask on-site experts, manufacturers and purchasers to grade the samples; based on the assessment results, the samples are grouped into five grades and twenty-two levels, with each group containing 50 samples, for a total of 1,100 samples;
[0035] (3) Sample visual, taste and spectral information collection: A 40×40 cm polytetrafluoroethylene plate was used as the reference background. A single laver sample was spread flat on the polytetrafluoroethylene plate. The sample spectrum was collected using a QualitySpec Trek handheld spectrometer. The spectral scanning range was 350-1700 nm, the resolution was 6.5 nm, and 50 scans were performed. The average value was taken as the sample visible-near infrared spectral data; the sample image was collected using a CanoScan LiDE 400 scanner with an image resolution of 600 dpi; 3 g of the sample was taken, distilled water was added at a ratio of 1:10, and the mixture was homogenized to prepare a uniform suspension. The sample taste information was collected using an electronic tongue; the above method was used to collect the spectrum, image and taste information of all samples;
[0036] (4) Sample spectrum information preprocessing: The spectrum collected in step (3) is preprocessed using the successive projection algorithm (SPA) and its characteristic variables are analyzed. The results are shown in Figure 2.
[0037] (5) Establishing a sample data set: The visual, taste, and spectral information of the samples collected in steps (3) and (4) are grouped according to levels, with 50 groups for each level, and the data groups are associated with the corresponding levels; the SPXY algorithm is used to randomly divide the data into training and test sets in a ratio of 4:1, that is, the training set has 880 samples covering five levels and twenty-two levels, and the test set has 220 samples;
[0038] (6) Establish recognition model: Based on the TensorFlow 2.2.0 learning framework, establish a CNN deep artificial neural network, such as Figure 1The network structure consists of 5 one-dimensional convolutional layers (conv1d), 3 maximum pooling layers (maxpooling1d) and 2 fully connected layers (dense). The number of convolution kernels of the three convolutional layers are 64, 128, 128, 256 and 256 respectively, and the convolution kernel sizes are 7, 3, 3, 3 and 3 respectively; the pooling stride of the pooling layer is 2; the number of fully connected layers is 1000 and 1 respectively; the 880 sample data of the training set are imported into the CNN neural network, combined with BP framework supervised learning, the number of training iterations is 200, the loss function is L2 norm, and the early_stopping strategy is adopted to prevent overfitting training, and a grade pattern recognition model for Porphyra yezoensis is established.
[0039] (7) Test of the model’s prediction of unknown samples: 132 samples from the test set were used as unknown samples to test the pattern recognition model; the correlation coefficient R and the determination coefficient R of the model were used to test the model’s prediction of unknown samples. 2 The model is evaluated by indicators such as the root mean square error (RMSE) of the prediction error; and the model is reversely propagated and cross-calculated according to the actual level of the test samples to obtain the best pattern recognition model.
[0040] The CNN neural network pattern recognition model established in the embodiment of the present invention is trained and optimized with the training set samples, and the prediction results of the remaining 88 samples in the test set are as follows: Figure 3 As shown in the figure, the model prediction accuracy is 93.2%, which has practical application value.
[0041] The above are merely specific embodiments of the present invention. The present invention is not limited to the above embodiments and is subject to numerous variations. All variations directly derived from or conceived of by a person of ordinary skill in the art without inventive effort based on the disclosure of the present invention are intended to fall within the scope of protection of the present invention.
Claims
1. A method for rapid identification of the grade of Porphyra yezoensis based on artificial intelligence, characterized by: The steps include: (1) Collecting samples of Porphyra yezoensis; (2) With reference to the current grading standards at home and abroad, the samples are graded into five grades and twenty-two levels, and grouped according to grade; (3) Select a stable medium such as polytetrafluoroethylene as a reference background, place a single laver sample under the probe of a near-infrared spectrometer, scan the spectrum in the range of 200-2500 nm, with a resolution of 4-8 nm, scan 10-100 times, and take the average value as the visible-near-infrared spectrum data of the sample; use a digital image acquisition device to obtain sample image information; collect the spectrum and image information of all samples; (4) Preprocessing the near-infrared spectrum in step (3) to eliminate noise and baseline drift, and obtain preprocessed spectrum information; (5) grouping the sample grades of Porphyra yezoensis obtained in step (2) and the image information in step (3) respectively, and establishing associations between the data groups and the corresponding grades; and randomly dividing the associated sample data into training set samples and test set samples; (6) grouping the grades of the Porphyra yezoensis samples obtained in step (2) and the pre-processed spectral information in step (4) respectively, and establishing associations between the data groups and the corresponding grades; and randomly dividing the associated sample data into training set samples and test set samples; (7) Using the training set data from step (5), a deep learning network was used to establish a Porphyra yezoensis grade prediction model based on image data; (8) Using the training set data in step (6), a deep learning network was used to establish a Porphyra yezoensis grade prediction model based on spectral information; (9) Using the test set in step (5) as an unknown sample, the prediction ability of the prediction model in step (7) is tested, and the prediction model is adjusted according to the test results to obtain the best prediction model; (10) Using the test set in step (6) as an unknown sample, the prediction ability of the prediction model in step (8) is tested, and the prediction model is adjusted according to the test results to obtain the best prediction model; (11) Relying on the Python learning framework, the spectral preprocessing algorithm was integrated with the optimal prediction model in steps (9) and (10), and the output weight was 3:
7. The grade of the Porphyra yezoensis sample could be detected in real time by directly inputting the near-infrared spectrum and image.
2. The method for rapid identification of Porphyra yezoensis grades based on artificial intelligence according to claim 1, wherein: The number of Porphyra yezoensis samples is no less than 1,000, and covers Porphyra yezoensis samples from different manufacturers, origins, grades and processed in various seasons, including five grades and twenty-second grades of samples.
3. The method for rapid identification of Porphyra yezoensis grades based on artificial intelligence according to claim 1, wherein: The sample quantity ratio of the training set samples to the test set samples in step (5) and step (6) is 6:1, wherein the training set samples contain associated sample data of different levels.
4. The method for rapid identification of Porphyra yezoensis grades based on artificial intelligence according to claim 1, wherein The spectrum preprocessing method includes one or more of differentiation, multivariate scatter correction (MSC), standard normal transformation (SNV), and successive projection algorithm (SPA).
5. The method for rapid identification of Porphyra yezoensis grades based on artificial intelligence according to claim 1, characterized in that: The deep learning network in step (7) and step (8) includes one or more deep learning networks such as convolutional neural network (CNN), recurrent neural network (RNN), generative adversarial network (GAN), deep belief network (DBN), residual network (ResNet), etc.
6. The method for rapid identification of Porphyra yezoensis grades based on artificial intelligence according to claim 5, characterized in that: The deep learning network includes an input layer, a one-dimensional convolutional layer, a fully connected layer and a Softmax layer, a batch normalization layer and an activation function layer between the one-dimensional convolutional layers, a maximum pooling layer after the first convolutional layer, and an average pooling layer after the fully connected layer, wherein the number of one-dimensional convolutional layers is ≥8.
7. The method for rapid identification of Porphyra yezoensis grades based on artificial intelligence according to claim 6, characterized in that: The number of convolution kernels of the one-dimensional convolution layer is 64-256, the convolution kernel size of the first one-dimensional convolution layer is 6-12, and the stride is 3-8; the convolution kernel size of the other one-dimensional convolution layers is 1-7; the activation function used in each one-dimensional convolution layer is ReLU.
Citation Information
Patent Citations
A method for identifying illegal additives in tea based on near-infrared spectroscopy technology
CN104122225B
A method for identifying the grade of ham sausage based on visible-near-infrared spectroscopy.
CN106198423B
Near-infrared spectrum rapid evaluation method for rice taste quality
CN111007040A
Method for grading quality of alfalfa hay by using near-infrared method experimental data
CN111077106A
Traditional Chinese medicine quality determination system based on near infrared spectroscopy
CN111175247A