Intelligent Grading and Quantitative Non-destructive Testing Method for Deer Antler Slices

By combining image recognition and infrared spectroscopy with non-destructive testing technology and utilizing machine learning models to construct multi-dimensional feature relationships, the subjective and destructive problems of traditional deer antler grading methods have been solved, enabling rapid and accurate grading of deer antler slicing.

CN121280681BActive Publication Date: 2026-05-26DALIAN INSTITUTE OF CHEMICAL PHYSICS CHINESE ACADEMY OF SCIENCES +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
DALIAN INSTITUTE OF CHEMICAL PHYSICS CHINESE ACADEMY OF SCIENCES
Filing Date
2025-04-18
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

Traditional methods for grading deer antler slices are highly subjective, prone to misjudgment, and can damage the appearance, making it impossible to achieve accurate and efficient objective grading.

Method used

By employing non-destructive testing technology that combines image recognition and infrared spectroscopy, and training an artificial intelligence model through machine learning, a multi-dimensional feature relationship model of "property-component-spectrum" is constructed to achieve rapid and high-throughput quality grading of deer antler slices.

Benefits of technology

It enables rapid, accurate, and non-destructive grading of deer antler slices, overcomes the subjectivity of traditional methods, and provides a scientifically based quality evaluation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121280681B_ABST
    Figure CN121280681B_ABST
Patent Text Reader

Abstract

This invention relates to a method for intelligent grading and quantitative non-destructive testing of deer antler slices. It utilizes machine learning and other methods to train an artificial intelligence recognition model, enabling rapid and high-throughput quality grading of deer antler. Simultaneously, it extracts the spectral characteristics of deer antler slices at each grade using bioinformatics and chemometrics analysis, establishing a correlation between the characteristics, physicochemical properties, and spectral features of deer antler slices. This provides a scientific basis for quantitatively predicting the quality of deer antler slices using infrared spectroscopy, thereby achieving non-destructive intelligent grading and quantitative classification of deer antler slices. This invention overcomes the problem of traditional deer antler slice quality grading relying on subjective experience through multi-data fusion, enabling rapid and accurate evaluation of deer antler slice quality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of machine learning and visual recognition of deer antler slices. Specifically, it relates to a method for intelligent grading and quantitative non-destructive testing of deer antler slices. Background Technology

[0002] Deer antler is a precious traditional Chinese medicine, rich in various nutrients such as amino acids, proteins, collagen, phospholipids, and trace elements, possessing high medicinal value and tonic effects. In traditional Chinese medicine theory, deer antler is believed to warm the kidneys and strengthen yang, replenish essence and blood, and strengthen muscles and bones, making it suitable for symptoms such as kidney yang deficiency, physical weakness, and lower back and knee pain. Furthermore, deer antler is also used to enhance immunity, promote growth and development, and improve fatigue, making it especially suitable for the elderly or those recovering from illness.

[0003] The price of whole deer antlers varies greatly depending on the part of the deer from which they are harvested. Deer antlers are sold in the market as sliced ​​deer antlers, which are classified into four grades according to current standards: wax slices, powder slices, gauze slices, and bone slices. Traditional methods for grading deer antler slices mainly involve judging by appearance and testing their physicochemical components. Appearance judgment relies on observing the color, shape, and texture of the slices; this method is highly subjective, depends heavily on personal experience, and is prone to misjudgment. Grading based on physicochemical properties requires pulverizing the deer antlers for testing, which damages their appearance and renders them unsellable. Therefore, developing a technology that can accurately, efficiently, and objectively grade deer antler slices is of great significance. Summary of the Invention

[0004] This invention proposes a non-destructive testing and intelligent quantitative grading technology for deer antler slices using image recognition and infrared spectroscopy. Machine learning and other technologies are used to train an artificial intelligence recognition model, enabling rapid and high-throughput quality grading of deer antler. Simultaneously, bioinformatics and chemometric analysis are employed to extract the spectral characteristics of deer antler slices at each grade, constructing a multi-dimensional feature relationship model of "property-component-spectrum". By intelligently analyzing the spatial distribution characteristics of the spectral features of deer antler slices, scientifically grounded rapid differentiation of different grades of deer antler slices is achieved, and the quality of the slices can be quantitatively predicted.

[0005] The technical solution adopted by this invention to achieve the above objectives is: a method for intelligent grading and quantitative non-destructive testing of deer antler slices, comprising the following steps:

[0006] Image acquisition, infrared spectral data acquisition, and physicochemical property data acquisition were performed on the deer antler slices, and each type of data was ensured to correspond to the same deer antler slice.

[0007] The acquired images and infrared spectral data are preprocessed, and the preprocessed infrared spectral data is fitted to obtain the integral area of ​​the spectral characteristic peaks.

[0008] A dataset was constructed based on physicochemical properties data, preprocessed images, and infrared spectral data. A model for classifying images of deer antler slices was trained to obtain a sample set.

[0009] Deer antler slices are classified using a spectral matrix feature distribution model based on the integral area of ​​the sample set and spectral characteristic peaks.

[0010] Using the attenuation coefficient, integral area of ​​spectral characteristic peaks, and physicochemical property data in the spectral matrix characteristic distribution model as input, a quantitative prediction model for the physicochemical properties of deer antler slices is trained.

[0011] The image, infrared spectral characteristics, and distribution of the sample to be tested are input into the quantitative prediction model of the physicochemical properties of deer antler slices to obtain the prediction results of the physicochemical properties of deer antler slices.

[0012] The process of acquiring images, infrared spectral data, and physicochemical properties of deer antler slices includes the following steps:

[0013] For a single deer antler slice, coordinate positioning is performed based on the image, and infrared spectral data acquisition uses one of the following modes:

[0014] Single-point scanning: Data is collected at a designated location on the antler.

[0015] Linear scanning: Spectral data is collected at fixed intervals by drawing straight lines;

[0016] Area scanning: Within a fixed range, spectral data is collected at fixed intervals;

[0017] The physicochemical property data includes the actual nitrogen content and amino acid content data of the medicinal slices.

[0018] Preprocessing infrared spectral data includes the following steps:

[0019] Smoothing is performed on the infrared spectral data;

[0020] The smoothed infrared spectral data undergoes spectral feature enhancement and identification, including baseline removal and background subtraction in specific regions. These specific regions include the following feature regions, and each feature region undergoes individual baseline correction:

[0021] Amide I with 1600cm -1 ~1700cm -1 Amide II band 1475cm -1 ~1575cm -1 ; Amide III band 1200cm -1 ~1300cm -1 ; phosphate 400cm -1~600cm -1 .

[0022] The process of constructing a dataset based on physicochemical properties data, preprocessed images, and infrared spectral data, training a model for classifying deer antler slices into a sample set, includes the following steps:

[0023] Based on the Swing Transformer framework, an attention mechanism module is added after the Transformer network to form a model for classifying images of deer antler slices.

[0024] The samples in the dataset, which is constructed from physicochemical properties data, preprocessed images, and infrared spectral data, are input into the deer antler slice image classification model to remove erroneous samples that appear repeatedly during the training process, thus forming a sample set.

[0025] Before constructing the deer antler slice image grading model, a binary classification model is first trained using the Swing Transformer framework to distinguish between genuine and substandard deer antler slices; substandard deer antler slices are broken and do not present a complete shape; the deer antler slice image grading model is constructed based on the dataset of genuine products.

[0026] The method of classifying deer antler slices using a spectral matrix feature distribution model based on the integral area of ​​the sample set and spectral characteristic peaks includes the following steps:

[0027] Based on the preprocessed infrared spectral data, and according to the infrared spectral data acquisition mode, a corresponding relationship between the preprocessed image and its spatial distribution is established, forming a spectral matrix feature distribution model, including:

[0028] a. Evaluation function for the linear distribution of infrared spectral characteristics of deer antler slices in line scan mode. = , The initial amplitude, x These are the sampling coordinates. t 1 The attenuation coefficient is used to characterize the trend of the integral area of ​​the infrared spectral characteristic peaks as a function of spatial location, serving as a feature of the line scan infrared spectrum.

[0029] b. Evaluation function of two-dimensional spatial distribution of infrared spectral characteristics of deer antler slices for area scanning mode. = , The initial amplitude, r These are the sampling coordinates. r = , x and y These represent the coordinates in the coordinate system of the herbal slice image. t 2The attenuation coefficient is used to characterize the trend of the integral area of ​​the infrared spectral characteristic peaks as a function of spatial location, serving as a feature of the surface-scan infrared spectrum.

[0030] c. For point scan mode, infrared spectral features at a specified location are established by integrating the area of ​​the spectral characteristic peaks;

[0031] The infrared spectral features obtained from various models are correlated with their spatial distribution to construct an infrared spectral spatial distribution feature database; and deer antler slices are classified based on the spectral matrix feature distribution model.

[0032] The classification of deer antler slices based on the spectral matrix feature distribution model is as follows:

[0033] a) Infrared spectral characteristics of each amide group in the medicinal slices t 1 and t 2 All are greater than the threshold;

[0034] b) In the center point scan spectrum, the integral area of ​​phosphate is less than the set value;

[0035] If deer antler slices meet both of the above conditions, they are classified as wax slices; otherwise, they are classified as powder slices.

[0036] The method of training a quantitative prediction model for the physicochemical properties of deer antler slices, using the attenuation coefficient, integral area of ​​spectral characteristic peaks, and physicochemical data as inputs from a spectral matrix characteristic distribution model, includes the following steps:

[0037] Using attenuation coefficient and integral area as features, and the measured physicochemical properties as labels for the corresponding sample features, a dataset is constructed.

[0038] The dataset is input into the CatBoost model to train the CatBoost network to output the physicochemical properties of deer antler slices:

[0039] (1) During model training, the initial prediction value is set to the target mean. Multiple weak learners are set and trained iteratively. The residual of the previous round is used as the input of the weak learner in the next round. The formula for calculating the residual is as follows: Where y is the target value of the input sample. For training k Predicted values ​​after generation -1;

[0040] (2) The learning rate controls the contribution of each weak learner to the result. k After training, the predicted amino acid and nitrogen content of each weak learner is the sum of the predictions from all weak learners. The calculation formula is as follows: ,in These are the initial predicted values. For learning rate, For the first k The predicted value of the weak learner;

[0041] (3) Using MSE as the overall objective function of the CatBoost model, the performance of the trained model is evaluated and verified by calculating the MSE value. The MSE calculation formula is as follows: Where n is the number of samples. For the sample true value, These are the predicted values ​​for the sample.

[0042] The classification includes wax flakes, powder flakes, gauze flakes, and bone flakes.

[0043] The intelligent grading and quantitative non-destructive testing system for deer antler slices includes:

[0044] The data acquisition module is used to acquire data by image acquisition, infrared spectral data acquisition and physicochemical property data acquisition of deer antler slices, and to ensure that each type of data corresponds to the same deer antler slice.

[0045] The preprocessing module is used to preprocess the acquired images and infrared spectral data, and to fit the preprocessed infrared spectral data to obtain the integral area of ​​the spectral characteristic peaks.

[0046] The sample set construction module is used to construct a dataset based on physicochemical property data, preprocessed images, and infrared spectral data, and to train the image classification model for deer antler slices to obtain the sample set;

[0047] The decoction piece classification module is used to classify deer antler decoction pieces by using the sample set and the integral area of ​​spectral characteristic peaks through a spectral matrix feature distribution model;

[0048] The module for constructing a quantitative prediction model for physicochemical properties is used to train a quantitative prediction model for the physicochemical properties of deer antler slices by taking the attenuation coefficient, the integral area of ​​the spectral characteristic peaks and the physicochemical property data in the spectral matrix characteristic distribution model as input.

[0049] The physicochemical property detection module is used to input the image, infrared spectral characteristics and distribution information of the sample to be tested into the quantitative prediction model of the physicochemical properties of deer antler slices, and obtain the prediction results of the physicochemical properties of deer antler slices.

[0050] The present invention has the following beneficial effects and advantages:

[0051] 1. This invention relates to visual recognition, deep learning, machine learning technology, and Fourier transform infrared spectroscopy intelligent analysis technology. By using machine learning and other methods, an artificial intelligence recognition model is trained to achieve rapid, high-throughput quality grading of deer antler. Simultaneously, through bioinformatics and chemometric analysis, the spectral characteristics of deer antler slices at each grade are extracted, and a correlation is established between the characteristics, physicochemical properties, and spectral features of deer antler slices. This provides a scientific basis for quantitatively predicting the quality of deer antler slices using infrared spectroscopy, thereby achieving non-destructive intelligent grading and quantitative classification of deer antler slices.

[0052] 2. This invention integrates visual recognition, infrared spectroscopy, and physicochemical property data to establish a three-dimensional data database, simplifying the classification process based on sample characteristics. For samples with obvious and easily distinguishable appearance characteristics, such as gauze and bone flakes, classification is directly performed using visual recognition results. For samples with blurred boundaries, such as wax flakes and powder flakes, infrared spectroscopy detection is conducted in addition to visual inspection to provide quantitative classification criteria.

[0053] 3. This invention, based on the Swim transformer model, adds an attention mechanism to enhance the training of the classification model. By reinforcing the features of misclassified samples through reinforcement learning, the parameters of the Swim transformer model are optimized. Through multiple iterations, automatic parameter tuning of the Swim transformer model is achieved. Based on different scanning methods, a spectral matrix feature distribution model is constructed. Furthermore, this invention establishes a database of infrared spectral matrix feature distributions of deer antler slices, quantitatively correlating the infrared spectral matrix feature distributions with physicochemical properties, and providing scientific data for the grading of deer antler slices through non-destructive infrared spectroscopy detection.

[0054] 4. The non-destructive testing method established by the present invention through multi-data fusion overcomes the problem that the traditional quality grading of deer antler slices relies on subjective experience, and can quickly and accurately evaluate the quality of deer antler slices. Attached Figure Description

[0055] Figure 1 The invention process architecture diagram of this invention;

[0056] Figure 2 The CatBoost model architecture diagram of this invention;

[0057] Figure 3 The present invention is based on the matrix-style infrared spectroscopy intelligent classification results (the first 10 pieces of the top of a single deer antler). Among them, (a) the changing trend of amide group characteristic indicators; (b) the changing trend of phosphate group characteristic indicators; (c) the amino acid content of the processed slices and the standard amino acid content of the wax slices; (d) the nitrogen content of the processed slices and the standard nitrogen content of the wax slices; through model prediction, the first 6 slices of processed slices meet the wax slice standard;

[0058] Figure 4 Predicted results for amino acid and nitrogen content. Among them, (a) predicted nitrogen content; (b) predicted amino acid content. Detailed Implementation

[0059] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments.

[0060] This invention establishes a non-destructive testing method combining image recognition and infrared spectroscopy to rapidly detect the substance content in deer antlers, achieving intelligent non-destructive identification of deer antler grades. It can automatically classify whole and damaged deer antler slices. Based on the shape of the antler slices and the content of substances such as amino acids and phosphates, it automatically and non-destructively classifies different grades of deer antler slices, such as wax slices, powder slices, gauze slices, and bone slices.

[0061] The overall process architecture of this invention is as follows: Figure 1 As shown, image data of deer antler slices were first acquired, and a deep learning model was used to identify the characteristics of the deer antler slices. Subsequently, matrix infrared spectral data were acquired, and machine learning techniques were used for automatic preprocessing and feature analysis of the infrared spectra. Then, chemometrics was used to intelligently analyze the spatial distribution of vibrational features such as amide groups in the deer antler slices, obtaining characteristic models of organic functional groups for slices of different qualities. Based on this, physicochemical property data of deer antler slices, such as amino acid, total nitrogen, and calcium content, were collected. Using industry standard data on the physicochemical properties of deer antler slices as a benchmark, the image recognition features and the intelligent infrared spectral analysis model were labeled and corrected. Ultimately, a scientifically based analytical method and technology for non-destructive quantitative analysis of the quality of deer antler slices were developed.

[0062] The specific steps are as follows:

[0063] 1. Data Preparation

[0064] Data preparation includes image acquisition and preprocessing of deer antler slices, infrared spectral data acquisition and preprocessing, and physicochemical property acquisition, ensuring that each type of data corresponds to the same deer antler slice.

[0065] 1.1 Data Acquisition

[0066] This invention requires the collection of image data, infrared spectral data, and physicochemical property data of deer antler slices to construct a complete feature dataset. Image data is acquired using an industrial camera and its lens. Infrared spectral data is acquired through matrix-style midpoint scanning, line scanning, and area scanning to obtain spatial distribution characteristics of the deer antler slices. For the physicochemical properties, nitrogen content is determined by measuring 100 mg of deer antler powder using the Kjeldahl method (GB5009.124—2016), with the average of three parallel experiments. Amino acid content is determined by measuring 20 mg of powder using the acid hydrolysis method (GB5009.5—2016), with the average of three parallel experiments.

[0067] 1.2 Data Preprocessing

[0068] The image data preprocessing process is as follows:

[0069] 1. Images are processed using contrast enhancement algorithms to improve their visual appeal. The contrast calculation formula is: ,in I These are the original pixel values. c Scaling factor c = . This represents the maximum pixel value in the image. This represents the pixel value after processing by the contrast enhancement algorithm.

[0070] 2. To address the issue of a small number of wax sample specimens, data augmentation methods such as flipping, translation, and rotation are used to appropriately amplify the data and balance its distribution.

[0071] The infrared spectral data preprocessing process is as follows:

[0072] 1. The infrared spectrum was smoothed using the Savitzky-Golay method, and the calculation formula is as follows: ,in, i This represents the data from the sampling points. j Indicates the index of an element in the convolution kernel. Represents the smoothed first... i Data from each point, It is the value of the j-th element in the convolution kernel. This refers to the data at the corresponding index in the original data, where m represents the total number of sampling points.

[0073] 2. Enhanced spectral feature recognition after smoothing, including baseline removal and background subtraction in specific regions. Feature region of interest: 1600cm² -1 ~1700cm -1 (Amide I band); 1475cm -1 ~1575cm -1 (Amide II band); 1200cm -1 ~1300cm -1 (Amide III band); 400cm -1 ~600cm -1 (Phosphate). Individual baseline correction is performed on the characteristic interval. The formula for calculating the nonlinear transformation of the correction is: in Indicates the first i The intensity of each sampling point Represents the th after nonlinear transformation i The intensity of each point is calculated, and then the background is subtracted after inverse transformation to complete the baseline correction.

[0074] 1.3 Intelligent Curve Fitting of Spectral Feature Range

[0075] The integral area of ​​the spectral characteristic peaks after baseline correction is calculated using Gaussian-Lorentz fitting. The fitting formula is as follows: ,in It is the Gaussian amplitude. Standard deviation, Peak position, For the Lorentz portion of the amplitude, It is half the peak width. It is the Lorentz weight. The horizontal axis represents the wavenumber of the infrared spectrum.

[0076] 2. Intelligent grading and quantitative prediction

[0077] By constructing a multidimensional feature relationship model of "traits-components-spectrum", four categories of deer antler slices are realized. Combined with matrix infrared spectroscopy classification technology, quantitative prediction of deer antler wax slices and powder slices is achieved.

[0078] 2.1 Construction of Image Grading Model Based on Deer Antler Slices

[0079] Based on the measured amino acid and nitrogen content of deer antler slices, combined with the physicochemical property grading standards for deer antler slices issued by the Ministry of Agriculture and Rural Affairs and the China Association of Traditional Chinese Medicine, labels were added to the image dataset samples.

[0080] This invention, based on the improved Swin Transformer framework, trains a model for intelligent grading of deer antler slices. An EMA (Exponential Moving Average) attention mechanism is added to the framework to smoothly update model parameters, enhancing the model's stability during validation and testing. Furthermore, it combines dynamic hard sample mining and reinforcement training methods, automatically identifying and reinforcing misclassified, low-confidence, and high-loss samples to improve the model's ability to classify complex data. This effectively enhances the model's robustness and generalization performance on difficult-to-classify samples.

[0081] Before constructing the grading model, a binary classification model is first trained based on the improved Swin transformer to distinguish between genuine and substandard deer antler slices, where substandard slices are defined as broken deer antler slices that do not present a complete shape. The deer antler grading model is then constructed based on the genuine product dataset.

[0082] The specific model construction process is as follows:

[0083] 1) Training data preparation

[0084] a. Obtain and divide the dataset into training, validation and test sets.

[0085] b. The training set is used for model training, the validation set is used for dynamic hard sample mining, and the test set is used for model performance evaluation and hard sample mining.

[0086] 2) Construction of grading models and dynamic mining to identify difficult samples

[0087] a. Initialize pre-trained weights, define the EMA module, and use a moving average to smoothly update the parameters of the Swin transformer model. The EMA update function is: ,in, These are the parameters of the current SwinTransformer model. These are the updated parameters. It is the decay factor. And begin model training.

[0088] b. During each round of training, save the cross-entropy loss for each sample.

[0089] c. After each round of training, validate the data using a validation set and identify hard samples. The criteria for hard samples are: 1. Misclassified samples; 2. Low-confidence samples; 3. Samples with high loss values.

[0090] d. Save the selected difficult samples in a separate dataset as reinforcement samples for the next round of training.

[0091] 3) Intensive training

[0092] a. Every 2-6 rounds, hard samples extracted from the validation set are added to the training set, and the EMA parameters are updated.

[0093] b. When calculating the loss, hard samples are weighted to enhance the model's focus. The ReduceLROnPlateau strategy is adopted to dynamically adjust the learning rate according to the validation loss to prevent training oscillations.

[0094] 4) Testing the test set and supplementing training with difficult samples

[0095] a. After training, evaluate the model's classification performance using the test set, and calculate the confidence score and loss for each test sample.

[0096] b. After training is completed and the test is conducted, extract new and difficult samples from the test set.

[0097] c. Add these difficult test samples to the training set and perform secondary reinforcement training. After the initial training is complete, perform at least two more rounds of reinforcement training. Update the training set after each round of training to ensure that the model continuously learns from incorrectly classified samples.

[0098] 2.2 The process of constructing the quantitative prediction model based on infrared spectral features is as follows:

[0099] 1) Matrix-type infrared spectral data acquisition

[0100] The deer antler slices were photographed, and their coordinates were determined based on the image information. The infrared spectral acquisition mode was as follows:

[0101] a. Single-point scanning: Data is collected at a specific location on the antler.

[0102] b. Linear scanning: Spectral data is collected at fixed intervals by drawing straight lines.

[0103] c. Surface scanning: Within a fixed range, spectral data is collected at fixed intervals.

[0104] 2) Infrared spectral characteristic peak information extraction process

[0105] The infrared spectrum was fitted using Gaussian-Lorentz fitting, with a fitting factor R. 2 H evaluates the accuracy of the fit, R 2 The calculation formula is: ,in This is the actual value. These are the fitted values. This is the average of the actual values. H The calculation formula is: H=H 1 -H 2 ,in H 1 This is the original peak height. H 2 To fit the peak height and suppress curve overfitting, the characteristic integral areas of three amide bands and one phosphate band were calculated by fitting the integral.

[0106] 3) Establish the relationship between the spectral characteristics and spatial distribution of deer antler slices.

[0107] a. Evaluation function of linear distribution (line scan) of infrared spectral characteristics of deer antler slices = , The initial amplitude, x These are the sampling coordinates. t 1 The attenuation coefficient describes the trend of the integrated area of ​​the characteristic peaks in the infrared spectrum as a function of spatial location (results are shown in...). Figure 3 (as shown) t 1 These are line scan infrared spectral characteristics.

[0108] b. Evaluation function of two-dimensional spatial distribution (area scan) of infrared spectral characteristics of deer antler slices = , The initial amplitude,r These are the sampling coordinates. r = , x and y These represent the coordinates of the surface of the medicinal slice in the vertical coordinate system. t 2 The attenuation coefficient describes the trend of the integrated area of ​​the characteristic peaks in the infrared spectrum as a function of spatial location. t 2 The infrared spectral characteristics are surface scans.

[0109] c. Establish infrared spectral features at specific locations, such as edges and centers, by integrating the characteristic peak areas of point scan spectra. The above steps a, b, and c form a spectral matrix characteristic distribution model.

[0110] d. Establish a database of known spatial distribution characteristics of infrared spectra.

[0111] 4) Based on the spectral matrix characteristic distribution model, deer antler slices are classified into wax slices and powder slices.

[0112] a. Spatial variation characteristics of amide groups in medicinal slices t 1 and t 2 Greater than 15.

[0113] b. In the center point scanning spectrum, the phosphate integral area is less than 0.1.

[0114] c. If the deer antler slices meet both of the above conditions, they are classified as wax slices; otherwise, they are classified as powder slices.

[0115] 5) Construction of a quantitative prediction model for the physicochemical properties of deer antler slices

[0116] Through CatBoost (model architecture such as...) Figure 2 The machine learning framework is trained using infrared spectral feature space features, and the specific process is as follows:

[0117] a. Using the attenuation coefficient and integral area as features, and based on the measured data of the actual nitrogen content and amino acid content of the medicinal slices, assign corresponding labels to the features of the corresponding samples to form a dataset.

[0118] b. Optimize model parameters using a grid search method to determine the optimal parameter combination.

[0119] c. During model training, the initial prediction value is set to the target mean. Multiple weak learners (decision trees) are set up and trained iteratively. The residual of the previous round is used as the input of the weak learner in the next round. The formula for calculating the residual is as follows: Where y is the target value of the input sample. For trainingk Predicted values ​​after generation -1.

[0120] d. The learning rate controls the contribution of each weak learner to the result. k After training, the predicted amino acid and nitrogen content of each weak learner is the sum of the predictions from all weak learners. The calculation formula is as follows: ,in These are the initial predicted values. For learning rate, For the first k The predicted value of the weak learner.

[0121] e. Using MSE as the overall objective function of the model, the performance of the trained model is evaluated and verified by calculating the MSE value. The MSE calculation formula is as follows: Where n is the number of samples. For the sample true value, These are the predicted values ​​for the sample.

[0122] 2.3 Output Results:

[0123] 1) The classification order of deer antler slices is: residue, gauze slices, bone slices, wax slices, and powder slices.

[0124] 2) Predicted results of the physicochemical properties of wax flakes and powder flakes. 3. Detailed Implementation:

[0126] 3.1 Software Environment Configuration

[0127] Configure a deep learning environment for Python in the operating system (Windows, Linux, Mac), configure a GPU-based Torch environment, and install the relevant development platform.

[0128] 3.2 Operating Procedures

[0129] Taking deer antler slices purchased from the market as an example, image data of the deer antler slices were acquired using an industrial camera with a matching lens and auxiliary light source. Infrared spectra of the deer antler slices, including spatial features, were acquired using point scanning, line scanning, and area scanning with an infrared spectrometer. Nitrogen content was measured using the Kjeldahl method (GB5009.124—2016), and amino acid content was measured using the acid hydrolysis method (GB5009.5—2016). After preprocessing, the acquired deer antler slice image data was labeled with amino acid and nitrogen content indicators. Similarly, the acquired infrared spectra were preprocessed, their spectral features were extracted, and labels were added to the samples based on the measured amino acid and nitrogen content data. Based on the constructed image dataset and infrared spectrum dataset, image grading models and quantitative prediction models for amino acid and nitrogen content were trained, respectively. Finally, the grading results of the new deer antler slice test model data and the predicted amino acid and nitrogen contents were used to determine the final results.

[0130] 3.3 Experimental Results

[0131] The trained image grading model was tested. The accuracy of the model in classifying each grade of medicinal slices is shown in Table 1. The accuracy calculation formula is: ,in, TP It is the number of samples whose true value is positive and whose model prediction is positive. TN It is the number of samples whose actual value is negative and whose model prediction is negative. FP It is the number of samples whose actual value is negative, but the model predicts it to be positive. FN It represents the number of samples whose actual value is positive, but the model predicts them to be negative.

[0132] Table 1. Classification accuracy of each grade of medicinal slices using the image classification model.

[0133]

[0134] like Figure 3 As shown, the classification results based on infrared spectral indicators and those based on physicochemical properties were compared. The trained quantitative prediction models for amino acid and nitrogen content were tested, as shown... Figure 4 The image shows a comparison between the actual and predicted values ​​of the sample. The evaluation index Ri of the quantitative prediction model is also shown. 2 The calculation formula is: , yi This is the actual value. These are model predictions. It is the average of the actual values. n This refers to the sample size. The formula for calculating the mean squared error is: , yi This is the actual value. These are model predictions. n The sample size is shown in Table 2. The evaluation results are shown in Table 2.

[0135] Table 2 Evaluation Indicators for Quantitative Prediction Models

[0136]

[0137] With the development of computer technology, deep learning and machine learning techniques are increasingly being applied in actual production processes. Deer antler slices vary in appearance and physicochemical composition depending on the part of the deer antler plant in the processing. Therefore, using image data of deer antler slices combined with computer vision technology can quickly and efficiently classify the slices. Furthermore, infrared spectroscopy can be used to non-destructively obtain the infrared spectra corresponding to different parts of the slices, and after extracting spectral features, machine learning techniques can be combined to achieve non-destructive and rapid classification of the slices, accurately predicting their physicochemical properties. Both methods can objectively and accurately classify deer antler slices while ensuring they remain undamaged, demonstrating promising application prospects.

Claims

1. A method for intelligent grading and quantitative non-destructive testing of deer antler slices, characterized in that, Includes the following steps: Image acquisition, infrared spectral data acquisition, and physicochemical property data acquisition were performed on the deer antler slices, and each type of data was ensured to correspond to the same deer antler slice. The acquired images and infrared spectral data are preprocessed, and the preprocessed infrared spectral data is fitted to obtain the integral area of ​​the spectral characteristic peaks. A dataset was constructed based on physicochemical properties data, preprocessed images, and infrared spectral data. A model for classifying images of deer antler slices was trained to obtain a sample set. Deer antler slices are classified using a spectral matrix feature distribution model based on the integral area of ​​the sample set and spectral characteristic peaks. Using the attenuation coefficient, integral area of ​​spectral characteristic peaks, and physicochemical property data in the spectral matrix characteristic distribution model as input, a quantitative prediction model for the physicochemical properties of deer antler slices is trained. The image, infrared spectral characteristics and distribution of the sample to be tested are input into the quantitative prediction model of the physicochemical properties of deer antler slices to obtain the prediction results of the physicochemical properties of deer antler slices. The method of classifying deer antler slices using a spectral matrix feature distribution model based on the integral area of ​​the sample set and spectral characteristic peaks includes the following steps: Based on the preprocessed infrared spectral data, and according to the infrared spectral data acquisition mode, a corresponding relationship between the preprocessed image and its spatial distribution is established, forming a spectral matrix feature distribution model, including: a. Evaluation function for the linear distribution of infrared spectral characteristics of deer antler slices in line scan mode. = , The initial amplitude, x These are the sampling coordinates. t 1 The attenuation coefficient is used to characterize the trend of the integral area of ​​the infrared spectral characteristic peaks as a function of spatial location, serving as a feature of the line scan infrared spectrum. b. Evaluation function of two-dimensional spatial distribution of infrared spectral characteristics of deer antler slices for area scanning mode. = , The initial amplitude, r These are the sampling coordinates. r = , x and y These represent the coordinates in the coordinate system of the herbal slice image. t 2 The attenuation coefficient is used to characterize the trend of the integral area of ​​the infrared spectral characteristic peaks as a function of spatial location, serving as a feature of the surface-scan infrared spectrum. c. For point scan mode, infrared spectral features at a specified location are established by integrating the area of ​​the spectral characteristic peaks; The infrared spectral features obtained from various models are correlated with their spatial distribution to construct an infrared spectral spatial distribution feature database; and deer antler slices are classified based on the spectral matrix feature distribution model.

2. The intelligent grading and quantitative non-destructive testing method for deer antler slices according to claim 1, characterized in that, The process of acquiring images, infrared spectral data, and physicochemical properties of deer antler slices includes the following steps: For a single deer antler slice, coordinate positioning is performed based on the image, and infrared spectral data acquisition uses one of the following modes: Single-point scanning: Data is collected at a designated location on the antler. Linear scanning: Spectral data is collected at fixed intervals by drawing straight lines; Area scanning: Within a fixed range, spectral data is collected at fixed intervals; The physicochemical property data includes the actual nitrogen content and amino acid content data of the medicinal slices.

3. The intelligent grading and quantitative non-destructive testing method for deer antler slices according to claim 1, characterized in that, Preprocessing infrared spectral data includes the following steps: Smoothing is performed on the infrared spectral data; The smoothed infrared spectral data undergoes spectral feature enhancement and identification, including baseline removal and background subtraction in specific regions. These specific regions include the following feature regions, and each feature region undergoes individual baseline correction: Amide I with 1600cm -1 ~1700cm -1 Amide II band 1475cm -1 ~1575cm -1 ; Amide III band 1200cm -1 ~1300cm -1 ; phosphate 400cm -1 ~600cm -1 .

4. The intelligent grading and quantitative non-destructive testing method for deer antler slices according to claim 1, characterized in that, The process of constructing a dataset based on physicochemical properties data, preprocessed images, and infrared spectral data, training a model for classifying deer antler slices into a sample set, includes the following steps: Based on the Swing Transformer framework, an attention mechanism module is added after the Transformer network to form a model for classifying images of deer antler slices. The samples in the dataset, which is constructed from physicochemical properties data, preprocessed images, and infrared spectral data, are input into the deer antler slice image classification model to remove erroneous samples that appear repeatedly during the training process, thus forming a sample set.

5. The intelligent grading and quantitative non-destructive testing method for deer antler slices according to claim 4, characterized in that, Before constructing the deer antler slice image grading model, a binary classification model is first trained using the Swing Transformer framework to distinguish between genuine and substandard deer antler slices; substandard deer antler slices are broken and do not present a complete shape; the deer antler slice image grading model is constructed based on the dataset of genuine products.

6. The intelligent grading and quantitative non-destructive testing method for deer antler slices according to claim 1, characterized in that, The classification of deer antler slices based on the spectral matrix feature distribution model is as follows: a) Infrared spectral characteristics of each amide group in the medicinal slices t 1 and t 2 All are greater than the threshold; b) In the center point scan spectrum, the integral area of ​​phosphate is less than the set value; If deer antler slices meet both of the above conditions, they are classified as wax slices; otherwise, they are classified as powder slices.

7. The intelligent grading and quantitative non-destructive testing method for deer antler slices according to claim 1, characterized in that, The method of training a quantitative prediction model for the physicochemical properties of deer antler slices, using the attenuation coefficient, integral area of ​​spectral characteristic peaks, and physicochemical data as inputs from a spectral matrix characteristic distribution model, includes the following steps: Using attenuation coefficient and integral area as features, and the measured physicochemical properties as labels for the corresponding sample features, a dataset is constructed. The dataset is input into the CatBoost model to train the CatBoost network to output the physicochemical properties of deer antler slices: (1) During model training, the initial prediction value is set to the target mean. Multiple weak learners are set and trained iteratively. The residual of the previous round is used as the input of the weak learner in the next round. The formula for calculating the residual is as follows: Where y is the target value of the input sample. For training k Predicted values ​​after generation -1; (2) The learning rate controls the contribution of each weak learner to the result. k After training, the predicted amino acid and nitrogen content of each weak learner is the sum of the predictions from all weak learners. The calculation formula is as follows: ,in These are the initial predicted values. For learning rate, For the first k The predicted value of the weak learner; (3) Using MSE as the overall objective function of the CatBoost model, the performance of the trained model is evaluated and verified by calculating the MSE value. The MSE calculation formula is as follows: Where n is the number of samples. For the sample true value, These are the predicted values ​​for the sample.

8. The intelligent grading and quantitative non-destructive testing method for deer antler slices according to claim 1, characterized in that, The classification includes wax flakes, powder flakes, gauze flakes, and bone flakes.

9. A smart grading and quantitative non-destructive testing system for deer antler slices, characterized in that, include: The data acquisition module is used to acquire data by image acquisition, infrared spectral data acquisition and physicochemical property data acquisition of deer antler slices, and to ensure that each type of data corresponds to the same deer antler slice. The preprocessing module is used to preprocess the acquired images and infrared spectral data, and to fit the preprocessed infrared spectral data to obtain the integral area of ​​the spectral characteristic peaks. The sample set construction module is used to construct a dataset based on physicochemical property data, preprocessed images, and infrared spectral data, and to train the image classification model for deer antler slices to obtain the sample set; The decoction piece classification module is used to classify deer antler decoction pieces by using the sample set and the integral area of ​​spectral characteristic peaks through a spectral matrix feature distribution model; The herbal medicine classification module is configured to execute: Based on the preprocessed infrared spectral data, and according to the infrared spectral data acquisition mode, a corresponding relationship between the preprocessed image and its spatial distribution is established, forming a spectral matrix feature distribution model, including: a. Evaluation function for the linear distribution of infrared spectral characteristics of deer antler slices in line scan mode. = , The initial amplitude, x These are the sampling coordinates. t 1 The attenuation coefficient is used to characterize the trend of the integral area of ​​the infrared spectral characteristic peaks as a function of spatial location, serving as a feature of the line scan infrared spectrum. b. Evaluation function of two-dimensional spatial distribution of infrared spectral characteristics of deer antler slices for area scanning mode. = , The initial amplitude, r These are the sampling coordinates. r = , x and y These represent the coordinates in the coordinate system of the herbal slice image. t 2 The attenuation coefficient is used to characterize the trend of the integral area of ​​the infrared spectral characteristic peaks as a function of spatial location, serving as a feature of the surface-scan infrared spectrum. c. For point scan mode, infrared spectral features at a specified location are established by integrating the area of ​​the spectral characteristic peaks; The infrared spectral features obtained from various models are correlated with their spatial distribution to construct an infrared spectral spatial distribution feature database; and deer antler slices are classified based on the spectral matrix feature distribution model. The module for constructing a quantitative prediction model for physicochemical properties is used to train a quantitative prediction model for the physicochemical properties of deer antler slices by taking the attenuation coefficient, the integral area of ​​the spectral characteristic peaks and the physicochemical property data in the spectral matrix characteristic distribution model as input. The physicochemical property detection module is used to input the image, infrared spectral characteristics and distribution information of the sample to be tested into the quantitative prediction model of the physicochemical properties of deer antler slices, and obtain the prediction results of the physicochemical properties of deer antler slices.

Citation Information

Patent Citations

  • Different section antler powder identification method and application

    CN104502512A

  • Method for identifying four processed pinellia ternate varieties based on hyperspectral imaging technology

    CN116908113A