A method and system for identifying the authenticity of cordyceps sinensis based on a convolutional neural network

The method of identifying Cordyceps sinensis using convolutional neural networks utilizes the characteristics of the insect body and stroma, solving the problem of dependence on high-end equipment, achieving high-precision identification of genuine Cordyceps sinensis, reducing identification costs, and improving the convenience of identifying Chinese medicinal materials.

CN120356195BActive Publication Date: 2025-11-04NAT INST FOR FOOD & DRUG CONTROL
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510326339.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-19
Publication Date
2025-11-04
Estimated Expiration
2045-03-19

AI Technical Summary

Technical Problem

Existing methods for identifying genuine Cordyceps sinensis rely on high-end instruments and sophisticated analytical techniques, resulting in high costs and hindering widespread application.

Method used

Using a convolutional neural network-based method, feature images are obtained by taking photos of cordyceps groups, and training and testing sets are divided. Significant features are extracted using convolutional neural networks, and the shape, texture, and color features of the insect body and stroma are combined to determine the type of cordyceps and identify Cordyceps sinensis.

Benefits of technology

It achieves high-precision identification of genuine and counterfeit Cordyceps sinensis, reduces the impact of background changes, is applicable to the differentiation of different types of Cordyceps sinensis, reduces identification costs, and improves the convenience of identifying Chinese medicinal materials.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120356195B_ABST
    Figure CN120356195B_ABST
Patent Text Reader

Abstract

The application discloses a cordyceps sinensis true and false identification method and system based on a convolutional neural network, belongs to the technical field of traditional Chinese medicine identification, and comprises the following steps: taking a photo of a cordyceps sinensis-containing cordyceps group, and obtaining a characteristic image of the cordyceps sinensis-containing cordyceps group; dividing the obtained characteristic image dataset into a training set and a test set, inputting the training set into a convolutional neural network for training; inputting the test set into the trained convolutional neural network, and extracting significant features in the cordyceps characteristic image; based on different kinds of significant features in the test set, dividing cordyceps types, and determining the cordyceps sinensis in the cordyceps group. The application can weaken the influence of background changes by extracting the features of the picture through the convolutional neural network, can identify the stipe and insect body parts of different kinds of cordyceps, and is suitable for distinguishing different kinds of cordyceps.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of traditional Chinese medicine identification, and particularly relates to a cordyceps sinensis true and false identification method and system based on a convolutional neural network. BACKGROUND

[0002] Cordyceps sinensis is a traditional tonic Chinese medicine. In recent years, due to human factors, environmental factors, etc., the resources of cordyceps sinensis are very rare, which makes the price continue to rise and become a precious medicinal material. After misselection and mistake taking, adverse reactions such as dizziness, nausea and vomiting may occur, so it is more necessary to identify and study cordyceps sinensis.

[0003] With the development of science and technology, in the identification process of cordyceps sinensis, in addition to the commonly used traditional identification technology, modern identification technologies are also gradually applied, including gas chromatography-mass spectrometry technology, double PCR identification technology, hyperspectral imaging technology, DNA barcode technology, electrochemical gene sensor technology, Fourier transform infrared spectroscopy technology, etc., which provide important technical support for the identification of cordyceps sinensis. However, the development of the above methods needs to rely on high-end instruments and equipment and precise analysis technology, which has high use cost and is difficult to popularize and apply.

[0004] Therefore, how to provide a cordyceps sinensis true and false identification method, which can distinguish different types of cordyceps sinensis and accurately identify cordyceps sinensis, is a technical problem to be solved by those skilled in the art. SUMMARY

[0005] Therefore, the present application provides a cordyceps sinensis true and false identification method based on a convolutional neural network to solve the problem of high use cost and difficult popularization and application due to the identification relying on high-end instruments and equipment and precise analysis technology in the prior art.

[0006] In order to achieve the above purpose, the present application provides the following technical scheme:

[0007] According to a first aspect of the present application, a cordyceps sinensis true and false identification method based on a convolutional neural network is provided, comprising the following steps:

[0008] Step S1: photographing a cordyceps sinensis containing cordyceps population to obtain a characteristic image containing the cordyceps population;

[0009] Step S2: dividing the obtained characteristic image data set into a training set and a test set, and inputting the training set into the convolutional neural network for training;

[0010] Step S3: inputting the test set into the trained convolutional neural network, and extracting the significant features in the cordyceps characteristic image;

[0011] Step S4: based on different kinds of significant features in the test set, divide the type of Cordyceps, determine Cordyceps sinensis in the Cordyceps population.

[0012] Further, in step S2, the training set is input into the convolutional neural network for training, specifically comprising:

[0013] Step S201: the convolutional neural network extracts a plurality of original local feature maps of the training set image data, and performs hole convolution and splicing on the plurality of original local feature maps, and processes through a local attention module to obtain a weighted local feature map;

[0014] Step S202: the convolutional neural network extracts an original global feature map of the training set image data, and processes through a global attention module to obtain an average-pooled global feature map;

[0015] Step S203: based on the weighted local feature map and the average-pooled global feature map, the convolutional neural network is used for feature fusion, and splicing, convolution and pooling are performed to obtain a Cordyceps feature map.

[0016] Further, in step S4, based on different kinds of significant features in the test set, divide the type of Cordyceps, determine Cordyceps sinensis in the Cordyceps population, specifically comprising the following steps:

[0017] Step S401: based on the body and stipe of Cordyceps, the image outlined by the body of Cordyceps is the first significant feature, and the image outlined by the stipe of Cordyceps is the second significant feature;

[0018] Step S402: based on the Cordyceps having the first significant feature, the shape feature, texture feature and color feature of the body image are obtained, and a first score value corresponding to the first significant feature is determined;

[0019] Step S403: based on the Cordyceps having the second significant feature, the shape feature, texture feature and color feature of the stipe image are obtained, and a second score value corresponding to the second significant feature is determined;

[0020] Step S404: based on the Cordyceps having the first significant feature and the second significant feature, the probability of the Cordyceps being Cordyceps sinensis is determined.

[0021] Further, in step S402, the shape feature, texture feature and color feature of the body image are obtained, and a first score value corresponding to the first significant feature is determined according to a first comparison standard, wherein the first comparison standard specifically comprises:

[0022] Based on the contour outline graph of the body image, the length and the number of protrusions of the contour outline graph are obtained, and the shape feature parameters of the body image are determined;

[0023] Based on the gray image of the insect image, the number of annular stripes and the roughness of the gray image are obtained, and the texture feature parameters of the insect image are determined;

[0024] Based on the gray image of the insect image, the color brightness of the gray image is obtained, and the color feature parameters of the insect image are determined;

[0025] Based on the shape feature parameters, texture feature parameters and color feature parameters of the insect image, the first score value corresponding to the first significant feature is determined.

[0026] Further, in the step S403, the shape feature, texture feature and color feature of the sub-housing image are obtained, and the second score value corresponding to the second significant feature is determined according to the second comparison standard, wherein the second comparison standard specifically includes:

[0027] Based on the outline sketch of the sub-housing image, the base end width, the end width and the length of the outline sketch are obtained, and the shape feature parameters of the sub-housing image are determined;

[0028] Based on the gray image of the sub-housing image, the roughness of the gray image is obtained, and the texture feature parameters of the sub-housing image are determined;

[0029] Based on the gray image of the sub-housing image, the color brightness of the gray image is obtained, and the color feature parameters of the sub-housing image are determined;

[0030] Based on the shape feature parameters, texture feature parameters and color feature parameters of the sub-housing image, the second score value corresponding to the second significant feature is determined.

[0031] Further, in the first comparison standard, based on the shape feature parameters, texture feature parameters and color feature parameters of the insect image, the first score value corresponding to the first significant feature is determined according to the first calculation function, wherein the first calculation function is:

[0032] P1=L1*f1(X)+S*f2(C1)+f3(M1);

[0033] Wherein, P1 is the first score value corresponding to the first significant feature, f1(X) is the first preset function corresponding to the shape feature parameter, L1 is the length of the insect image, X is the number of convexes of the insect image, f2(C1) is the second preset function corresponding to the texture feature parameter, S is the number of annular stripes of the insect image, C1 is the roughness of the insect image, f3(M1) is the third preset function corresponding to the color feature parameter, and M1 is the color brightness of the insect image.

[0034] Further, in the second comparison standard, based on the shape feature parameters, texture feature parameters and color feature parameters of the sub-housing image, the second score value corresponding to the second significant feature is determined according to the second calculation function, wherein the second calculation function is:

[0035] P2=L2*f1(W2-W1)+f2(C2)+f3(M2);

[0036] Wherein, P2 is the second score value corresponding to the second significant feature, f1(W2-W1) is the first preset function corresponding to the shape feature parameter, L2 is the length of the sub-seat image, W2 is the base end width of the sub-seat image, W1 is the end width of the sub-seat image, f2(C2) is the second preset function corresponding to the texture feature parameter, C2 is the roughness of the sub-seat image, f3(M2) is the third preset function corresponding to the color feature parameter, and M2 is the color brightness of the sub-seat image.

[0037] Further, in the step S404, based on the fact that the cordyceps has the first significant feature and the second significant feature, the probability that the cordyceps is Cordyceps sinensis is determined according to a probability calculation function, wherein the probability calculation function is:

[0038] Q=K1P1+K2P2;

[0039] Wherein, Q is the probability that the cordyceps is Cordyceps sinensis, K1 is the first preset weight corresponding to the first significant feature, P1 is the first score value corresponding to the first significant feature, K2 is the second preset weight corresponding to the second significant feature, and P2 is the second score value corresponding to the second significant feature.

[0040] Further, the calculation process of the cordyceps feature map obtained by the convolutional neural network is as follows:

[0041]

[0042] Wherein, f g represents a one-dimensional tensor of global features, f i represents a three-dimensional tensor of local features, f orth is an orthogonalized local feature map, f final is a cordyceps feature map, conv indicates a normal convolution operation, contact indicates a splicing operation, and pooling indicates an average pooling operation.

[0043] According to the second aspect of the present application, a Cordyceps sinensis authenticity identification system based on a convolutional neural network is provided, which is used to implement the Cordyceps sinensis authenticity identification method based on a convolutional neural network described in any one of the above aspects, and comprises:

[0044] An information acquisition unit is configured to take a photo of a cordyceps population containing Cordyceps sinensis, and acquire a feature image of the cordyceps population containing Cordyceps sinensis;

[0045] A first information processing unit is configured to divide the acquired feature image data set into a training set and a test set, and input the training set into the convolutional neural network for training.

[0046] a second information processing unit configured to input the test set into the trained convolutional neural network and extract the significant features in the cordyceps feature map;

[0047] a feedback unit configured to divide the cordyceps types based on the different types of significant features in the test set and determine the Cordyceps sinensis in the cordyceps population.

[0048] The present application has the following advantages:

[0049] The present application photographs the cordyceps population containing Cordyceps sinensis and obtains the feature image of the cordyceps population containing Cordyceps sinensis; divides the obtained feature image data set into a training set and a test set, inputs the training set into the convolutional neural network for training; inputs the test set into the trained convolutional neural network and extracts the significant features in the cordyceps feature map; divides the cordyceps types based on the different types of significant features in the test set and determines the Cordyceps sinensis in the cordyceps population.

[0050] The convolutional neural network applied in the present application is a high-precision recognition method, which can weaken the influence of background changes by extracting the features of the picture through the convolutional neural network, recognize the stipe and insect body parts of different types of cordyceps, and is suitable for distinguishing different types of cordyceps. The present application solves the problem that modern high-end instruments and equipment are needed for research, and takes a step closer to the fast and convenient identification of traditional Chinese medicine authenticity. BRIEF DESCRIPTION OF DRAWINGS

[0051] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are only exemplary, and for those skilled in the art, other drawings can be obtained from the provided drawings without creative labor.

[0052] The structures, proportions, sizes, etc. shown in the present specification are only used to cooperate with the content disclosed in the specification, to be understood and read by those skilled in the art, and do not define the limiting conditions for the implementation of the present application, so they do not have technical significance. Any modification of structure, change of proportion relationship or adjustment of size, without affecting the effects and purposes that can be achieved by the present application, should still fall within the scope of the technical content disclosed by the present application.

[0053] Figure 1 A flowchart of a Cordyceps sinensis authenticity identification method provided by the present application;

[0054] Figure 2 A specific flowchart of step S2 in the identification method provided by the present application;

[0055] Figure 3 A specific flow chart of step S4 in the identification method provided by the present application is shown in the figure;

[0056] Figure 4 A connection block diagram of the cordyceps sinensis identification system provided by the present application is shown in the figure. DETAILED DESCRIPTION

[0057] The embodiments of the present application are described below by specific examples, and those skilled in the art can easily understand other advantages and effects of the present application from the content disclosed in the description. Obviously, the described embodiments are part of the embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.

[0058] In order to solve the problem that the use cost is high and it is difficult to popularize and apply due to the reliance on high-end instrument equipment and precise analysis technology in the prior art, according to the first aspect, a cordyceps sinensis identification method based on convolutional neural network is provided, as shown in the figure, comprising the following steps: Figure 1

[0059] Step S1: photographing the cordyceps sinensis group containing cordyceps sinensis to obtain the feature image of the cordyceps sinensis group containing cordyceps sinensis;

[0060] Step S2: dividing the obtained feature image data set into a training set and a test set, and inputting the training set into the convolutional neural network for training;

[0061] Step S3: inputting the test set into the trained convolutional neural network to obtain the cordyceps sinensis feature image, and extracting the significant features in the cordyceps sinensis feature image;

[0062] Step S4: dividing the cordyceps sinensis type based on the different types of significant features in the test set, and determining the cordyceps sinensis in the cordyceps sinensis group.

[0063] In step S1, a digital camera with a macro focus lens is used for digital collection and recording of the specimen. The aperture is set to F16-F22 to ensure sufficient depth of field. In the shutter setting, the speed is 1 / 125s. Use a tripod or a fixed device to ensure that the picture is stable and does not appear to be shaking. Use a flip table and flash instant shooting, and unify the white shooting background to avoid the influence of the surrounding environment light and color. Increase the soft cloth on the light source to ensure the softness and uniformity of the light, and avoid the reflection point of the light source. The resolution of the photo is not less than 3 million pixels, and the shooting photo should be selected in high precision mode, and the image is saved in JPG file format. ​

[0064] The experimental dataset contains 333 images, each containing one or more samples of Cordyceps from the corresponding category. Specifically, there are 101 images of Cordyceps sinensis, 101 images of Cordyceps dauricum, and 131 images of Cordyceps militaris. During training, the sample data for each category were divided into a training set (248 images) and a test set (85 images) in a 3:1 ratio.

[0065] like Figure 2 As shown, in step S2, the training set is input into the convolutional neural network for training, specifically including:

[0066] Step S201: The convolutional neural network extracts multiple original local feature maps from the training set image data, performs dilated convolution on the multiple original local feature maps and concatenates them, and then processes them through the local attention module to obtain the weighted local feature maps;

[0067] Step S202: The convolutional neural network extracts the original global feature map of the training set image data, and after processing by the global attention module, the average pooled global feature map is obtained.

[0068] Step S203: Based on the weighted local feature map and the average pooled global feature map, feature fusion is performed through a convolutional neural network, followed by concatenation, convolution, and pooling to obtain the Cordyceps feature map.

[0069] Convolutional neural networks (CNNs) are mainly divided into three modules: the backbone network, the local feature extraction branch, and the global feature extraction branch. The backbone network uses ResNet50 as the core network for feature extraction, and the downsampling operation of the Res3 module has been removed to increase the original local feature map f obtained by the Res3 module. g,3 The semantic information. The local feature extraction branch mainly consists of multiple dilated convolutions, which perform dilated convolution operations on feature maps obtained using different network layers, and combine multiple original local feature maps f g,1 f g,2 f g,3 The data is then stitched together. The global feature extraction branch then extracts the original global feature map f obtained from the Res4 module. g,4 It is fed into the global attention feature module.

[0070] The specific process of extracting local feature maps by the local feature extraction branch is as follows: the feature extraction module extracts the original local feature map f. g,1 f g,2 f g,3 and multiple original local feature maps f g,1 f g,2 f g,3The spliced local feature maps containing different levels of local semantic information are input into a local attention feature module. The local attention mechanism obtains a vector after pooling the feature map, performs one-dimensional convolution or passes through a fully connected layer to obtain a channel weighting vector, then point multiplies the original local feature map, and adds a residual connection of the original local feature map to obtain a local feature map weighted by the local attention module f local The specific calculation process is as follows:

[0071] f local = att(conv(contact(atr_convf g,1 , f g,2 , f g,3 )));

[0072] wherein f local is the weighted local feature map, f g,1 , f g,2 , and f g,3 are the original local feature maps, att indicates the local attention module, conv indicates the ordinary convolution operation, contact indicates the splicing operation, and atr_conv indicates the atrous convolution operation.

[0073] The specific process of extracting the global feature map by the global feature extraction branch is as follows: the feature extraction module sends the original global feature map f g,4 obtained by the Res4 module into the global attention feature module. The global attention feature module constructs Q, V, and K vectors by using two-dimensional convolution on the feature map, weights and sums the spatial and channel interaction information to obtain an attention weight map, point multiplies the original global feature map, and adds a residual connection of the original global feature map to obtain a global feature map weighted by the global spatial and channel attention modules. The weighted global feature map is subjected to average pooling to obtain an average-pooled global feature map f global The specific calculation process is as follows:

[0074] f global = pooling(att(f g,4 ));

[0075] wherein f global is the average-pooled global feature map, f g,4 is the original global feature map, att indicates the global attention module, and pooling indicates the average pooling operation.

[0076] The specific process of feature fusion of the weighted local feature map and the average-pooled global feature map is as follows: after obtaining the one-dimensional tensor f gand f represents a three-dimensional tensor of local features i After that, both are sent into the feature fusion module respectively. Among them, the feature fusion module uses the method of orthogonalization to obtain the orthogonalized local feature f orth , which eliminates the mutual interference of local features and global features, and splices, convolves, and obtains the final global cordyceps feature map f final after pooling. The specific calculation process is as follows:

[0077]

[0078] Among them, f represents a one-dimensional tensor of global features, f represents a three-dimensional tensor of local features, f represents an orthogonalized local feature map, f represents a cordyceps feature map, conv indicates a normal convolution operation, contact indicates a splicing operation, and pooling indicates an average pooling operation. g i orth final

[0079] The loss function selects a softmax classification loss function for training, and iterates the network parameters to finally make the network reach a stable convergence state.

[0080] The convolutional neural network applied in the present application is a high-precision recognition method. The features of the picture are extracted through the convolutional neural network, the influence of background changes can be weakened, the stipe and body parts of different types of cordyceps are recognized, and the different types of cordyceps are distinguished, so that different types of pictures can be distinguished. The present application solves the problem that modern high-end instruments and equipment are needed for research, and takes a step closer to the fast and convenient identification of traditional Chinese medicine.

[0081] As shown in Figure 3 , in step S4, based on the different types of significant features in the test set, the cordyceps type is divided, and the cordyceps group is determined. Cordyceps sinensis, specifically comprising the following steps:

[0082] Step S401: based on the stipe and strobilus of cordyceps, the image outlined by the stipe of cordyceps is the first significant feature, and the image outlined by the strobilus of cordyceps is the second significant feature;

[0083] Step S402: based on the fact that cordyceps has the first significant feature, the shape feature, texture feature and color feature of the stipe image are obtained, and the first score value corresponding to the first significant feature is determined;

[0084] Step S403: based on the fact that cordyceps has the second significant feature, the shape feature, texture feature and color feature of the strobilus image are obtained, and the second score value corresponding to the second significant feature is determined;

[0085] ​​​​Step S404: based on the fact that the caterpillar fungus has the first significant feature and the second significant feature, determine the probability that the caterpillar fungus is Cordyceps sinensis.

[0086] In step S402, the shape feature, texture feature and color feature of the caterpillar image are obtained, and the first score value corresponding to the first significant feature is determined according to the first comparison standard, wherein the first comparison standard specifically includes:

[0087] Cordyceps sinensis is formed by the combination of a caterpillar fungus and an immature stroma, so the caterpillar and the stroma are two significant features of Cordyceps sinensis. By observing whether the caterpillar fungus has a caterpillar and a stroma, it can be preliminarily judged whether it is Cordyceps sinensis. Further analysis of the shape feature, texture feature and color feature of the caterpillar and the stroma can further determine whether it is really Cordyceps sinensis.

[0088] Based on the contour sketch of the caterpillar image, the length and the number of protrusions of the contour sketch are obtained to determine the shape feature parameters of the caterpillar image;

[0089] Based on the gray image of the caterpillar image, the number of ring stripes and the roughness of the gray image are obtained to determine the texture feature parameters of the caterpillar image;

[0090] Based on the gray image of the caterpillar image, the color brightness of the gray image is obtained to determine the color feature parameters of the caterpillar image;

[0091] Based on the shape feature parameters, the texture feature parameters and the color feature parameters of the caterpillar image, the first score value corresponding to the first significant feature is determined.

[0092] In the first comparison standard, based on the shape feature parameters, the texture feature parameters and the color feature parameters of the caterpillar image, the first score value corresponding to the first significant feature is determined according to the first calculation function, wherein the first calculation function is:

[0093] P1=L1*f1(X)+S*f2(C1)+f3(M1);

[0094] Wherein, P1 is the first score value corresponding to the first significant feature, f1(X) is the first preset function corresponding to the shape feature parameter, L1 is the length of the caterpillar image, X is the number of protrusions of the caterpillar image, f2(C1) is the second preset function corresponding to the texture feature parameter, S is the number of ring stripes of the caterpillar image, C1 is the roughness of the caterpillar image, f3(M1) is the third preset function corresponding to the color feature parameter, M1 is the color brightness of the caterpillar image.

[0095] The shape feature of the worm body of Cordyceps sinensis is that the worm body is in the shape of a long cylinder, and the worm body is like a silkworm, 3-5 cm long, and 8 pairs of feet corresponding to the number of protrusions. The texture feature of the worm body of Cordyceps sinensis is that the worm body is rough, and the back has 20-30 ring patterns, and the ring patterns near the head are thinner. The color feature of the worm body of Cordyceps sinensis is that the worm body is yellow, clean and bright. By detecting the worm body image of Cordyceps sinensis, the above-mentioned each worm body feature is obtained, the worm body feature is compared with the standard feature, and the worm body is scored. The closer to the standard feature, the higher the score value.

[0096] In step S403, the shape feature, the texture feature and the color feature of the sub-hat image are obtained, and a second score value corresponding to a second significant feature is determined according to a second comparison standard. The second comparison standard specifically includes:

[0097] Based on the contour sketch map of the sub-hat image, the base end width, the end width and the length of the contour sketch map are obtained, and the shape feature parameters of the sub-hat image are determined;

[0098] Based on the gray scale image of the sub-hat image, the roughness of the gray scale image is obtained, and the texture feature parameters of the sub-hat image are determined;

[0099] Based on the gray scale image of the sub-hat image, the color brightness of the gray scale image is obtained, and the color feature parameters of the sub-hat image are determined;

[0100] Based on the shape feature parameters, the texture feature parameters and the color feature parameters of the sub-hat image, the second score value corresponding to the second significant feature is determined.

[0101] In the second comparison standard, based on the shape feature parameters, the texture feature parameters and the color feature parameters of the sub-hat image, the second score value corresponding to the second significant feature is determined according to a second calculation function. The second calculation function is:

[0102] P2=L2*f1(W2-W1)+f2(C2)+f3(M2);

[0103] Wherein, P2 is the second score value corresponding to the second significant feature, f1(W2-W1) is a first preset function corresponding to the shape feature parameter, L2 is the length of the sub-hat image, W2 is the base end width of the sub-hat image, W1 is the end width of the sub-hat image, f2(C2) is a second preset function corresponding to the texture feature parameter, C2 is the roughness of the sub-hat image, f3(M2) is a third preset function corresponding to the color feature parameter, and M2 is the color brightness of the sub-hat image.

[0104] The stroma shape feature of the cordyceps sinensis is that the stroma is in the shape of long and thin cylinder, 4-7 cm in length, with thick base and thin end. The stroma texture feature of the cordyceps sinensis is that the stroma is rough. The color feature of the cordyceps sinensis is dark brown to brown. The stroma image of the cordyceps sinensis is detected to obtain the above stroma features, and the stroma features are compared with the standard features to score the stroma, and the closer to the standard features, the higher the score value.

[0105] The length in the contour drawing of the insect body image or the stroma image is obtained by obtaining the contour drawing, determining the center point of the contour drawing, dividing the contour drawing into two parts along the center point, determining two farthest points in the contour drawing of each part, and connecting the center point and the two farthest points.

[0106] The number of protrusions in the contour drawing of the insect body image is obtained by obtaining the distance value between the center point of the contour drawing and each point from the starting point to the ending point in the contour line, representing all distance values on the contour point-distance image, obtaining the curve change rate, which represents the smoothness of the contour drawing of the insect body image, and determining the number of protrusions according to the number of curve change rates greater than the preset threshold.

[0107] The base end width and the end width in the contour drawing of the stroma image are obtained by obtaining the left and right boundary points of the base end and the end in the contour drawing, and the distance value between the left and right boundary points is the base end width and the end width.

[0108] The pixel gray value of the gray image is the color brightness of the gray image, the standard deviation of the pixel gray value reflects the degree of change in gray, and the area with large change is usually considered rough. The roughness of the gray image is obtained by obtaining the standard deviation of the pixel gray value in the gray image. Based on the first and second significant features of the cordyceps, the probability that the cordyceps is the cordyceps sinensis is determined according to a probability calculation function, wherein the probability calculation function is:

[0109] Q=K1P1+K2P2;

[0110] Wherein, Q is the probability that the cordyceps is the cordyceps sinensis, K1 is a first preset weight corresponding to the first significant feature, P1 is a first score value corresponding to the first significant feature, K2 is a second preset weight corresponding to the second significant feature, and P2 is a second score value corresponding to the second significant feature.

[0111] If the cordyceps has the first significant feature and the second significant feature, and the score values of the first significant feature and the second significant feature are both high, it indicates that the cordyceps is real Cordyceps sinensis; if the cordyceps does not have the first significant feature or the second significant feature, it indicates that the cordyceps is fake Cordyceps sinensis; if the cordyceps has the first significant feature and the second significant feature, but the score values of the first significant feature and the second significant feature are both low, it indicates that the cordyceps is fake Cordyceps sinensis.

[0112] A score threshold is set, and when the first score value and the second score value are greater than the score threshold, the cordyceps is real Cordyceps sinensis.

[0113] According to a second aspect, a convolutional neural network-based Cordyceps sinensis authenticity identification system is provided for implementing a convolutional neural network-based Cordyceps sinensis authenticity identification method, as shown in the figure, comprising: Figure 4

[0114] An information acquisition unit is configured to take photos of Cordyceps sinensis and other cordyceps, and acquire feature images of Cordyceps sinensis and other cordyceps;

[0115] A first information processing unit is configured to divide the acquired feature image data set into a training set and a test set, and input the training set into the convolutional neural network for training;

[0116] A second information processing unit is configured to input the test set into the trained convolutional neural network, and extract significant features in the cordyceps feature image;

[0117] A feedback unit is configured to divide the cordyceps type based on different types of significant features in the test set, and determine Cordyceps sinensis in the cordyceps population.

[0118] The present application takes photos of Cordyceps sinensis and other cordyceps, and the information acquisition unit acquires feature images of Cordyceps sinensis and other cordyceps. The acquired feature image data set is divided into a training set and a test set, and the training set is input into the convolutional neural network for training, and the cordyceps feature image is obtained through the first information processing unit. The test set is input into the trained convolutional neural network, and the significant features in the cordyceps feature image are extracted through the second information processing unit. Based on different types of significant features in the test set, the cordyceps type is divided, and the feedback unit determines Cordyceps sinensis in the cordyceps population.

[0119] Although the present application has been described in detail in the foregoing description with general principles and specific embodiments, some modifications or improvements can be made on the basis of the present application, which is obvious to those skilled in the art. Therefore, these modifications or improvements made on the basis of not deviating from the spirit of the present application, all belong to the scope of protection claimed by the present application.​

Claims

1. A method for identifying the authenticity of Cordyceps sinensis based on a convolutional neural network, characterized in that, The method comprises the following steps: Step S1: photographing a cordyceps group containing cordyceps sinensis to obtain a characteristic image of the cordyceps group containing cordyceps sinensis; Step S2: dividing the obtained characteristic image dataset into a training set and a test set, and inputting the training set into a convolutional neural network for training; Step S3: inputting the test set into the trained convolutional neural network, and extracting significant features in the cordyceps characteristic image; Step S4: dividing the cordyceps type based on the different types of significant features in the test set, and determining the cordyceps sinensis in the cordyceps group; In the step S4, the cordyceps type is divided based on the different types of significant features in the test set, and the cordyceps sinensis in the cordyceps group is determined, which comprises the following steps: Step S401: based on the insect body and stipe of the cordyceps, the image outlined by the insect body of the cordyceps is the first significant feature, and the image outlined by the stipe of the cordyceps is the second significant feature; Step S402: based on the first significant feature of the cordyceps, the shape feature, texture feature and color feature of the insect body image are obtained, and the first score value corresponding to the first significant feature is determined; Step S403: based on the second significant feature of the cordyceps, the shape feature, texture feature and color feature of the stipe image are obtained, and the second score value corresponding to the second significant feature is determined; Step S404: based on the first significant feature and the second significant feature of the cordyceps, the probability that the cordyceps is cordyceps sinensis is determined; In the step S402, the shape feature, texture feature and color feature of the insect body image are obtained, and the first score value corresponding to the first significant feature is determined according to the first comparison standard, wherein the first comparison standard comprises: Based on the contour outline graph of the insect body image, the length and the number of convexities of the contour outline graph are obtained, and the shape feature parameters of the insect body image are determined; Based on the gray image of the insect body image, the number of ring stripes and the roughness of the gray image are obtained, and the texture feature parameters of the insect body image are determined; Based on the gray image of the insect body image, the color brightness of the gray image is obtained, and the color feature parameters of the insect body image are determined; Based on the shape feature parameters, texture feature parameters and color feature parameters of the insect body image, the first score value corresponding to the first significant feature is determined; In the step S403, the shape feature, texture feature and color feature of the stipe image are obtained, and the second score value corresponding to the second significant feature is determined according to the second comparison standard, wherein the second comparison standard comprises: Based on the contour outline graph of the stipe image, the base end width, the end width and the length of the contour outline graph are obtained, and the shape feature parameters of the stipe image are determined; Based on the gray image of the stipe image, the roughness of the gray image is obtained, and the texture feature parameters of the stipe image are determined; Based on the gray image of the stipe image, the color brightness of the gray image is obtained, and the color feature parameters of the stipe image are determined; Based on the shape feature parameters, texture feature parameters and color feature parameters of the stipe image, the second score value corresponding to the second significant feature is determined.

2. The cordyceps sinensis authenticity identification method based on a convolutional neural network according to claim 1, characterized in that, In the step S2, the training set is input into the convolutional neural network for training, which comprises: Step S201: The convolutional neural network extracts a plurality of original local feature maps of the training set image data, and performs hole convolution and splicing on the plurality of original local feature maps, processes through a local attention module, and obtains a weighted local feature map; Step S202: The convolutional neural network extracts an original global feature map of the training set image data, processes through a global attention module, and obtains an average-pooled global feature map; Step S203: Based on the weighted local feature map and the average-pooled global feature map, the convolutional neural network performs feature fusion, splicing, convolution and pooling to obtain a cordyceps feature map.

3. The cordyceps sinensis authenticity identification method based on a convolutional neural network according to claim 1, characterized in that, In the first comparison standard, based on the shape feature parameter, the texture feature parameter and the color feature parameter of the insect body image, a first score value corresponding to a first significant feature is determined according to a first calculation function, wherein the first calculation function is: ; wherein, a first score value corresponding to the first salient feature, a first preset function corresponding to the shape feature parameter, a length of the insect image, a number of protrusions of the insect image, a second preset function corresponding to the texture feature parameter, a number of annular stripes of the insect image, a roughness of the insect image, a third preset function corresponding to the color feature parameter, a color brightness of the insect image.

4. The cordyceps sinensis authenticity identification method based on a convolutional neural network according to claim 1, characterized in that, In the second comparison standard, based on the shape feature parameter, the texture feature parameter and the color feature parameter of the stroma image, a second score value corresponding to a second significant feature is determined according to a second calculation function, wherein the second calculation function is: ; wherein, a second score value corresponding to the second salient feature, a first preset function corresponding to the shape feature parameter, a length of the sub-pile image, a base width of the sub-pile image, a tip width of the sub-pile image, a second preset function corresponding to the texture feature parameter, a roughness of the sub-pile image, a third preset function corresponding to the color feature parameter, a color brightness of the sub-pile image.

5. The cordyceps pseudo-identification method based on a convolutional neural network according to claim 1, wherein, In the step S404, based on the fact that the cordyceps has the first significant feature and the second significant feature, a probability that the cordyceps is Cordyceps sinensis is determined according to a probability calculation function, wherein the probability calculation function is: ; Wherein Q is the probability that the cordyceps is Cordyceps sinensis, K1 is a first preset weight corresponding to the first significant feature, P1 is a first score value corresponding to the first significant feature, K2 is a second preset weight corresponding to the second significant feature, and P2 is a second score value corresponding to the second significant feature.

6. The cordyceps pseudo-identification method based on a convolutional neural network according to claim 2, wherein, The calculation process of the convolutional neural network to obtain the cordyceps feature map is: ; where f g is a one-dimensional tensor representing global features, f i is a three-dimensional tensor representing local features, f orth is an orthogonalized local feature map, f final is a cordyceps feature map, conv denotes a normal convolution operation, contact denotes a concatenation operation, and pooling denotes an average pooling operation.

7. A Cordyceps sinensis authenticity identification system based on a convolutional neural network, used to implement the Cordyceps sinensis authenticity identification method based on a convolutional neural network according to any one of claims 1-6, characterized in that, It comprises: An information acquisition unit configured to take a photo of a cordyceps population containing Cordyceps sinensis, and acquire a feature image of the cordyceps population containing Cordyceps sinensis; A first information processing unit configured to divide the acquired feature image dataset into a training set and a test set, and input the training set into a convolutional neural network for training; A second information processing unit configured to input the test set into the trained convolutional neural network, and extract significant features in the cordyceps feature map; A feedback unit configured to divide cordyceps types based on different types of significant features in the test set, and determine Cordyceps sinensis in the cordyceps population.

Citation Information

Patent Citations

  • Convolutional neural network picture feature extraction-based ship type identification method

    CN107145903A

  • Method and device for quickly identifying authenticity of cordyceps sinensis

    CN114693613A