A feasibility study on the use of artificial intelligence to analyze pig health in livestock farms
Main Article Content
Abstract
Tracking the daily behavior of pigs raised on farms using artificial intelligence technology helps farmers to automatically and quickly assess the health and growth of the pigs. This article presents a feasibility study on using artificial intelligence (AI) to analyze images from CCTV cameras to detect standing, eating, and lying behaviors of pigs in a farm, and to record numerical values of these behaviors over time for health analysis. The study trained the AI with numerous pig images sourced from social media, without using actual farm pig images, and developed a model using YOLO8 tools. The trained model can detect the three behaviors from video clips with approximately 70% accuracy. The analysis shows that this method has high potential for practical application in pig farms, with possible adjustments to the camera setup environment to achieve the best image quality for detection.
Article Details

This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
Copyright @2021 Engineering Transactions: A Research Publication of Mahanakorn University of Technology
Faculty of Engineering and Technology
Mahanakorn University of Technology
References
C. Pomar and A. Remus, "Precision pig feeding: a breakthrough toward sustainability," Animal Frontiers, vol. 9, no. 2, pp. 52-59, 2019.
C. Pomar, I. Andretta and A. Remus, "Feeding strategies to reduce nutrient losses and improve the sustainability of growing pigs," Frontiers in Veterinary Science, vol. 8, p. 742220, 2021.
A. Dore, M. Lihoreau, J. Bailly, Y. Billon, J.-F. Bompa, E. Ricard, D. Henry, L. Canario and H. Aubert, "Automated detection of sow posture changes with millimeter-wave radars and deep learning," bioRxiv, p. preprint, 2022.
A. Dore, C. Pasquaretta, D. Henry, E. Ricard, J.-F. Bompa, M. Bonneau, A. Boissy, D. Hazard, M. Lihoreau and H. Aubert, "A Non-Invasive Millimetre-Wave Radar Sensor for Automated Behavioural Tracking in Precision Farming—Application to Sheep Husbandry," Sensors, vol. 21, no. 23, 2021.
A. Nasirahmadi, B. Sturm, S. Edwards, K.-H. Jeppsson, A.-C. Olsson, S. Müller and O. Hensel, "Deep Learning and Machine Vision Approaches for Posture Detection of Individual Pigs," Sensors, vol. 19, no. 17, 2019.
Y. Luo, Z. Zeng, H. Lu and E. Lv, "Posture Detection of Individual Pigs Based on Lightweight Convolution Neural Networks and Efficient Channel-Wise Attention," Sensors, vol. 21, no. 24, 2021.
S. Wang, H. Jiang, Y. Qiao, S. Jiang, H. Lin and Q. Sun, "The research progress of vision-based artificial intelligence in smart pig farming," Sensors, vol. 22, no. 17, p. 6541, 2022.
M. Sohan, T. Sai Ram and C. V. Rami Reddy, "A Review on YOLOv8 and Its Advancements," in Data Intelligence and Cognitive Informatics ICDICI 2023., Singapore, 2024.
F. Hermens, "Automatic object detection for behavioural research using YOLOv8," Behavior Research Methods, vol. 56, no. 7, pp. 7307-7330, 2024.
D. M. W. Powers, "Evaluation: from precision, recall and F-measure to ROC, informedness, markedness and correlation," arXiv preprint arXiv:2010.16061, 2020.