PB-STR: A spatiotemporal transformer network for multi-behavior recognition of pigs

Pig behavior is a reliable indicator of health status, accurate recognition is vital for effective health surveillance and management. This study proposes PB-STR, a behavior recognition model based on the integration of video spatiotemporal feature fusion. The model addresses challenges in recognizi...

Full description

Saved in:
Bibliographic Details
Main Authors: Yufan Hu, Xiaobo Wang, Rui Mao, Yusen Guo, Xianyao Zhu, Meili Wang
Format: Article
Language:English
Published: Elsevier 2025-12-01
Series:Smart Agricultural Technology
Subjects:
Online Access:http://www.sciencedirect.com/science/article/pii/S2772375525003636
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1849472686218018816
author Yufan Hu
Xiaobo Wang
Rui Mao
Yusen Guo
Xianyao Zhu
Meili Wang
author_facet Yufan Hu
Xiaobo Wang
Rui Mao
Yusen Guo
Xianyao Zhu
Meili Wang
author_sort Yufan Hu
collection DOAJ
description Pig behavior is a reliable indicator of health status, accurate recognition is vital for effective health surveillance and management. This study proposes PB-STR, a behavior recognition model based on the integration of video spatiotemporal feature fusion. The model addresses challenges in recognizing multiple behaviors within a single frame and handling dynamically changing behaviors. It develops a Time Series Prediction Module (UnetTSF) and a Context Anchor Attention (CAA) module, enhancing the PB-STR framework's ability to capture feature evolution over time and fully utilize contextual information. To enhance the model's proficiency in detecting and recognizing behaviors within overlapping regions, the detection head employs Minimum Points Distance Intersection over Union (MPDIoU) as its bounding box loss function, improving adaptability to variations in pig positions. The PB-STR model was evaluated on a proprietary dataset of 294 videos covering seven pig behaviors. With a mean Average Precision of 94.2 %, recall of 90.8 %, and precision of 87.5 %, the PB-STR model can concurrently recognize five dynamic and two static behaviors in pigs. By outperforming models such as DETR, DAB-DETR, Deformable DETR, CenterNet, and DINO, the proposed approach not only enhances detection accuracy but also serves as a technological foundation for intelligent, welfare-oriented pig farming, facilitating in the sector's modernization.
format Article
id doaj-art-86ff077ba13d4e93b356ef7ecf88c4cf
institution Kabale University
issn 2772-3755
language English
publishDate 2025-12-01
publisher Elsevier
record_format Article
series Smart Agricultural Technology
spelling doaj-art-86ff077ba13d4e93b356ef7ecf88c4cf2025-08-20T03:24:26ZengElsevierSmart Agricultural Technology2772-37552025-12-011210113110.1016/j.atech.2025.101131PB-STR: A spatiotemporal transformer network for multi-behavior recognition of pigsYufan Hu0Xiaobo Wang1Rui Mao2Yusen Guo3Xianyao Zhu4Meili Wang5College of Information Engineering, Northwest A&F University, Yangling 712100, ChinaCollege of Information Engineering, Northwest A&F University, Yangling 712100, ChinaCollege of Information Engineering, Northwest A&F University, Yangling 712100, China; Shaanxi Engineering Research Center of Agriculture Information Intelligent Perception and Analysis, Yangling 712100, China; Corresponding author.College of Information Engineering, Northwest A&F University, Yangling 712100, ChinaCollege of Information Engineering, Northwest A&F University, Yangling 712100, ChinaCollege of Information Engineering, Northwest A&F University, Yangling 712100, China; Shaanxi Engineering Research Center of Agriculture Information Intelligent Perception and Analysis, Yangling 712100, ChinaPig behavior is a reliable indicator of health status, accurate recognition is vital for effective health surveillance and management. This study proposes PB-STR, a behavior recognition model based on the integration of video spatiotemporal feature fusion. The model addresses challenges in recognizing multiple behaviors within a single frame and handling dynamically changing behaviors. It develops a Time Series Prediction Module (UnetTSF) and a Context Anchor Attention (CAA) module, enhancing the PB-STR framework's ability to capture feature evolution over time and fully utilize contextual information. To enhance the model's proficiency in detecting and recognizing behaviors within overlapping regions, the detection head employs Minimum Points Distance Intersection over Union (MPDIoU) as its bounding box loss function, improving adaptability to variations in pig positions. The PB-STR model was evaluated on a proprietary dataset of 294 videos covering seven pig behaviors. With a mean Average Precision of 94.2 %, recall of 90.8 %, and precision of 87.5 %, the PB-STR model can concurrently recognize five dynamic and two static behaviors in pigs. By outperforming models such as DETR, DAB-DETR, Deformable DETR, CenterNet, and DINO, the proposed approach not only enhances detection accuracy but also serves as a technological foundation for intelligent, welfare-oriented pig farming, facilitating in the sector's modernization.http://www.sciencedirect.com/science/article/pii/S2772375525003636Pig behavior recognitionDeep learningSpatiotemporal transformer networkPB-STR
spellingShingle Yufan Hu
Xiaobo Wang
Rui Mao
Yusen Guo
Xianyao Zhu
Meili Wang
PB-STR: A spatiotemporal transformer network for multi-behavior recognition of pigs
Smart Agricultural Technology
Pig behavior recognition
Deep learning
Spatiotemporal transformer network
PB-STR
title PB-STR: A spatiotemporal transformer network for multi-behavior recognition of pigs
title_full PB-STR: A spatiotemporal transformer network for multi-behavior recognition of pigs
title_fullStr PB-STR: A spatiotemporal transformer network for multi-behavior recognition of pigs
title_full_unstemmed PB-STR: A spatiotemporal transformer network for multi-behavior recognition of pigs
title_short PB-STR: A spatiotemporal transformer network for multi-behavior recognition of pigs
title_sort pb str a spatiotemporal transformer network for multi behavior recognition of pigs
topic Pig behavior recognition
Deep learning
Spatiotemporal transformer network
PB-STR
url http://www.sciencedirect.com/science/article/pii/S2772375525003636
work_keys_str_mv AT yufanhu pbstraspatiotemporaltransformernetworkformultibehaviorrecognitionofpigs
AT xiaobowang pbstraspatiotemporaltransformernetworkformultibehaviorrecognitionofpigs
AT ruimao pbstraspatiotemporaltransformernetworkformultibehaviorrecognitionofpigs
AT yusenguo pbstraspatiotemporaltransformernetworkformultibehaviorrecognitionofpigs
AT xianyaozhu pbstraspatiotemporaltransformernetworkformultibehaviorrecognitionofpigs
AT meiliwang pbstraspatiotemporaltransformernetworkformultibehaviorrecognitionofpigs