Document type: scientific article published in Smart Agricultural Technology
Authors: Eddiemar B. Lagua, Hong-Seok Mun, Md Sharifuzzaman, Md Kamrul Hasan, Ahsan Mehtab, Jin-Gu Kang, Young-Hwa Kim, Chul-Ju Yang
Preview: This study proposed a stressor-specific anomaly detection system by integrating computer vision-based behavioral monitoring with machine learning techniques in growing pigs. Multiple algorithms were trained for binary (Normal vs. Abnormal) and multi-class (Normal, Heat Stress + Poor Ventilation, Heat Stress, Heat Stress + Infection, and Heat Stress + Recovery) anomaly detections, and the best-performing models were identified. Results revealed that pigs exhibited distinct behavioral patterns in response to different stressors: healthy pigs showed higher feeding activity but lower drinking activity compared to those under stress. Binary classification models achieved high accuracy, with most algorithms reaching precision, recall, and F1-scores ≥90%. Among them, the Decision Tree (DT) performed best, achieving perfect classification by relying on a single highly discriminative feature, indicating strong potential for real-time anomaly detection. For multi-class classification, XGBoost demonstrated the highest overall performance (accuracy = 0.923, precision = 0.954, recall = 0.861, F1-score = 0.892). However, its performance decreased for minor classes, particularly with infection and recovery. Independent testing with unseen data confirmed that both DT and XGBoost effectively detected anomalies during heat stress days, though XGBoost struggled to identify specific classes. These results highlight that pigs display distinct behavioral responses to various stressors, which can be reliably detected using integrated computer vision and machine learning approaches. Future research should expand datasets under commercial settings and incorporate finer temporal analyses to enable robust, real-time health monitoring. The proposed multi-class classification framework holds promise for advancing precision livestock farming through improved animal health, welfare, and decision-support systems.


