CN113588596A - Method and system for identifying and detecting content of animal source protein powder doped in fish meal - Google Patents

Method and system for identifying and detecting content of animal source protein powder doped in fish meal Download PDF

Info

Publication number
CN113588596A
CN113588596A CN202110981043.2A CN202110981043A CN113588596A CN 113588596 A CN113588596 A CN 113588596A CN 202110981043 A CN202110981043 A CN 202110981043A CN 113588596 A CN113588596 A CN 113588596A
Authority
CN
China
Prior art keywords
sample
meal
adulterated
correction data
fish
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110981043.2A
Other languages
Chinese (zh)
Inventor
何勇
张文凯
孔丹丹
李晓丽
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang University ZJU
Original Assignee
Zhejiang University ZJU
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang University ZJU filed Critical Zhejiang University ZJU
Priority to CN202110981043.2A priority Critical patent/CN113588596A/en
Publication of CN113588596A publication Critical patent/CN113588596A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/17Systems in which incident light is modified in accordance with the properties of the material investigated
    • G01N21/25Colour; Spectral properties, i.e. comparison of effect of material on the light at two or more different wavelengths or wavelength bands
    • G01N21/31Investigating relative effect of material at wavelengths characteristic of specific elements or molecules, e.g. atomic absorption spectrometry
    • G01N21/35Investigating relative effect of material at wavelengths characteristic of specific elements or molecules, e.g. atomic absorption spectrometry using infrared light
    • G01N21/359Investigating relative effect of material at wavelengths characteristic of specific elements or molecules, e.g. atomic absorption spectrometry using infrared light using near infrared light
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/17Systems in which incident light is modified in accordance with the properties of the material investigated
    • G01N21/25Colour; Spectral properties, i.e. comparison of effect of material on the light at two or more different wavelengths or wavelength bands
    • G01N21/27Colour; Spectral properties, i.e. comparison of effect of material on the light at two or more different wavelengths or wavelength bands using photo-electric detection ; circuits for computing concentration
    • G01N21/274Calibration, base line adjustment, drift correction
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/17Systems in which incident light is modified in accordance with the properties of the material investigated
    • G01N21/25Colour; Spectral properties, i.e. comparison of effect of material on the light at two or more different wavelengths or wavelength bands
    • G01N21/31Investigating relative effect of material at wavelengths characteristic of specific elements or molecules, e.g. atomic absorption spectrometry
    • G01N21/35Investigating relative effect of material at wavelengths characteristic of specific elements or molecules, e.g. atomic absorption spectrometry using infrared light
    • G01N21/3563Investigating relative effect of material at wavelengths characteristic of specific elements or molecules, e.g. atomic absorption spectrometry using infrared light for analysing solids; Preparation of samples therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning

Abstract

The invention relates to a method and a system for identifying and detecting the content of animal source protein powder adulterated in fish meal, which comprises the steps of firstly, acquiring hyperspectral images corresponding to three samples and then preprocessing the hyperspectral images; secondly, establishing an animal source protein powder classification model by using the spectral correction data corresponding to the pure sample and the spectral correction data corresponding to the adulterated sample and adopting a machine learning identification algorithm; then, spectrum correction data corresponding to the adulteration sample is utilized, and a machine learning identification algorithm is adopted to construct an adulteration content detection model; and finally, inputting the spectral correction data corresponding to the sample to be detected into the animal source protein powder classification model for classification, and inputting the spectral correction data corresponding to the sample to be detected into the adulteration content detection model for content detection to obtain an adulteration prediction value. The invention combines the near-infrared hyperspectral imaging technology and the machine learning identification algorithm, and realizes the real-time, rapid and accurate identification of whether the fish meal is adulterated or not and the detection of the adulteration amount.

Description

Method and system for identifying and detecting content of animal source protein powder doped in fish meal
Technical Field
The invention relates to the technical field of intelligent detection of feed quality, in particular to a method and a system for identifying and detecting the content of animal source protein powder mixed in fish meal.
Background
Fish Meal (PFM) is a high-quality animal-derived protein material, is rich in nutrients such as protein, minerals, essential amino acids, trace elements and vitamins, and contains growth factors. Due to the excellent nutrient components, palatability and digestibility, the feed is widely applied to livestock, poultry and aquatic feeds. In recent years, with the rapid development of the feed industry, the demand of fish meal in the market is increasing. The price of the fish meal is high, and the price of the fish meal is positively correlated with the protein content, so the profits drive many illegal fish meal manufacturers and distributors in China to mix some cheap animal protein powder into the pure fish meal, which causes serious harm to the health of the cultured animals, thereby threatening the safety of human food.
Feather meal (FTM) is typically made from chicken feathers (waste from poultry production) after cooking under high pressure, hydrolysis, drying and grinding. Feather meal contains more than 80% crude protein, but most of it is keratin that is not well digested by proteolytic enzymes. Related studies found that feather meal, a low-cost, high-yield processed animal protein common in china, may cause significant reduction in the growth of many fish when fed a diet containing high levels of feather meal due to its low protein digestibility and unbalanced amino acid profile. Fish filet powder (FBP) is typically a by-product of fish processing, particularly the by-product produced by tilapia, catfish, cod, spanish mackerel, and the like, and is typically composed of fish head, viscera, bones, scales, and skin. Compared with pure fish meal, the fish steak meal has a lower proportion of protein, essential amino acids and docosahexaenoic acid and eicosapentaenoic acid in the total fatty acid content, and has a higher ash content, thus having a lower nutritional value. At present, feather meal and fish steak meal are used as common low-price high-yield processed animal protein and have high physical similarity (such as shape, color, texture and the like) with pure fish meal. Therefore, some illegal merchants typically mix animal-derived proteins (e.g., feather meal or fish meal) into pure fish meal for sale in an attempt to obtain a riot. Also, it is difficult to distinguish fish meal incorporated with feather meal or fish-row meal from pure fish meal by the sensory perception. Therefore, how to quickly, simply and accurately judge whether the animal-derived protein powder is mixed in the fish meal and the content detection of the adulteration content become one of the important links of the control of the fish meal feed, and is also a challenge faced by most feed factories in China.
The Guangdong union spread group company Limited discloses a method for rapidly detecting fish meal adulteration (patent number: CN 108802023A), adopts hot water to remove impurities and hot alkali liquor to remove protein and fat, the impurities removal is simple and efficient, yellow precipitate produced by adding ammonium molybdate dropwise under acid condition and relevant parameters of the fish meal are observed under a microscope by adopting acid detection, and the judgment result is accurate and the phenomenon is visual. However, the method still belongs to a chemical treatment process, the operation steps are complicated, the detection personnel are required to have higher professional skills, and the method is not suitable for ordinary users.
Disclosure of Invention
The invention aims to provide a method and a system for identifying and detecting the content of animal source protein powder adulterated in fish meal so as to realize real-time, quick and simple detection of the adulterated content.
In order to realize the purpose, the invention provides a method for identifying and detecting the content of animal source protein powder adulterated in fish meal, which comprises the following steps:
step S1: acquiring hyperspectral images corresponding to the three samples in the first set spectral range by using a hyperspectral imager; the three samples comprise a pure sample, an adulterated sample and a sample to be detected;
step S2: respectively preprocessing the hyperspectral images corresponding to the three samples to obtain a spectrum correction data set; the spectrum correction data set comprises spectrum correction data corresponding to three samples;
step S3: establishing an animal source protein powder classification model by using the spectrum correction data corresponding to the pure sample and the spectrum correction data corresponding to the adulterated sample in the spectrum correction data set and adopting a machine learning identification algorithm;
step S4: inputting the spectrum correction data corresponding to the sample to be detected into an animal source protein powder classification model for classification to obtain a classification result; the classification result is fish meal, feather meal-fish meal mixture, fish steak meal or fish steak meal-fish meal mixture;
step S5: spectrum correction data corresponding to adulterated samples in the spectrum correction data set are utilized, and a machine learning identification algorithm is adopted to construct an adulterated content detection model;
step S6: and when the classification result is a feather meal-fish meal mixture or a fish steak meal-fish meal mixture, inputting the spectral correction data corresponding to the sample to be detected into the adulteration content detection model for content detection to obtain a feather meal adulteration predicted value or a fish steak meal adulteration predicted value.
Optionally, the preprocessing is performed on the hyperspectral images corresponding to the three samples respectively to obtain a spectrum correction dataset, and the method specifically includes:
step S21: respectively carrying out background removal treatment on the hyperspectral images corresponding to the three samples to obtain an interesting area corresponding to a pure sample, an interesting area corresponding to an adulterated sample and an interesting area corresponding to a sample to be detected;
step S22: respectively removing spectral noise of spectral data corresponding to each pixel in the region of interest corresponding to the three samples to obtain a sample data set; the sample data set comprises sample spectrum data corresponding to a pure sample, sample spectrum data corresponding to an adulterated sample and sample spectrum data corresponding to a sample to be detected;
step S23: and correcting the sample data set by adopting a baseline offset correction method to obtain a spectrum correction data set.
Optionally, the background removal processing is performed on the hyperspectral images corresponding to the three samples respectively to obtain an interesting region corresponding to the pure sample, an interesting region corresponding to the adulterated sample, and an interesting region corresponding to the sample to be detected, and the background removal processing specifically includes:
step S211: selecting a high-spectrum image at 1325nm corresponding to a pure sample as a gray image corresponding to the pure sample, selecting a high-spectrum image at 1325nm corresponding to an adulterated sample as a gray image corresponding to the adulterated sample, and selecting a high-spectrum image at 1325nm corresponding to a sample to be detected as a gray image corresponding to the sample to be detected;
step S212: utilizing the gray level image corresponding to the pure sample to construct a mask image corresponding to the pure sample, utilizing the gray level image corresponding to the adulterated sample to construct a mask image corresponding to the adulterated sample, and utilizing the gray level image corresponding to the sample to be detected to construct a mask image corresponding to the sample to be detected;
step S213: carrying out binarization image segmentation on a hyperspectral image corresponding to a pure sample by using the mask image corresponding to the pure sample to obtain a segmentation area corresponding to the pure sample, carrying out binarization image segmentation on a hyperspectral image corresponding to an adulterated sample by using the mask image corresponding to the adulterated sample to obtain a segmentation area corresponding to the adulterated sample, and carrying out binarization image segmentation on a hyperspectral image corresponding to a sample to be detected by using the mask image corresponding to the sample to be detected to obtain a segmentation area corresponding to the sample to be detected;
step S214: and respectively carrying out corrosion treatment on the segmentation areas corresponding to the three samples by adopting a corrosion operation in the morphological treatment method to obtain an interested area corresponding to the pure sample, an interested area corresponding to the adulterated sample and an interested area corresponding to the sample to be detected.
Optionally, the respectively removing spectral noise of spectral data corresponding to each pixel in the region of interest corresponding to the three samples to obtain a sample data set specifically includes:
step S221: respectively carrying out wavelet transformation on spectral data corresponding to each pixel in the region of interest corresponding to the three samples;
step S222: respectively selecting spectral data corresponding to all pixels in a second set spectral range in the region to be selected, adding the spectral data to calculate the average to form a sample data set; and the region to be selected is the region of interest corresponding to each sample after wavelet transformation.
Optionally, the constructing of the animal source protein powder classification model by using the spectrum correction data corresponding to the pure sample and the spectrum correction data corresponding to the adulterated sample in the spectrum correction data set and using a machine learning identification algorithm specifically includes:
step S31: selecting the spectrum correction data corresponding to the pure sample and the spectrum correction data corresponding to the adulterated sample from the spectrum correction data set, simultaneously obtaining the actual classification of the pure sample and the adulterated sample, and dividing according to a first set proportion to obtain a first training set;
step S32: respectively screening characteristic wavelengths of the pure sample and the adulterated sample by adopting a continuous projection algorithm;
step S33: and selecting and utilizing the spectrum correction data corresponding to the characteristic wavelength and the actual classification of the sample corresponding to each spectrum correction data from the first training set, and performing three-classification modeling by adopting a machine learning identification algorithm to obtain an animal source protein powder classification model.
Optionally, when the adulterated sample is feather meal, the animal source protein powder classification model is selected as a feather meal classification model, and when the feather meal classification model is established, the punishment factor C is 1 × 104Taking 10 as a hyper-parameter gamma of a radial basis function RBF, and taking the value of the segmentation number n of cross validation as 10; when the adulterant is fish steak powder, the animal source protein powder classification model is selected as a fish steak powder classification model, and when the fish steak powder classification model is established, the punishment factor C is 1 multiplied by 105And taking 10 as the hyper-parameter gamma of the radial basis function RBF, and taking 10 as the segmentation number n of the cross validation.
Optionally, when the adulterant is feather powder, the adulterant content detection model is selected as a feather powder content detection model, and when the feather powder content detection model is established, the punishment factor C is 1000, the hyperparameter gamma of the RBF is 0.005, and the hyperparameter epsilon is 0.1; when the adulterants are fish steak powder, the adulterant content detection model is selected as a fish steak powder content detection model, and when the fish steak powder content detection model is established, a punishment factor C is 5600, a hyper-parameter gamma of RBF is 0.01, and a hyper-parameter epsilon is 0.1.
The invention also provides a system for identifying and detecting the content of the animal source protein powder adulterated in the fish meal, which comprises the following components:
the hyperspectral image acquisition module is used for acquiring hyperspectral images corresponding to the three samples in the first set spectral range by using a hyperspectral imager; the three samples comprise a pure sample, an adulterated sample and a sample to be detected;
the preprocessing module is used for respectively preprocessing the hyperspectral images corresponding to the three samples to obtain a spectrum correction data set; the spectrum correction data set comprises spectrum correction data corresponding to three samples;
the animal source protein powder classification model building module is used for building an animal source protein powder classification model by using the spectrum correction data corresponding to the pure sample and the spectrum correction data corresponding to the adulterated sample in the spectrum correction data set and by adopting a machine learning identification algorithm;
the classification module is used for inputting the spectral correction data corresponding to the sample to be detected into the animal source protein powder classification model for classification to obtain a classification result; the classification result is fish meal, feather meal-fish meal mixture, fish steak meal or fish steak meal-fish meal mixture;
the adulteration content detection model building module is used for building an adulteration content detection model by utilizing the spectral correction data corresponding to the adulteration samples in the spectral correction data set and adopting a machine learning identification algorithm;
and the content detection module is used for inputting the spectral correction data corresponding to the sample to be detected into the adulteration content detection model for content detection when the classification result is the feather meal-fish meal mixture or the fish steak meal-fish meal mixture, so as to obtain a feather meal adulteration predicted value or a fish steak meal adulteration predicted value.
Optionally, when the adulterated sample is feather meal, the animal source protein powder classification model is selected as a feather meal classification model, and when the feather meal classification model is established, the punishment factor C is 1 × 104Taking 10 as a hyper-parameter gamma of a radial basis function RBF, and taking the value of the segmentation number n of cross validation as 10; when the adulterant is fish steak powder, the animal source protein powder classification model is selected as a fish steak powder classification model, and when the fish steak powder classification model is established, the punishment factor C is 1 multiplied by 105And taking 10 as the hyper-parameter gamma of the radial basis function RBF, and taking 10 as the segmentation number n of the cross validation.
Optionally, when the adulterant is feather powder, the adulterant content detection model is selected as a feather powder content detection model, and when the feather powder content detection model is established, the punishment factor C is 1000, the hyperparameter gamma of the RBF is 0.005, and the hyperparameter epsilon is 0.1; when the adulterants are fish steak powder, the adulterant content detection model is selected as a fish steak powder content detection model, and when the fish steak powder content detection model is established, a punishment factor C is 5600, a hyper-parameter gamma of RBF is 0.01, and a hyper-parameter epsilon is 0.1.
According to the specific embodiment provided by the invention, the invention discloses the following technical effects:
the invention applies near infrared high spectral imaging (NIR-HSI) technology to the detection of the animal source protein powder mixed in the fish meal for the first time, and combines a machine learning identification algorithm to realize the real-time, rapid and accurate identification of whether the fish meal is mixed and the detection of the mixed amount.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings without inventive exercise.
FIG. 1 is a flow chart of the identification and content detection method of animal source protein powder adulterated in fish meal in example 1;
FIG. 2 is a structural diagram of a system for identifying and detecting the content of animal-derived protein powder adulterated in fish meal in example 2;
FIG. 3 is a near-infrared hyperspectral original image corresponding to the adulterated sample in example 3;
FIG. 4 is a mask image corresponding to the adulterated sample in example 3;
FIG. 5 is the average spectrum curve of the fish meal of 4 different manufacturers and feather meal of 2 different manufacturers in example 3;
FIG. 6 is the average spectral curves of the pixels obtained after 10 concentrations of feather meal were blended with fish meal in example 3;
FIG. 7 is the results of three classification modeling of PFM, FTM and FTM-PFM in example 3;
FIG. 8 is the result of the model for predicting the content of feather meal mixed in fish meal in example 3;
FIG. 9 is a graph comparing the predicted value and the actual value of the content of feather meal incorporated in the fish meal in example 3;
FIG. 10 is a near-infrared hyperspectral original image corresponding to the adulterated sample in example 4;
FIG. 11 is a mask image corresponding to the adulterated sample in example 4;
FIG. 12 is the mean spectral curves of the fish meal image elements of 4 different manufacturers and 2 different manufacturers of fish steak of example 4;
FIG. 13 is a plot of the mean spectra for the pixels obtained after the 10 concentrations of fish steak meal of example 4 was spiked with fish meal;
FIG. 14 is the results of three-classification modeling of PFM, FBP and FBP-PFM in example 4;
FIG. 15 is the results of the predictive modeling of the content of fish-row powder incorporated in fish meal of example 4;
FIG. 16 is a graph comparing the predicted value and the actual value of the content of the fish raft powder doped in the fish meal in example 4.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The invention aims to provide a method and a system for identifying and detecting the content of animal source protein powder adulterated in fish meal so as to realize real-time, quick and simple detection of the adulterated content.
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
Example 1
Although the near infrared spectrum technology can utilize the spectral reflection characteristics of a detected object to carry out analysis and research, the hyperspectral imaging technology has higher resolution compared with the hyperspectral imaging technology, and can acquire the spectral data of each pixel point in an image while acquiring the image information of a sample, so that the hyperspectral imaging technology is a detection and analysis technology which effectively fuses the image characteristics and the spectral characteristics, can overcome the defect that the image information is only dependent on the spectral characteristics, and effectively improves the accuracy of image information detection. The invention applies the near infrared high spectral imaging technology (NIR-HSI) to the detection of the animal source protein powder mixed in the fish meal for the first time, and can realize the quick identification of whether the animal source protein powder mixed in the fish meal is mixed and the quick content detection of the mixed amount of the animal source protein powder mixed in the fish meal by combining the quick and accurate machine learning identification algorithm.
As shown in figure 1, the invention discloses a method for identifying and detecting the content of animal source protein powder adulterated in fish meal, which comprises the following steps:
step S1: acquiring hyperspectral images corresponding to the three samples in the first set spectral range by using a hyperspectral imager; the three samples comprise a pure sample, an adulterated sample and a sample to be detected.
Step S2: respectively preprocessing the hyperspectral images corresponding to the three samples to obtain a spectrum correction data set; the spectral correction data set comprises spectral correction data corresponding to each of the three samples.
Step S3: and establishing an animal source protein powder classification model by using the spectrum correction data corresponding to the pure sample and the spectrum correction data corresponding to the adulterated sample in the spectrum correction data set and adopting a machine learning identification algorithm.
Step S4: inputting the spectrum correction data corresponding to the sample to be detected into an animal source protein powder classification model for classification to obtain a classification result; the classification result is fish meal, feather meal-fish meal mixture, fish steak meal or fish steak meal-fish meal mixture.
Step S5: and establishing an adulteration content detection model by using the spectral correction data corresponding to the adulteration samples in the spectral correction data set and adopting a machine learning identification algorithm.
Step S6: and when the classification result is a feather meal-fish meal mixture or a fish steak meal-fish meal mixture, inputting the spectral correction data corresponding to the sample to be detected into the adulteration content detection model for content detection to obtain a feather meal adulteration predicted value or a fish steak meal adulteration predicted value.
The individual steps are discussed in detail below:
before collecting the hyperspectral image, correcting the hyperspectral imager constructed by adopting a near-infrared hyperspectral imaging technology, and obtaining a specific formula of the corrected hyperspectral image as follows:
Figure BDA0003229039420000081
wherein, IcorFor the corrected hyperspectral image IrawAs a raw hyperspectral image, IdarkAnd IwhiteRespectively a white reference picture and a black reference picture.
The black reference image is obtained by covering the lens of the hyperspectral imager with black when the light source is turned off, and the white reference image is collected from a white Teflon tile with the reflectivity close to 100%.
Step S1: and acquiring a hyperspectral image corresponding to the pure sample, a hyperspectral image corresponding to the adulterated sample and a hyperspectral image corresponding to the sample to be detected in a first set spectral range by using a hyperspectral imager. The pure sample is fish meal or feather meal or fish steak meal, and the adulterated sample is a feather meal-fish meal mixture or fish steak meal-fish meal mixture.
Before the sample to be tested is obtained, the method further comprises the following steps: weighing about 4g of fish meal to be detected, slowly pouring the fish meal into a black cylindrical aluminum box with the diameter of 30mm and the height of 10mm, lightly compacting the surface of the sample by using a box cover to obtain samples to be detected, wherein a plurality of samples to be detected are prepared, and the spectral images of the samples to be detected can be conveniently and repeatedly obtained.
The invention uses the hyperspectral imager, the mobile platform and the lamp in the near-infrared hyperspectral imaging system to carry out an infrared hyperspectral experiment, and the position and the lighting condition of the lamp relative to the hyperspectral imager are kept in the whole experiment process so as to obtain stable and comparable images.
In this embodiment, the first set spectral range is 874-1734nm, that is, the present invention obtains the spectral data of the pure sample and the adulterated sample in the 874-1734nm spectral range. In order to obtain clear and undistorted images of the feed samples, the speed of the moving platform and the exposure time of the hyperspectral imager are respectively adjusted to be 22mm/s and 3000 mu s, and the distance between the lens of the hyperspectral imager and the surfaces of the two samples is kept to be 24.5 cm.
Step S2: preprocessing the hyperspectral images corresponding to the three samples to obtain a spectrum correction data set, wherein the spectrum correction data set comprises spectrum correction data corresponding to pure samples, spectrum correction data corresponding to adulterated samples and spectrum correction data corresponding to samples to be detected.
Each hyperspectral image is a three-dimensional data cube with dimensions x y x (x and y are spatial dimensions; x is the number of wavelengths). In order to extract spectral data of each pel of each sample, a region of interest (ROI) should be separated from the background image. The reflection value between the sample and the background has a large difference, so a mask image is constructed by using the gray level image, and all hyperspectral images are binarized to perform image segmentation. Applying the etching operation in the morphological processing method to each segmentation region to remove the edge region of the aluminum box and obtain the ROI, and specifically summarizing the steps as follows:
step S21: respectively carrying out background removal treatment on hyperspectral images corresponding to the three samples to obtain an interesting region corresponding to a pure sample, an interesting region corresponding to an adulterated sample and an interesting region corresponding to a sample to be detected, and specifically comprising the following steps:
step S211: selecting a high-spectrum image at 1325nm corresponding to a pure sample as a gray image corresponding to the pure sample, selecting a high-spectrum image at 1325nm corresponding to an adulterated sample as a gray image corresponding to the adulterated sample, and selecting a high-spectrum image at 1325nm corresponding to a sample to be detected as a gray image corresponding to the sample to be detected.
Step S212: the gray level image corresponding to the pure sample is used for constructing a mask image corresponding to the pure sample, the gray level image corresponding to the adulterated sample is used for constructing a mask image corresponding to the adulterated sample, and the gray level image corresponding to the sample to be detected is used for constructing a mask image corresponding to the sample to be detected.
Step S213: the method comprises the steps of utilizing a mask image corresponding to a pure sample to carry out binarization image segmentation on a hyperspectral image corresponding to the pure sample to obtain a segmentation area corresponding to the pure sample, utilizing the mask image corresponding to an adulterated sample to carry out binarization image segmentation on the hyperspectral image corresponding to the adulterated sample to obtain a segmentation area corresponding to the adulterated sample, utilizing the mask image corresponding to a sample to be detected to carry out binarization image segmentation on the hyperspectral image corresponding to the sample to be detected to obtain a segmentation area corresponding to the sample to be detected.
Step S214: and respectively carrying out corrosion treatment on the segmentation areas corresponding to the three samples by adopting a corrosion operation in the morphological treatment method to obtain an interested area corresponding to the pure sample, an interested area corresponding to the adulterated sample and an interested area corresponding to the sample to be detected.
Step S22: respectively removing spectral noise of spectral data corresponding to each pixel in an interested area corresponding to the three samples to obtain a sample data set, which specifically comprises the following steps:
step S221: respectively carrying out wavelet transformation on spectral data corresponding to each pixel in the region of interest corresponding to the three samples; the invention uses Daubechies8 as a wavelet basis function and 3 as a wavelet decomposition layer to perform wavelet transformation, and the purpose of performing wavelet transformation on spectral data corresponding to each pixel in a region of interest is to reduce random noise.
Step S222: respectively selecting spectral data corresponding to all pixels in a second set spectral range in the region to be selected, adding the spectral data to calculate the average to form a sample data set; the region to be selected is an interested region corresponding to each sample after wavelet transformation; the second set spectral range must be within the first set spectral range, which is between 975nm and 1619nm as summarized experimentally, since the regions before 975nm and after 1619nm exhibit higher noise levels, thus removing the first 30 wavelengths and the last 34 wavelengths of the spectral data to improve the signal-to-noise ratio of the data. And finally, adding and averaging the spectral data corresponding to all pixels in the range of 975nm to 1619nm in the ROI after wavelet transformation to obtain sample spectral data. The sample data set comprises sample spectrum data corresponding to a pure sample, sample spectrum data corresponding to an adulterated sample and sample spectrum data corresponding to a sample to be detected.
Step S23: and correcting the sample data set by adopting a baseline offset correction method to obtain a spectrum correction data set, wherein the spectrum correction data set comprises spectrum correction data corresponding to a pure sample, spectrum correction data corresponding to an adulterated sample and spectrum correction data corresponding to a sample to be detected.
The baseline of the spectrum cannot be guaranteed to be completely unchanged due to drift of the detector, changes in the environment, repairs to the equipment, etc. By baseline correction, the measurements can be compared on the same standard. The Baseline offset correction (BO) used in the present invention is widely used in spectrum preprocessing, and is used to adjust the spectrum offset to reflect the true spectrum difference between samples, i.e. the value of the lowest point of the spectrum is subtracted from all variables, and the specific formula for obtaining the spectrum correction data is:
f(x)=x-minX;
wherein, f (X) is spectrum correction data, X is the minimum sample spectrum data in the sample spectrum curve, and X is the sample spectrum curve.
Step S3: the method comprises the following steps of utilizing spectrum correction data corresponding to a pure sample and spectrum correction data corresponding to a adulterated sample in the spectrum correction data set, and constructing an animal source protein powder classification model by adopting a machine learning identification algorithm, wherein the method specifically comprises the following steps:
step S31: and selecting the spectrum correction data corresponding to the pure sample and the spectrum correction data corresponding to the adulterated sample from the spectrum correction data set, simultaneously obtaining the actual classification of the pure sample and the adulterated sample, and dividing according to a first set proportion to obtain a first training set and a first testing set. In this embodiment, the first setting ratio is 7:3, which is only an example but not limited to the above, and before step S5, the method further includes removing abnormal data, where the abnormal data mentioned here is data that is out of a normal setting range, and the normal setting range mentioned here is determined according to actual requirements.
Step S32: and respectively screening the characteristic wavelengths of the pure sample and the adulterated sample by adopting a continuous projection algorithm.
The spectral data collected by the invention may contain a large amount of redundant, co-linear and overlapping information, which may interfere with the constructed model and affect the effect of the model. The characteristic band selection aims at selecting some wavelengths which have the largest contribution to fish meal category discrimination from the original spectrum. Screening out the effective wavelengths can reduce the number of variables and the complexity of modeling calculations, which will help the model to obtain more accurate results and better robust performance. The continuous projection algorithm SPA is a vector projection analysis by projecting one wavelength onto the other wavelength and selecting the candidate wavelength with the largest projection vector, and the variable subset obtained by the SPA contains less redundant information and collinearity. Therefore, the invention utilizes a continuous projection algorithm to screen the characteristic wavelengths corresponding to the pure samples and the adulterated samples.
Step S33: and selecting and utilizing the spectrum correction data corresponding to the characteristic wavelength and the actual classification of the sample corresponding to each spectrum correction data from the first training set, and performing three-classification modeling by adopting a machine learning identification algorithm to obtain an animal source protein powder classification model.
The SVM is a classification method based on statistical learning, and in order to solve the problem that a linear function cannot simulate complex separation, a support vector machine utilizes a kernel function to map an original space to a feature space. The kernel function may be of various types to provide the ability to handle non-linear classification situations. The kernel of the support vector machine can be viewed as a mapping of non-linear data to a high-dimensional feature space while reducing computational complexity by allowing a linear algorithm to process the high-dimensional feature space. When some classes are non-uniform and partially overlapped, SVM modeling has good performance, and the overfitting tendency of the support vector machine is smaller compared with other non-linear classification methods. Therefore, the method selects a Support Vector Machine (SVM) as a classification model, specifically selects C-SVC as an SVM classification type, selects a Radial Basis Function (RBF) as a kernel function, and performs cross validation. And setting the division number n of the cross validation data set, and setting a penalty factor C and a hyper-parameter gamma of the RBF in the modeling process.
Specifically, when the adulterated sample is feather meal, the animal source protein powder classification model is selected as a feather meal classification model, and when the feather meal classification model is established, the punishment factor C is 1 multiplied by 104Taking 10 as a hyper-parameter gamma of a radial basis function RBF, and taking the value of the segmentation number n of cross validation as 10; when the adulterant is fish steak powder, the animal source protein powder classification model is selected as a fish steak powder classification model; when building the fish steak powder classification model, the punishment factor C is 1 multiplied by 105And taking 10 as the hyper-parameter gamma of the radial basis function RBF, and taking 10 as the segmentation number n of the cross validation.
The first test set is input into the animal source protein powder classification model for classification, and the number of correctly classified samples is calculated; the accuracy is calculated based on the ratio of the number of correctly classified samples to the total number of samples, because the accuracy is an important index for evaluating the quality of the model, and the higher the accuracy is, the better the modeling effect is, so the specific formula for calculating the accuracy is as follows:
Figure BDA0003229039420000121
in the formula, TP (true positive) represents the number of correctly classified samples, N represents the total number of samples, N represents the number of classes, and Accuracy represents the Accuracy.
Step S4: inputting the spectrum correction data corresponding to the sample to be detected into an animal source protein powder classification model for classification to obtain a classification result; when the adulterated sample is feather powder, carrying out classification detection by using a feather powder classification model, and obtaining classification results including fish meal (PFM), feather powder (FTM) and a feather powder-fish meal mixture (FTM-PFM); when the adulterant is fish steak powder, carrying out classification detection by using a fish steak powder classification model, and obtaining classification results including fish meal (PFM), fish steak powder (FBP) and fish steak powder-fish meal mixture (FBP-PFM).
Step S5: the method comprises the following steps of utilizing spectrum correction data corresponding to adulterated samples in the spectrum correction data set, and constructing an adulteration content detection model by adopting a machine learning identification algorithm, wherein the method specifically comprises the following steps:
step S51: and selecting the spectrum correction data corresponding to the adulterated sample from the spectrum correction data set, simultaneously acquiring the actual content of the adulterated sample, and dividing the adulterated sample according to a second set proportion to obtain a second training set and a second testing set. In this embodiment, the second setting ratio is 3:1, which is only an example but not limited to the above, and before this step, the method further includes removing abnormal data, where the abnormal data mentioned here is data that is beyond a normal setting range, and the normal setting range mentioned here is determined according to actual requirements.
Step S52: and constructing an adulteration content detection model by using a second training set by adopting a machine learning identification algorithm.
The method selects a Support Vector Machine Regression (SVMR) model to establish an adulteration content detection model, selects epsilon-SVR as a classification type of the support vector machine, selects a Radial Basis Function (RBF) as a kernel function, and performs cross validation. And setting the division number n of the cross validation data set, and setting the penalty factor C and the hyperparameters gamma and epsilon of the RBF in the modeling process. Specifically, when the adulterant is feather powder, the adulterant content detection model is selected as a feather powder content detection model, and when the feather powder content detection model is established, a penalty factor C is 1000, a hyperparameter gamma of RBF is 0.005, and a hyperparameter epsilon is 0.1; when the adulterants are fish steak powder, the adulterant content detection model is selected as a fish steak powder content detection model, and when the fish steak powder content detection model is established, a punishment factor C is 5600, a hyper-parameter gamma of RBF is 0.01, and a hyper-parameter epsilon is 0.1.
Step S6: and when the classification result is a feather meal-fish meal mixture or a fish steak meal-fish meal mixture, inputting the spectral correction data corresponding to the sample to be detected into the adulteration content detection model for content detection to obtain a feather meal adulteration predicted value or a fish steak meal adulteration predicted value. Specifically, when the classification result is the feather powder-fish meal mixture, the spectral correction data corresponding to the sample to be detected is input into a feather powder content detection model for content detection, and the feather powder adulteration prediction value is obtained. And when the classification result is the fish steak powder-fish meal mixture, inputting the spectral correction data corresponding to the sample to be detected into a fish steak powder content detection model for content detection to obtain a fish steak powder adulteration prediction value.
And performing content detection on the adulteration content detection model by using the second test set to obtain a predicted value of the adulteration amount, and calculating a correlation coefficient r of the true value of the adulteration amount and the predicted value of the adulteration amount in the fish meal by using Pearson correlation analysis. The closer r is to 1, the better the prediction effect of the model is.
Example 2
As shown in fig. 2, the invention also discloses a system for identifying and detecting the content of the animal source protein powder adulterated in the fish meal, which comprises the following components:
the hyperspectral image acquisition module 201 is used for acquiring hyperspectral images corresponding to three samples in a first set spectral range by using a hyperspectral imager; the three samples comprise a pure sample, an adulterated sample and a sample to be detected.
The preprocessing module 202 is configured to respectively preprocess the hyperspectral images corresponding to the three samples to obtain a spectrum correction dataset; the spectral correction data set comprises spectral correction data corresponding to each of the three samples.
And the animal source protein powder classification model construction module 203 is used for constructing an animal source protein powder classification model by using the spectrum correction data corresponding to the pure sample and the spectrum correction data corresponding to the adulterated sample in the spectrum correction data set and adopting a machine learning identification algorithm.
The classification module 204 is used for inputting the spectral correction data corresponding to the sample to be detected into the animal source protein powder classification model for classification to obtain a classification result; the classification result is fish meal, feather meal-fish meal mixture, fish steak meal or fish steak meal-fish meal mixture.
And the adulteration content detection model building module 205 is configured to build an adulteration content detection model by using the spectral correction data corresponding to the adulteration samples in the spectral correction data set and by using a machine learning identification algorithm.
And the content detection module 206 is configured to, when the classification result is the feather meal-fish meal mixture or the fish steak meal-fish meal mixture, input the spectral correction data corresponding to the sample to be detected into the adulteration content detection model for content detection, so as to obtain a feather meal adulteration prediction value or a fish steak meal adulteration prediction value.
The same contents as those in embodiment 1 are not described in detail herein, and for details, see embodiment 1.
Example 3
The embodiment is a method for identifying mixed fish steak powder in fish meal and detecting the mixed content, which comprises the following steps:
sample preparation: fish meal samples from 4 different manufacturers in 4 different regions (identified as PFM1, PFM2, PFM3, PFM4, respectively) and feather meal samples from 2 different manufacturers in 2 different regions (identified as FTM1, FTM2, respectively) were selected. All fish meal samples were evaluated by each feed processing plant quality safety detection center to confirm the authenticity of the samples. The fish meal of different manufacturers and feather meal (5%, 10%, 15%, 20%, 25%, 30%, 35%, 40%, 45%, 50%) under 10 concentration gradients are mixed to generate adulterated fish meal samples, and 80 feather meal adulterated fish meal (FTM-PFM) are obtained. Approximately 4g of each sample was weighed, poured slowly into a black cylindrical aluminum box 30mm in diameter and 10mm high, and the surface of the sample was lightly compacted using the box lid, 4 replicates of each sample were prepared for hyperspectral image collection.
Acquiring a hyperspectral image: hyperspectral images of all pure and adulterated samples were acquired using a near infrared hyperspectral imaging (NIR-HSI) system with a spectral resolution of 5nm, scanning 874-1734nm samples over a total of 256 bands. The sample box is placed on a moving platform in line and conveyed to the field of view of the hyperspectral imager for line scanning. In order to obtain a clear and undistorted image of the feed sample, the speed of the moving platform and the exposure time of the hyperspectral imager are respectively adjusted to be 22mm/s and 3000 mu s, and the distance between the lens of the hyperspectral imager and the surface of the sample is kept to be 24.5 cm. The position of the lamp relative to the hyperspectral imager and the illumination conditions were maintained throughout the experiment to obtain a stable and comparable image, so a partial hyperspectral image was acquired as shown in fig. 3.
Before collecting the image, image correction needs to be carried out on the hyperspectral imager.
Background removal of sample image: and constructing a mask image by using the 1325nm gray level image, and binarizing the corrected hyperspectral image to perform image segmentation. The etching operation in the morphological processing method is applied to each of the divided regions to remove the edge region of the aluminum box, and a partial sample region of interest ROI is obtained as shown in fig. 4.
Spectral noise removal: and performing wavelet transformation on each pixel spectrum of the region of interest, wherein Daubechies8 is used as a wavelet basis function, and 3 is used as a wavelet decomposition layer, so that random noise is reduced. In addition, the regions before 975nm and after 1619nm exhibit higher noise levels, thus removing the first 30 wavelengths and the last 34 wavelengths of data to improve the signal-to-noise ratio of the data. Finally, the spectral data corresponding to all pixels in the range of 975 to 1619nm (including 192 bands) within the ROI are averaged into the sample spectral data. Fig. 5 shows the sample average spectral curves for 4 PFMs versus 2 FTMs, and fig. 6 shows the sample spectral curves formed from the sample spectral data obtained from the sample averaged after doping with PFM1 versus 10 FTMs 1 at different concentrations.
And (3) spectrum correction: in the invention, the spectral data is corrected by using Baseline Offset (BO) correction, and the Baseline offset is used for adjusting the spectral offset to reflect the real spectral difference between samples to obtain spectral correction data.
Classifying a sample set: the invention has three types of samples, which are respectively as follows: fish Meal (PFM), feather meal (FTM), feather meal-fish meal mixture (FTM-PFM). The spectral correction data of each type of sample and the actual classification of pure samples and adulterated samples are divided into a first training set and a first testing set according to a ratio of 7: 3. The abnormal spectrum data are eliminated, 394 sample spectra are finally obtained for the training of the model (143for PFM,27 for FTM, and 224 for FTM-PFM), and 169 sample spectra are used for the prediction of the model (61 for PFM,12 for FTM, and 96 for FTM-PFM).
Selecting a characteristic wave band: according to the invention, spectrum data in continuous 192 wave bands are collected in a hyperspectral way, a continuous projection algorithm (SPA) is used for screening characteristic wavelengths, and finally 30 characteristic wavelengths are screened out, wherein the characteristic wavelengths are respectively as follows: {1002nm, 1029nm, 1042nm, 1046nm, 1052nm, 1059nm, 1079nm, 1093nm, 1106nm, 1123nm, 1140nm, 1160nm, 1264nm, 1284nm, 1294nm, 1318nm, 1335nm, 1369nm, 1389nm, 1402nm, 1426nm, 1436nm, 1450nm, 1467nm, 1483nm, 1561nm, 1575nm, 1592nm, 1609nm, 1615nm }.
Establishing a three-classification model: the method comprises the steps of utilizing spectrum correction data corresponding to characteristic wavelengths in a first training set and actual sample classification corresponding to the spectrum correction data, and adopting a machine learning recognition algorithm to carry out three-classification modeling to obtain a feather meal classification model. Through research, the penalty factor C is 1 multiplied by 10 in the modeling process4And when the hyperparameter gamma of the RBF is 10, the accuracy of the obtained cross validation training set and the accuracy of the obtained validation set are the highest, namely 100% and 99.75%, respectively, as shown in figure 7.
And (3) evaluation of a classification model: and (3) carrying out sample classification on the data of the first test set by using the feather meal classification model, and calculating the accuracy of the feather meal classification model, wherein the classification accuracy of the established model is 100%.
Dividing a sample set: feather meal (FTM1, FTM2) of two different manufacturers are respectively doped into fish meal (PFM1, PFM2, PFM3, PFM4) of four different manufacturers under 10 concentration gradients, the obtained spectrum correction data of adulterated samples are divided into a second training set and a second testing set according to the proportion of 3:1, and finally 240 sample spectra are obtained for model training, and 80 sample spectra are used for model prediction.
Establishing a feather powder content detection model: and constructing a feather meal content detection model by utilizing the second training set. The invention selects a Support Vector Machine Regression (SVMR) model for modeling, selects epsilon-SVR as the classification type of the support vector machine, selects a Radial Basis Function (RBF) as a kernel function, and performs cross validation, wherein the classification number is set to 10. Through research, when the penalty factor C is 1000, the hyperparameter gamma of the RBF is 0.005 and the epsilon of the RBF is 0.1 in the modeling process, the accuracy rates of the obtained cross validation training set and the validation set are respectively 99.22% and 99.03%, as shown in FIG. 8.
Evaluating a feather powder content detection model: as can be found from fig. 9, the true value of the adulteration amount of the feather powder has high correlation with the predicted value, and the correlation coefficient r is 0.992 through Pearson correlation analysis. And it can be found that the points in the scatter diagram are uniformly distributed near the y-x function straight line, which indicates that the prediction accuracy is high.
Example 4
The embodiment is a method for identifying mixed fish steak powder in fish meal and detecting the mixed content, which comprises the following steps:
sample preparation: fish meal samples from 4 different producers from 4 different regions (identified as PFM1, PFM2, PFM3, PFM4, respectively) and fish steak samples from 2 different producers from 2 different regions (identified as FBP1, FBP2, respectively) were selected. All fish meal samples were evaluated by each feed processing plant quality safety detection center to confirm the authenticity of the samples. Fish meal from different manufacturers was mixed with 10 fish steak meals (5%, 10%, 15%, 20%, 25%, 30%, 35%, 40%, 45%, 50%) at a concentration gradient to produce adulterated fish meal samples, and 80 fish steak meal adulterated fish meal (FBP-PFM) samples were obtained. Approximately 4g of each sample was weighed, poured slowly into a black cylindrical aluminum box 30mm in diameter and 10mm high, and the surface of the sample was lightly compacted using the box lid, 4 replicates of each sample were prepared for hyperspectral image collection.
Acquiring a hyperspectral image: hyperspectral images of all pure and adulterated samples were acquired using a near infrared hyperspectral imaging (NIR-HSI) system with a spectral resolution of 5nm, scanning 874-1734nm samples over a total of 256 bands. The sample box is placed on a moving platform in line and conveyed to the field of view of the hyperspectral imager for line scanning. In order to obtain a clear and undistorted image of the feed sample, the speed of the moving platform and the exposure time of the hyperspectral imager are respectively adjusted to be 22mm/s and 3000 mu s, and the distance between the lens of the hyperspectral imager and the surface of the sample is kept to be 24.5 cm. The position of the lamp relative to the hyperspectral imager and the illumination conditions were maintained throughout the experiment to obtain stable and comparable images. The acquired partial hyperspectral image is shown in fig. 10.
Before collecting the image, image correction needs to be carried out on the hyperspectral imager.
Background removal of sample image: and constructing a mask image by using the 1325nm gray level image, and binarizing the corrected hyperspectral image to perform image segmentation. The etching operation in the morphological processing method was applied to each divided region to remove the edge region of the aluminum box, and a partial sample ROI was obtained as shown in fig. 11.
Spectral noise removal: and performing wavelet transformation on each pixel spectrum of the region of interest, wherein Daubechies8 is used as a wavelet basis function, and 3 is used as a wavelet decomposition layer, so that random noise is reduced. In addition, the regions before 975nm and after 1619nm exhibit higher noise levels, thus removing the first 30 wavelengths and the last 34 wavelengths of data to improve the signal-to-noise ratio of the data. Finally, the spectral data corresponding to all pixels in the range of 975 to 1619nm (containing 192 bands) within the ROI are averaged into the sample spectrum. Fig. 12 shows the sample average spectra curves for 4 PFMs and 2 FBPs, and fig. 13 shows the sample average spectra curves for PFM1 doped with FBP1 at 10 different concentrations.
And (3) spectrum correction: in the invention, the spectral data is corrected by using Baseline Offset (BO) correction, and the Baseline offset is used for adjusting the spectral offset to reflect the real spectral difference between samples to obtain spectral correction data.
Classifying a sample set: the invention has three types of samples, which are respectively as follows: fish Meal (PFM), fish steak meal (FBP), fish steak meal-fish meal mixture (FBP-PFM). The spectral correction data of each type of sample and the actual classification of pure samples and adulterated samples are divided into a first training set and a first testing set according to a ratio of 7: 3. The abnormal spectrum data are eliminated, 408 sample spectrums are finally obtained for training the model (143forPFM,42forFBP, and 223forFBP-PFM), and 169 sample spectrums are used for predicting the model (60forPFM,14forFBP, and 95 forFBP-PFM).
Selecting a characteristic wave band: according to the invention, spectrum data in continuous 192 wave bands are collected in a hyperspectral way, a continuous projection algorithm (SPA) is used for screening characteristic wavelengths, and finally 34 characteristic wavelengths are screened out: {978nm, 982nm, 985nm, 995nm, 999nm, 1002nm, 1009nm, 1022nm, 1025nm, 1029nm, 1032nm, 1049nm, 1059nm, 1079nm, 1130nm, 1140nm, 1160nm, 1187nm, 1193nm, 1214nm, 1237nm, 1375nm, 1386nm, 1399nm, 1426nm, 1433nm, 1477nm, 1517nm, 1538nm, 1561nm, 1585nm, 1609nm, 1619nm }.
Establishing a fish steak powder classification model: the method comprises the steps of utilizing spectrum correction data corresponding to characteristic wavelengths in a first training set and actual sample classification corresponding to the spectrum correction data, and adopting a machine learning recognition algorithm to carry out three-classification modeling to obtain a fish powder classification model. Through research, the penalty factor C is 1 multiplied by 10 in the modeling process5And when the hyperparameter gamma of the RBF is 10, the accuracy of the obtained cross validation training set and the accuracy of the obtained validation set are the highest, and are respectively 99.76% and 99.02%, as shown in FIG. 14.
And (3) evaluation of a classification model: and (3) carrying out sample classification on the first test set data by using a fish waste powder classification model, and calculating the accuracy of the first test set data, wherein the classification accuracy of the established model is 100%.
Dividing a sample set: the fish steak powder (FBP1, FBP2) of two different manufacturers is respectively doped into the fish meal (PFM1, PFM2, PFM3, PFM4) of four different manufacturers under 10 concentration gradients, the obtained spectrum correction data of adulterated samples are divided into a second training set and a second testing set according to the proportion of 3:1, finally, 240 sample spectrums are used for training the model, and 80 sample spectrums are used for predicting the model.
Establishing a fish steak powder content detection model: and constructing a fish powder content detection model by using the second training set. The invention selects a Support Vector Machine Regression (SVMR) model for modeling, selects epsilon-SVR as the classification type of the support vector machine, selects a Radial Basis Function (RBF) as a kernel function, and performs cross validation, wherein the classification number is set to 10. Through research, it is found that when the penalty factor C is 5600, the hyperparameter gamma of the RBF is 0.01, and the epsilon is 0.1 in the modeling process, the accuracy rates of the obtained cross validation training set and the validation set are the highest, and are respectively 98.17% and 97.82%, as shown in FIG. 15.
Evaluating a fish steak powder content detection model: as can be found from fig. 16, the true value of the adulteration amount of the fish steak powder has high correlation with the predicted value, and the correlation coefficient r is 0.992 through Pearson correlation analysis. And it can be found that the points in the scatter diagram are uniformly distributed near the y-x function straight line, which indicates that the prediction accuracy is high.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. For the system disclosed by the embodiment, the description is relatively simple because the system corresponds to the method disclosed by the embodiment, and the relevant points can be referred to the method part for description.
The principles and embodiments of the present invention have been described herein using specific examples, which are provided only to help understand the method and the core concept of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, the specific embodiments and the application range may be changed. In view of the above, the present disclosure should not be construed as limiting the invention.

Claims (10)

1. A method for identifying and detecting the content of animal source protein powder adulterated in fish meal is characterized by comprising the following steps:
step S1: acquiring hyperspectral images corresponding to the three samples in the first set spectral range by using a hyperspectral imager; the three samples comprise a pure sample, an adulterated sample and a sample to be detected;
step S2: respectively preprocessing the hyperspectral images corresponding to the three samples to obtain a spectrum correction data set; the spectrum correction data set comprises spectrum correction data corresponding to three samples;
step S3: establishing an animal source protein powder classification model by using the spectrum correction data corresponding to the pure sample and the spectrum correction data corresponding to the adulterated sample in the spectrum correction data set and adopting a machine learning identification algorithm;
step S4: inputting the spectrum correction data corresponding to the sample to be detected into an animal source protein powder classification model for classification to obtain a classification result; the classification result is fish meal, feather meal-fish meal mixture, fish steak meal or fish steak meal-fish meal mixture;
step S5: spectrum correction data corresponding to adulterated samples in the spectrum correction data set are utilized, and a machine learning identification algorithm is adopted to construct an adulterated content detection model;
step S6: and when the classification result is a feather meal-fish meal mixture or a fish steak meal-fish meal mixture, inputting the spectral correction data corresponding to the sample to be detected into the adulteration content detection model for content detection to obtain a feather meal adulteration predicted value or a fish steak meal adulteration predicted value.
2. The method for identifying and detecting the content of the animal source protein powder adulterated in the fish meal according to claim 1, wherein the hyperspectral images corresponding to the three samples are respectively preprocessed to obtain a spectrum correction dataset, and the method specifically comprises the following steps:
step S21: respectively carrying out background removal treatment on the hyperspectral images corresponding to the three samples to obtain an interesting area corresponding to a pure sample, an interesting area corresponding to an adulterated sample and an interesting area corresponding to a sample to be detected;
step S22: respectively removing spectral noise of spectral data corresponding to each pixel in the region of interest corresponding to the three samples to obtain a sample data set; the sample data set comprises sample spectrum data corresponding to a pure sample, sample spectrum data corresponding to an adulterated sample and sample spectrum data corresponding to a sample to be detected;
step S23: and correcting the sample data set by adopting a baseline offset correction method to obtain a spectrum correction data set.
3. The method for identifying and detecting the content of the adulterated animal source protein powder in the fish meal according to claim 2, wherein the background removal treatment is respectively carried out on the hyperspectral images corresponding to the three samples to obtain an interesting region corresponding to a pure sample, an interesting region corresponding to an adulterated sample and an interesting region corresponding to a sample to be detected, and the method specifically comprises the following steps:
step S211: selecting a high-spectrum image at 1325nm corresponding to a pure sample as a gray image corresponding to the pure sample, selecting a high-spectrum image at 1325nm corresponding to an adulterated sample as a gray image corresponding to the adulterated sample, and selecting a high-spectrum image at 1325nm corresponding to a sample to be detected as a gray image corresponding to the sample to be detected;
step S212: utilizing the gray level image corresponding to the pure sample to construct a mask image corresponding to the pure sample, utilizing the gray level image corresponding to the adulterated sample to construct a mask image corresponding to the adulterated sample, and utilizing the gray level image corresponding to the sample to be detected to construct a mask image corresponding to the sample to be detected;
step S213: carrying out binarization image segmentation on a hyperspectral image corresponding to a pure sample by using the mask image corresponding to the pure sample to obtain a segmentation area corresponding to the pure sample, carrying out binarization image segmentation on a hyperspectral image corresponding to an adulterated sample by using the mask image corresponding to the adulterated sample to obtain a segmentation area corresponding to the adulterated sample, and carrying out binarization image segmentation on a hyperspectral image corresponding to a sample to be detected by using the mask image corresponding to the sample to be detected to obtain a segmentation area corresponding to the sample to be detected;
step S214: and respectively carrying out corrosion treatment on the segmentation areas corresponding to the three samples by adopting a corrosion operation in the morphological treatment method to obtain an interested area corresponding to the pure sample, an interested area corresponding to the adulterated sample and an interested area corresponding to the sample to be detected.
4. The method for identifying and detecting the content of the animal-derived protein powder adulterated in the fish meal according to claim 2, wherein the method comprises the following steps of respectively removing spectral noise of spectral data corresponding to each pixel in an interested area corresponding to three samples to obtain a sample data set:
step S221: respectively carrying out wavelet transformation on spectral data corresponding to each pixel in the region of interest corresponding to the three samples;
step S222: respectively selecting spectral data corresponding to all pixels in a second set spectral range in the region to be selected, adding the spectral data to calculate the average to form a sample data set; and the region to be selected is the region of interest corresponding to each sample after wavelet transformation.
5. The method for identifying and detecting the content of the animal source protein powder adulterated in the fish meal according to claim 1, wherein the method comprises the following steps of utilizing the spectrum correction data corresponding to the pure sample and the spectrum correction data corresponding to the adulterated sample in the spectrum correction data set, and constructing an animal source protein powder classification model by adopting a machine learning identification algorithm:
step S31: selecting the spectrum correction data corresponding to the pure sample and the spectrum correction data corresponding to the adulterated sample from the spectrum correction data set, simultaneously obtaining the actual classification of the pure sample and the adulterated sample, and dividing according to a first set proportion to obtain a first training set;
step S32: respectively screening characteristic wavelengths of the pure sample and the adulterated sample by adopting a continuous projection algorithm;
step S33: and selecting and utilizing the spectrum correction data corresponding to the characteristic wavelength and the actual classification of the sample corresponding to each spectrum correction data from the first training set, and performing three-classification modeling by adopting a machine learning identification algorithm to obtain an animal source protein powder classification model.
6. The method for identifying and detecting the content of the animal-derived protein powder mixed with the fish meal as claimed in claim 5, wherein when the mixed sample is feather meal, the animal-derived protein powder classification model is selected as a feather meal classification model, and when the feather meal classification model is established, the penalty factor C is 1 x 104Taking 10 as a hyper-parameter gamma of a radial basis function RBF, and taking the value of the segmentation number n of cross validation as 10; when the adulterant is fish steak powder, the animal source protein powder classification model is selected as a fish steak powder classification model, and when the fish steak powder classification model is established, the punishment factor C is 1 multiplied by 105Taking the hyper-parameter gamma of the radial basis function RBF as 10 and crossingThe verified number of splits n takes the value 10.
7. The method for identifying and detecting the content of the animal-derived protein powder adulterated in the fish meal as claimed in claim 1, wherein when the adulterant is feather meal, the adulteration content detection model is selected as a feather meal content detection model, a penalty factor C is 1000 when the feather meal content detection model is established, a hyperparameter gamma of an RBF is 0.005, and a hyperparameter epsilon is 0.1; when the adulterants are fish steak powder, the adulterant content detection model is selected as a fish steak powder content detection model, and when the fish steak powder content detection model is established, a punishment factor C is 5600, a hyper-parameter gamma of RBF is 0.01, and a hyper-parameter epsilon is 0.1.
8. A system for identifying and detecting the content of animal source protein powder adulterated in fish meal is characterized by comprising the following components:
the hyperspectral image acquisition module is used for acquiring hyperspectral images corresponding to the three samples in the first set spectral range by using a hyperspectral imager; the three samples comprise a pure sample, an adulterated sample and a sample to be detected;
the preprocessing module is used for respectively preprocessing the hyperspectral images corresponding to the three samples to obtain a spectrum correction data set; the spectrum correction data set comprises spectrum correction data corresponding to three samples;
the animal source protein powder classification model building module is used for building an animal source protein powder classification model by using the spectrum correction data corresponding to the pure sample and the spectrum correction data corresponding to the adulterated sample in the spectrum correction data set and by adopting a machine learning identification algorithm;
the classification module is used for inputting the spectral correction data corresponding to the sample to be detected into the animal source protein powder classification model for classification to obtain a classification result; the classification result is fish meal, feather meal-fish meal mixture, fish steak meal or fish steak meal-fish meal mixture;
the adulteration content detection model building module is used for building an adulteration content detection model by utilizing the spectral correction data corresponding to the adulteration samples in the spectral correction data set and adopting a machine learning identification algorithm;
and the content detection module is used for inputting the spectral correction data corresponding to the sample to be detected into the adulteration content detection model for content detection when the classification result is the feather meal-fish meal mixture or the fish steak meal-fish meal mixture, so as to obtain a feather meal adulteration predicted value or a fish steak meal adulteration predicted value.
9. The system for identifying and detecting the content of the animal-derived protein powder mixed in the fish meal as claimed in claim 8, wherein when the mixed sample is feather meal, the animal-derived protein powder classification model is selected as a feather meal classification model, and when the feather meal classification model is established, the penalty factor C is 1 x 104Taking 10 as a hyper-parameter gamma of a radial basis function RBF, and taking the value of the segmentation number n of cross validation as 10; when the adulterant is fish steak powder, the animal source protein powder classification model is selected as a fish steak powder classification model, and when the fish steak powder classification model is established, the punishment factor C is 1 multiplied by 105And taking 10 as the hyper-parameter gamma of the radial basis function RBF, and taking 10 as the segmentation number n of the cross validation.
10. The system for identifying and detecting the content of the animal-derived protein powder adulterated in the fish meal as claimed in claim 8, wherein when the adulterants are feather meal, the adulteration content detection model is selected as a feather meal content detection model, a penalty factor C is 1000 when the feather meal content detection model is established, a hyperparameter gamma of an RBF is 0.005, and a hyperparameter epsilon is 0.1; when the adulterants are fish steak powder, the adulterant content detection model is selected as a fish steak powder content detection model, and when the fish steak powder content detection model is established, a punishment factor C is 5600, a hyper-parameter gamma of RBF is 0.01, and a hyper-parameter epsilon is 0.1.
CN202110981043.2A 2021-08-25 2021-08-25 Method and system for identifying and detecting content of animal source protein powder doped in fish meal Pending CN113588596A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110981043.2A CN113588596A (en) 2021-08-25 2021-08-25 Method and system for identifying and detecting content of animal source protein powder doped in fish meal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110981043.2A CN113588596A (en) 2021-08-25 2021-08-25 Method and system for identifying and detecting content of animal source protein powder doped in fish meal

Publications (1)

Publication Number Publication Date
CN113588596A true CN113588596A (en) 2021-11-02

Family

ID=78239734

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110981043.2A Pending CN113588596A (en) 2021-08-25 2021-08-25 Method and system for identifying and detecting content of animal source protein powder doped in fish meal

Country Status (1)

Country Link
CN (1) CN113588596A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113959961A (en) * 2021-12-22 2022-01-21 广东省农业科学院动物科学研究所 Hyperspectral image-based tannin additive anti-counterfeiting detection method and system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105931223A (en) * 2016-04-13 2016-09-07 浙江大学 Band ratio method based maize embryo segmentation method in high-spectral reflection image
WO2020130947A1 (en) * 2018-12-21 2020-06-25 Wilmar International Limited Method and system for predicting quantitative measures of oil adulteration of an edible oil sample
CN111401794A (en) * 2020-04-24 2020-07-10 江苏傲农生物科技有限公司 Feed quality control method based on near infrared spectrum
CN112036432A (en) * 2020-07-03 2020-12-04 桂林理工大学 Spectral modeling sample set rapid partitioning method based on tabu optimization
CN113239816A (en) * 2021-05-17 2021-08-10 华中农业大学 Fish meal adulteration identification method based on microscopic image

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105931223A (en) * 2016-04-13 2016-09-07 浙江大学 Band ratio method based maize embryo segmentation method in high-spectral reflection image
WO2020130947A1 (en) * 2018-12-21 2020-06-25 Wilmar International Limited Method and system for predicting quantitative measures of oil adulteration of an edible oil sample
CN111401794A (en) * 2020-04-24 2020-07-10 江苏傲农生物科技有限公司 Feed quality control method based on near infrared spectrum
CN112036432A (en) * 2020-07-03 2020-12-04 桂林理工大学 Spectral modeling sample set rapid partitioning method based on tabu optimization
CN113239816A (en) * 2021-05-17 2021-08-10 华中农业大学 Fish meal adulteration identification method based on microscopic image

Non-Patent Citations (7)

* Cited by examiner, † Cited by third party
Title
付苗苗: ""基于近红外光谱和高光谱图像技术的配合饲料主要营养成分的检测方法"", 《中国优秀硕士学位论文全文数据库 农业科技辑》 *
刘平: ""基于近红外和高光谱检测鸡蛋粉掺假的研究"", 《中国优秀硕士学位论文全文数据库 工程科技I辑》 *
张优优等: ""区间偏最小二乘结合差分进化算法应用于鱼粉近红外光谱波长筛选"", 《分析测试学报》 *
李爱科主编: "《中国蛋白质饲料资源》", 31 January 2013, 中国农业大学出版社 *
杨磊主编: "《数字媒体技术概要》", 31 July 2017 *
汪懋华等主编: "《现代精细农业理论与实践》", 31 October 2012, 中国农业大学出版社 *
郭培源等编著: "《光电检测技术与应用》", 30 June 2015 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113959961A (en) * 2021-12-22 2022-01-21 广东省农业科学院动物科学研究所 Hyperspectral image-based tannin additive anti-counterfeiting detection method and system

Similar Documents

Publication Publication Date Title
Xu et al. Comparison of hyperspectral imaging and computer vision for automatic differentiation of organically and conventionally farmed salmon
Li et al. Evaluating green tea quality based on multisensor data fusion combining hyperspectral imaging and olfactory visualization systems
Haidar et al. Image-based date fruit classification
Sun et al. A method for rapid identification of rice origin by hyperspectral imaging technology
Dissing et al. Multispectral imaging for determination of astaxanthin concentration in salmonids
Jiang et al. Integration of spectral and textural features of visible and near-infrared hyperspectral imaging for differentiating between normal and white striping broiler breast meat
Zhang et al. Non-destructive determination of fat and moisture contents in Salmon (Salmo salar) fillets using near-infrared hyperspectral imaging coupled with spectral and textural features
Donis-González et al. Assessment of chestnut (Castanea spp.) slice quality using color images
Luo et al. Classification of weed seeds based on visual images and deep learning
Liu et al. Fusion of electronic nose and hyperspectral imaging for mutton freshness detection using input-modified convolution neural network
Muñoz et al. Computer image analysis as a tool for classifying marbling: A case study in dry-cured ham
Zhang et al. Comparison of spectral and image morphological analysis for egg early hatching property detection based on hyperspectral imaging
CN109883967B (en) Eriocheir sinensis quality grade discrimination method based on information fusion
Kong et al. Rapid and nondestructive detection of marine fishmeal adulteration by hyperspectral imaging and machine learning
Cruz-Tirado et al. Determination of protein content in single black fly soldier (Hermetia illucens L.) larvae by near infrared hyperspectral imaging (NIR-HSI) and chemometrics
Cernadas et al. Automatic marbling prediction of sliced dry-cured ham using image segmentation, texture analysis and regression
CN113588596A (en) Method and system for identifying and detecting content of animal source protein powder doped in fish meal
Wang et al. Application of hybrid image features for fast and non-invasive classification of raisin
Priyatno et al. Combination of extraction features based on texture and colour feature for beef and pork classification
Feng et al. Detection of blood spots in eggs by hyperspectral transmittance imaging
Sun et al. Nondestructive identification of soybean protein in minced chicken meat based on hyperspectral imaging and VGG16-SVM
Al-Shekaili et al. Computer vision technique to classify dates based on hardness.
Valous et al. Quality evaluation of meat cuts
Xu Electronic eye for food sensory evaluation
Saberioon et al. Spectral imaging application to discriminate different diets of live rainbow trout (Oncorhynchus mykiss)

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination