Pork intramuscular fat content portable determination method and device

Through the combination of portable measurement methods and deep learning networks, feature bands are screened, multi-modal images are taken and information fusion is carried out, which solves the problems of cumbersome and low accuracy of the existing methods for measuring fat content in pork in muscles, and achieves a fast, accurate and portable measurement effect.

CN119715383APending Publication Date: 2025-03-28HUAZHONG AGRI UNIV +1
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202411954845.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-27
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

The existing methods for measuring intramuscular fat content of pork are complicated, expensive equipment, low spectral accuracy and difficult to build models, making it difficult to achieve fast, accurate and portable measurements.

Method used

By using a portable measurement method, by screening characteristic bands related to pork fat content, selecting lamp panels made of narrowband LEDs and white LEDs, taking RGB images, black and white images and multispectral images, combining semantic segmentation models and deep learning networks (CNN-MLPs), the fusion of multimodal information and the extraction of spectral reflectivity are achieved.

Benefits of technology

It improves multi-spectral accuracy, simplifies the measurement process, reduces costs, enhances the applicability of the model, and achieves a fast, accurate and portable pork fat content measurement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119715383A_ABST
    Figure CN119715383A_ABST
Patent Text Reader

Abstract

The invention belongs to the field of agricultural automation and intelligent equipment, and discloses a portable measuring method and device for pork intramuscular fat content. By screening the characteristic wave bands related to the fat content and selecting the corresponding narrow-band LEDs, the accuracy and effectiveness of the multispectral image are improved. And meanwhile, through multi-modal image fusion analysis, in combination with the RGB image, the black-and-white image and the multi-spectral image, the precision of target segmentation and content prediction is improved. And establishing an end-to-end content prediction model by adopting a mode of combining a CNN and an MLP network. Meanwhile, the FCNN network is used for processing the spectral data, the tedious spectral data preprocessing process is omitted, the advantages of the spectral data and the RGB image are fully played, and a new thought and method are provided for the field of spectral modeling. The technical scheme has the advantages of portability, high efficiency, accuracy and the like, provides powerful support for pork nutrition evaluation, and can provide reference for determination of the fat content of other livestock and poultry meat.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to but is not limited to the field of agricultural automation and intelligent equipment, and specifically relates to a portable method and device for determining the intramuscular fat content of pork. Background Art

[0002] The determination of intramuscular fat content is mainly divided into chemical diagnosis and optical methods. The optical method is mainly based on the establishment of a prediction model based on hyperspectral imaging technology. However, the hyperspectral imaging system is expensive and cumbersome to use, making it difficult to promote and apply.

[0003] Existing multispectral imaging systems are mainly divided into two categories: based on narrowband filters and based on narrowband LEDs. Most multispectral cameras on the market are based on narrowband filters, and their spectral accuracy is much lower than the ±5nm of narrowband LEDs. In addition, multispectral cameras can only collect spectral information in fixed bands, and their collection bands do not completely match the characteristic bands of fat content.

[0004] Spectral modeling requires tedious data preprocessing, including but not limited to data cleaning, standardization, and normalization. Different machine learning models are suitable for different spectral data and prediction tasks, which makes model building complicated and difficult. At the same time, the applicability of the model is often limited by the data itself, which causes the model's predictive ability to change with changes in the data. Summary of the invention

[0005] In view of the problems existing in the prior art of pork intramuscular fat content determination method being cumbersome, equipment being expensive, spectral accuracy being low and model building being difficult, the present invention provides a portable pork fat content determination method and device, which can effectively improve multi-spectral accuracy, simplify the determination process, reduce costs and enhance the applicability of the model, thereby realizing fast, accurate and portable pork fat content determination.

[0006] The present invention is achieved by a portable method for determining the intramuscular fat content of pork, the method comprising:

[0007] S1, screen out the characteristic bands related to pork fat content in advance, select the corresponding narrow-band LEDs based on the characteristic bands, and make a light board with white light LEDs;

[0008] S2, placing the pork block under the light board, and photographing and obtaining an RGB image, a black-and-white image, and a multispectral image of the pork block;

[0009] S3, training a semantic segmentation model for pork chunks, segmenting the outlines of pork chunks in the pork RGB image and the black-and-white image, and obtaining the pork RGB image and the black-and-white image with the background removed;

[0010] S4, using the black and white image obtained in step S3 as a mask, segmenting the pork multispectral image taken in step S2 to obtain a pork multispectral image with the background removed;

[0011] S5, using histogram equalization to process the multispectral image obtained in step S4 to reduce the influence of uneven illumination;

[0012] S6, extracting the spectral reflectance of the multispectral image processed in step S5;

[0013] S7, input the RGB image obtained in step S3 and the spectral reflectance obtained in step S6 into the CNN-MLP network model to obtain the pork fat content.

[0014] Furthermore, the specific steps of selecting the characteristic bands related to pork fat content in S1 are as follows:

[0015] (1) Taking hyperspectral images of pork samples;

[0016] (2) Complete spatial spectral radiation calibration and reflectance conversion;

[0017] (3) Selecting a region of interest and deriving the average reflectance of the region of interest as the spectral reflectance of pork;

[0018] (5) Gaussian smoothing filter (GF) and maximum-minimum normalization (Min-Max) are used to preprocess the spectral reflectance, and a full-spectrum regression model is established in combination with the least squares method;

[0019] (6) The Variance Threshold (VT) and (Least Angle Regression) LARS feature screening method was used in combination with the least squares method to establish a characteristic spectrum regression model, and the characteristic bands related to fat content were selected according to the characteristic scores.

[0020] Furthermore, in S2, the RGB image is taken with a color camera using a white light LED as a light source, the black and white image is taken with a white light LED as a light source, and the multispectral image is taken with a black and white camera using a narrow-band LED as a light source.

[0021] Further, the specific steps of S3 are as follows:

[0022] (1) Select the pork RGB image and black-and-white image taken in step S2 as a training set;

[0023] (2) Manually label the images in the training set, labeling the meat pieces and the background respectively;

[0024] (3) Input the training set images and the corresponding annotation files into the semantic segmentation network for training to obtain a pork semantic segmentation model;

[0025] (4) Use the pork semantic segmentation model to segment the pork RGB image and the black-and-white image taken in step S2 to obtain the pork RGB image and the black-and-white image with the background removed.

[0026] Further, in S7, the RGB image obtained in S3 and the spectral reflectance obtained in step S6 are input into the CNN-MLP network model to obtain the pork fat content. The specific structure of the CNN-MLP network model is as follows:

[0027] S71, inputting the RGB image obtained in step S3 and the spectral reflectance obtained in step S6 into a pre-trained CNN-MLP network;

[0028] S72, after scaling the RGB image to a size of 256×256 pixels, crop an image of a size of 224×224 pixels from the center;

[0029] S73, converting the RGB image into a tensor and performing normalization processing;

[0030] S74, inputting the RGB image processed in step S73 into the CNN network, and outputting an m×1 one-dimensional vector as the RGB image feature;

[0031] S75, inputting the spectral reflectance into the FCNN network and training it synchronously with the CNN network, and outputting an n×1 one-dimensional vector as a multi-spectral feature;

[0032] S76, concatenating the RGB image features with the multispectral features to obtain a one-dimensional vector of (m+n)×1, where (m+n) represents the number of features of the multi-source image;

[0033] S77, input the multi-source image features into the MLP network to obtain the prediction result of the fat content of plant pork.

[0034] Furthermore, the CNN-MLP network is trained in the following way:

[0035] Step S711, selecting the RGB image obtained in step S3 and the spectral reflectance obtained in step S6 as a training set;

[0036] Step S712, for the pork samples corresponding to the training set images, the pork fat content is tested by Soxhlet extraction method, and this is used as a label;

[0037] Step S713, randomly cropping the RGB image and scaling it to a size of 224×224 pixels;

[0038] Step S714, randomly flipping the RGB image obtained in step S713, and then converting it into a tensor and performing normalization processing;

[0039] Step S715, determining the hyperparameters of the CNN-MLP network in step S7, where the MLP network consists of 5 linear layers, 4 batch normalization layers, 4 LeakyReLU activation function layers, and 4 random dropout layers;

[0040] In step S716, using five-fold cross validation, the spectral reflectance selected in step S711, the RGB image processed in step S714, and the label obtained in step S712 are input into the CNN-MLP network for training to obtain a network model for predicting pork fat content.

[0041] Furthermore, the FCNN network described in S75 consists of 3 linear layers, 2 batch normalization layers, 2 LeakyReLU activation function layers and 2 random dropout layers.

[0042] Further, in step S76, m is 1024 and n is 12.

[0043] Furthermore, the CNN network used by the CNN-MLP network model described in step S7 is ShuffleNet V2.

[0044] Another object of the present invention is to provide a portable device for measuring the intramuscular fat content of pork, which adopts the portable method for measuring the fat content of pork to measure the fat content of pork. The portable device includes a light source module, an image acquisition module, a main control unit, a PC and a stage; wherein the light source module is a light board made of narrow-band LED and white light LED, the image acquisition module includes a black and white camera and a color camera, the main control unit is used to control the lighting of LED lamp beads, and interact with the PC to realize RGB image, black and white image and multi-spectral image acquisition, and the PC is used to process RGB images, black and white images, multi-spectral images and predict fat content.

[0045] In combination with the above technical solutions and the technical problems solved, the advantages and positive effects of the technical solutions to be protected by the present invention are as follows:

[0046] First, (1) in the prior art, most multispectral cameras use narrow-band filters to collect spectra. Such filters are usually pre-set and have a fixed spectral transmission range, so they cannot be freely selected according to different needs. In contrast, in step S1, characteristic bands related to pork fat content are screened in advance, and these characteristic bands are used to select corresponding narrow-band LEDs for acquiring multispectral images. This method not only improves the accuracy of spectral acquisition, but also realizes the free selection of spectral bands, and is more flexible and adaptable.

[0047] (2) In the prior art, when performing spectral analysis, usually only spectral images are used for analysis without integrating other information. In contrast, in step S2, RGB images, black-and-white images, and multispectral images of pork are simultaneously captured to achieve multimodal image fusion analysis. By combining image information of multiple modalities, the model can capture the characteristics of the target more comprehensively, thereby achieving a more accurate and reliable prediction of pork intramuscular fat content. In step S4, the multispectral image is segmented by using the black-and-white image as a mask, so that the segmentation of pork and background can be achieved more accurately.

[0048] (3) When building a multi-source image prediction model, the existing technology usually ignores the synchronous training of images from different sources and directly uses one party's information for prediction. This approach ignores the intrinsic connection and synergy between different image information, thereby affecting the accuracy and generalization ability of the model prediction. In step S7, the multispectral reflectance is input into the FCNN network, and the RGB image is input into the CNN network. The two networks are trained synchronously, which not only makes full use of the spectral information, but also saves the spectral data preprocessing process. In addition, the method also uses the RGB image as an auxiliary information and organically combines it with the spectral data, thereby giving full play to the respective advantages of spectral data and RGB images, and effectively making up for their shortcomings. By synchronously training the two networks, it can be ensured that the information between images from different sources can verify and complement each other, thereby improving the accuracy and robustness of the prediction model. In step S7, MLP network regression is used, which has a simple structure, is easy to understand and implement; has strong representation ability, can handle complex regression problems; and performs well for small-scale data sets. The CNN network, FCNN network and MLP network are integrated together to construct an end-to-end model for content prediction.

[0049] Second, the technical solution of the present invention fills the technical gap in the industry at home and abroad:

[0050] The prior art often builds a machine learning model based on single spectral data when building a multi-spectral portable acquisition device, ignoring the help of image features in modeling. The present invention uses the FCNN model to extract spectral features and the CNN network to extract image features, and then outputs the fat content prediction results through the MLP network after splicing, and establishes a graph fusion feature model based on deep learning. With sufficient data support, the deep learning model used in the present invention can achieve better results.

[0051] Third, the existing technical problems solved by the technical solution of the present invention in industrial applications are:

[0052] 1. The detection method is complicated and time-consuming

[0053] Existing methods for detecting pork fat content usually rely on chemical analysis (such as Soxhlet extraction) or near-infrared spectroscopy. These methods are complex, time-consuming, and require destructive sampling, which makes it difficult to meet the industry's demand for rapid and non-destructive testing.

[0054] 2. Spectral data acquisition is significantly affected by ambient light

[0055] Traditional spectral detection methods are easily affected by changes in ambient light, resulting in unstable detection results, and their application is particularly limited in non-laboratory environments.

[0056] 3. Lack of accurate identification of sample boundaries

[0057] Traditional methods cannot accurately separate pork samples from the background, resulting in background noise being mixed into the collected data, thereby reducing detection accuracy.

[0058] 4. Insufficient multimodal information fusion

[0059] Existing technologies usually rely only on a single data source (such as spectral data or image data) for analysis, ignoring the joint use of multimodal information (such as image color, texture, and spectral reflectance), thereby reducing the accuracy of the model's prediction of fat content.

[0060] Significant technical advancements of the present invention:

[0061] 1. Realize portable, fast and non-destructive testing

[0062] The present invention combines multispectral imaging technology and deep learning models to achieve rapid and non-destructive detection of pork fat content. No destructive sampling is required, which greatly improves the detection efficiency and is suitable for wide application in industrial scenarios such as slaughterhouses and meat processing plants.

[0063] 2. Accurately segment the sample area to reduce background interference

[0064] The semantic segmentation model was used to accurately identify the contours of pork samples and remove background noise through masks. This process effectively improved data quality and ensured the reliability of multispectral data and image data.

[0065] 3. Enhance environmental adaptability and improve detection stability

[0066] The illumination of multispectral images is homogenized by using the histogram equalization method, which significantly reduces the impact of ambient light changes on the detection results and ensures that the system can operate stably under different lighting conditions.

[0067] 4. Multimodal data fusion to improve detection accuracy

[0068] The texture and color features of RGB images are combined with the multispectral reflectance features, and the CNN-MLP network model is used for data fusion analysis. Compared with a single data source, the fusion model can more comprehensively characterize the characteristics of pork fat content and significantly improve the prediction accuracy.

[0069] 5. Strong adaptability and support for industrial applications

[0070] The present invention adopts portable equipment and intelligent algorithm design, which can adapt to complex industrial application scenarios, such as pork quality grading, supply chain management and other fields, greatly improving detection efficiency and cost-effectiveness.

[0071] The present invention solves the problems in the prior art such as complex detection methods, great environmental influences, low segmentation accuracy, and insufficient single data source, and significantly improves the accuracy, efficiency, and convenience of pork fat content detection, and has broad industrial application prospects and economic benefits. BRIEF DESCRIPTION OF THE DRAWINGS

[0072] Figure 1 is a flow chart of a portable method for determining pork fat content provided by an embodiment of the present invention;

[0073] Figure 2 It is a specific structural flow chart of the CNN-MLP network model provided by an embodiment of the present invention;

[0074] Figure 3 is a flow chart of the training method adopted by the CNN-MLP network provided in an embodiment of the present invention;

[0075] Figure 4 It is a fitting diagram of a characteristic spectrum model of pork fat content based on machine learning provided by an embodiment of the present invention;

[0076] Figure 5 It is a fitting diagram of a pork fat content atlas fusion model based on a CNN-MLP network provided in an embodiment of the present invention;

[0077] Figure 6 This is a schematic diagram of a portable device for measuring pork fat content provided by an embodiment of the present invention;

[0078] In the figure: 1. light source module; 2. main control unit; 3. PC terminal; 4. image acquisition module 1; 5. image acquisition module 2; 6. stage. DETAILED DESCRIPTION

[0079] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0080] The embodiment of the present invention provides a portable method for determining the intramuscular fat content of pork, the method comprising:

[0081] S1, screen out the characteristic bands related to pork fat content in advance, select the corresponding narrow-band LEDs based on the characteristic bands, and make a light board with white light LEDs;

[0082] S2, placing the pork block under the light board, and photographing and obtaining an RGB image, a black-and-white image, and a multispectral image of the pork block;

[0083] S3, training a semantic segmentation model for pork chunks, segmenting the outlines of pork chunks in the pork RGB image and the black-and-white image, and obtaining the pork RGB image and the black-and-white image with the background removed;

[0084] S4, using the black and white image obtained in step S3 as a mask, segmenting the pork multispectral image taken in step S2 to obtain a pork multispectral image with the background removed;

[0085] S5, using histogram equalization to process the multispectral image obtained in step S4 to reduce the influence of uneven illumination;

[0086] S6, extracting the spectral reflectance of the multispectral image processed in step S5;

[0087] S7, input the RGB image obtained in step S3 and the spectral reflectance obtained in step S6 into the CNN-MLP network model to obtain the pork fat content.

[0088] This method screens the characteristic spectral bands related to pork fat content in advance, determines the narrowband band that best characterizes fat content, selects a matching narrowband LED lamp, and adds white light LEDs to form a hybrid light board. This design ensures that the light board can specifically stimulate the spectral reflectance characteristics of pork samples in the band related to fat content, providing high-precision light source support for subsequent multi-spectral data acquisition.

[0089] The pork block was placed under the light board, and the image sensor was used to simultaneously capture RGB images, black-and-white images, and multispectral images. Subsequently, the semantic segmentation model was used to analyze the RGB images and black-and-white images, accurately identify and remove background interference, and extract the contour information of the meat block. The extracted black-and-white image was used as a mask for the segmentation operation of the multispectral image, thereby obtaining a multispectral image of pork with the background removed. This process effectively eliminated the background noise in the multispectral data, laying the foundation for the subsequent calculation of fat content.

[0090] In order to eliminate the influence of uneven ambient lighting, the segmented multispectral image is processed with histogram equalization to enhance the image contrast and unify the spectral characteristics. Then, the spectral reflectance of the multispectral image in the characteristic band is extracted as the core parameter of quantitative analysis. The accurate extraction of spectral reflectance ensures the stability and reliability of fat content calculation.

[0091] The spectral reflectance features of RGB images and multispectral images are input into the deep learning CNN-MLP (convolutional neural network-multilayer perceptron) model, and CNN is used to extract the texture and color features of the RGB image. At the same time, MLP is combined to perform high-dimensional feature modeling on the spectral reflectance data. The model integrates visual and spectral information, and accurately predicts the fat content of pork based on the relationship learned from the training set. This method breaks through the limitations of traditional detection methods and realizes portable, efficient, and non-destructive fat content determination.

[0092] The specific steps for selecting the characteristic bands related to pork fat content in S1 are as follows:

[0093] (1) Taking hyperspectral images of pork samples;

[0094] (2) Complete spatial spectral radiation calibration and reflectance conversion;

[0095] (3) Selecting a region of interest and deriving the average reflectance of the region of interest as the spectral reflectance of pork;

[0096] (4) The pork reflectance was preprocessed by Gaussian smoothing filtering and maximum and minimum normalization, and a full-spectrum regression model was established in combination with the least squares method;

[0097] (5) The Variance Threshold (VT) and (Least Angle Regression) LARS feature screening method was combined with the least squares method to establish a characteristic spectrum regression model, and the characteristic bands related to fat content were screened out according to the characteristic scores.

[0098] In S2, the RGB image uses a white light LED as a light source and is taken with a color camera, the black and white image uses a white light LED as a light source and is taken with a black and white camera, and the multispectral image uses a narrow-band LED as a light source and is taken with a black and white camera.

[0099] The specific steps of S3 are as follows:

[0100] (1) Select the pork RGB image and black-and-white image taken in step S2 as a training set;

[0101] (2) Manually label the images in the training set, labeling the meat pieces and the background respectively;

[0102] (3) Input the training set images and the corresponding annotation files into the semantic segmentation network for training to obtain a pork semantic segmentation model;

[0103] (4) Use the pork semantic segmentation model to segment the pork RGB image and the black-and-white image taken in step S2 to obtain the pork RGB image and the black-and-white image with the background removed.

[0104] like Figure 2 As shown, the specific structure of the CNN-MLP network model is as follows:

[0105] S71, inputting the RGB image obtained in step S3 and the spectral reflectance obtained in step S6 into a pre-trained CNN-MLP network;

[0106] S72, after scaling the RGB image to a size of 256×256 pixels, crop an image of a size of 224×224 pixels from the center;

[0107] S73, converting the RGB image into a tensor and performing normalization processing;

[0108] S74, inputting the RGB image processed in step S73 into the CNN network, and outputting an m×1 one-dimensional vector as the RGB image feature;

[0109] S75, inputting the spectral reflectance into the FCNN network and training it synchronously with the CNN network, and outputting an n×1 one-dimensional vector as a multi-spectral feature;

[0110] S76, concatenating the RGB image features with the multispectral features to obtain a one-dimensional vector of (m+n)×1, where (m+n) represents the number of features of the multi-source image;

[0111] S77, input the multi-source image features into the MLP network to obtain the prediction result of the fat content of plant pork.

[0112] like Figure 3 As shown, in step S7, the RGB image obtained in step S3 and the spectral reflectance obtained in step S6 are input into a pre-trained CNN-MLP network, and the CNN-MLP network is trained in the following manner:

[0113] Step S711, selecting the RGB image obtained in step S3 and the spectral reflectance obtained in step S6 as a training set;

[0114] Step S712, for the pork samples corresponding to the training set images, the pork fat content is tested by Soxhlet extraction method, and this is used as a label;

[0115] Step S713, randomly cropping the RGB image and scaling it to a size of 224×224 pixels;

[0116] Step S714, randomly flipping the RGB image obtained in step S713, and then converting it into a tensor and performing normalization processing;

[0117] Step S715, determining the hyperparameters of the CNN-MLP network in step S7, where the MLP network consists of 5 linear layers, 4 batch normalization layers, 4 LeakyReLU activation function layers, and 4 random dropout layers;

[0118] In step S716, using five-fold cross validation, the spectral reflectance selected in step S711, the RGB image processed in step S714, and the label obtained in step S712 are input into the CNN-MLP network for training to obtain a network model for predicting pork fat content.

[0119] The FCNN network described in S75 consists of 3 linear layers, 2 batch normalization layers, 2 LeakyReLU activation function layers and 2 random loss layers.

[0120] In step S76, m is 1024 and n is 12.

[0121] The CNN network used by the CNN-MLP network model described in step S7 is ShuffleNetV2.

[0122] An embodiment of the present invention provides a portable device for measuring the intramuscular fat content of pork, which uses the portable method for measuring the fat content of pork to measure the fat content of pork. The portable device includes a light source module 1, image acquisition modules 4 and 5, a main control unit 2, a PC terminal 3 and a stage 6; wherein the light source module is a light board made of narrow-band LEDs and white light LEDs, the image acquisition module includes a black and white camera and a color camera, the main control unit is used to control the lighting of LED lamp beads, and interact with the PC terminal to realize RGB image, black and white image and multi-spectral image acquisition, and the PC terminal is used to process RGB images, black and white images, multi-spectral images and predict fat content.

[0123] The present invention provides a portable device for measuring pork intramuscular fat content, specifically, as Figure 2 As shown, the device includes a light source module 1, a main control unit 2, a PC terminal 3, and image acquisition modules 4 and 5.

[0124] The main control unit 2 is composed of a single-chip microcomputer, a relay, and a constant current source, and is used to control the lighting of the LED lamp beads, and interact with the PC terminal 3 to realize the acquisition of RGB images, black and white images, and multi-spectral images;

[0125] The PC terminal 3 is a laptop computer, which is used to process the RGB image, black and white image, and multi-spectral image taken by the image acquisition module 1 and predict the starch content;

[0126] The image acquisition module is composed of a black and white camera 4 and a color camera 5, and stores the acquired images in the PC terminal 3.

[0127] The portable method and device for determining the intramuscular fat content of pork according to the embodiment of the present invention specifically include the following steps:

[0128] (1) Taking hyperspectral images of pork chunks;

[0129] (2) Combining the VT and LARS feature screening methods, the feature scores were obtained and the characteristic bands related to pork fat content were screened out, which were 430nm, 480nm, 555nm, 750nm, 770nm, 820nm, 840nm, 875nm, 885nm, 900nm, 920nm, and 1000nm;

[0130] (3) Establish a machine learning prediction model for pork fat content based on the selected characteristic bands related to pork fat content 2 =0.8535, RMSE = 0.3759. The fitting effect is as follows Figure 4 shown.

[0131] (4) A CNN-MLP deep learning prediction model for pork fat content was established based on the selected characteristic bands related to pork fat content and image features. The model effect was R 2 =0.9218, RMSE = 0.0107, the fitting effect is as follows Figure 5 shown.

[0132] (3) Produce a portable measurement device based on the selected characteristic bands related to pork fat content;

[0133] (4) Using a portable measuring device to capture RGB images, black and white images, and multispectral images of pork;

[0134] (5) segmenting the RGB image and the black-and-white image of pork to obtain the RGB image and the black-and-white image of pork with the background removed;

[0135] (6) using the pork black-and-white image with the background removed as a mask to segment the pork multispectral image to obtain the pork multispectral image with the background removed;

[0136] (7) Processing the pork multispectral image using histogram equalization and extracting the spectral reflectance of the pork multispectral image;

[0137] (8) The pork RGB image and spectral reflectance were input into the CNN-MLP network model, and the pork intramuscular fat content tested by Soxhlet extraction was used as the standard physical and chemical value.

[0138] It should be noted that the embodiments of the present invention can be implemented by hardware, software, or a combination of software and hardware. The hardware part can be implemented using dedicated logic; the software part can be stored in a memory and executed by an appropriate instruction execution system, such as a microprocessor or dedicated design hardware. It can be understood by a person of ordinary skill in the art that the above-mentioned devices and methods can be implemented using computer executable instructions and / or contained in a processor control code, such as a carrier medium such as a disk, CD or DVD-ROM, a programmable memory such as a read-only memory (firmware), or a data carrier such as an optical or electronic signal carrier. Such code is provided on the carrier medium. The device and its modules of the present invention can be implemented by hardware circuits such as very large-scale integrated circuits or gate arrays, semiconductors such as logic chips, transistors, etc., or programmable hardware devices such as field programmable gate arrays, programmable logic devices, etc., can also be implemented by software executed by various types of processors, and can also be implemented by a combination of the above-mentioned hardware circuits and software, such as firmware.

[0139] The above description is only a specific implementation mode of the present invention, but the protection scope of the present invention is not limited thereto. Any modifications, equivalent substitutions and improvements made by any technician familiar with the technical field within the technical scope disclosed by the present invention and within the spirit and principle of the present invention should be covered by the protection scope of the present invention.

Claims

1. A portable method for determining pork intramuscular fat content, characterized in that: The method includes: S1, screen out the characteristic bands related to pork fat content in advance, select the corresponding narrow-band LEDs based on the characteristic bands, and make a light board with white light LEDs; S2, placing the pork block under the light board, and photographing and obtaining an RGB image, a black-and-white image, and a multispectral image of the pork block; S3, training a semantic segmentation model for pork chunks, segmenting the outlines of pork chunks in the pork RGB image and the black-and-white image, and obtaining the pork RGB image and the black-and-white image with the background removed; S4, using the black and white image obtained in step S3 as a mask, segmenting the pork multispectral image taken in step S2 to obtain a pork multispectral image with the background removed; S5, using histogram equalization to process the multispectral image obtained in step S4 to reduce the influence of uneven illumination; S6, extracting the spectral reflectance of the multispectral image processed in step S5; S7, input the RGB image obtained in step S3 and the spectral reflectance obtained in step S6 into the CNN-MLP network model to obtain the pork fat content.

2. The portable method for determining the intramuscular fat content of pork according to claim 1, characterized in that: The specific steps for selecting the characteristic bands related to pork fat content in S1 are as follows: S11, taking hyperspectral images of pork samples; S12, complete spatial spectrum radiation calibration and reflectance conversion; S13, selecting a region of interest and deriving an average reflectance of the region of interest as pork reflectance; S14, the pork reflectance is subjected to Gaussian smoothing filtering and maximum and minimum normalization; S15, using Variance Threshold (VT) and (Least Angle Regression) LARS combined with the least squares method to establish a regression model, and screen out the characteristic bands related to fat content according to the characteristic scores.

3. The portable method for determining the intramuscular fat content of pork according to claim 1, characterized in that: In S2, the RGB image uses a white light LED as a light source and is taken with a color camera, the black and white image uses a white light LED as a light source and is taken with a black and white camera, and the multispectral image uses a narrow-band LED as a light source and is taken with a black and white camera.

4. The portable method for determining the intramuscular fat content of pork according to claim 1, characterized in that: The specific steps of S3 are as follows: (1) Select the pork RGB image and black-and-white image taken in step S2 as a training set; (2) Manually label the images in the training set, labeling the meat pieces and the background respectively; (3) Input the training set images and the corresponding annotation files into the semantic segmentation network for training to obtain a pork semantic segmentation model; (4) Use the pork semantic segmentation model to segment the pork RGB image and the black-and-white image taken in step S2 to obtain the pork RGB image and the black-and-white image with the background removed.

5. A portable method for determining pork intramuscular fat content according to claim 1, characterized in that: In step S7, the RGB image obtained in step S3 and the spectral reflectance obtained in step S6 are input into the CNN-MLP network model to obtain the pork fat content. The specific structure of the CNN-MLP network model is as follows: S71, inputting the RGB image obtained in step S3 and the spectral reflectance obtained in step S6 into a pre-trained CNN-MLP network; S72, after scaling the RGB image to a size of 256×256 pixels, crop an image of a size of 224×224 pixels from the center; S73, converting the RGB image into a tensor and performing normalization processing; S74, inputting the RGB image processed in step S73 into the CNN network, and outputting an m×1 one-dimensional vector as the RGB image feature; S75, inputting the spectral reflectance into the FCNN network and training it synchronously with the CNN network, and outputting an n×1 one-dimensional vector as a multi-spectral feature; S76, concatenating the RGB image features with the multispectral features to obtain a one-dimensional vector of (m+n)×1, where (m+n) represents the number of features of the multi-source image; S77, input the multi-source image features into the MLP network to obtain the prediction result of the fat content of plant pork.

6. The portable method for determining pork intramuscular fat content according to claim 5, characterized in that: The CNN-MLP network is trained in the following way: Step S711, selecting the RGB image obtained in step S3 and the spectral reflectance obtained in step S6 as a training set; Step S712, for the pork samples corresponding to the training set images, the pork fat content is tested by Soxhlet extraction method, and this is used as a label; Step S713, randomly cropping the RGB image and scaling it to a size of 224×224 pixels; Step S714, randomly flipping the RGB image obtained in step S713, and then converting it into a tensor and performing normalization processing; Step S715, determining the hyperparameters of the CNN-MLP network in step S7, where the MLP network consists of 5 linear layers, 4 batch normalization layers, 4 LeakyReLU activation function layers, and 4 random dropout layers; In step S716, using five-fold cross validation, the spectral reflectance selected in step S711, the RGB image processed in step S714, and the label obtained in step S712 are input into the CNN-MLP network for training to obtain a network model for predicting pork fat content.

7. The portable method for determining pork fat content according to claim 5, characterized in that: The FCNN network described in S75 consists of 3 linear layers, 2 batch normalization layers, 2 LeakyReLU activation function layers and 2 random loss layers.

8. The portable method for determining pork content according to claim 5, characterized in that: In step S76, m is 1024 and n is 12.

9. The portable method for determining pork intramuscular fat content according to claim 1, characterized in that: The CNN network used by the CNN-MLP network model described in step S7 is ShuffleNetV2.

10. A portable device for measuring pork intramuscular fat content, which uses the portable method for measuring pork fat content according to claims 1 to 9 to measure pork fat content, characterized in that: The portable measuring device includes a light source module, an image acquisition module, a main control unit and a PC; wherein the light source module is a light board made of narrow-band LED and white light LED, the image acquisition module includes a black and white camera and a color camera, the main control unit is used to control the lighting of LED lamp beads, and interact with the PC to realize RGB image, black and white image and multi-spectral image acquisition, and the PC is used to process RGB images, black and white images, multi-spectral images and predict fat content.

Citation Information

Cited By

  • Pork quality index accurate determination method and system based on multi-modal spectrum fusion

    CN120446045A

  • Pork quality index precision determination method and system based on multi-modal spectral fusion

    CN120446045B

  • AI algorithm-based full-appearance visual detection method and system for energy storage socket

    CN120629205A

  • An AI algorithm-based energy storage socket full appearance visual detection method and system

    CN120629205B