An Enhanced YOLOv8n-Based Approach for Pig Behavior Recognition

Read full text
Authors: Jianjun Guo, Yin Xu, Lijun Lin, Beibei Zhang, Piao Zhou, Shangwen Luo, Yi Zhuo, Jingyu Ji, Zhijie Luo, Guangming Cheng
Cited by: 0
References: 25

Abstract

Pig behavior statistics can reflect their health status.Conventional approaches depend on manual observation to derive behavioral information from video recordings, a process that demands substantial time and human effort. To overcome these limitations, this study introduces an effective approach for recognizing pig behaviors, employing an enhanced YOLOv8n architecture. The technique leverages advanced object detection algorithms to automatically distinguish feeding, recumbent, and upright activities of pigs from overhead video footage of the enclosure. First, images of daily pig behaviors are collected using cameras to build a pig behavior dataset. To boost detection accuracy, the SE attention mechanism is embedded within the feature extraction backbone of the YOLOv8n network to enhance its representational capacity, Strengthening the model’s capacity to grasp overarching contextual information and improve the expressiveness of extracted features. The GIoU loss function is employed during training to reduce computational cost and accelerate model convergence. Moreover, the integration of Ghost convolution within the backbone structure significantly decreases both computational complexity and the total number of parameters. The experimental findings reveal that the optimized YOLOv8n model contains just 1.71 million parameters, marking a 42.93% reduction relative to the baseline model. Its floating-point operations total 5.0 billion, indicating a 38.27% decrease, while the mean average precision (mAP) reaches 98.8%, surpassing the original by 1.3 percentage points. In comparison to other widely used YOLO-based object detection frameworks, the proposed approach achieves notably higher accuracy with significantly lower computational demands and model complexity.

Fields of Study & Subjects

Animal Behavior and Welfare Studies Meat and Animal Product Quality Identification and Quantification in Food

Publication details

Journal / source
Computers
Volume
15
Issue
4
Pages
230–230
Publication date
8 April 2026
Language
EN