Stressor-Specific Anomaly Detection System in Group-Housed Growing Pigs Through Combined Computer Vision-Machine Learning Framework: A Pilot Study
Eddiemar B. Lagua, Hong-Seok Mun, Md Sharifuzzaman, Md Kamrul Hasan, Ahsan Mehtab, Jin-Gu Kang, Hae-Rang Park, Young-Hwa Kim, Chul-Ju Yang
This study proposed a multi-class anomaly detection framework for group-housed pigs by integrating computer vision and machine learning. Nine classification algorithms were trained to identify five pig conditions—normal, heat stress, poor ventilation, infection, and recovery—using 10 combinations of feeding, drinking, and posture variables. The analysis revealed distinct behavioral patterns across stress conditions. Linear Discriminant Analysis (LDA) using all feeding and drinking variables achieved strong performance, with precision, recall, F1-score, and accuracy of 96.2% (95% confidence interval: 89.5–100%), 96.0% (91.5–100%), 96.0% (89.8–100%), and 96.0% (91.6–100%), respectively, and an AUC of 98.7% (88.2–95.5%). However, Random Forest and XGBoost trained on feeding and drinking variables achieved perfect classification on unseen data. With the present dataset, results indicate that feeding and drinking behaviors alone are sufficient for robust anomaly detection when paired with appropriate classifiers. Overall, this pilot study demonstrated that stressor-specific anomaly detection based on behavioral data is feasible and offers a practical, scalable approach for early stress detection, improved health and welfare monitoring, and more efficient precision livestock management. Future studies should utilize larger and more diverse datasets to further validate and strengthen the generalizability of the proposed framework.