A method for predicting pork water retention based on magnetic resonance imaging technology

Through the method based on magnetic resonance imaging technology, a prediction model for water retention of pork is constructed, which solves the problem of cumbersome and time-consuming operation of traditional methods, and achieves rapid and accurate detection of water retention of pork, with higher correlation coefficients and lower root mean square error.

CN119470534BActive Publication Date: 2025-05-06INST OF QUALITY STANDARD & TESTING TECH FOR AGRO PROD OF CAAS
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411544542.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-31
Publication Date
2025-05-06
Estimated Expiration
2044-10-31

AI Technical Summary

Technical Problem

Traditional methods are used to evaluate the water retention of pork, which are complicated and time-consuming, and are difficult to adapt to the needs of modern meat processing and quality control.

Method used

Using a method based on magnetic resonance imaging technology, pork samples were processed through freeze-thaw cycles, T2 weighted images were collected, image feature values ​​were extracted, and a regression prediction model was constructed in MATLAB software to predict the water retention of pork.

Benefits of technology

The rapid and accurate detection of pork water retention is achieved, and a scientific solution is provided. The R2 values ​​of the correction set and verification set of the PLSR model are 0.9634 and 0.9656, respectively, and the RMSEC and RMSEP are 1.0026 and 1.1119, respectively, showing higher correlation coefficients and lower root mean square error.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119470534B_ABST
    Figure CN119470534B_ABST
Patent Text Reader

Abstract

The present invention relates to a method for constructing a prediction model of water holding capacity of pork based on magnetic resonance imaging technology, comprising the following steps: (1) sample preparation; (2) acquisition of T2-weighted images of samples; (3) determination of water holding capacity parameters of samples; (4) data import; (5) model construction and evaluation. Based on MRI technology, the present invention takes fresh pork and frozen-thawed pork as research objects, collects T2-weighted images of them, then extracts feature data from the key information in the images, and respectively establishes a prediction model of water holding capacity of pork by using principal component regression analysis (PCR) and partial least squares regression method (PLSR), providing a scientific solution for realizing rapid and accurate detection of water holding capacity of pork.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of food detection, and in particular to a method for predicting the water retention capacity of pork based on magnetic resonance imaging technology. Background Art

[0002] Pork is an important meat ingredient on people's tables, and the evaluation and control of its quality characteristics have always been the focus of meat science research. The overall content and distribution of water are directly related to the tenderness, taste, juiciness and shelf life of pork, which in turn affects consumers' willingness to buy. Generally speaking, meat with high water content usually exhibits better water retention. This is because sufficient water in the meat can provide a more ideal water state, which is conducive to maintaining the edible quality of the meat. If the water retention of the meat is poor, it is easy to lose water during processing and storage, resulting in a decrease in water content, which affects the processing quality of the meat. Therefore, water retention, as one of the important indicators for evaluating pork quality, is crucial to improving consumers' eating experience.

[0003] Traditional methods for evaluating water retention can be divided into the following three categories: The first category is methods that are subject to external forces, such as pressure method and centrifugation method. In these methods, water retention performance is evaluated by applying external forces (such as weight or centrifugal force) to the sample and observing its water loss. The second category is methods that are not subject to external forces, the most representative of which is drip loss. This method measures the water lost by meat only under the action of natural gravity, which can reflect the water retention performance of meat without external interference. It is the most commonly used indicator for evaluating the water retention of fresh meat. The third category is methods performed under processing conditions, such as cooking loss method. Cooking loss simulates the actual situation of water loss when raw meat is converted into cooked meat during processing, storage or cooking to evaluate its water retention performance. It is the most commonly used indicator to describe the water retention of meat during processing. However, traditional water retention evaluation methods often have problems such as cumbersome operation and long time consumption, and it is difficult to adapt to the needs of modern meat processing and quality control.

[0004] Magnetic resonance imaging (MRI) is an imaging technology based on the water distribution of biological tissues. It can obtain the water distribution information inside the sample without destroying the sample. MRI is mainly used for medical imaging diagnosis. In recent years, it has gradually shown its unique application value in the field of food science due to its high sensitivity, rapid analysis, non-invasiveness and relatively low cost. For the evaluation of the water retention of meat products, it is of great significance to explore the relationship between the water state and distribution of pork with different water retention and its water retention, and further use magnetic resonance imaging technology to develop a method for determining the water retention of pork.

[0005] So far, there is no literature report on the application of magnetic resonance imaging technology in the determination of pork water retention capacity. Summary of the invention

[0006] To solve the above technical problems, the present invention includes the following aspects:

[0007] A first aspect of the present invention provides a method for constructing a pork water retention prediction model based on magnetic resonance imaging technology, the method comprising the following steps:

[0008] (1) Sample preparation: Fresh pork was selected as the test sample, and a portion of the fresh pork was subjected to freeze-thaw cycle treatment to obtain fresh pork and pork test samples with different freeze-thaw cycle times;

[0009] (2) Sample T2-weighted image acquisition: The pork test sample obtained in step (1) is placed in a nuclear magnetic resonance sample tube, the instrument detection parameters are set, and a multi-slice spin echo sequence is used to perform T2-weighted imaging. A layer of clear DICOM images is selected from the obtained multi-slice DICOM images, and DICOM image feature values ​​are extracted;

[0010] (3) Determination of water retention parameters of samples: After the MRI scan of the pork test sample in step (2) is completed, the water retention parameter data of the pork sample is immediately taken out and measured;

[0011] (4) Data import: The image feature values ​​extracted in step (2) and the water retention parameter data corresponding to the sample obtained in step (3) are imported into MATLAB software for matrix reorganization to obtain a three-dimensional matrix;

[0012] (5) Model construction and evaluation: A mathematical regression model was selected in MATLAB software, and the three-dimensional matrix obtained in step (4) was preprocessed. Then, a regression prediction model equation for predicting the water retention of pork was established, and the prediction effect of the regression model equation was evaluated.

[0013] Preferably, the fresh pork sample in step (1) is stored at a low temperature of -18°C and subjected to freeze-thaw cycle treatment.

[0014] Preferably, the freeze-thaw cycle treatment in step (1) comprises storing the pork at -18°C for 12 hours and then completely thawing it at 4°C.

[0015] Preferably, in step (1), the fresh pork sample is subjected to freeze-thaw cycle treatment for 3, 5 and 10 times respectively.

[0016] Preferably, the instrument detection parameters set in step (2) include repetition time, echo time and selected layer thickness.

[0017] Preferably, the instrument detection parameters set in step (2) further include the number of layers, field of view (FOV), layer gap, read size (Read Size) and phase size (Phase size).

[0018] Preferably, the repetition time is set to 1000-2000 ms. More preferably, the repetition time is set to 1200-1800 ms. Further preferably, the repetition time is set to 1600 ms.

[0019] Preferably, the echo time is set to 50-70 ms. More preferably, the echo time is set to 50-60 ms. Further preferably, the echo time is set to 50 ms.

[0020] Preferably, the selected layer thickness is set to 1-10 mm. More preferably, the selected layer thickness is set to 2-6 mm. Further preferably, the selected layer thickness is set to 4 mm.

[0021] Preferably, the number of layers is set to 4, the field of view is set to 100 mm×100 mm, the layer gap is set to 0.5 mm, the reading size is set to 256, and the phase size is set to 192.

[0022] Preferably, the method for extracting DICOM image feature values ​​in step (2) is as follows: using the dicomread function to read and display the DICOM file in the MATLAB environment to obtain a 256×256 two-dimensional matrix, and the values ​​in the matrix group represent the grayscale values ​​of the image.

[0023] Preferably, the key code for reading and displaying DICOM images using the dicomread function in the MATLAB environment is as follows:

[0024] % Read image

[0025] image=dicomread(name)

[0026] %Convert image to grayscale

[0027] grayImage=image

[0028] % Convert each pixel value in grayImage from its original data type to double type and store these converted double-precision values ​​in the data variable

[0029] data = double(grayImage)

[0030] % Write the matrix data to a text file

[0031] dlmwrite('grayImageData.txt',data,'delimiter','\t')

[0032] The matrix corresponding to each image is matched one by one with the pressure loss rate data and converted into a 256×256×n three-dimensional matrix.

[0033] Preferably, the water retention parameter of the pork sample in step (3) is juice loss rate, cooking loss rate or pressure loss rate. More preferably, the water retention parameter of the pork sample is pressure loss rate.

[0034] Preferably, the pressurization loss rate in step (3) is determined by the following method: a sampler with a diameter of 2.5 cm is selected, a circular meat column sample with a thickness of 1.0 cm is taken along the vertical direction of the muscle fiber, and the sample is accurately weighed. The upper and lower surfaces of the meat sample are respectively wrapped with 16 layers of filter paper. The meat is pressurized with a hydraulic tester at a constant pressure of 35.0 kg for 5 minutes, the filter paper is removed, and the sample is weighed immediately. The pressurization loss rate of the meat sample is calculated according to the following formula:

[0035]

[0036] Where PL is the pressurization loss rate, in %; m1 is the mass of the meat sample before pressurization, in g; m2 is the mass of the meat sample after pressurization, in g.

[0037] Preferably, the method used for preprocessing the three-dimensional matrix in step (5) is centering, autoscaling or minmax. More preferably, the method used for preprocessing is centering.

[0038] Preferably, the steps and mathematical formula of the centralization method are as follows:

[0039] (1) Calculate the mean of each matrix slice:

[0040] For each matrix slice (X_{ij}) (where (i) ranges from 1 to (m) and (j) ranges from 1 to (n)), calculate its mean (\mu_{ij}):

[0041] (\mu_{ij}=\frac{1}{p}\sum_{k=1}^{p}X_{ijk})

[0042] Here, (X_{ijk}) is the element at position ((i,j,k)) in the three-dimensional matrix (X).

[0043] (2) Center each matrix slice:

[0044] Using the calculated mean (\mu_{ij}), center each corresponding element in the original three-dimensional matrix (X):

[0045] (X'{ijk}=X{ijk}-\mu_{ij})

[0046] Here, (X'_{ijk}) is the element at position ((i,j,k)) in the centered three-dimensional matrix (X').

[0047] Preferably, the mathematical regression model selected in step (5) is a principal component regression model or a partial least squares regression model. More preferably, the mathematical regression model is a partial least squares regression model.

[0048] Preferably, the regression prediction model equation established in step (5) is a principal component regression prediction model equation or a partial least squares regression prediction model equation. More preferably, the regression prediction model equation is a partial least squares regression prediction model equation.

[0049] Preferably, the principal component regression prediction model equation is:

[0050] y=31.7275+(0.0000260916)*x1+(0.0000357875)*x2+(-0.0000094101)*x3+

[0051] (-0.0000342416)*x4+(0.0001441206)*x5+(0.0000067638)*x6+(0.0001680843)*x7+

[0052] (0.0001553091)*x8+(0.0001194323)*x9+(0.0000676422)*x10+(0.0001655114)*x11+

[0053] (0.0000497281)*x12+(-0.0001521550)*x13+(0.0002651069)*x14+(0.0002253167)*x15+(0.0001707976)*x16.

[0054] Preferably, y in the principal component regression prediction model equation is the pressurization loss rate, and x1-x16 are 16 principal component factors.

[0055] Preferably, the partial least squares regression prediction model equation is: Y^=0.0001461401*T1+0.0001962329*T2+0.0001431147*T3+0.0000875012*T4+0.0000393194*T5+0.0000422470*T6.

[0056] Preferably, Y^ in the partial least squares regression prediction model equation is the pressurization loss rate, and T1-T6 are 6 latent variables.

[0057] Preferably, in the partial least squares regression model, the data set is repeatedly segmented under different numbers of latent variables through the plsmccv function, and the number of latent variables that minimizes the prediction error is selected as the optimal choice.

[0058] Preferably, the partial least squares regression model uses Monte Carlo cross-validation (MCCV) with a split ratio of 8:2 for 1000 times to obtain the optimal number of latent variables.

[0059] Preferably, the optimal number of latent variables in the partial least squares regression model is 6.

[0060] Preferably, the mathematical regression model in step (5) is validated using a Monte Carlo cross-validation method.

[0061] Preferably, the mathematical regression model in step (5) predicts its effect through the coefficient of determination, root mean square error and residual of the validation set.

[0062] A second aspect of the present invention provides a method for predicting the water retention capacity of pork based on magnetic resonance imaging technology, the method comprising the following steps:

[0063] (i) Sample T2-weighted image acquisition: Take the pork sample to be tested, place it in a nuclear magnetic resonance sample tube, set the instrument detection parameters, use a multi-slice spin echo sequence to perform T2-weighted imaging, select a layer of clear DICOM image from the obtained multi-slice DICOM images, and extract the DICOM image feature value;

[0064] (ii) Calculating the water retention capacity of the sample: Using mathematical functions in MATLAB software, the DICOM image feature values ​​extracted in step (i) were analyzed, and the analysis results were substituted into the regression prediction model equation of pork water retention capacity to calculate the water retention parameters of the pork sample. The water retention capacity of the pork sample was evaluated based on the water retention parameter data.

[0065] Preferably, the pork sample to be tested in step (i) is fresh pork or pork that has been frozen and thawed multiple times.

[0066] Preferably, the instrument detection parameters in step (i) include repetition time, echo time and selected layer thickness.

[0067] Preferably, the instrument detection parameters set in step (i) further include the number of layers, field of view (FOV), layer gap, read size (Read Size) and phase size (Phase size).

[0068] Preferably, the repetition time is set to 1600 ms, the echo time is set to 50 ms, and the selected layer thickness is set to 4 mm.

[0069] Preferably, the number of layers is set to 4, the field of view is set to 100 mm×100 mm, the layer gap is set to 0.5 mm, the reading size is set to 256, and the phase size is set to 192.

[0070] Preferably, the step of extracting DICOM image feature values ​​in step (i) is: using the dicomread function to read and display the DICOM file in the MATLAB environment to obtain a 256×256 two-dimensional matrix, and the values ​​in the matrix group represent the grayscale values ​​of the image.

[0071] Preferably, in step (ii), the use of mathematical functions to analyze the DICOM image eigenvalues ​​is to use the PCR function to perform principal component analysis on the target two-dimensional matrix or to use the plsmccv function to perform analysis.

[0072] Preferably, the pork water retention prediction model equation in step (ii) is constructed by the aforementioned method.

[0073] More preferably, the pork water retention prediction model equation in step (ii) is a principal component analysis regression prediction model equation or a partial least squares regression prediction model equation.

[0074] Preferably, the principal component regression prediction model equation is:

[0075] y=31.7275+(0.0000260916)*x1+(0.0000357875)*x2+(-0.0000094101)*x3+

[0076] (-0.0000342416)*x4+(0.0001441206)*x5+(0.0000067638)*x6+(0.0001680843)*x7+

[0077] (0.0001553091)*x8+(0.0001194323)*x9+(0.0000676422)*x10+(0.0001655114)*x11+

[0078] (0.0000497281)*x12+(-0.0001521550)*x13+(0.0002651069)*x14+(0.0002253167)*x15+(0.0001707976)*x16.

[0079] Preferably, y in the principal component regression prediction model equation is the pressurization loss rate, and x1-x16 are 16 principal component factors.

[0080] Preferably, the partial least squares regression prediction model equation is: Y^=0.0001461401*T1+0.0001962329*T2+0.0001431147*T3+0.0000875012*T4+0.0000393194*T5+0.0000422470*T6.

[0081] Preferably, Y^ in the partial least squares regression prediction model equation is the pressurization loss rate, and T1-T6 are 6 latent variables.

[0082] Preferably, in the partial least squares regression prediction model, the target matrix is ​​analyzed using the plsmccv function in the MATLAB software, and the optimal number of latent variables selected is 6.

[0083] Preferably, the water retention parameter of the pork sample in step (ii) is the pressure loss rate.

[0084] Preferably, the pressure loss rate used as a water retention parameter in step (ii) is in the range of 20-50%, and the higher the value, the fewer freeze-thaw cycles the pork sample has experienced.

[0085] More preferably, the pressure loss rate as a water retention parameter in step (ii) is in the range of 25-45%, and the higher the value is, the fewer freeze-thaw cycles the pork sample has experienced.

[0086] The technical effects produced by the present invention are:

[0087] 1. The present invention is based on MRI technology. Fresh pork and frozen-thawed pork are used as research objects to collect T2-weighted images. Then, after extracting feature data from the key information in the image, principal component regression analysis (PCR) and partial least squares regression (PLSR) are used to establish a pork water retention prediction model, which provides a scientific solution for the rapid and accurate detection of pork water retention.

[0088] 2. R of the calibration set of the PLSR water retention prediction model of the present invention c 2 The R p 2 The accuracy and reliability of the model are higher than those of the PCR model. It can be used as a rapid and non-destructive method to evaluate pork quality. It also has potential reference value for quality control of other foods and water retention analysis. BRIEF DESCRIPTION OF THE DRAWINGS

[0089] Figure 1 is the effect of different repetition times on T2-weighted imaging images;

[0090] Figure 2 is the effect of different echo times on T2-weighted imaging images;

[0091] Figure 3 It is the original picture of T2-weighted image;

[0092] Figure 4 is the cumulative contribution rate of different principal component factors in the PCR model;

[0093] Figure 5 This is the correlation diagram between the calibration set (a), validation set (b) and predicted value of the PCR model for predicting pork water retention;

[0094] Figure 6 It is the relationship between the root mean square error difference of the PLSR prediction model and the optimal number of latent variables;

[0095] Figure 7 This is the correlation diagram between the calibration set (a), validation set (b) and predicted value of the PLSR model for predicting pork water retention;

[0096] Figure 8 It is the sample residual distribution diagram of PLSR prediction model. DETAILED DESCRIPTION

[0097] The present invention is further described below in conjunction with examples, but the embodiments of the present invention are not limited thereto. The experimental methods used in the following examples are conventional methods unless otherwise specified.

[0098] Experimental Example 1: Construction of a prediction model for pork water retention based on magnetic resonance imaging technology

[0099] 1. Test methods

[0100] 1.1 Sample preparation

[0101] Three-way pigs with the same feeding conditions were selected from Beijing Ershang Meat Food Group Co., Ltd., and the longissimus dorsi muscle of the left half of the carcass was collected. The fat and connective tissue on the surface of the pork were removed, and the sample was evenly divided into four parts perpendicular to the myofibril direction, with a weight of about 500g each. One of the samples was not repeatedly frozen and thawed, marked as 0F-T, and various indicators were directly measured. The remaining three samples were stored in a low-temperature environment of -18℃ and subjected to 3, 5 and 10 freeze-thaw cycles, respectively. Each cycle included storing the pork at -18℃ for 12h and then completely thawing at 4℃, marked as 0F-T, 3F-T, 5F-T and 10F-T, respectively. A total of 20 samples of fresh pork and pork with different freeze-thaw cycles were prepared, and the above pork samples were subjected to MRI measurement.

[0102] 1.2. Pork T2-weighted image acquisition

[0103] The test sample prepared in Section 1.1 was placed in a nuclear magnetic resonance sample tube, the detection parameters of the low-field nuclear magnetic resonance instrument (ZX-58, Suzhou Newmai Analytical Instrument Co., Ltd.) were set, and T2-weighted imaging was performed using a multi-slice spin echo (SE) sequence. The reason for selecting T2-weighted imaging is that in the water retention prediction process of the present invention, T2 weighting will highlight the characteristics of hydrogen protons in water and suppress the signals of hydrogen protons in other tissues such as fat. T2 images are generally long TR and long TE, TR>1000ms, TE>50ms.

[0104] 1.2.1. Optimization of acquisition parameters

[0105] (1) Time of Repetition (TR)

[0106] In SE sequences, it is defined as the time from a 90° pulse to the next 90° pulse. The repetition time affects image contrast, signal-to-noise ratio, and scanning time. Comparing the images of 1000, 1200, 1400, 1600, 1800, and 2000 ms, 1600 ms was selected as the final detection condition.

[0107] (2) Echo time (TE)

[0108] Comparing the images of the same sample and the same layer with different echo times of 50, 55, 60, 65 and 70 ms, there is no significant change in the images (see Figure 2 ). In order to save time and ensure that there is no loss of juice in the sample during the imaging process, 50ms was selected as the final detection condition.

[0109] (3) Layer thickness

[0110] The selected layer thickness determines the thickness of the image in the scanning direction, affecting the image resolution and signal-to-noise ratio. The parameter setting is reasonably set according to the scanning organization and scanning requirements. Increasing the layer thickness will increase the scanning range and improve the signal-to-noise ratio under the same number of layers. Increasing the partial volume effect will lead to a decrease in resolution, while decreasing it will be the opposite. The selected layer thickness here is 4mm.

[0111] (4) Field of view, reading size, and phase size

[0112] The field of view (FOV) is set to 100mm×100mm. This parameter determines the size of the scanning field of view and affects the resolution and signal-to-noise ratio of the image. When setting the parameters, it should be reasonably set according to the scanning organization. When the FOV is increased, the signal-to-noise ratio is improved and the resolution is reduced, and vice versa.

[0113] The read size is set to 256. Under the premise that other imaging parameters remain unchanged, the larger the matrix, the smaller the imaging voxel, and the higher the spatial resolution within the image plane.

[0114] Phase size is set to 192. This parameter and the frequency field of view together constitute the field of view size, which is expressed as a decimal, that is, the phase field of view is equal to the frequency field of view multiplied by the decimal. When it is set to less than 1, it is a rectangular field of view. Reducing the phase field of view reduces the scanning time and reduces the signal-to-noise ratio.

[0115] (5) Determination of final parameters

[0116] The parameters were set as follows: number of layers was 4, field of view (FOV) was set to 100 mm × 100 mm, layer thickness was 4 mm, layer gap was 0.5 mm, read size was set to 256, phase size was set to 192, number of scans was 4, repetition time (TR) was 1600 ms, and echo time (TE) was 50 ms. All images were saved in DCM format for subsequent data processing.

[0117] 1.2.2 T2-weighted image selection

[0118] When performing T2-weighted imaging acquisition, the number of layers is set to 4, so 4 images are finally obtained, and the corresponding DICOM files are also 4. However, when the meat block image is acquired through MRI, the position of the sample in the nuclear magnetic tube and the size of the sample are often disturbed, resulting in a decrease in the quality of the input image, and even causing the collected pork image to be incomplete. Therefore, it is necessary to select one layer of clear sampling images for each sample before obtaining the characteristic parameters of the pork image as the object of the next image processing. Figure 3These are images of four different layers of pork samples, but some layers cannot fully show the specific shape of the pork. These should be eliminated and images that more completely show the overall profile of the pork should be selected. Appropriate T2-weighted images such as Figure 3 As shown in the red box.

[0119] 1.3. Extraction of DICOM image feature values

[0120] The Digital Imaging and Communications in Medicine (DICOM) standard is an international standard for the transmission, display and storage of digital medical images, jointly developed by the American College of Radiology (ACR) and the National Electrical Manufactorers Association (NEMA). After the scan is completed, the MRI device will generate original DICOM files, which contain the pixel data of the image and the metadata information related to it, which can ensure the integrity, accuracy and compatibility of the image. The DICOM standard elaborates on the composition format and exchange method of the image and its related information, ensuring the standardized input and output of the image data. By following the DICOM standard, the accuracy and consistency of the image data can be ensured, and the seamless integration and efficient collaboration between different systems can be promoted.

[0121] The dicomread function can be used to read DICOM files in the MATLAB environment and obtain a 256×256 two-dimensional matrix. The values ​​in the matrix group represent the grayscale values ​​of the image.

[0122] The key code for reading and displaying DICOM images in MATLAB's dicomread function is as follows:

[0123] % Read image

[0124] image=dicomread(name)

[0125] %Convert image to grayscale

[0126] grayImage=image

[0127] % Convert each pixel value in grayImage from its original data type to double type and store these converted double-precision values ​​in the data variable

[0128] data = double(grayImage)

[0129] % Write the matrix data to a text file

[0130] dlmwrite('grayImageData.txt',data,'delimiter','\t')

[0131] The matrix corresponding to each image is matched one by one with the pressure loss rate data, and converted into a 256×256×n three-dimensional matrix. The pressure loss rate data is determined according to the method in Section 1.5.

[0132] 1.4 Preprocessing of image eigenvalues

[0133] Preprocessing data through data standardization, regularization and other processing methods can improve data quality, make data more suitable for analysis, and improve the performance and stability of the model. Commonly used data preprocessing methods include centering, autoscaling and minmax. In this test example, centering is used as a preprocessing method for the three-dimensional matrix.

[0134] The centering method subtracts the mean of each feature dimension from each data point to make the mean of each feature dimension in the data set zero. The centering method helps to eliminate the dimensional differences between different feature dimensions, making each feature numerically comparable and making the data easier to analyze and process, which is very beneficial for subsequent feature selection and model training.

[0135] A three-dimensional matrix (X) has a shape of ([m,n,p]), where (m) is the size of the first dimension, (n) is the size of the second dimension, and (p) is the size of the third dimension. A three-dimensional matrix can be viewed as a collection of (m\times n) two-dimensional arrays (or matrix slices), each of size (p). To center a three-dimensional matrix, the mean of each matrix slice is calculated and subtracted from the corresponding element.

[0136] Here are the steps and mathematical formula for centralization:

[0137] (1) Calculate the mean of each matrix slice:

[0138] For each matrix slice (X_{ij}) (where (i) ranges from 1 to (m) and (j) ranges from 1 to (n)), calculate its mean (\mu_{ij}):

[0139] (\mu_{ij}=\frac{1}{p}\sum_{k=1}^{p}X_{ijk})

[0140] Here, (X_{ijk}) is the element at position ((i,j,k)) in the three-dimensional matrix (X).

[0141] (2) Center each matrix slice:

[0142] Using the calculated mean (\mu_{ij}), center each corresponding element in the original three-dimensional matrix (X):

[0143] (X'{ijk}=X{ijk}-\mu_{ij})

[0144] Here, (X'_{ijk}) is the element at position ((i,j,k)) in the centered three-dimensional matrix (X'). After the above steps, the obtained three-dimensional matrix (X') is the result of the centering.

[0145] 1.5. Determination of pressure loss rate

[0146] After the image acquisition is completed, the sample is immediately tested for pressure loss rate. The specific test method is as follows: fresh pork and pork with different freeze-thaw cycles are used as test samples. A sampler with a diameter of 2.5 cm is selected to take a 1.0 cm thick round meat column sample along the vertical direction of the muscle fiber, and accurately weigh it (accurate to 0.01g). The upper and lower surfaces of the meat sample are wrapped with 16 layers of filter paper respectively. The meat is pressurized with a hydraulic tester at a constant pressure of 35.0kg for 5 minutes, then the filter paper is removed and weighed immediately (accurate to 0.01g). The pressure loss rate of the meat sample is calculated according to the following formula:

[0147]

[0148] Where PL is the pressurization loss rate, in %; m1 is the mass of the meat sample before pressurization, in g; m2 is the mass of the meat sample after pressurization, in g.

[0149] The test results show that the pressurization loss rate of the 20 samples is between 19% and 40%.

[0150] 1.6 Statistical Model and Data Processing

[0151] (1) Principal component regression

[0152] Principal Component Regression (PCR) is a statistical method first proposed by Pearson and developed and improved by Hotelling. PCR performs principal component analysis on standardized data, extracts the most important principal components by dimensionality reduction, selects the first few principal components as independent variables for regression analysis based on the cumulative explained percentage of variation (usually 85% or higher), and finally establishes a model between the dependent variable and the principal components. The main advantages of PCR are that it is simple and fast to calculate, and avoids multicollinearity problems between data.

[0153] (2) Partial least squares regression

[0154] Partial Least Squares Regression (PLSR) is a multivariate statistical data analysis method first proposed by S. Wold and C. Albano et al. PLSR usually reduces the dimension of the data matrix when there are multiple correlations between independent variables. It can simultaneously achieve regression modeling (multivariate linear regression), data structure simplification (principal component analysis) and correlation analysis between two groups of variables (canonical correlation analysis), so as to establish a prediction model with higher accuracy.

[0155] (3) Regression model construction and model evaluation

[0156] MATLAB R2022a software was used to establish the prediction model of pork water retention by PCR and PLSR. The PLSR model used Monte Carlo Cross Validation (MCCV) to cross-validate the data. Model evaluation and prediction are important components of predictive model building. In order to evaluate the prediction accuracy and reliability of the model, the regression model was evaluated by the following performance evaluation indicators after it was established. The calculation formula is as follows:

[0157] (a) The coefficient of determination includes the calibration set (R c 2 ) and the correlation coefficient of the validation set (R p 2 ), which is used to reflect the degree of fit of the model. The closer its value is to 1, the higher the degree of fit. Its calculation formula is:

[0158]

[0159] (b) The root mean square error includes the root mean square error of the calibration set (RMSEC) and the validation set (RMSEP), which is used to evaluate the accuracy of the built model. The closer its value is to 0, the smaller the error and the higher the accuracy. Its calculation formula is:

[0160]

[0161] (c) Residual (Res) is used to evaluate the model's fit. If the model's predicted values ​​are very close to the actual observed values, the residual will be small, which usually means that the model fits well. On the contrary, if the residual is large, the model may not capture the structure or relationship in the data well and needs further adjustment or optimization. Its calculation formula is:

[0162] Res=y act -y pre

[0163] Note: N is the number of samples, y act and pre are the actual and predicted values ​​of the sample, is the average of all samples in the modeling or prediction set.

[0164] 2. Test results

[0165] 2.1. Establishing the principal component regression model

[0166] In order to accurately predict the water retention of pork, a principal component regression prediction model was established based on the characteristic data of T2-weighted images of pork with different water retention and the pressure loss rate of the corresponding samples. The PCR function was used to establish the PCR model on MATLAB. In order to further determine the core indicators, the principal component analysis of the target matrix was performed. The specific steps are as follows. The results are as follows Figure 4 shown.

[0167] (1) Image feature value extraction and processing: Select appropriate T2-weighted images, use the dicomread function to read and display DICOM files in the MATLAB environment, and obtain a 256×256 two-dimensional matrix, where the values ​​in the matrix group represent the grayscale values ​​of the image. Then, the two-dimensional matrix of each image and the corresponding sample's pressurization loss rate data are converted into a 256×256×n three-dimensional matrix.

[0168] (2) Dataset division: To ensure reasonable evaluation of model training and inversion results, the entire dataset is divided into a calibration set and a validation set using a random method, with 20 samples in the calibration set and 15 samples in the validation set.

[0169] (3) Model training: The PCR function was used to build the PCR model on MATLAB. In order to further determine the core indicators, principal component analysis was performed on the target matrix and 16 principal components were extracted. Sufficient principal components were selected to explain 95% of the variability.

[0170] (4) Establishing a regression model: Use the principal component scores to establish a regression model equation. The principal component regression prediction model equation is y = 31.7275 + (0.0000260916) * x1 + (0.0000357875) * x2 +

[0171] (-0.0000094101)*x3+(-0.0000342416)*x4+(0.0001441206)*x5+(0.0000067638)*x6+

[0172] (0.0001680843)*x7+(0.0001553091)*x8+(0.0001194323)*x9+(0.0000676422)*x10+

[0173] (0.0001655114)*x11+(0.0000497281)*x12+(-0.0001521550)*x13+(0.0002651069)*x14+(0.0002253167)*x15+(0.0001707976)*x16, where y is the pressurization loss rate and x1-x16 are 16 principal component factors.

[0174] (5) Model verification: Based on the principle that the eigenvalue is greater than 1, 16 principal component factors were extracted (i.e., x1-x16 in the above-mentioned “principal component regression prediction model”, which are linear combinations of the original variables and represent the main change direction or pattern in the data. These principal component factors were extracted during the dimensionality reduction process in order to summarize most of the information in the original data with fewer variables. These principal component factors are arranged in descending order according to the amount of variance they explain (i.e., the amount of information)). The cumulative contribution rate reached 96.394%, of which PC1 (the first principal component) contributed 28.823%, PC2 (the second principal component) contributed 25.609%, and PC3 (the third principal component) contributed 11.282%. Sufficient principal components were selected to explain 95% of the variability. Figure 5 The evaluation results of the prediction model for the water retention of pork samples based on MRI feature data are shown. The evaluation results show that the prediction results of the PCR model are good, the results of the calibration set and the interactive validation set are similar, and the correlation coefficient R c 2 and R p 2 They are 0.8825 and 0.8856 respectively, and the root mean square error RMSEC and RMSEP are 1.7959 and 2.0284 respectively.

[0175] (6) Model prediction: To predict the water retention of pork samples, it is only necessary to collect sample images under the same detection parameter conditions, select the pork imaging file, use the PCR function in MATLAB software to perform principal component analysis on the matrix, select the first 16 principal components extracted, and use the established principal component regression model to predict the pressure loss rate.

[0176] 2.2. Establishing Partial Least Squares Regression Model

[0177] In order to compare the prediction effects of different models on pork water retention, the same data set was selected for PCR modeling, and the PLSR model was established on MATLAB using the pls_nipals function. Monte Carlo cross-validation (MCCV) was used for cross-validation to improve the fitting accuracy of the prediction model (the specific operation steps are the same as those in Section 2.1).

[0178] In PLSR modeling, MCCV is particularly suitable for determining model complexity, that is, the selection of the optimal number of latent variables. MCCV calculates the root mean square error (RMSE) under each number of latent variables and obtains a stable error estimate through the average of 1000 repetitions, and selects the number of latent variables that minimizes the prediction error as the optimal number of latent variables. Through the plsmccv function, the data set is repeatedly split under different numbers of latent variables, and the number of latent variables that minimizes the prediction error is selected as the optimal choice.

[0179] In this test case, MCCV with a split ratio of 8:2 was used 1000 times to obtain the optimal number of latent variables. Finally, according to the calculation, the optimal number of latent variables was 6 (i.e., T1-T6, which were extracted from the original data, could capture the main variability in the data, and were highly correlated with the dependent variable (prediction target). These latent variables were used as independent variables in the regression model to predict the value of the dependent variable). Figure 6 A plot showing the relationship between the root mean square error of the PLSR prediction model and the optimal number of latent variables.

[0180] The PLSR model is established according to the optimal number of latent variables, and the partial least squares regression prediction model equation is Y^=0.0001461401*T1+0.0001962329*T2+0.0001431147*T3+0.0000875012*T4+0.0000393194*T5+0.0000422470*T6, where Y^ is the pressurization loss rate and T1-T6 are 6 latent variables.

[0181] The performance of the model was calculated by calculating the correlation coefficient (R 2) and root mean square error (RMSE). The results showed that the R c 2 The R p 2 The RMSEP is 1.1119 and the prediction accuracy and reliability of the model are evaluated using residual analysis (see Figure 7 and 8 ).

[0182] To predict the water retention of pork samples in the future, it is only necessary to collect sample images under the same detection parameter conditions, select files with relatively complete images, use the plsmccv function in MATLAB software to analyze the target matrix, select the number of latent variables extracted, and use the established partial least squares regression model to predict the pressurization loss rate.

[0183] 2.3 Evaluation of Two Regression Models

[0184] When the model's coefficient of determination R 2 When R > 0.90, the prediction effect is the best, and when R ≤ 0.81, the prediction effect is the best. 2 When ≤0.90, the prediction effect is good, and 0.66≤R 2 When ≤0.8, the prediction effect can be achieved; the lower the RMSE value, the better. In this test case, both the PCR model and the PLSR model are suitable for predicting the water retention of pork. After further comparison of the accuracy and repeated prediction robustness of the PLSR and PCR models, it was found that the PLSR model showed a higher correlation coefficient R in both the calibration set and the interactive validation set model. 2 This indicates that the PLSR model has a superior performance in evaluating the water retention of pork.

[0185] Although specific embodiments of the present invention have been described, it will be appreciated by those skilled in the art that various changes and modifications may be made to the present invention without departing from the scope or spirit of the present invention. Therefore, the present invention is intended to cover all such changes and modifications that fall within the scope of the appended claims and their equivalents.

Claims

1. A method for constructing a prediction model for pork water retention based on magnetic resonance imaging technology, characterized in that: The method comprises the following steps: (1) Sample preparation: Fresh pork was selected as the test sample, and a portion of the fresh pork was subjected to freeze-thaw cycle treatment to obtain fresh pork and pork test samples with different freeze-thaw cycle times; (2) Sample T2-weighted image acquisition: Place the pork test sample obtained in step (1) in a nuclear magnetic resonance sample tube, set the instrument detection parameters, use a multi-slice spin echo sequence to perform T2-weighted imaging, select a layer of clear DICOM image from the obtained multi-slice DICOM image, and extract the DICOM image feature value; (3) Determination of water retention parameters of samples: After the pork test sample in step (2) is scanned by MRI, the water retention parameter data of the pork sample is immediately taken out and measured; (4) Data import: The image feature values ​​extracted in step (2) and the water retention parameter data corresponding to the sample obtained in step (3) are imported into MATLAB software for matrix reorganization to obtain a three-dimensional matrix; (5) Model construction and evaluation: A mathematical regression model was selected in MATLAB software, and the three-dimensional matrix obtained in step (4) was preprocessed. Then, a regression prediction model equation for predicting the water retention of pork was established, and the prediction effect of the regression model equation was evaluated.

2. The method according to claim 1, characterized in that The instrument detection parameters set in step (2) include repetition time, echo time and selected layer thickness.

3. The method according to claim 2, characterized in that The repetition time is set to 1000-2000ms.

4. The method according to claim 2, characterized in that: The echo time is set to 50-70ms.

5. The method according to claim 2, characterized in that: The thickness of the selected layer is set to 1-10 mm.

6. The method according to claim 1, characterized in that The method for extracting DICOM image feature values ​​in step (2) is as follows: use the dicomread function to read and display the DICOM file in the MATLAB environment to obtain a 256×256 two-dimensional matrix, and the values ​​in the matrix group represent the grayscale values ​​of the image.

7. The method according to claim 1, characterized in that The water retention parameter of the pork sample in step (3) is the juice loss rate, cooking loss rate or pressure loss rate.

8. The method according to claim 1, characterized in that The mathematical regression model selected in step (5) is a principal component regression model or a partial least squares regression model.

9. A method for predicting the water retention of pork based on magnetic resonance imaging technology, characterized in that: The method comprises the following steps: (i) Sample T2-weighted image acquisition: Take the pork sample to be tested, place it in a nuclear magnetic resonance sample tube, set the instrument detection parameters, use a multi-slice spin echo sequence to perform T2-weighted imaging, select a layer of clear DICOM image from the obtained multi-slice DICOM image, and extract the DICOM image feature value; (ii) Calculating the water retention of the sample: using mathematical functions in MATLAB software to analyze the DICOM image feature values ​​extracted in step (i), substituting the analysis results into the regression prediction model equation of pork water retention, calculating the water retention parameters of the pork sample, and evaluating the water retention of the pork sample based on the water retention parameter data; The regression prediction model equation of pork water retention in step (ii) is constructed by the method described in any one of claims 1-8.

Citation Information

Patent Citations

  • Method for predicting water-retaining property of pork based on low-field nuclear magnetic resonance technology

    CN119125212A