{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,10,13]],"date-time":"2026-10-13T15:57:54Z","timestamp":1791907074209,"version":"4.3.4"},"reference-count":35,"publisher":"MDPI AG","issue":"8","license":[{"start":{"date-parts":[[2025,4,17]],"date-time":"2025-04-17T00:00:00Z","timestamp":1744848000000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"funder":[{"DOI":"10.13039\/501100001809","name":"National Natural Science Foundation of China","doi-asserted-by":"publisher","award":["32371583"],"award-info":[{"award-number":["32371583"]}],"id":[{"id":"10.13039\/501100001809","id-type":"DOI","asserted-by":"publisher"}]}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["Animals"],"abstract":"<jats:p>With the rise of smart agriculture and the expansion of pig farming, pig aggressive behavior recognition is crucial for maintaining herd health and improving farming efficiency. The differences in background and light variation in different barns can lead to the missed detection and false detection of pig aggressive behaviors. Therefore, we propose a deep learning-based pig aggressive behavior recognition model, in order to improve the adaptability of the model in complex pig environments. This model, combined with MobileNetV2 and Autoformer, can effectively extract local detail features of pig aggression and temporal correlation information of video frame sequences. Both Convolutional Block Attention Module (CBAM) and Advanced Filtering Feature Fusion Pyramid Network (HS-FPN) are integrated into the lightweight convolutional network MobileNetV2, which can more accurately capture key visual features of pig aggression and enhance the ability to detect small targets. We extract temporal correlation information between consecutive frames by the improved Autoformer. The Gate Attention Unit (GAU) is embedded into the Autoformer encoder in order to focus on important features of pig aggression while reducing computational latency. Experimental validation was implemented on public datasets, and the results showed that the classification recall, precision, accuracy, and F1-score of the model proposed in this paper reach 98.08%, 94.44%, 96.23%, and 96.23%, and the parameter quantity is optimized to 10.41 M. Compared with MobileNetV2-LSTM and MobileNetV2-GRU, the accuracy has been improved by 3.5% and 3.0%, respectively. Therefore, this model achieves a balance between recognition accuracy and computational complexity and is more suitable for automatic pig aggression recognition in practical farming scenarios, providing data support for scientific feeding and management strategies in pig farming.<\/jats:p>","DOI":"10.3390\/ani15081159","type":"journal-article","created":{"date-parts":[[2025,4,17]],"date-time":"2025-04-17T06:53:46Z","timestamp":1744872826000},"page":"1159","update-policy":"https:\/\/doi.org\/10.3390\/mdpi_crossmark_policy","source":"Crossref","is-referenced-by-count":8,"title":["A Lightweight Pig Aggressive Behavior Recognition Model by Effective Integration of Spatio-Temporal Features"],"prefix":"10.3390","volume":"15","author":[{"given":"Ying","family":"Pu","sequence":"first","affiliation":[{"name":"College of Mechanical and Electronic Engineering, Nanjing Forestry University, Nanjing 210037, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-6144-8915","authenticated-orcid":false,"given":"Yaqin","family":"Zhao","sequence":"additional","affiliation":[{"name":"College of Mechanical and Electronic Engineering, Nanjing Forestry University, Nanjing 210037, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Hao","family":"Ma","sequence":"additional","affiliation":[{"name":"College of Mechanical and Electronic Engineering, Nanjing Forestry University, Nanjing 210037, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Junxiong","family":"Wang","sequence":"additional","affiliation":[{"name":"College of Mechanical and Electronic Engineering, Nanjing Forestry University, Nanjing 210037, China"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"1968","published-online":{"date-parts":[[2025,4,17]]},"reference":[{"key":"ref_1","doi-asserted-by":"crossref","unstructured":"Xu, Q., Zhao, J., Guo, Y., Liu, M., Schinckel, A.P., and Zhou, B. (2022). A single-nucleotide polymorphism in the promoter of porcine ARHGAP24 gene regulates aggressive behavior of weaned pigs after mixing by affecting the binding of transcription factor p53. Front. Cell Dev. Biol., 10.","DOI":"10.3389\/fcell.2022.839583"},{"key":"ref_2","doi-asserted-by":"crossref","first-page":"47","DOI":"10.1016\/0304-3762(82)90165-1","article-title":"An analysis of agonistic interaction patterns in group-housed dry sows\u2014Aggression regulation through an \u201cavoidance order\u201d","volume":"9","author":"Jensen","year":"1982","journal-title":"Appl. Anim. Ethol."},{"key":"ref_3","first-page":"266","article-title":"Well-being in pregnant sows: Confinement versus group housing with electronic sow feeding","volume":"45","author":"Jensen","year":"1995","journal-title":"Acta Agric. Scand. A-Anim. Sci."},{"key":"ref_4","doi-asserted-by":"crossref","first-page":"142","DOI":"10.1017\/S1751731115001779","article-title":"Does group size have an impact on welfare indicators in fattening pigs?","volume":"10","author":"Lambertz","year":"2016","journal-title":"Animal"},{"key":"ref_5","doi-asserted-by":"crossref","unstructured":"Rana, T., and Soto-Blanco, B. (2024). Good Practices and Principles in Pig Farming, Springer Nature.","DOI":"10.1007\/978-981-97-4665-1"},{"key":"ref_6","doi-asserted-by":"crossref","unstructured":"Yang, J., and Chen, Y. (2022). Tender leaf identification for early-spring green tea based on semi-supervised learning and image processing. Agronomy, 12.","DOI":"10.3390\/agronomy12081958"},{"key":"ref_7","doi-asserted-by":"crossref","unstructured":"Wei, J., Tang, X., Liu, J., and Zhang, Z. (2023). Detection of pig movement and aggression using deep learning approaches. Animals, 13.","DOI":"10.3390\/ani13193074"},{"key":"ref_8","doi-asserted-by":"crossref","unstructured":"Benjamin, M., and Yik, S. (2019). Precision livestock farming in swine welfare: A review for swine practitioners. Animals, 9.","DOI":"10.3390\/ani9040133"},{"key":"ref_9","doi-asserted-by":"crossref","first-page":"545","DOI":"10.1093\/jas\/skad281.641","article-title":"PSXIV-13 Evaluation of On-Animal Sensors for Monitoring Diurnal Physical Activity of Beef Bulls During the Breeding Season","volume":"101","author":"Rykaczewski","year":"2023","journal-title":"J. Anim. Sci."},{"key":"ref_10","doi-asserted-by":"crossref","first-page":"105003","DOI":"10.1016\/j.compag.2019.105003","article-title":"Detection of aggressive behaviours in pigs using a RealSence depth sensor","volume":"166","author":"Chen","year":"2019","journal-title":"Comput. Electron. Agric."},{"key":"ref_11","doi-asserted-by":"crossref","first-page":"1947","DOI":"10.1016\/j.spinee.2017.08.243","article-title":"Multimodal sensor-based weight drop spinal cord impact system for large animals","volume":"17","author":"Kim","year":"2017","journal-title":"Spine J."},{"key":"ref_12","doi-asserted-by":"crossref","first-page":"57","DOI":"10.1016\/j.compag.2014.03.010","article-title":"Image feature extraction for classification of aggressive interactions among pigs","volume":"104","author":"Viazzi","year":"2014","journal-title":"Comput. Electron. Agric."},{"key":"ref_13","doi-asserted-by":"crossref","first-page":"295","DOI":"10.1016\/j.compag.2016.04.022","article-title":"Automatic detection of mounting behaviours among pigs using image analysis","volume":"124","author":"Nasirahmadi","year":"2016","journal-title":"Comput. Electron. Agric."},{"key":"ref_14","unstructured":"Zhu, W., Pu, X., Li, X., and Zhu, X. (2009, January 20\u201322). Automated detection of sick pigs based on machine vision. Proceedings of the 2009 IEEE International Conference on Intelligent Computing and Intelligent Systems, Shanghai, China."},{"key":"ref_15","doi-asserted-by":"crossref","first-page":"106139","DOI":"10.1016\/j.compag.2021.106139","article-title":"A CNN-based posture change detection for lactating sow in untrimmed depth videos","volume":"185","author":"Yang","year":"2021","journal-title":"Comput. Electron. Agric."},{"key":"ref_16","first-page":"249","article-title":"A review of research on pig behavior recognition based on image processing","volume":"6","author":"Gu","year":"2020","journal-title":"Int. Core J. Eng."},{"key":"ref_17","doi-asserted-by":"crossref","first-page":"53","DOI":"10.1016\/j.compag.2015.11.008","article-title":"An automatic splitting method for the adhesive piglets\u2019 gray scale image based on the ellipse shape feature","volume":"120","author":"Lu","year":"2016","journal-title":"Comput. Electron. Agric."},{"key":"ref_18","doi-asserted-by":"crossref","first-page":"105048","DOI":"10.1016\/j.compag.2019.105048","article-title":"Automated video analysis of sow nursing behavior based on fully convolutional network and oriented optical flow","volume":"167","author":"Yang","year":"2019","journal-title":"Comput. Electron. Agric."},{"key":"ref_19","doi-asserted-by":"crossref","first-page":"108997","DOI":"10.1016\/j.compag.2024.108997","article-title":"Tracking and monitoring of individual pig behavior based on YOLOv5-Byte","volume":"221","author":"Tu","year":"2024","journal-title":"Comput. Electron. Agric."},{"key":"ref_20","doi-asserted-by":"crossref","first-page":"48","DOI":"10.1016\/j.biosystemseng.2021.02.010","article-title":"Automated piglet tracking using a single convolutional neural network","volume":"205","author":"Gan","year":"2021","journal-title":"Biosyst. Eng."},{"key":"ref_21","doi-asserted-by":"crossref","first-page":"107606","DOI":"10.1016\/j.compag.2022.107606","article-title":"Recognition of aggressive behavior of group-housed pigs based on CNN-GRU hybrid model with spatio-temporal attention mechanism","volume":"205","author":"Gao","year":"2023","journal-title":"Comput. Electron. Agric."},{"key":"ref_22","doi-asserted-by":"crossref","first-page":"1756","DOI":"10.21437\/Interspeech.2013-436","article-title":"Cross-entropy vs. squared error training: A theoretical and experimental comparison","volume":"13","author":"Golik","year":"2013","journal-title":"Interspeech"},{"key":"ref_23","doi-asserted-by":"crossref","first-page":"195","DOI":"10.1007\/s10462-025-11198-7","article-title":"A comprehensive survey of loss functions and metrics in deep learning","volume":"58","author":"Terven","year":"2025","journal-title":"Artif. Intell. Rev."},{"key":"ref_24","first-page":"22419","article-title":"Autoformer: Decomposition transformers with auto-correlation for long-term series forecasting","volume":"34","author":"Wu","year":"2021","journal-title":"Adv. Neural Inf. Process. Syst."},{"key":"ref_25","doi-asserted-by":"crossref","first-page":"100563","DOI":"10.1016\/j.atech.2024.100563","article-title":"Deep learning-based sow posture classifier using colour and depth images","volume":"9","author":"Pacheco","year":"2024","journal-title":"Smart Agric. Technol."},{"key":"ref_26","doi-asserted-by":"crossref","unstructured":"Markland, L., D\u00edaz, J.A.C., Boyle, L.A., Pessoa, J., and van Staaveren, N. (2025). Observations on the associations between damaging and aggressive behaviors, related lesions, and their implications for the welfare of pigs in the grower-finisher period. Front. Vet. Sci., 12.","DOI":"10.3389\/fvets.2025.1523663"},{"key":"ref_27","doi-asserted-by":"crossref","unstructured":"Dong, K., Zhou, C., Ruan, Y., and Li, Y. (2020, January 18\u201320). MobileNetV2 model for image classification. Proceedings of the 2020 2nd International Conference on Information Technology and Computer Application (ITCA), Guangzhou, China.","DOI":"10.1109\/ITCA52113.2020.00106"},{"key":"ref_28","doi-asserted-by":"crossref","unstructured":"Shi, Z., Hu, J., Ren, J., Ye, H., Yuan, X., Ouyang, Y., He, J., Ji, B., and Guo, J. (2024). HS-FPN: High Frequency and Spatial Perception FPN for Tiny Object Detection. arXiv.","DOI":"10.1609\/aaai.v39i7.32740"},{"key":"ref_29","unstructured":"Hua, W., Dai, Z., Liu, H., and Le, Q. (2022, January 17\u201323). Transformer quality in linear time. Proceedings of the International Conference on Machine Learning (PMLR), Baltimore, MD, USA."},{"key":"ref_30","doi-asserted-by":"crossref","unstructured":"Hou, Q., Zhou, D., and Feng, J. (2021, January 20\u201325). Coordinate attention for efficient mobile network design. Proceedings of the IEEE\/CVF Conference on Computer Vision and Pattern Recognition, Virtual.","DOI":"10.1109\/CVPR46437.2021.01350"},{"key":"ref_31","doi-asserted-by":"crossref","unstructured":"Wang, C.Y., Liao, H.Y.M., Wu, Y.H., Chen, P.Y., Hsieh, J.W., and Yeh, I.H. (2020, January 14\u201319). CSPNet: A new backbone that can enhance learning capability of CNN. Proceedings of the IEEE\/CVF Conference on Computer Vision and Pattern Recognition Workshops, Seattle, WA, USA.","DOI":"10.1109\/CVPRW50498.2020.00203"},{"key":"ref_32","unstructured":"Liu, Y., Shao, Z., Teng, Y., and Hoffmann, N. (2021). NAM: Normalization-based attention module. arXiv."},{"key":"ref_33","doi-asserted-by":"crossref","unstructured":"Low, B.E., Cho, Y., Lee, B., and Yi, Y.M. (2022). Playing behavior classification of group-housed pigs using a deep CNN-LSTM network. Sustainability, 14.","DOI":"10.3390\/su142316181"},{"key":"ref_34","doi-asserted-by":"crossref","first-page":"5263","DOI":"10.3233\/JIFS-236674","article-title":"TR-YOLO: A pig detection network based on YOLO V5n by combining self attention mechanism and large convolutional kernel","volume":"46","author":"Pu","year":"2024","journal-title":"J. Intell. Fuzzy Syst."},{"key":"ref_35","doi-asserted-by":"crossref","first-page":"6645","DOI":"10.1007\/s11760-024-03341-8","article-title":"A lightweight fire hazard recognition model for urban subterranean buildings suitable for resource-constrained embedded systems","volume":"18","author":"Chen","year":"2024","journal-title":"Signal Image Video Process."}],"container-title":["Animals"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/www.mdpi.com\/2076-2615\/15\/8\/1159\/pdf","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,10,9]],"date-time":"2025-10-09T17:16:25Z","timestamp":1760030185000},"score":1,"resource":{"primary":{"URL":"https:\/\/www.mdpi.com\/2076-2615\/15\/8\/1159"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2025,4,17]]},"references-count":35,"journal-issue":{"issue":"8","published-online":{"date-parts":[[2025,4]]}},"alternative-id":["ani15081159"],"URL":"https:\/\/doi.org\/10.3390\/ani15081159","relation":{},"ISSN":["2076-2615"],"issn-type":[{"value":"2076-2615","type":"electronic"}],"subject":[],"published":{"date-parts":[[2025,4,17]]}}}