College of Engineering, South China Agricultural University, Guangzhou 510642, China.
Guangdong Academy of Agricultural Sciences, Guangzhou 510640, China.
Sensors (Basel). 2021 Dec 15;21(24):8369. doi: 10.3390/s21248369.
In this paper, a lightweight channel-wise attention model is proposed for the real-time detection of five representative pig postures: standing, lying on the belly, lying on the side, sitting, and mounting. An optimized compressed block with symmetrical structure is proposed based on model structure and parameter statistics, and the efficient channel attention modules are considered as a channel-wise mechanism to improve the model architecture.The results show that the algorithm's average precision in detecting standing, lying on the belly, lying on the side, sitting, and mounting is 97.7%, 95.2%, 95.7%, 87.5%, and 84.1%, respectively, and the speed of inference is around 63 ms (CPU = i7, RAM = 8G) per postures image. Compared with state-of-the-art models (ResNet50, Darknet53, CSPDarknet53, MobileNetV3-Large, and MobileNetV3-Small), the proposed model has fewer model parameters and lower computation complexity. The statistical results of the postures (with continuous 24 h monitoring) show that some pigs will eat in the early morning, and the peak of the pig's feeding appears after the input of new feed, which reflects the health of the pig herd for farmers.
本文提出了一种轻量级的通道注意力模型,用于实时检测五种有代表性的猪姿态:站立、仰卧、侧卧、坐和交配。基于模型结构和参数统计,提出了一种优化的压缩块,具有对称结构,并考虑了高效的通道注意力模块作为通道机制,以改进模型架构。结果表明,该算法在检测站立、仰卧、侧卧、坐和交配时的平均精度分别为 97.7%、95.2%、95.7%、87.5%和 84.1%,每幅姿态图像的推理速度约为 63ms(CPU=i7,RAM=8G)。与最先进的模型(ResNet50、Darknet53、CSPDarknet53、MobileNetV3-Large 和 MobileNetV3-Small)相比,所提出的模型具有更少的模型参数和更低的计算复杂度。对姿态(连续 24 小时监测)的统计结果表明,一些猪会在清晨进食,猪的进食高峰出现在新饲料投入之后,这反映了农民对猪群的健康状况。