Skip to main content
ARS Home » Plains Area » Clay Center, Nebraska » U.S. Meat Animal Research Center » Genetics and Animal Breeding » Research » Publications at this Location » Publication #423224

Research Project: Multi-Dimension Phenotyping to Enhance Prediction of Performance in Swine

Location: Genetics and Animal Breeding

Title: Accelerating sow nursing behavior monitoring with modified YOLO11n architecture and TensorRT integration

Author
item RAHMAN, MAMUNUR - University Of Illinois
item CONDOTTA, ISABELLA CFS - University Of Illinois
item SOUZA, VICTOR HS - University Of Illinois
item BROWN-BRANDL, TAMI - University Of Nebraska
item Rohrer, Gary
item SHI, YEYIN - University Of Nebraska

Submitted to: BMC Porcine Health Management
Publication Type: Peer Reviewed Journal
Publication Acceptance Date: 3/17/2026
Publication Date: N/A
Citation: N/A

Interpretive Summary: Efficient monitoring of sow nursing behaviors is critical for improving animal welfare and reducing pre-weaning mortality (PWM), which remains a significant challenge in intensive swine production systems. Conventional observation methods are labor-intensive and inadequate for large-scale farms, requiring automated solutions. Precision Livestock Farming (PLF) technologies, particularly computer vision and deep learning models, offer innovative opportunities for real-time monitoring of swine behaviors and activities. However, to develop something for real-time monitoring, accuracy and computational speed are critical standards that must be addressed. This study used overhead video data recorded starting 3 days prior to farrowing and then throughout the lactation period. Sow posture classifications were: Sow_Lying_Right_Nursing, Sow_Lying_Left_Nursing, Sow_Sternal_Lying_Nursing, Sow_Sitting_Nursing, Sow_Standing_Nursing, Sow_Lying_Right_Not_Nursing, Sow_Lying_Left_Not_Nursing, Sow_Sternal_Lying_Not_Nursing, Sow_Sitting_Not_Nursing, and Sow_Standing_Not_Nursing. After testing six different machine-learning programs and two different computers, one method was developed which achieved acceptable accuracy and processing time suitable for real-time predictions. Overall accuracy reached 98.90% and processing times were 4.6 milliseconds. The postures most difficult to accurately predict were Sow_Sitting_Nursing and Sow_Sitting_Not_Nursing. This study demonstrates the potential of leveraging efficient deep-learning architectures for real-time behavioral monitoring in precision livestock farming. The model developed, provides an efficient and scalable framework for automated monitoring of sow nursing behaviors, addressing key challenges for studying preweaning mortality and animal welfare. The model's superior balance of accuracy and speed underscores its practicality for deployment in commercial swine production systems, enabling producers to make timely, data-driven interventions.

Technical Abstract: Efficient monitoring of sow nursing behaviors is critical for improving animal welfare and reducing pre-weaning mortality (PWM), which remains a significant challenge in intensive swine production systems. Conventional observation methods are labor-intensive and inadequate for large-scale farms, requiring automated solutions. Precision Livestock Farming (PLF) technologies, particularly computer vision and deep learning models, offer innovative opportunities for real-time monitoring of swine behaviors and activities. Among these, YOLO (You Only Look Once) architecture has demonstrated high accuracy and speed for object detection in different environments. This study developed and evaluated a modified YOLO11n model, optimized with TensorRT, to monitor sow nursing behaviors within farrowing crates. The model's lightweight architecture and inference acceleration addressed the computational constraints of real-time applications in dynamic farm environments. The modified YOLO11n achieved mAP@50 of 98.90%, surpassing larger models such as YOLO11x and YOLO11l in computational efficiency while maintaining competitive accuracy. The removal of the small-object detection head reduced the architecture's complexity to 207 layers and 5 GFLOPs, enabling inference times of 4.6 ms on an NVIDIA A100 GPU and 6.1 ms on a T4 GPU with TensorRT optimization. The framework reliably detected and classified ten distinct nursing and non-nursing behaviors, with high confidence scores (>0.85) even under challenging conditions such as occlusions and varying lighting. Misclassifications were observed primarily among visually similar behaviors, such as Sow_Sitting_Nursing and Sow_Sitting_Not_Nursing, but the model effectively differentiated distinct behaviors critical for monitoring. TensorRT optimization further reduced inference latency by 58.56% (A100) and 44.55% (T4), demonstrating the scalability of the solution across diverse computational platforms. This study demonstrates the potential of leveraging lightweight deep learning architectures for real-time behavioral monitoring in precision livestock farming. The modified YOLO11n, combined with TensorRT optimization, provides an efficient and scalable framework for automated monitoring of sow nursing behaviors, addressing key challenges in PWM and animal welfare. The model's superior balance of accuracy and speed underscores its practicality for deployment in commercial swine production systems, enabling producers to make timely, data-driven interventions. Future research should explore incorporating temporal features and deploying the framework on edge computing platforms for enhanced generalizability and end-to-end automation.