Method for detecting intramuscular fat content of cattle living body
By using a linear array ultrasonic probe and deep learning algorithms, we have achieved in vivo detection of intramuscular fat in beef, solving the problem that traditional methods cannot achieve in vivo monitoring. This provides an efficient and low-cost detection solution that is suitable for large-scale applications in livestock farms.
Patent Information
- Application Number
- CN202610054106.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-15
- Publication Date
- 2026-04-24
AI Technical Summary
Existing methods for detecting intramuscular fat in beef cannot achieve live monitoring, and traditional equipment is expensive and the testing process is cumbersome, making it difficult to apply on a large scale in farms.
By employing a linear array ultrasound probe combined with deep learning algorithms, and through ultrasound image preprocessing, segmentation, and fat content prediction, non-invasive, real-time detection of intramuscular fat content in live beef can be achieved.
It achieves high-precision, low-cost detection of intramuscular fat in live beef, suitable for large-scale application in farms, providing a scientific basis for breeding and management, and improving detection efficiency and result consistency.
Smart Images

Figure CN121910403A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of bovine animal testing and intelligent farming technology, specifically a method for detecting intramuscular fat content in bovine animals. Background Technology
[0002] Intramuscular fat content is a crucial indicator for evaluating beef quality. Different levels of intramuscular fat directly affect the flavor, tenderness, and juiciness of beef, and also influence its suitability for subsequent processing. Insufficient intramuscular fat deposition leads to dry, tough meat with poor flavor, while excessive intramuscular fat can negatively impact the health value of beef. Therefore, real-time monitoring and accurate assessment of intramuscular fat content during beef cattle fattening and breeding are of great significance for improving beef quality, optimizing production management, and meeting market demands.
[0003] Currently common detection methods include post-slaughter sampling and testing (such as chemical extraction, near-infrared spectroscopy, and marbling scoring). While these methods provide accurate results, they cannot be used for live animal monitoring and cannot achieve dynamic tracking of cattle during their growth and rearing stages. Other methods, such as computed tomography combined with computer vision technology, can be used for live animal detection, but the equipment is expensive, the testing process is cumbersome, and special treatment of the cattle is required, making large-scale application on farms difficult.
[0004] Therefore, developing a low-cost, non-invasive, real-time, and high-precision technology for detecting intramuscular fat in beef has become a crucial issue that urgently needs to be addressed. This would not only provide a scientific basis for beef cattle feeding and breeding but also offer objective references for beef quality grading and market pricing, thereby promoting quality improvement and efficiency enhancement across the entire industry chain. Summary of the Invention
[0005] The purpose of this invention is to provide a method for detecting intramuscular fat content in live bovine tissue, in order to solve the problems mentioned in the background art.
[0006] To achieve the above objectives, the present invention provides the following technical solution: a method for detecting intramuscular fat content in live bovine tissue, the specific steps of which are as follows:
[0007] S1. Data Acquisition:
[0008] S1-1. First, routine performance measurements were performed on the sample cattle. Then, the sample cattle were slaughtered. One hour after slaughter, 200 grams of meat samples were taken from the eye area. The intramuscular fat (IMF) content of each cattle was determined by Soxhlet extraction.
[0009] S1-2. Fix the cow to the restraint frame, shave and clean the hair in the examination area, and then apply vegetable oil as an ultrasound coupling agent.
[0010] S1-3. Place the linear array ultrasound probe along the rib direction at the midline position between the 12th and 13th ribs, and select the medial end of the longissimus dorsi muscle for scanning. Acquire an ultrasound video for each cow, and then select the ideal frame with clear image and complete eye muscle structure for subsequent analysis.
[0011] S2, Ultrasound Image Preprocessing:
[0012] S2-1. Crop the region of interest in the acquired ultrasound images, retaining only the rib eye area and removing unnecessary background.
[0013] S2-2. Process the image using grayscale histogram equalization or normalization methods;
[0014] S2-3. Enhance contrast to improve the local and global contrast of the image;
[0015] S2-4. Apply data augmentation techniques to the preprocessed image;
[0016] S3, Eye muscle region image segmentation:
[0017] S3-1. Construct a segmentation network based on the Segment Anything Model (SAM) and fine-tune it on bovine eye muscle ultrasound images;
[0018] S3-2. During training, a ground-value supervised model is used for segmentation to balance the segmentation accuracy of both foreground and background.
[0019] S3-3. Use the trained segmentation model to generate a binary mask image of the oculomotor region, apply it to the original ultrasound image, and extract the pure oculomotor region image.
[0020] S4. Fat content prediction:
[0021] S4-1. A deep learning-based visual Transformer network (ViT) combined with a long short-term recurrent neural network (LSTM) is used to perform regression prediction on the video. The segmented eye muscle region image is input into the network to extract deep features; the instability of the image model is supplemented in the form of video.
[0022] S4-2. During training, the mean squared error (MSE) of the regression loss function is used to minimize the difference between the predicted fat content output by the network and the actual value measured in the laboratory, through iterative optimization.
[0023] S4-3. After training, input the eye muscle image of the cow to be tested into the trained model to obtain the corresponding intramuscular fat content prediction value. Compare the prediction value with the actual measured value to evaluate the model accuracy.
[0024] S5. Finally, the trained segmentation and prediction algorithms are integrated into the ultrasound detection system to achieve real-time or near-real-time monitoring of intramuscular fat content in live cattle. In actual use, the operator collects images of the eye muscles through ultrasound scanning, and the system automatically performs image preprocessing, segmentation, and fat prediction in the background, and finally outputs the corresponding intramuscular fat percentage value.
[0025] Preferably, in S1-1, the routine performance measurements of the sample beef cattle include breed, sex, and weight.
[0026] Preferably, in S2-4, the data augmentation techniques include random translation, rotation, scaling, and mirror flipping to increase the number of training samples.
[0027] Preferably, in S3-1, the Segment Anything Model (SAM) performs well in natural and medical image segmentation tasks. It is adapted to the segmentation requirements of ultrasound images by providing a set of labeled eye muscle images for supervised learning.
[0028] Preferably, in step S4-1, a deep learning-based visual Transformer network (ViT) combined with a long short-term recurrent neural network (LSTM) is used to perform regression prediction on the video. The segmented eye muscle region image is input into the network to extract deep features. The instability of the image model is supplemented in the form of video to predict the percentage of intramuscular fat.
[0029] Compared with the prior art, the beneficial effects of the present invention are:
[0030] 1) The main beneficial effect of this invention is the realization of high-precision segmentation and fat content prediction based on deep learning. This invention uses deep learning as the core algorithm, greatly improving the accuracy and reliability of bovine intramuscular fat (IMF) content detection. First, the system integrates a high-precision deep learning segmentation algorithm. This algorithm can quickly and accurately identify and extract the oculomotor muscle region between the 12th and 13th ribs in ultrasound images, effectively eliminating background noise and interference from non-target tissues, ensuring the regional accuracy of subsequent fat content analysis. Second, based on the segmentation results, the system applies an advanced deep learning regression algorithm to achieve accurate prediction of IMF content. Through training with a large amount of image data, this regression model can convert image features into accurate fat percentage values, with accuracy comparable to time-consuming and costly laboratory analyses. This non-invasive, high-accuracy live detection capability can repeatedly obtain IMF data from the same cow at different growth stages, providing a reliable scientific basis for breeding selection and feeding management, and solving the shortcomings of traditional methods such as low accuracy and inability to guide process optimization.
[0031] 2) Another beneficial effect of this invention lies in the low cost and highly integrated systematization of ultrasound hardware. This invention offers significant cost and efficiency advantages in hardware configuration and system integration. This application uses a linear array ultrasound probe and a B-mode ultrasound detection system as core equipment. Compared to CT equipment, ultrasound equipment has significantly lower procurement and maintenance costs, lower energy consumption, and smaller size, making it suitable for mobile use in livestock farms and greatly reducing the hardware barrier for large-scale system applications. Most importantly, this invention achieves a unified and systematic integration of image acquisition (B-mode ultrasound) and deep learning algorithm computation. By directly embedding segmentation and prediction algorithms into the B-mode ultrasound detection system backend, the operation process is extremely simplified: users only need to complete the ultrasound scan, and the system can automatically complete image preprocessing, eye muscle region segmentation, and IMF content prediction, quickly outputting results without waiting. This fully automated design not only reduces the professional skill requirements of operators but also improves detection efficiency and result consistency, enabling it to easily meet the batch detection needs of large-scale cattle herds. Attached Figure Description
[0032] Figure 1 This is an overall flowchart of the present invention;
[0033] Figure 2 This is an ultrasound image of the eye muscles.
[0034] Figure 3 This is a schematic diagram of the eye muscle region;
[0035] Figure 4 This is a schematic diagram of the overall structure of the model;
[0036] Figure 5 This is a diagram of the segmentation model structure;
[0037] Figure 6 This is a structural diagram of the encoder used. Detailed Implementation
[0038] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0039] Example:
[0040] Please see Figure 1-6 The present invention provides a technical solution:
[0041] A method for detecting intramuscular fat content in live bovine tissue, the specific steps of which are as follows:
[0042] S1. Data Acquisition:
[0043] S1-1. First, routine performance measurements were performed on the sample cattle. Then, the cattle were slaughtered. One hour after slaughter, 200 grams of meat were sampled from the eye area. The intramuscular fat (IMF) content of each cattle was determined using the Soxhlet extraction method. The Soxhlet extraction method was used to determine the actual IMF content of the slaughtered samples, providing accurate ground truth labels for subsequent model training. This ensures that the image features learned by the model are strongly correlated with the actual fat content, guaranteeing prediction accuracy from the source. At the same time, by co-acquiring the slaughtered samples and live ultrasound, a mapping basis between live ultrasound images and actual IMF content was established, solving the problem of lack of accurate reference for live detection.
[0044] S1-2. Secure the cattle to a restraint frame, shave and clean the examination area, then apply vegetable oil as an ultrasound coupling agent to improve the acoustic coupling quality between the probe and the skin. Using vegetable oil as an ultrasound coupling agent is inexpensive and readily available on farms, while effectively improving the acoustic coupling quality between the probe and the skin, ensuring the clarity of the ultrasound image. By securing the cattle to a restraint frame and shaving and cleaning the examination area, external interference factors are reduced, ensuring uniform scanning conditions for each cattle and avoiding image quality fluctuations due to differences in operation.
[0045] S1-3. Place the linear array ultrasound probe along the rib direction at the midline between the 12th and 13th ribs, and scan at the medial end of the longissimus dorsi muscle. Acquire an ultrasound video segment for each cow, and then select ideal frames with clear images and intact eye muscle structures for subsequent analysis. Establish a fixed scanning position to ensure the consistency and representativeness of the acquired ultrasound image areas, reducing analytical errors caused by individual anatomical differences. Select ideal frames with clear images and intact eye muscle structures from the ultrasound video, filtering out blurry or invalid images to provide a high-quality data foundation for subsequent preprocessing and analysis.
[0046] S2, Ultrasound Image Preprocessing:
[0047] S2-1. The acquired ultrasound image is cropped to the region of interest, retaining only the oculomotor region and removing redundant background, so that the subsequent network focuses only on the oculomotor texture features. Cropping the region of interest and removing redundant background interference allows the subsequent algorithm to focus only on the core region related to fat content, which reduces the amount of computation, improves the processing speed, and avoids the interference of background noise on feature extraction.
[0048] S2-2. Apply grayscale histogram equalization or normalization to process the image to make the grayscale distribution more uniform. By equalizing or normalizing the grayscale histogram, the grayscale distribution of the image is made more uniform, eliminating the problem of uneven grayscale caused by ultrasound equipment parameters or scanning angle, laying the foundation for subsequent contrast enhancement, and making it easier to distinguish the texture differences between muscle and fat.
[0049]
[0050] In the formula This represents the converted grayscale image. , and Represents 3 channels;
[0051] S2-3. Enhance contrast to improve local and global image contrast, making the texture differences between muscle and fat tissue more obvious, which is beneficial for subsequent feature extraction. Local and global contrast enhancement is achieved through quantization formulas, which deliberately amplifies the texture differences between muscle and fat tissue, making fat texture features clearer and more distinguishable, directly improving the accuracy of subsequent segmentation and feature extraction.
[0052]
[0053] In the formula Represents the smallest pixel in the grayscale image. This represents the largest pixel in the grayscale image. This represents an image with enhanced contrast.
[0054] S2-4. Apply data augmentation techniques to the preprocessed image;
[0055] S3, Eye muscle region image segmentation:
[0056] S3-1. Construct a segmentation network based on Segment Anything Model (SAM) and fine-tune it on ultrasound images of the bovine eye muscle. SAM itself has powerful general segmentation capabilities. Combined with fine-tuning for specific scenarios, it can accurately adapt to the segmentation requirements of the bovine eye muscle region, and has higher accuracy than general segmentation models.
[0057] S3-2. During training, a ground truth supervised model is used for segmentation, balancing the segmentation accuracy of both the foreground (eye muscle region) and background. Through a loss function, the model can more accurately segment the eye muscle region; the focus loss is achieved through... The weights of easy and difficult-to-classify samples are adjusted by the γ parameter to solve the problem of class imbalance between foreground (eye muscle) and background in segmentation; Dice loss directly measures the similarity between the predicted mask and the real mask to ensure that the segmentation result is highly matched with the actual eye muscle region. The dual loss function design greatly improves the segmentation accuracy.
[0058] Focus loss is a loss function designed for class imbalance problems, which can help models better handle samples that are easy to classify and those that are difficult to classify.
[0059]
[0060] In the formula It is a balancing parameter used to adjust the weights of easy-to-classify and hard-to-classify samples; This represents the predicted probability of the model; It is an adjustable exponential parameter used to adjust the decay rate of focus loss.
[0061] Dice loss is a commonly used metric for evaluating the accuracy of segmentation tasks. It measures the similarity between the model's predictions and the actual segmentation results.
[0062]
[0063] In the formula The model's prediction result is represented by a binary segmentation mask, which represents the eye muscle region. The actual segmentation result is represented by a binary segmentation mask; the Dice loss ranges from 0 to 1, with a larger value indicating a higher similarity between the model's prediction and the actual segmentation result. Therefore, minimizing the Dice loss can make the model closer to the actual segmentation result.
[0064] S3-3. Use the trained segmentation model to generate a binary mask image of the eye muscle region, apply it to the original B-ultrasound image, extract the pure eye muscle region image, and the obtained eye muscle image is the input of the fat content prediction model, further removing the interference of non-target regions.
[0065] S4. Fat content prediction:
[0066] S4-1. A deep learning-based visual Transformer network (ViT) combined with a long short-term recurrent neural network (LSTM) is used to perform regression prediction on the video. The segmented eye muscle region image is input into the network to extract deep features; the instability of the image model is supplemented in the form of video.
[0067] S4-2. During training, the mean squared error (MSE) regression loss function is used to minimize the difference between the predicted fat content output by the network and the actual value measured in the laboratory. Through iterative optimization, the model can learn the mapping relationship between image texture and fat content.
[0068]
[0069] In the formula Represents the number of samples. This refers to the intramuscular fat content measured in the laboratory. The model's predicted values are optimized by minimizing the squared difference between the predicted and actual values.
[0070] Using mean squared error as the regression loss function, the difference between the predicted value and the true value is quantified by a clear formula. During the model training process, the error can be minimized directly through iteration, so that the network can accurately learn the mapping relationship between image texture and fat content, ensuring that the deviation between the predicted value and the actual value is minimized.
[0071] S4-3. After training, input the eye muscle image of the cow to be tested into the trained model to obtain the corresponding intramuscular fat content prediction value. Compare the prediction value with the actual measured value to evaluate the model accuracy.
[0072] S5. Finally, the trained segmentation and prediction algorithms are integrated into the ultrasound detection system to achieve real-time or near-real-time monitoring of intramuscular fat content in live cattle. In actual use, the operator collects images of the eye muscles through ultrasound scanning, and the system automatically performs image preprocessing, segmentation, and fat prediction in the background, and finally outputs the corresponding intramuscular fat percentage value. This process saves manual scoring and time costs and improves measurement consistency.
[0073] By integrating segmentation and prediction algorithms into the ultrasound detection system, real-time or near-real-time monitoring of intramuscular fat content in living organisms can be achieved without exporting images for offline analysis, significantly shortening the detection cycle and adapting to the needs of batch detection in farms. The system automatically completes image preprocessing, segmentation, and fat prediction in the background, eliminating the need for manual delineation, scoring, or calculation, avoiding subjective errors caused by human operation, and improving the consistency and objectivity of detection results.
[0074] In S1-1, the routine performance measurements of the sample beef cattle include breed, sex, and weight.
[0075] In S2-4, data augmentation techniques include random translation, rotation, scaling, and mirror flipping to increase the number of training samples.
[0076] In S3-1, the Segment Anything Model (SAM) performs well in natural and medical image segmentation tasks. It is adapted to the segmentation requirements of ultrasound images by providing a set of labeled eye muscle images for supervised learning.
[0077] In step S4-1, a deep learning-based visual Transformer network (ViT) combined with a long short-term recurrent neural network (LSTM) is used to perform regression prediction on the video. The segmented eye muscle region image is input into the network to extract deep features. The instability of the image model is supplemented in the form of video to predict the percentage of intramuscular fat.
[0078] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or basic characteristics. Therefore, the embodiments should be considered exemplary and non-limiting in all respects. The scope of the invention is defined by the appended claims rather than the foregoing description. Therefore, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the present invention, and no reference numerals in the claims should be construed as limiting the scope of the claims.
[0079] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A method for detecting intramuscular fat content in live bovine tissue, characterized in that, The specific steps of this method for detecting intramuscular fat content in live cattle are as follows: S1. Data Acquisition: S1-1. First, routine performance measurements were performed on the sample cattle. Then, the sample cattle were slaughtered. One hour after slaughter, 200 grams of meat samples were taken from the eye area. The intramuscular fat (IMF) content of each cattle was determined by Soxhlet extraction. S1-2. Fix the cow to the restraint frame, shave and clean the hair in the examination area, and then apply vegetable oil as an ultrasound coupling agent. S1-3. Place the linear array ultrasound probe along the rib direction at the midline position between the 12th and 13th ribs, and select the medial end of the longissimus dorsi muscle for scanning. Acquire an ultrasound video for each cow, and then select the ideal frame with clear image and complete eye muscle structure for subsequent analysis. S2, Ultrasound Image Preprocessing: S2-1. Crop the region of interest in the acquired ultrasound images, retaining only the rib eye area and removing unnecessary background. S2-2. Process the image using grayscale histogram equalization or normalization methods; S2-3. Enhance contrast to improve the local and global contrast of the image; S2-4. Apply data augmentation techniques to the preprocessed image; S3, Eye muscle region image segmentation: S3-1. Construct a segmentation network based on the Segment Anything Model (SAM) and fine-tune it on bovine eye muscle ultrasound images; S3-2. During training, a ground-value supervised model is used for segmentation to balance the segmentation accuracy of both foreground and background. S3-3. Use the trained segmentation model to generate a binary mask image of the oculomotor region, apply it to the original ultrasound image, and extract the pure oculomotor region image. S4. Fat content prediction: S4-1. The video is regressed and predicted using a deep learning-based visual Transformer network (ViT) combined with a long short-term recurrent neural network (LSTM). The segmented eye muscle region image is input into the network to extract deep features. To compensate for the instabilities of image models using video; S4-2. During training, the mean squared error (MSE) of the regression loss function is used to minimize the difference between the predicted fat content output by the network and the actual value measured in the laboratory, through iterative optimization. S4-3. After training, input the eye muscle image of the cow to be tested into the trained model to obtain the corresponding intramuscular fat content prediction value. Compare the prediction value with the actual measured value to evaluate the model accuracy. S5. Finally, the trained segmentation and prediction algorithms are integrated into the ultrasound detection system to achieve real-time or near-real-time monitoring of intramuscular fat content in live cattle. In actual use, the operator collects images of the eye muscles through ultrasound scanning, and the system automatically performs image preprocessing, segmentation, and fat prediction in the background, and finally outputs the corresponding intramuscular fat percentage value.
2. The method for detecting intramuscular fat content in bovine live animals according to claim 1, characterized in that: In S1-1, the routine performance measurements of the sample beef cattle include breed, sex, and weight.
3. The method for detecting intramuscular fat content in bovine live animals according to claim 1, characterized in that: In S2-4, data augmentation techniques include random translation, rotation, scaling, and mirror flipping to increase the number of training samples.
4. The method for detecting intramuscular fat content in bovine live animals according to claim 1, characterized in that: In S3-1, the Segment Anything Model (SAM) performs well in natural and medical image segmentation tasks. It is adapted to the segmentation requirements of ultrasound images by providing a set of labeled eye muscle images for supervised learning.
5. The method for detecting intramuscular fat content in bovine live tissue according to claim 1, characterized in that: In S4-1, a deep learning-based visual Transformer network ViT combined with a long short-term recurrent neural network LSTM is used to perform regression prediction on the video, and the segmented eye muscle region image is input into the network to extract deep features. The instability of the image model is supplemented by video to predict the percentage of intramuscular fat.
