Meat and Muscle BiologyTM Prediction of Whole Pork Loin and Individual Chops’ Intramuscular Fat Using Computer Vision System Technology

The objective of this study was to compare different methods of evaluating intramuscular fat (IMF) in pork and test the accuracy of using a computer vision system (CVS) on different locations of the loin. Whole pork loins (n= 1,400) were obtained from 6 pork processing plants. Subjective marbling scores and CVS IMF percentage (CVS IMF%) were assessed on the ventral lean surface of the whole loin and the 3rd (A) and 10th (B) rib chops. Additionally, the A and B chops were evaluated for crude fat percentage (CF%) using ether extract. The CF% of the whole loin was represented by using the average CF% of A and B chops. A combination of the bootstrap method and stepwise regression models was used to increase prediction and robustness for CF% prediction. To better understand whether plants played an effect, models for individual plants and using all plants together were built, tested, and compared. Results were that subjectivemarbling score had stronger correlations with CF% compared to CVS IMF% for the whole loin (0.70 vs. 0.58), A chop (0.79 vs. 0.62), and B chop (0.74 vs. 0.61). When using the stepwise regression models to predict CF%, B chop (71.8%) had the highest prediction accuracy (estimates within 0.5% residual compared to CF% were considered accurate) followed by A chop (58.1%) andwhole loin (48.2%).When comparing individual plant models and overall models, the overall accuracy improved; however, this improvement in accuracy was not consistent through every single plant. In conclusion, CVS has shown potential to estimate pork IMF on all locations, especially the posterior pork chop.


Introduction
Pork quality is a combination of many different attributes, including color, intramuscular fat (IMF), pH, water-holding capacity, and tenderness. While it is hard to isolate the importance of one attribute from another, color may be the most important quality as it both is highly correlated to the other attributes (Papanagiotou et al., 2013) and strongly influences consumers' intent to purchase (Ngapo, 2017). Another important attribute to pork quality would be IMF or marbling of the pork. It is generally accepted that marbling has a positive influence on flavor, tenderness, and juiciness of meat (Brewer et al., 2001;Cannata et al., 2010). Furthermore, the degree of marbling within meat would influence consumers' purchasing choice (Cannata et al., 2010). It is also reported that consumers with different cultural backgrounds would also have different preferences for pork appearance, with European consumers preferring pork that is light red and lean in appearance and Asian consumers preferring pork that is dark red and has a wide range of marbling available (Ngapo et al., 2007).
Currently, in the pork industry, color and marbling of the whole loins are commonly assessed subjectively by a trained evaluator according to the National Pork Board's color and marbling standard cards (NPB, 2011). However, with subjective measuring of pork quality, some of the following issues could be present, which could all affect consistency of the measurement: effect of environmental lighting, examiner's fatigue, and different preferences between individuals. In 2017, Bohrer and Bolert summarized research results that indicated a weak correlation between subjective color measurement and colorimeter results, indicating the need for an industry tool with high accuracy and consistency for pork color measurement. In addition to subjective marbling, the conventional Soxhlet extraction method is commonly used for determination of marbling or IMF. However, this method is slow and laborious; additionally, it cannot be utilized without consuming a fraction of the product, which leads to devaluation of the product.
Computer vision system (CVS) is a technology that has been applied in the food industry and beef industry for over a decade (Ma et al., 2018). It is known for being efficient, accurate, consistent, and cost-effective, which suits the rapid, mass production of the meat industry (Liu et al., 2017). Other advantages of CVS include data analysis within the system as opposed to having to input data into a computer and analyze it and the capability of automatically saving data for further usage. With advancements in technology, components (camera, computer, software, etc.) of CVS have become easier to handle (i.e., smaller camera sizes) and more affordable, resulting in CVS being more commonplace. The use of CVS to quantify or measure pork quality including color has been proven effective on various cuts, including whole loin, loin chops, and ham (Muñoz et al., 2015;Sun et al., 2016b). Other than color, CVS has also been applied to other important meat quality traits such as marbling in beef (Jackman et al., 2009) and pork (Faucitano et al., 2005;Liu et al., 2010;Huang et al., 2013;Liu et al., 2018) and tenderness in beef (Li et al., 2001;Sun et al., 2012). In addition to quality traits, CVS has also been utilized for evaluating freshness in pork (Huang et al., 2015).
Therefore, the objectives of this study were to compare and correlate the results from different pork marbling measurement methods of the same sample and to build prediction models for pork marbling using CVS IMF pixels and color features.

Pork sample preparation and data collection
Whole loin samples (n = 1,400) were obtained from 6 different processing plants on the line. The goal was 200 loins per plant from 7 pork processing plants. However, due to scheduling issues, plant 6 was visited twice instead of 2 plants from that processor, resulting in 400 loins from plant 6 collected on 2 separate dates. Plants were selected according to the National Pork Board's recommendation based on pork product distribution mapping for the whole country. Each sample was selected by the same trained evaluator and chosen to maximize the variation in pork quality for color and IMF. Subjective marbling scores (SMS) were assessed on the line on a scale from 1 (devoid of marbling) to 10 (abundant marbling) according to NPB (2011).

CVS
Images of the exposed lean surface on the ventral side of the whole loin were acquired using a CVS ( Figure 1). The CVS consisted of 3 components: an industry camera (NI 1776C smart camera, National Instrument, Ltd., Austin, TX) with a 1/1.8" F1.6/4.4-11-mm lens (LMVZ4411, Kowa, Ltd., Japan), a 111.76-cm dome light (DL180 Large Area Diffuse Light, color = white, Advance Illumination, Ltd., Rochester, VT), and a personal laptop (Lenovo, Ltd., China). The CVS was attached to a table to ease transportation of the dome light and to standardize the relationship of the camera to the dome light and the samples. A black, light-absorbent fabric was installed between the dome light and table to exclude light noise from the surrounding environment. Before each image acquisition, a white tile (Minolta Inc., Tokyo, Japan) was used as a standard for color standardization. Each sample was manually placed on a lightabsorbing, black background surface platform for image acquisition. The color image (1,500 × 600 pixels) was captured and stored in red, green, and blue (RGB) format using LabVIEW software (LabVIEW 15.0, National Instrument, Ltd.).

Whole pork loin image processing and image IMF percentage
The original image acquired by the CVS is shown in Figure 2a (Sun et al., 2018b). Using the LabVIEW software, the background of the image was segmented and removed using the boundary tracking algorithm method reported by Otsu (1979; Figure 2b). After removal of the background, a 410 × 130 pixel region of interest (ROI) was determined using the mapping system ( Figure 2c; Sun et al., 2018aSun et al., , 2018b. The size of the ROI was determined by finding the optimal size that can reasonably represent the whole loin but also allows the artificial intelligence (AI) to automatically find an ideal location within the loin muscle without including other muscles or connective tissue. Once determined, the mean and standard deviation of the color image features-including RGB; hue, saturation, and intensity; and CVS L*, a*, and b*-were extracted from the ROI, using the method published by Sun et al. (2016a). After color feature extraction, lean muscle and IMF pixels were segmented within the ROI using the Sobel image processing method (Figure 2d; Vincent and Folorunso, 2009). Then, CVS IMF percentage (CVS IMF%) was calculated using the following equation:

Individual chop measurement
After image acquisition, whole loins were vacuum packaged and shipped to the US Department of Agriculture Meat Animal Research Center (Clay Center, NE). Samples were allowed to age at 4°C for 14 d. After 14 d, whole loins were opened and sliced into loin chops for further data collection. The 3rd (A) and 10th (B) rib chops were selected for subjective marbling assessment, objective pork quality measurements of CVS for color, and IMF. Pork chops were bloomed between 10 and 25 min before SMS was assessed on the individual chops. After subjective assessment by the same trained evaluator from the plant, images (1,400 × 500 pixels) of the A and B chops were captured, saved, and processed using the same procedure as the whole loin and are shown in Figure 3, with an ROI of approximately 160 × 130 pixels.

Ether extraction
After imaging was completed, chops were then immediately vacuum packaged and transported from the US Department of Agriculture Meat Animal Research Center to North Dakota State University to determine crude fat percentage (CF%). Both A and B chops were trimmed of connective tissue and left with approximately 20 cm 2 of the chop. Once trimmed, the samples were freeze dried for 48 h to remove moisture. After the freeze-drying period, CF% was determined gravimetrically using the Soxhlet extraction procedure with petroleum ether (AOAC, 1990). Whole loin CF% was estimated using the average CF% of A and B samples.

Data analysis
Pearson correlations between CVS IMF%, CF%, and SMS were estimated using PROC CORR in SAS (version 9.4; SAS Institute, Inc., Cary, NC). In this project, 2 different types of models were used to build 5 sets of models. First, a set of basic simple regression models (Model 1) were constructed using CF% and image IMF values. Using the equation estimated from simple regression across all plants, each sample then had an estimate IMF% calculated, and these were compared back to CF%. In order to test and improve the stability and robustness of the model, the bootstrap method by Efron (1979) was adopted using SAS. For the bootstrap method, data were divided into training (70%) and test (30%) datasets randomly for 100 repetitions. Usage of samples were evaluated to ensure that samples were not used equally across all 100 repetitions for the training and testing datasets (i.e., used 70 times for training and 30 times for testing). Then, the final model was used to estimate the IMF%, which was compared to the CF% for accuracy. The simple regression models using the bootstrap method were constructed for each individual plant (Model 2) as well as all plants together (Model 3). Lastly, stepwise regression models using the bootstrap method were constructed for each individual plant (Model 4) as well as all plants together (Model 5).
For the stepwise regression model, 19 features of the image IMF% value and the 18 color features (the average and standard deviation of CVS L*, CVS a*, CVS b*, red, green, blue, hue, saturation, and intensity within the ROI) were used. For this research, residuals that were between þ0.5% and −0.5% were considered accurately predicted as this is comparable to SMS, which is scored on a whole number scale and cards are designed to represent the middle of the range (i.e., card for SMS = 2 represents CF% of 1.50 to 2.49).

Pork IMF assessment correlation between different methods
Descriptive statistics of pork marbling attributes detected using CVS, ether extraction, and SMS are shown in Table 1. When evaluating the whole loin, CVS IMF% had the greatest value and the most variability compared to the other methods. For CF% and SMS, the A chop had a numerically higher value than the B chop, while there was no difference between A and B chops for CVS IMF%.
When looking at correlations (Table 2; plots in Figure 4), the strongest correlations were between SMS and CF% for all samples (r = 0.70, 0.79, and 0.74). The weakest correlations were between SMS and CVS IMF% for the whole loin (r = 0.52) and between CF% and CVS IMF% for the B chop (r = 0.61). There was no difference in the correlations for the A chop of CVS IMF% with CF% and with SMS (r = 0.62 and 0.63, respectively). For individual chops, CVS IMF% had lower average values than CF% or SMS, suggesting that the capability of CVS to identify marbling is weaker than SMS, which could be due to the limitation of the Sobel method to detect fine marbling.  All correlations were significant at the P < 0.0001 level.
The whole loin images that were acquired by our CVS (shown in Figure 2) include 2 muscles, the longissimus dorsi and the spinalis dorsi. In order to fully represent only the pork chop area, our CVS uses a mapping system to avoid the spinalis dorsi; however, the pork loins were noticeably different in terms of size and how well the ventral side of longissimus dorsi was trimmed between the different meat plants. Sometimes the CVS included the spinalis dorsi if the ventral side of longissimus dorsi was not trimmed sufficiently for the ROI to be located entirely on the longissimus dorsi, resulting in the ROI including the large seam of connective tissue between the 2 muscles. Additionally, the ROI could also have included connective tissue that was not trimmed off the longissimus dorsi. These variations could affect the accuracy of the CVS selection of the most ideal ROI because connective tissue present within the ROI is identified as IMF pixels by the Sobel method, resulting in an artificially elevated IMF value. The elevated IMF values were most noticed at plant 5 (shown in Tables 3-5) especially due to the inconsistency of the trimming of the longissimus dorsi and the overall size of the whole loin. Thus, different methods of segmentation should be investigated for future research. It is likely that variation in pork color and firmness would also influence the effectiveness of the Sobel method to accurately detect marbling. It would be more difficult to separate lean and IMF pixels when the lean tissue is extremely pale. Additionally, variation in firmness of the pork will affect the depth of visible IMF relative to the depth of the entire sample. While the results in this study showed a strong correlation between SMS and CF%, previous studies did not show as strong a correlation. Cannata et al. (2010) reported a correlation of 0.54 between SMS and CF% (measured using a chloroform/methanol extraction and gas chromatography), which is similar to the results by Huff-Lonergan et al. (2002), who used an isopropanol extraction (r = 0.57). The difference in methodology may explain part of the difference in correlations between experiments. Additionally, different evaluators were used for each study, so effect of evaluators' experience and accuracy could also play a role when comparing results to one another.
All methods in this study had stronger correlations when comparing methods within the individual chops than within the whole loin. Because the standard cards are pictures of individual chops, it may be easier for the  Estimates within 0.5% residual when compared to the CF% were considered accurate.
CF%, crude fat percentage; CVS, computer vision system; IMF%, intramuscular fat percentage. Estimates within 0.5% residual when compared to CF% were considered accurate.
CF%, crude fat percentage; CVS, computer vision system; HSI, hue, saturation, and intensity; IMF%, intramuscular fat percentage; RGB, red, green, and blue. evaluator to assess SMS for individual chops compared to the whole loin due to innate differences in the loin surface versus the loin interior. Additionally, due to the transparency of pork, depth of visible IMF, and thickness of samples, there is a greater ability to evaluate the IMF of a greater percentage of the volume of the individual chop compared to the whole loin, which may result in a better prediction of total IMF when using CVS IMF% or SMS. Last but not least, the consistency of exposure of the longissimus dorsi also affects the accuracy and difficulty of accurate assessment of SMS and CVS IMF% on the whole loin.
While there were only moderate correlations of CVS IMF% with CF% found in this study, there are many methods to increase the correlation, such as including other image features that can be extracted from the image and used for modeling for better accuracy prediction (Liu et al., 2018).

Prediction models and accuracy
While using the simple regression model to predict CF% had a low accuracy (Table 3), an improvement in accuracy was noticed when utilizing the bootstrap method for either simple (Table 4) or stepwise (Table 5) regression. Bootstrapping within plant to develop individual plant regression models was utilized to evaluate the effect of plant on model development. Creating individual models for each plant as opposed to using one model developed using data from all plants did improve the accuracy for the simple regression models (Table 4). When looking at overall accuracies, the improvement was seen the most when evaluating the whole loin (6.1% increase) compared to the A (2.4% increase) and B (2.1% increase) chops. However, this result was inconsistent with stepwise regression models, in which an increase in accuracy was found when evaluating the whole loin (4.5% increase) but a decrease in accuracy for the A (2.1% decrease) and B (1.8% decrease) chops.
The accuracy of the bootstrap stepwise regression model using all of the samples was determined to be 43.7% (whole loin), 58.1% (A chop), and 71.8% (B chop) (shown in Table 5.). The residual distribution of stepwise regression is presented in Figure 5. Whereas a positive residual indicates an overprediction of the CF%, a negative residual indicates an underprediction of CF%. It was noticed that, when predicting CF% of the whole loin, there was 25.9% of overprediction of CVS IMF% that were higher than 2.5%, although it was only 0.7% and 0.6% for A chop and B chop. Again, this could be due to the connective tissue between the longissimus dorsi and longissimus sparatus being calculated as IMF, as discussed earlier. Additionally, it was also shown that 65. 1%, 87.4%, and 93.6% (whole loin, A chop, and B chop, respectively) of the samples were predicted within 1% of the CF% value; 27.5%, 1.9%, and 0.8% (whole loin, A chop, and B chop) of the samples had an estimated IMF% that deviated greater than 2 from the ether extract IMF%.
In this study, SMS was shown to have a better correlation with CF% in all of the categories when compared to CVS IMF%. Currently, the performance of CVS IMF, especially in prediction of whole loin Orange columns represent percentage of residuals that were within −0.5% and þ0.5%. Positive residuals indicate overprediction of CF% by the computer vision system. CF%, has shown the limitation of CVS performance when there is an increase in improperly trimmed fat. However, there are still other factors that could contribute to increase the prediction accuracy. The difference observed within plants using CVS on IMF came significantly from the trimming operation. If the pork loin is trimmed well, that will leave more detection area to allow the artificial intelligence to choose which will significantly increase the prediction accuracy. While in our research 18 additional color features were added to the stepwise regression model, Muñoz and colleagues in 2015 reported that they regarded the Haralick textural features-including autocorrelation, cluster shade, entropy, and sum of variance-as the best features to measure quantitative marbling in meat products. It was also mentioned that, while CVS IMF% is widely considered the most representative feature for evaluating marbling, other features, including number of IMF fleck areas, can improve the performance of the model (Muñoz et al., 2015). These features were not measured in the present study but could improve results from this study if included.
Another potential factor that could affect the prediction accuracy is that, even when ROI is selected within the longissimus dorsi, it still does not truly represent the location on A chop and B chop. The second factor could be that more than 2 chops could be required to more accurately represent CF% of the whole loin. Another potential reason that could affect the prediction accuracy is that the ventral side of the muscle does not fully represent the face of its individual chop. While the ventral side does reveal a larger area of longissimus dorsi within the images (Figure 2), the evaluation result that came from subjective viewing of the loin at a different angle may change how SMS and CVS determines IMF. IMF is fat that grows between the muscle fibers, so there could be an effect depending on whether you are looking at the angle with or against the muscle fibers' growth. The fourth factor that could affect the accuracy is the uniformity of trimming within the plants, as this hugely effects the determination of ROI selection and how much lean tissue is exposed within the ROI, as discussed earlier. Therefore, the moderate accuracy for whole loin prediction from this research does not truly reflect the potential of using CVS to predict IMF for whole loin.
It was also noticed that, regardless of the modeling procedure, B chop consistently had the highest accuracy (percent), followed by A chop, and then the whole loin. Although this does suggest that the posterior end of the whole loin could potentially be a more ideal location for IMF detection, we believe that by increasing the uniformity of the ventral side pork whole loin by providing a consistent lean muscle area would also increase and benefit the accuracy of the prediction. For industry use of our established precision model, different image sensors other than RGB color will need to be investigated in order to add more elements to model as indicators for increasing the prediction accuracy in future study.

Conclusions
In this study, CVS IMF% was used to test the ventral side of the pork loin and the 3rd and 10th rib chop and was compared to CF% and SMS. The simple regression model demonstrated a weaker correlation when compared to SMS and CF% using only the CVS IMF% as prediction. However, after including color features and applying the bootstrap method and stepwise regression model, CVS was able to accurately predict the CF% of B chop (71.8%) and A chop (58.1%) and whole loin (48.2%). While prediction on the ventral side of the whole loin was the lowest, it is still an important location that cannot be replaced if CVS were to be implemented in the pork industry, as this location allows the meat plant to keep the integrity of the whole loin. And whereas unlike the beef industry pork is not priced based on marbling, having the ability to keep track and categorize pork will help the industry to distribute their products toward customer-specific needs.