AI-ML Powered Pig Behavior Classification and Body Weight Prediction

TR Number



Journal Title

Journal ISSN

Volume Title


Virginia Tech


Precision livestock farming technologies have been widely researched over the last decade. These technologies help in monitoring animal health and welfare parameters in a continuous, automated fashion. Under this umbrella of precision livestock farming, this study focuses on activity classification and body weight prediction in pigs. Activity monitoring is essential for understanding the health and growth of pigs. To automate this task effectively, we propose efficient and accurate sensor-based deep learning (DL) solutions. Among these, the 2D Residual Networks emerged as the best performing model, achieving an accuracy of 95.6%. This accuracy was 15.6% higher than that of other machine learning approaches. Additionally, accurate pig weight estimation is crucial for pork production, as it provides valuable insights into growth rates, disease prevalence, and overall health. Traditional manual methods of estimating pig weights are time-consuming and labor-intensive. To address this issue, we propose a novel approach that utilizes deep learning techniques on depth images for weight prediction. Through a custom image preprocessing pipeline, we train DL models to extract meaningful information from depth images for weight prediction. Our findings show that XceptionNet gives promising results, with a mean absolute error of 2.82 kg and a mean absolute percentage error of 7.42%. In comparison, the best performing statistical model, support vector machine, achieved a mean absolute error of 4.51 kg mean absolute percentage error of 15.56%.



Image Processing, Machine Learning, Deep Learning, Precision Livestock Farming