Abstract
In Korea, beef carcass quality grades are primarily determined based on the loin-eye muscle area and the degree of marbling. However, final grading decisions also consider additional factors, including carcass abnormalities such as the extent of cartilage ossification. Ossification is classified into nine levels, with lower levels indicating younger cattle. In the case of multiparous cows, which are generally older and exhibit higher ossification levels, a grade reduction is typically applied when the ossification level reaches 8 or 9. Traditionally, ossification levels have been assessed visually by human graders. However, the inherent subjectivity of this method has led to inconsistencies, highlighting the need for more objective, image-based assessment techniques. In this study, ossification levels ranging from 6 to 9 were documented using a smartphone camera, resulting in a dataset of 1,770 images per grade. To evaluate the ossification levels, object detection models including YOLO v8, v9, v10, and v11 were compared. All models achieved an accuracy exceeding 95%, demonstrating their potential for practical application in slaughterhouse environments. In particular, the YOLO v9m and YOLO v10m models showed the highest accuracy of 99.08% and 99.22%, respectively. Furthermore, explainable artificial intelligence (XAI) techniques such as Grad-CAM and LIME were applied to visually confirm that the deep learning models focused on regions relevant to carcass maturity. This study presents an efficient and reliable approach for assessing cartilage ossification using smartphone-based deep learning. The proposed method offers improved grading accuracy and consistency, supporting its adoption in modern meat processing facilities.
Graphical abstract
Keywords: Beef carcass maturity grading, Object grading system, Explainable artificial intelligence, Ossification, YOLO model
Introduction
Recently, internal discussions at the Korean grading center have emerged on using image-based evaluations of carcass maturity to explore the scalability of camera-based object grading systems. In Korea, carcass maturity is determined by comprehensively examining the thoracic, lumbar, and sacral vertebrae and ribs of the left-side beef carcass, then assigning a grade from 1 to 9 based on ossification of the spinous-process cartilage in these areas (Korean Ministry of Government Legislation (KMGL), 2023). Maturity evaluation is not only applied in Korea but is also reflected in the beef carcass grading systems of the United States and Australia (USDA, 1997; AUS-MEAT, 2005). In the United States before 2017 maturity was assessed according toUSDA standards by evaluating ossification of the vertebrae and cartilage, the condition of the spinal column, and the color and texture of the ribeye muscle; since 2017 it has been classified by age into A–E groups (A: 9–30 months; E: over 96 months) (Hoffman et al., 2020). In contrast, in Korea, according to the standards set by the Livestock Products Quality Evaluation Center, maturity is divided into nine stages; grades 1 through 7 maintain the meat quality grade, while grades 8 and 9 result in a decline in meat quality grade. Incorrect maturity evaluation can lead to economic losses for farms, making it a critical factor in carcass grading (Kim et al., 2008). In young cattle, cartilaginous regions are more abundant than in older animals and undergo progressive age-related ossification—often more pronounced in cows—which, when advanced, can adversely affect meat quality (Hoffman et al., 2020; Watson et al., 2008). Tatum (2007) reported that with maturity, ribs change from red, narrow, and oval to wider, flatter, and gray, with coarser lean texture and darker muscle color (Tatum, 2007). The maturity grade of a beef carcass significantly affects meat quality, and grading variations due to maturity can cause economic losses (Schönfeldt & Strydom, 2011). Ossification progression varies with rearing conditions and genetics (Shira et al., 2021); some carcasses show atypical patterns—e.g., centralized initiation with peripheral cartilage retained or incomplete ossification in specific zones. Practical slaughterhouse plant conditions (lighting, backgrounds) adds variance, heightening subjectivity among graders; the boundary between grades 7 and 8 is particularly error-prone.
Image-based objective evaluation devices and quantitative approaches for livestock grading have recently been developed in Korea (Kim et al., 2021, 2023). Deep learning, especially for images, further supports this direction. Object detection methods identify both the location and type of targets in images, improving consistency and accuracy over visual inspection. In the analysis of cattle carcass maturity, key assessment criteria include the degree of cartilage ossification, bone coloration, and the color of the surrounding meat, which necessitate effective object detection methodologies. “You Only Look Once” (YOLO) is a widely used recent object detection model, offering fast inference and high accuracy (Kurniawan et al., 2024). The initial version divided an image into a fixed grid and derived predictions from bounding boxes per cell; the series has continuously improved, with the latest being YOLO v11 (Redmon et al., 2016; Jeghem et al., 2024). In the agricultural sector, YOLO has been employed in research for detecting foreign objects in cut vegetables (Kurniawan et al., 2024), predicting cattle body parts (Hao et al., 2023), and monitoring cattle behavior (Jeong et al., 2024). However, deep neural networks contain millions of parameters and learn via nonlinear transformations, making their decisions hard to interpret. When rationale is opaque, reliability and applicability are questioned (Markus et al., 2021). In slaughterhouses, internal conditions (floor color, background), lighting, and carcass characteristics introduce variables, and models may overfit the surrounding environment rather than focusing on maturity-related features. Thus, it is necessary to verify that models rely on maturity-related features. Recently, explainable artificial intelligence (XAI) techniques have emerged as useful model interpretation tools (Song et al., 2023; Narkhede, 2024). Arrieta et al. categorized XAI into model-specific vs. model-agnostic and intrinsic vs. post-hoc approaches (Arrieta et al., 2020). Representative post-hoc methods include Gradient-weighted Class Activation Mapping (Grad-CAM) and local interpretable model-agnostic explanations (LIME) (Song et al., 2023; Narkhede, 2024). Grad-CAM, a model-agnostic variant of Class Activation Mapping (CAM), generates activation maps without a Global Average Pooling (GAP) layer and is not restricted to specific architectures (Selvaraju et al., 2017). LIME constructs a simplified surrogate by perturbing features of a single instance and observing output changes (Magesh et al., 2020). Ultimately, these XAI methods help verify which features predominantly influence predictions.
This study is a pilot investigation of smartphone-based maturity grading, intentionally focusing on grades 6–9 rather than the full 1–9 range. Grades 1–5 have limited influence on the final quality grade and are readily distinguished by human graders, whereas misclassification within grades 6–9 can alter grading outcomes and result in economic loss. Accordingly, the study develops a YOLO-based object detection algorithm using images of cattle carcass bone maturity grades 6 through 9 and employs XAI to visualize the model’s decision process, validating key features and assessing algorithmic reliability.
Materials and methods
Image acquisition
The beef carcass maturity images used in this study were collected from eight slaughterhouses nationwide in Korea (Naju LPC, Bucheon LPC, Chungbuk Eumseong LPC, Hoengseong KC, Dodram LPC, Sobaeksan Hanwoo, Integrated Bukyung LPC, and Porkvill) (Fig. 1). This preliminary research did not target all maturity grades (1–9); only carcasses corresponding to maturity grades 6–9 were imaged, with grade 7 as the reference point for meat quality decline. The study focused on Korean native cattle (Bos taurus coreana), and images were collected regardless of gender (cow, steer, or bull) or age. Data were gathered over four months from July to October 2023, comprising 8,713 images (Grade 6: 1,839; Grade 7: 1,850; Grade 8: 1,780; Grade 9: 3,244). Sample image acquisitions were taken of the first thoracic vertebra region of the left half-carcass between June and August 2023.
Fig. 1.
Sample images of beef bone maturity from various slaughterhouse chilling rooms
Images were captured using a smartphone, employing its 108-megapixel primary camera among the four rear cameras (Fig. 2). The camera settings were fixed at an aperture of F1.8 and an exposure time of 1/120 seconds, resulting in final images of 4000 × 3000 pixels. Image collection was divided into three sessions: the first in August 2023, the second in September 2023, and the third in October 2023. The images were subsequently classified into maturity grades 6 through 9 by evaluators stationed at each slaughterhouse. Due to potential variations in evaluation criteria across slaughterhouses, the images collected in the first session were sent to the Korea Institute for Animal Products Quality Evaluation headquarters in Sejong for cross-validation. Two experts, trained in maturity grading, conducted the final review of these images. Misclassified images were either regraded or excluded. The final, validated set of images was then used to develop the maturity grading model.
Fig. 2.
(a) Beef carcass image acquisition location and process. (b) Collected images of bone maturity at different grades (6 to 9 grade)
Data grading and classification
Two professionally trained beef carcass graders conducted the maturity grading of the data. Each evaluator independently classified the images, and subsequently, both reviewers re-examined the images to reclassify any incorrectly graded ones. A total of 8,713 images were initially acquired, distributed as follows: Grade 6–1,839 images, Grade 7–1,850 images, Grade 8–1,780 images, and Grade 9–3,244 images. However, duplicate images were removed through random sampling to preserve the overall proportion of images across grades, resulting in a final database comprising 7,080 images (Table 1).
Table 1.
Bone maturity grade image database information
| Maturity grade | Train | Valid | Test | Total |
|---|---|---|---|---|
| 6 | 1,068 | 360 | 342 | 1,770 |
| 7 | 1,057 | 370 | 343 | 1,770 |
| 8 | 1,060 | 344 | 366 | 1,770 |
| 9 | 1,063 | 342 | 365 | 1,770 |
| Total | 4,248 | 1,416 | 1416 | 7,080 |
Data labeling
This study used the web-based Roboflow platform (Roboflow, Inc., Iowa, USA) to construct the training dataset for an object detection model targeting ossification levels (grades 6–9). The dataset comprised 1,770 images categorized by ossification level, with the cartilage regions corresponding to each level annotated using rectangular bounding boxes. Labeling was done on the Roboflow platform, and the dataset was converted into the ‘.txt’ format, which is suitable for training YOLO models. The converted files were stored in folders named ‘6-grade’, ‘7-grade’, ‘8-grade’, and ‘9-grade’, corresponding to each image’s ossification grade. A ‘.yaml’ file was also created to specify the classes and dataset information using the YOLO format.
Data augmentation
In deep learning, data augmentation is frequently employed to increase the training dataset’s size and diversity, serving as a form of regularization to reduce the model’s generalization error (Chlap et al., 2021). In this study, various augmentation techniques were applied to enhance the diversity of the dataset for cattle carcass maturity grading. The augmentation methods included horizontal flipping with a 50% probability to generate symmetric data, and mosaic augmentation was applied at a 100% probability to combine several images into one, thereby increasing data complexity. Mixup augmentation was employed with a 10% probability to blend pixels from different images, enhancing training robustness. Furthermore, images were translated with a 10% probability and scaled with a 50% probability to capture variations in size and position. Shear and perspective augmentations were each applied with a 10% probability, and image rotation was allowed up to 10 degrees to maximize the variability of the training data. These augmentation techniques were designed to ensure that the model maintains high predictive performance under various conditions.
Model training
The fully labeled dataset was partitioned into training, validation, and test sets in a 6:2:2 ratio for model development. This ratio was adopted to balance parameter learning, a separate subset for hyper-parameter tuning/early stopping, and an untouched hold-out large enough to stabilize estimates—particularly around the grade-7/8 boundary; splits were grade-stratified and group-aware by carcass ID to prevent information leakage. For model training, various YOLO model variants were compared and analyzed across versions 8 through 11, including the fast nano model (n), the medium model (m), which offers a balance of speed and accuracy, and the extra-large model (x) that, while relatively slower, delivers higher accuracy. In the case of YOLO 9, models distributed by a different developer were utilized, namely YOLO v9-tiny (t), YOLO v9-medium (m), and YOLO v9-enhanced (e). Hyperparameter settings for training were established as follows: The number of epochs was set to 300, with an early stopping mechanism in place to terminate training if no performance improvement was observed for 100 consecutive epochs. The batch size was set to 32, and an adaptive learning rate was employed so that the learning rate would automatically adjust during model optimization. The final trained model was saved as a ‘.pt’ file. Model training was conducted in a Python 3.11.10 environment(Python Software Foundation, Wilmington, Delaware, USA) using the PyTorch 2.5.1 deep learning framework, and the training process was accelerated using an NVIDIA RTX A6000 GPU(Nvidia Corporation, Santa Clara, California, USA), with the environment optimized based on CUDA 12.6 and cuDNN 8.9.
Model performance analysis
The model’s performance was evaluated using trained weights from the maturity image dataset on the test set. Evaluation metrics included mean average precision (mAP), calculated as the average of average precision (AP) scores (with AP defined as the area under the precision-recall curve), specifically mAP50—assessing detection accuracy at an Intersection over Union (IoU) threshold of 0.50—and mAP50-95, computed by averaging AP scores over IoU thresholds ranging from 0.50 to 0.95 in increments of 0.05, which provides a more stringent and comprehensive assessment. In addition, precision, recall, F1 Score, and total accuracy (%) were computed. Here, precision represents the proportion of correct positive predictions among all positive predictions, recall indicates the proportion of actual positives correctly identified, and the F1 Score is the harmonic mean of precision and recall. The test dataset was further analyzed using a confusion matrix that categorized predictions into true positives (TP), false positives (FP), and false negatives (FN), while inference time per image (ms) was measured to assess the model’s speed. Models were selected during training based on achieving higher mAP50-95 values.
![]() |
1 |
![]() |
2 |
![]() |
3 |
![]() |
4 |
Explainable AI
Explainable AI (XAI) seeks to make the decision-making and prediction processes of AI models comprehensible to humans. Deep learning models, owing to complex architectures, are often termed “black boxes” (Magesh et al., 2020), obscuring which features drive decisions. For example, in vehicle-detection systems, it is crucial to verify whether the algorithm relies on features intrinsic to the car rather than spurious context (e.g., nearby roads or wheels). Such opacity can cause deployment issues, necessitating thorough validation (Atakishiyev et al., 2021). Accordingly, understanding model decision processes is essential for broad acceptance (Garreau & Luxburg, 2020). This study is preliminary research assessing feasibility by training on data collected from multiple Korean slaughterhouses with differing backgrounds. Initial classification experiments showed sensitivity to lighting and background (results not shown), motivating a shift to object detection and XAI for deeper insight. XAI methods included Gradient-weighted Class Activation Mapping (Grad-CAM) and Local Interpretable Model-agnostic Explanations (LIME). Analyses used PyTorch 2.5.1 with cu118 in Python 3.8.19. XAI was applied to the model version with the highest accuracy for each YOLO variant.
Gradient-weighted class activation mapping (Grad-CAM)
Grad-CAM is a technique that visualizes the weight contributions in a model’s decision-making process (Selvaraju et al., 2017). In this study, Grad-CAM highlighted the important regions of input images associated with specific classes during the deep learning model’s prediction process. Specifically, Grad-CAM generates a class activation map based on the gradients of the output class scores with respect to the feature maps produced by the convolutional neural network (CNN) architecture. Here, Grad-CAM was applied to the classified ossification levels (grades 6–9); the process involved computing the gradients of the score for each target class along with those from the final convolutional layer to derive weights that represent the contribution of each feature map. These feature maps and their corresponding weights were then combined, and the resultant activation map was normalized using the Rectified Linear Unit (ReLU), ultimately being visualized as a heatmap superimposed on the original image. The Grad-CAM analysis was implemented using the Python-based PyTorch framework and the Grad-CAM library, which confirmed that the image regions emphasized during the classification of ossification levels are indeed related to ossification characteristics. This approach not only enhances model reliability but also demonstrates the utility of explainable artificial intelligence (XAI) techniques. In this study, the YOLO v9m model was selected for Grad-CAM visualization; for class prediction, the ‘model.21.cv3.0.m.0.cv2’ layer was used, and for bounding box prediction, the ‘model.22.cv3.1.1.conv’ layer was chosen.
Local interpretable Model-agnostic explanations (LIME)
Local interpretable model-agnostic explanations(LIME) is a model-agnostic, superpixel-based explainable algorithm (Ribeiro et al., 2016). This algorithm segments the input image into superpixels and quantitatively evaluates the impact of each region on the model’s prediction. It assigns local weights to individual data points (i.e., superpixels) for interpretation. To accomplish this, LIME utilizes a radial basis function kernel to compute the similarity between the original and perturbed data, assigning higher weights to more similar samples. Based on the weighted data, LIME trains a simple linear regression model to approximate the local behavior of the black-box model. The regression coefficients of this linear model reveal the extent to which each feature contributes to the prediction outcome. For instance, in the case of image data, a particular superpixel may be highlighted, whereas for text data, a specific word may be identified as influential. Without requiring any knowledge of the model’s structure or internal workings, LIME can explain individual predictions in a local context, thereby elucidating why a particular image is classified into a specific category and identifying the most critical input elements influencing that decision. In this study, the LIME algorithm was implemented using version 0.2.0.1 of the Python lime library to perform superpixel segmentation on the input images and provide a quantitative interpretation of the model’s prediction outcomes.
Results and discussion
YOLO model result
In this study, models from YOLO V8 to V11 were compared, including the lightweight nano (n)/tiny (t) models, the medium (m) models that balance speed and accuracy, and the extra-large (x)/enhanced (e) models that, although slower, offer higher accuracy. Table 2 summarizes the overall performance of these models, while Fig. 3 visualizes the classification outcomes for the highest-performing model, YOLO 9 m. Figure 3 presents the annotated images for bone maturity grades 6 through 9 and the corresponding classification regions. Table 2 reports metrics including mAP50, mAP50-95, Precision, Recall, F1-score, total accuracy, and inference time. Most models produced prediction regions closely aligned with the annotations, with many YOLO models achieving mAP50 values above 0.99. In particular, YOLO v8m, v8x, and 10 m demonstrated relatively high performance. However, model selection was based on mAP50-95, a more stringent metric; in this regard, the heavier YOLO v8x and v9e models attained the highest mAP50-95 values, while YOLO v10 and v11 exhibited optimal performance in their medium (m) configurations. The differences between mAP50 and mAP50-95 across models were within 1–2%, indicating that the predicted bounding boxes closely match the annotated positions even under rigorous IoU thresholds (Jeghem et al., 2024). This performance suggests that the models effectively avoided overfitting and achieved robust generalization. Analysis of the test set based on total accuracy generally showed that, except for YOLO v10x, the medium (m) variant in each version performed best, with YOLO v9-m and YOLO v11-m achieving accuracies of 99.08% and 99.22%, respectively. Inference time, where lower values correspond to faster processing, was also evaluated. Although image data were acquired via a smartphone in this preliminary study—with the long-term goal of deploying models on mobile devices—inference time was calculated using an NVIDIA RTX 6000, and similar trends are expected in smartphone environments. Overall, the YOLO v11m model was determined to be superior in terms of accuracy and speed, while the YOLO v9m model emerged as a viable alternative.
Table 2.
Comparative analysis of overall performance for classifying beef carcass maturity grades across different YOLO versions
| System type | Models | mAP50 | mAP 50–95 |
Precision | Recall | F1-score | Total Accuracy | Inference time(ms) |
|---|---|---|---|---|---|---|---|---|
|
Object detection model performance |
YOLO v8-n | 0.9900 | 0.9780 | 0.9861 | 0.9804 | 0.9832 | 98.31 | 0.0186 |
| YOLO v8-m | 0.9930 | 0.9789 | 0.9802 | 0.9861 | 0.9832 | 98.94 | 0.0216 | |
| YOLO v8-x | 0.9932 | 0.9854 | 0.9889 | 0.9837 | 0.9863 | 98.94 | 0.0240 | |
| YOLO v9-t | 0.9909 | 0.9834 | 0.9809 | 0.9875 | 0.9842 | 98.73 | 0.0311 | |
| YOLO v9-m | 0.9923 | 0.9853 | 0.9782 | 0.9909 | 0.9845 | 99.08 | 0.0290 | |
| YOLO v9-e | 0.9921 | 0.9855 | 0.992 | 0.9804 | 0.9861 | 98.23 | 0.0436 | |
| YOLO v10n | 0.9912 | 0.9803 | 0.9848 | 0.9765 | 0.9806 | 98.38 | 0.0231 | |
| YOLO v10m | 0.9931 | 0.986 | 0.9823 | 0.9857 | 0.9840 | 98.94 | 0.0297 | |
| YOLO v10x | 0.9926 | 0.9846 | 0.9858 | 0.9819 | 0.9838 | 98.52 | 0.0263 | |
| YOLO v11n | 0.9917 | 0.9779 | 0.9798 | 0.9897 | 0.9847 | 98.59 | 0.0214 | |
| YOLO v11m | 0.9923 | 0.9847 | 0.9864 | 0.9838 | 0.9851 | 99.22 | 0.0248 | |
| YOLO v11x | 0.9911 | 0.9844 | 0.9894 | 0.9821 | 0.9821 | 98.73 | 0.0332 |
mAP 50: mean Average Precision at the intersection over union (IoU) 0.50, mAP 50–95: mean Average Precision at IoU thresholds from 0.50 to 0.95; F1 score: Harmonic mean of precision and recall; n: nano; m: medium; x: extra-large; t: tiny; e: enhanced; ms: milliseconds
Fig. 3.
Beef carcass bone maturity detection labeling and prediction results using the YOLO V9m model
To contextualize these results, v8–v11 can be briefly positioned within recent architectural advances (Murat & Kiran, 2025). YOLOv9 introduces Programmable Gradient Information (PGI) and a lightweight GELAN backbone, aimed at retaining fine-grained cues in low-contrast regions without incurring inference-time costs. This design aligns with the observation that v9m sustains high recall under subtle visual differences. YOLOv10 emphasizes an NMS-free, assignment-consistent detection pipeline to reduce post-processing latency, though its added components may complicate customization for mobile deployment. YOLOv11 replaces C2f with C3k2 and integrates a lightweight attention module (C2PSA), improving small/low-resolution focus while maintaining competitive compute; this likely underpins v11m’s slight accuracy edge at comparable scales. Collectively, these design trends—better gradient flow (v9), end-to-end efficiency (v10), and targeted attention (v11)—explain the tight mAP50–95 gaps across models and the strong generalization observed in this study.
Furthermore, a confusion matrix for the test set is presented in Fig. 4 to support model selection. Differentiating grades 7 and 8 is particularly critical because this boundary aligns with the onset of quality degradation. The highest confusion rate occurred between these two grades, which reflects a genuinely indistinct boundary rather than a model artifact. Grades 7 and 8 share highly similar visual cues—e.g., the coloration and opacity of cartilage and ossified bone—and minor variations in external lighting or the grader’s viewing angle can attenuate those cues, lowering inter-rater agreement and increasing model uncertainty. By contrast, grade 9 shows pronounced ossification with a clearly visible porous surface pattern, making visual discrimination comparatively easier. These characteristics explain why mutual misclassification peaks at the 7–8 boundary in the confusion matrix. While it is important to minimize misclassifications where images of maturity grades 8 or 9 are erroneously classified as grades 6 or 7, such errors are unlikely to cause direct socioeconomic harm. However, misclassifying grade 6 as grade 8 or 9, or grade 7 as grade 8 or 9, could potentially lead to economic losses. Consequently, model selection should prioritize those with high recall for grades 6 and 7. Based on total accuracy, the YOLO v11m model (99.22%) was deemed the most effective overall. Nonetheless, from an economic perspective, the YOLO v9m model—with a recall value of 0.9909—appears to minimize potential losses most effectively. Therefore, despite the slightly higher overall accuracy of the YOLO v11m model, the YOLO v9m model was selected as the industrially suitable candidate, and subsequent XAI analysis was conducted using this model.
Fig. 4.
Comparative confusion matrix analysis of YOLO v9m and YOLO v11m classifications
Grad-CAM result
The present study applied Grad-CAM and LIME algorithms to the top-performing model, YOLO v9m. Grad-CAM visualizes the critical regions of an input image that are associated with a specific class during the deep learning model’s prediction process, thereby increasing transparency and enhancing trust in the predictions—an essential function in the field of XAI. The YOLO architecture is divided into the Backbone, Neck, and Head. Its distinctive feature is first predicting the coordinates of the bounding boxes and then computing class probabilities for those coordinates. Consequently, when applying Grad-CAM to YOLO, it is necessary to indicate the convolutional layer responsible for the bounding box predictions as well as the convolutional layer associated with the class classifications. For YOLO v9m, the convolutional layer related to class classification is identified as ‘model.21.cv3.0.m.0.cv2’, while the layer associated with bounding box prediction is ‘model.22.cv3.1.1.conv’. Grad-CAM visualization was performed on these layers during class determination (Fig. 5). During bounding box prediction, it appears that the YOLO v9m model utilizes features from the surrounding muscle and fat regions, as well as information pertaining to the bone region, to determine the necessary location. In the case of class projection, the emphasis on the bone structure was confirmed through the Grad-CAM weight heat map, particularly with concentrated weights observed along the central line of the bone. The Grad-CAM visualization of the YOLO model enhances interpretability by transparently revealing the key feature areas that influence the model’s predictions, thereby reinforcing model reliability and supporting the justification of decision-making in real-time applications. However, since Grad-CAM only visualizes the feature weights from a specific layer, it has limitations in fully explaining the decision-making process across the entire model (Chattopadhay et al., 2018). The LIME algorithm was additionally employed to address this limitation.
Fig. 5.
Visualization of grade-specific activations using Grad-CAM
LIME result
LIME is a superpixel-based algorithm that provides interpretable results. This study specified a threshold of 0.25 during superpixel visualization, designating the top five weighted superpixels. The LIME algorithm belongs to the category of surrogate analysis, a method that creates a surrogate model to mimic the functionality of the original model and assess whether the prototype behaves similarly (Ribeiro et al., 2016; Sejr et al., 2021). Deep learning involves constructing a new model that exhibits functionality similar to a complex, original model. Interpreting a single training instance through this process is called local surrogate analysis. Surrogate analysis offers the advantage of being model-agnostic, enabling the construction of interpretable models without requiring detailed information about the original model, even when using a limited dataset. LIME is an XAI technique that identifies the regions of the input data on which the model focuses and that serve as the basis for classification. When an input image is provided, LIME segments it into several parts and applies perturbations to interpret its contribution to the model’s prediction. It searches for the combination of superpixels that minimizes the loss function, thereby identifying those that most significantly influence the model’s output. Figure 6 illustrates the results of applying the LIME algorithm to the highest-performing model, YOLO v9m, which was tested on images corresponding to grades 6, 7, 8, and 9. The model yielded a probability of 1.00 for all of these grades. Additionally, when visualizing the high-weight superpixels, the analysis for the 6-grade image revealed that the model considered both the red bone area and its surrounding regions (indicated by the green pixels). For the 7-grade and 8-grade images, high weights were assigned to the inter-bone areas, while for the 9-grade image, high weights were concentrated on the white ossified area, as observed in Fig. 6. These findings confirm that the classification model identifies features like the criteria used by human evaluators for determining maturity grades.
Fig. 6.
Results of pixel-wise importance analysis using the LIME algorithm
Conclusion
The present study investigated the feasibility of image-based evaluation of bone maturity. An object detection model was constructed using various YOLO V8–V11 models, and additional interpretative analyses were conducted with explainable AI techniques—namely Grad-CAM and LIME—to elucidate the models’ feature utilization. Although the YOLO v11m model achieved the highest accuracy (99.22%) and demonstrated reliable operation by leveraging bone ossification characteristics, its recall value for grades 7–8 was lower than that of the YOLO v9m model, reducing economic viability. Consequently, the YOLO v9m model was selected as the optimized model, and both Grad-CAM and LIME confirmed that its classifications of ossification closely aligned with human judgment. Specifically, the XAI maps concentrated on the spinous-process cartilage, the porous/opaque texture and grayish coloration of ossified bone, and the darker surrounding muscle with shape/edge cues—features routinely examined by graders—thereby substantiating that the model attends to anatomically meaningful signals. This alignment also clarifies why grades 7–8 exhibit the highest mutual confusion, as these cues transition gradually across the boundary. These results indicate that objective ossification assessment is achievable through image analysis, with potential applications in automated grading and investigations into the genetic factors influencing ossification phenotypes. However, because the data were collected in a slaughterhouse chilling room, further studies are required to evaluate the algorithm’s performance in diverse environments. In particular, the current database covers only grades 6–9; therefore, additional data collection is necessary for a comprehensive grading system encompassing grades 1–9. Moreover, deploying the algorithm in real-world settings will necessitate the development of an appropriate hardware system. Since cattle carcasses may be closely positioned in some slaughterhouse environments, the existing smartphone-based imaging method may have limitations, and integrating the algorithm into a whole-carcass imaging system such as VBS2000 should be considered. This foundational research demonstrates that an image-based analytical approach can automate the grading process for bone maturity, potentially enhancing the reliability, efficiency, and objectivity of maturity evaluation.
Acknowledgements
This study was supported by Chungnam National University, Republic of Korea.
Author contributions
Conceptualization: Kim J, Sun CW, and Cho BK. Methodology: Kim J, Ahn SH, Yoon SK.Software: Kim J. Validation: Kim J, Ahn SH, Yoon SK, Sun CW, Cho BK.Formal analysis: Kim J. Investigation: Cho BK. Resources: Cho BK. Data curation: Kim J, Noh HR, Jeong HJ, Ahn SH, Yoon SK. Writing—original draft preparation: Kim J, Cho BK. Writing—review and editing: Kim J, Cho BK.Visualization: Kim J. Supervision: Cho BK. Project administration: Cho BK. Funding acquisition: Cho BK. All authors have read and agreed to the submitted version of the manuscript.
Funding
This study was supported by Chungnam National Univeristy, Republic of Korea.
Data availability
Data will be made available on request.
Declarations
Competing interests
The authors declare no competing interests.
Ethics approval
This article does not require IRB/IACUC approval because there are no human and animal participants.
Footnotes
Publisher’s note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
References
- Arrieta, A. B., Díaz-Rodríguez, N., Del Ser, J., Bennetot, A., Tabik, S., Barbado, A., García, S., Gil-López, S., Molina, D., Benjamins, R., & Chatila, R. (2020). Explainable artificial intelligence (XAI): Concepts, taxonomies, opportunities and challenges toward responsible AI. Information Fusion,58, 82–115. 10.1016/j.inffus.2019.12.012 [Google Scholar]
- Atakishiyev, S., Salameh, M., Yao, H., & Goebel, R. (2021). Explainable artificial intelligence for autonomous driving: A comprehensive overview and field guide for future research directions. IEEE Access, 12, 101603–101625. 10.1109/ACCESS.2024.3431437 [Google Scholar]
- AUS-MEAT (2005). Handbook of Australian meat. 7th ed. AUS-MEAT Ltd, Brisbane, Australia.
- Chattopadhay, A., Sarkar, A., Howlader, P., & Balasubramanian, V. N. (2018). Grad-CAM++: Generalized gradient-based visual explanations for deep convolutional networks. In: 2018 IEEE Winter Conference on Applications of Computer Vision (WACV 2018). pp. 839–847. 10.1109/WACV.2018.00097
- Chlap, P., Min, H., Vandenberg, N., Dowling, J., Holloway, L., & Haworth, A. (2021). A review of medical image data augmentation techniques for deep learning applications. Journal of Medical Imaging and Radiation Oncology, 65(5), 545–563. 10.1111/1754-9485.13261 [DOI] [PubMed] [Google Scholar]
- Garreau, D., & Luxburg, U. (2020). Explaining the explainer: A first theoretical analysis of LIME. In: Proceedings of the International Conference on Artificial Intelligence and Statistics (AISTATS 2020). pp. 1287–1296. Available from: http://proceedings.mlr.press/v108/garreau20a.html
- Hao, W., Ren, C., Han, M., Zhang, L., Li, F., & Liu, Z. (2023). Cattle body detection based on YOLOv5-EMA for precision livestock farming. Animals, 13(22), 3535. 10.3390/ani13223535 [DOI] [PMC free article] [PubMed] [Google Scholar]
- Hoffman, K. C., Colle, M. J., Nasados, J. A., Gray, S. J., Rogers, J., Van Buren, J. B., Puga, K. J., Murdoch, G. K., Richard, R. P., & Doumit, M. E. (2020). Relationship between heifer carcass maturity and beef quality characteristics. Transl Anim Sci, 4(2), 1206–1215. 10.1093/tas/txaa017 [DOI] [PMC free article] [PubMed] [Google Scholar]
- Jeghem, N., Koh, C. Y., Abdelatti, M., & Hendawi, A. (2024). Evaluating the evolution of YOLO (You only look Once) models: A comprehensive benchmark study of YOLO11 and its predecessors. ArXiv Preprint arXiv:241100201. https://arxiv.org/abs/2411.00201
- Jeong, K., Kim, D. R., Ryu, J. H., Kim, H. W., Cho, J., Lee, E., & Jeong, J. H. (2024). A monitoring system for cattle behavior detection using YOLO-v8 in IoT environments. In: Proceedings of the IEEE International Conference on Consumer Electronics (ICCE 2024). pp. 1–4. 10.1109/ICCE59016.2024.10444145
- Kim, D. Y., Kim, B. D., Baek, S. G., Jeong, H. J., Kim, D. G., & Han, G. D. (2008). Correlation between shear force and grade decision factors on Hanwoo cow carcass. Korean J Food Sci Anim Resour, 28, 344–348. 10.5851/kosfa.2008.28.3.344 [Google Scholar]
- Kim, J., Han, H. D., Lee, W. Y., Wakholi, C., Lee, J., Jeong, Y. B., & Bae, J. H. (2021). Economic analysis of the use of VCS2000 for pork carcass meat yield grading in Korea. Animals, 11(5), 1297. 10.3390/ani11051297 [DOI] [PMC free article] [PubMed] [Google Scholar]
- Kim, J., Kwon, Y. K., Kim, H. W., Seol, K. H., & Cho, B. K. (2023). Robot technology for pork and beef meat slaughtering process: A review. Animals, 13(4), 651. 10.3390/ani13040651 [DOI] [PMC free article] [PubMed] [Google Scholar]
- Korean Ministry of Government Legislation (KMGL). (2023). Enforcement Rule of the Livestock Act. National Law Information Center. Available from: https://www.law.go.kr. Accessed Jan 15, 2025.
- Kurniawan, H., Arief, M. A. A., Manggala, B., Lee, S., Kim, H., & Cho, B. K. (2024). Advanced detection of foreign objects in fresh-cut vegetables using YOLOv5. LWT-Food Sci Technol, 212, 116989. 10.1016/j.lwt.2023.116989 [Google Scholar]
- Magesh, P. R., Myloth, R. D., & Tom, R. J. (2020). An explainable machine learning model for early detection of Parkinson’s disease using LIME on DaTSCAN imagery. Computers in Biology and Medicine,126, Article 104041. 10.1016/j.compbiomed.2020.104041 [DOI] [PubMed] [Google Scholar]
- Markus, A. F., Kors, J. A., & Rijnbeek, R. (2021). The role of explainability in creating trustworthy artificial intelligence for health care: A comprehensive survey of the terminology, design choices, and evaluation strategies. Journal of Biomedical Informatics,113, Article 103655. 10.1016/j.jbi.2020.103655 [DOI] [PubMed] [Google Scholar]
- Murat, A. A., & Kiran, M. S. (2025). A comprehensive review on YOLO versions for object detection. Engineering Science and Technology an International Journal, 70, 102161. 10.1016/j.jestch.2025.102161 [Google Scholar]
- Narkhede, J. (2024). Comparative evaluation of post-hoc explainability methods in AI: LIME, SHAP, and Grad-CAM. In: Proceedings of the 4th International Conference on Sustainable Expert Systems (ICSES 2024). pp. 826–830. 10.1109/ICSES63445.2024.10762963
- Redmon, J., Divvala, S., Girshick, R., & Farhadi, A. (2016). You only look once: Unified, real-time object detection. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR). pp. 779–788. 10.1109/CVPR.2016.91
- Ribeiro, M. T., Singh, S., & Guestrin, C. (2016). Why should I trust you? Explaining the predictions of any classifier. In: Proceedings of the ACM SIGKDD International Conference on Knowledge Discovery and Data Mining (KDD 2016). pp. 1135–1144. 10.1145/2939672.2939778
- Schönfeldt, H. C., & Strydom, P. E. (2011). Effect of age and cut on tenderness of South African beef. Meat Science, 87, 206–218. 10.1016/j.meatsci.2010.11.020 [DOI] [PubMed] [Google Scholar]
- Sejr, J. H., Schneider-Kamp, P., & Ayoub, N. (2021). Surrogate object detection explainer (SODEx) with YOLOv4 and LIME. Machine Learning and Knowledge Extraction,3(4), 662–671. 10.3390/make3030035 [Google Scholar]
- Selvaraju, R. R., Cogswell, M., Das, A., Vedantam, R., Parikh, D., & Batra, D. (2017). Grad-CAM: visual explanations from deep networks via gradient-based localization. In: Proceedings of the IEEE International Conference on Computer Vision (ICCV 2017). pp. 618–626. 10.1109/ICCV.2017.74
- Shira, K. A., Murdoch, B. M., Davenport, K. M., Becker, G. M., Xie, S., Colacchio, A. M., Bass, P. D., Colle, M. J., & Murdoch, G. K. (2021). Advanced skeletal ossification is associated with genetic variants in chronologically young beef heifers. Genes, 14(8), 1629. 10.3390/genes14081629 [DOI] [PMC free article] [PubMed] [Google Scholar]
- Song, D., Yao, J., Jiang, Y., Shi, S., Cui, C., Wang, L., Yu, M., Zhou, X., Li, H., Gao, Z., Li, Y., Chen, F., & Dong, F. (2023). A new xAI framework with feature explainability for tumors decision-making in ultrasound data: Comparing with Grad-CAM. Computer Methods and Programs in Biomedicine, 235, 107527. 10.1016/j.cmpb.2023.107527 [DOI] [PubMed] [Google Scholar]
- Tatum, D. (2007). Beef grading. Colorado State University, Department of Animal Science. Available from: https://www.beefresearch.org/resources/product-quality/fact-sheets/beef-grading. Accessed Jan 26, 2025.
- USDA. (1997). United States standards for grades of slaughter cattle. Agricultural Marketing Service, USDA, Washington, DC, USA.
- Watson, R., Polkinghorne, R., & Thompson, J. M. (2008). Development of the meat standards Australia (MSA) prediction model for beef palatability. Australian Journal of Experimental Agriculture, 48(11), 1368–1379. 10.1071/EA07184 [Google Scholar]
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.
Data Availability Statement
Data will be made available on request.











