The recognition of pig behavior plays a crucial role in smart farming and welfare assurance for pigs. Currently, in the field of pig behavior recognition, the lack of publicly available behavioral datasets not only limits the development of innovative algorithms but also hampers model robustness and algorithm optimization.This paper proposes a dataset containing 13 pig behaviors that significantly impact welfare.Based on this dataset, this paper proposes a spatial-temporal perception and enhancement networks based on the attention mechanism to model the spatiotemporal features of pig behaviors and their associated interaction areas in video data. The network is composed of a spatiotemporal perception network and a spatiotemporal feature enhancement network. The spatiotemporal perception network is responsible for establishing connections between the pigs and the key regions of their behaviors in the video data. The spatiotemporal feature enhancement network further strengthens the important spatial features of individual pigs and captures the long-term dependencies of the spatiotemporal features of individual behaviors by remodeling these connections, thereby enhancing the model's perception of spatiotemporal changes in pig behaviors. Experimental results demonstrate that on the dataset established in this paper, our proposed model achieves a MAP score of 75.92%, which is an 8.17% improvement over the best-performing traditional model. This study not only improces the accuracy and generalizability of individual pig behavior recognition but also provides new technological tools for modern smart farming. The dataset and related code will be made publicly available alongside this paper.
翻译:猪行为识别在智慧养殖与猪只福利保障中起着至关重要的作用。当前,在猪行为识别领域,公开可用的行为数据集的缺乏不仅限制了创新算法的发展,也阻碍了模型的鲁棒性与算法优化。本文提出了一个包含13种对福利有显著影响的猪行为的数据集。基于此数据集,本文提出了一种基于注意力机制的时空感知与增强网络,用于对视频数据中猪行为的时空特征及其相关交互区域进行建模。该网络由时空感知网络和时空特征增强网络组成。时空感知网络负责在视频数据中建立猪只与其行为关键区域之间的联系。时空特征增强网络则通过重塑这些连接,进一步强化个体猪只的重要空间特征,并捕捉个体行为时空特征的长期依赖关系,从而增强模型对猪行为时空变化的感知能力。实验结果表明,在本文建立的数据集上,我们提出的模型取得了75.92%的mAP分数,相比性能最佳的传统模型提升了8.17%。本研究不仅提高了单个猪行为识别的准确性与泛化能力,也为现代智慧养殖提供了新的技术工具。数据集及相关代码将随本文一并公开。