{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,4,8]],"date-time":"2026-04-08T10:54:30Z","timestamp":1775645670184,"version":"3.50.1"},"reference-count":42,"publisher":"MDPI AG","issue":"4","license":[{"start":{"date-parts":[[2026,4,8]],"date-time":"2026-04-08T00:00:00Z","timestamp":1775606400000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"funder":[{"name":"Special Projects in Key Fields of Ordinary Universities in Guangdong Province","award":["2025ZDZX4025"],"award-info":[{"award-number":["2025ZDZX4025"]}]},{"name":"Guangdong Province Rural Science and Technology Commissioner","award":["KTP20240590"],"award-info":[{"award-number":["KTP20240590"]}]},{"name":"Guangdong Province Rural Science and Technology Commissioner","award":["KTP20240597"],"award-info":[{"award-number":["KTP20240597"]}]},{"name":"Guangdong Province Graduate Education Innovation Program Project","award":["2024ANLK_049"],"award-info":[{"award-number":["2024ANLK_049"]}]},{"name":"Innovative projects with distinctive features in ordinary universities in Guangdong Province","award":["2023KTSCX048"],"award-info":[{"award-number":["2023KTSCX048"]}]},{"name":"Guangzhou Rural Science and Technology Commissioner Special Project","award":["2024E04J0106"],"award-info":[{"award-number":["2024E04J0106"]}]},{"name":"Yunfu 2023 provincial science and technology innovation strategy and rural revitalization strategy project","award":["2023020101"],"award-info":[{"award-number":["2023020101"]}]},{"name":"Yunfu City\u2019s 2025 Provincial Science and Technology Support \u201cHundred, Thousand, and Million Project\u201d","award":["2025020206"],"award-info":[{"award-number":["2025020206"]}]},{"award":["2025020206"],"award-info":[{"award-number":["2025020206"]}],"id":[{"id":"https:\/\/ror.org\/03q269m48","id-type":"ROR","asserted-by":"publisher"}]}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["Computers"],"abstract":"<jats:p>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 in indoor intensive farming environments, this study introduces an effective approach for recognizing pig behaviors, employing an enhanced YOLOv8n architecture. The approach utilizes advanced object detection algorithms to automatically identify pig behaviors, including stand, lie, eat, fight, and tail-bite, 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\u2019s 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, integrating Ghost convolution into the backbone significantly reduces 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@50) reaches 96.8%, surpassing the original by 2.6 percentage points. Compared with other widely used YOLO-based object detection frameworks, the proposed approach achieves notably higher accuracy while requiring significantly lower computational resources and model complexity.<\/jats:p>","DOI":"10.3390\/computers15040230","type":"journal-article","created":{"date-parts":[[2026,4,8]],"date-time":"2026-04-08T09:49:44Z","timestamp":1775641784000},"page":"230","update-policy":"https:\/\/doi.org\/10.3390\/mdpi_crossmark_policy","source":"Crossref","is-referenced-by-count":0,"title":["An Enhanced YOLOv8n-Based Approach for Pig Behavior Recognition"],"prefix":"10.3390","volume":"15","author":[{"given":"Jianjun","family":"Guo","sequence":"first","affiliation":[{"name":"College of Artificial Intelligence, Zhongkai University of Agriculture and Engineering, Guangzhou 510225, China"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"given":"Yudian","family":"Xu","sequence":"additional","affiliation":[{"name":"College of Artificial Intelligence, Zhongkai University of Agriculture and Engineering, Guangzhou 510225, China"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"given":"Lijun","family":"Lin","sequence":"additional","affiliation":[{"name":"College of Artificial Intelligence, Zhongkai University of Agriculture and Engineering, Guangzhou 510225, China"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"given":"Beibei","family":"Zhang","sequence":"additional","affiliation":[{"name":"College of Artificial Intelligence, Zhongkai University of Agriculture and Engineering, Guangzhou 510225, China"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"given":"Piao","family":"Zhou","sequence":"additional","affiliation":[{"name":"College of Artificial Intelligence, Zhongkai University of Agriculture and Engineering, Guangzhou 510225, China"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"given":"Shangwen","family":"Luo","sequence":"additional","affiliation":[{"name":"College of Artificial Intelligence, Zhongkai University of Agriculture and Engineering, Guangzhou 510225, China"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"given":"Yuhan","family":"Zhuo","sequence":"additional","affiliation":[{"name":"College of Artificial Intelligence, Zhongkai University of Agriculture and Engineering, Guangzhou 510225, China"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"given":"Jingyu","family":"Ji","sequence":"additional","affiliation":[{"name":"College of Artificial Intelligence, Zhongkai University of Agriculture and Engineering, Guangzhou 510225, China"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"given":"Zhijie","family":"Luo","sequence":"additional","affiliation":[{"name":"College of Artificial Intelligence, Zhongkai University of Agriculture and Engineering, Guangzhou 510225, China"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"given":"Guangming","family":"Cheng","sequence":"additional","affiliation":[{"name":"China Electronic Product Reliability and Environmental Testing Research Institute, Guangzhou 511300, China"}],"role":[{"role":"author","vocabulary":"crossref"}]}],"member":"1968","published-online":{"date-parts":[[2026,4,8]]},"reference":[{"key":"ref_1","doi-asserted-by":"crossref","unstructured":"Hao, W., Han, W., Han, M., and Li, F. (2022). A novel improved yolov3-sc model for individual pig detection. Sensors, 22.","DOI":"10.3390\/s22228792"},{"key":"ref_2","first-page":"e601","article-title":"Precision feeding based on individual daily body weight of group-housed pigs with an automatic feeder developed to allow for restricting feed allowance","volume":"15","author":"Marcon","year":"2015","journal-title":"Precis. Livest. Farming"},{"key":"ref_3","doi-asserted-by":"crossref","first-page":"17515","DOI":"10.1109\/JSEN.2021.3051194","article-title":"An iot-based design using accelerometers in animal behavior recognition systems","volume":"22","author":"Tran","year":"2021","journal-title":"IEEE Sens. J."},{"key":"ref_4","doi-asserted-by":"crossref","first-page":"338","DOI":"10.1109\/TFUZZ.2024.3398075","article-title":"Temporal-Spatial Fuzzy Deep Neural Network for the Grazing Behavior Recognition of Herded Sheep in Triaxial Accelerometer Cyber-Physical Systems","volume":"33","author":"Hou","year":"2024","journal-title":"IEEE Trans. Fuzzy Syst."},{"key":"ref_5","first-page":"766","article-title":"Applications and challenges of wearable devices in livestock and poultry health management","volume":"48","author":"Dai","year":"2025","journal-title":"J. Nanjing Agric. Univ."},{"key":"ref_6","doi-asserted-by":"crossref","first-page":"25","DOI":"10.1016\/j.livsci.2017.05.014","article-title":"Implementation of machine vision for detecting behaviour of cattle and pigs","volume":"202","author":"Nasirahmadi","year":"2017","journal-title":"Livest. Sci."},{"key":"ref_7","doi-asserted-by":"crossref","unstructured":"Mellor, D.J. (2016). Updating animal welfare thinking: Moving beyond the \u201cFive Freedoms\u201d towards \u201ca Life Worth Living\u201d. Animals, 6.","DOI":"10.3390\/ani6030021"},{"key":"ref_8","first-page":"110","article-title":"Research progress of deep learning in recognition of typical behaviors of livestock and poultry","volume":"26","author":"Zhu","year":"2024","journal-title":"J. Agric. Sci. Technol."},{"key":"ref_9","doi-asserted-by":"crossref","first-page":"210","DOI":"10.1016\/j.livsci.2015.09.003","article-title":"Effects of clinical lameness and tail biting lesions on voluntary feed intake in growing pigs","volume":"181","author":"Munsterhjelm","year":"2015","journal-title":"Livest. Sci."},{"key":"ref_10","doi-asserted-by":"crossref","first-page":"261","DOI":"10.1016\/S0147-9571(99)00016-8","article-title":"Experimental model of enterotoxigenic Escherichia coli infection in pigs: Potential for an early recognition of colibacillosis by monitoring of behavior","volume":"22","author":"Krsnik","year":"1999","journal-title":"Comp. Immunol. Microbiol. Infect. Dis."},{"key":"ref_11","first-page":"109","article-title":"Aggressive and sexual behaviour of growing and finishing pigs reared in groups, without castration","volume":"56","author":"Rydhmer","year":"2006","journal-title":"Acta Agric. Scand Sect. A"},{"key":"ref_12","doi-asserted-by":"crossref","first-page":"164","DOI":"10.1016\/j.compag.2012.09.015","article-title":"The automatic monitoring of pigs water use by cameras","volume":"90","author":"Kashiha","year":"2013","journal-title":"Comput. Electron. Agric."},{"key":"ref_13","doi-asserted-by":"crossref","first-page":"453","DOI":"10.1016\/j.compag.2018.11.002","article-title":"Feeding behavior recognition for group-housed pigs with the Faster R-CNN","volume":"155","author":"Yang","year":"2018","journal-title":"Comput. Electron. Agric."},{"key":"ref_14","doi-asserted-by":"crossref","first-page":"475","DOI":"10.1016\/j.compag.2018.12.009","article-title":"Automatic scoring of lateral and sternal lying posture in grouped pigs using image processing and Support Vector Machine","volume":"156","author":"Nasirahmadi","year":"2019","journal-title":"Comput. Electron. Agric."},{"key":"ref_15","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_16","doi-asserted-by":"crossref","first-page":"17418","DOI":"10.1038\/s41598-023-40757-7","article-title":"A lightweight cow mounting behavior recognition system based on improved YOLOv5s","volume":"13","author":"Wang","year":"2023","journal-title":"Sci. Rep."},{"key":"ref_17","doi-asserted-by":"crossref","first-page":"103524","DOI":"10.1016\/j.jvcir.2022.103524","article-title":"Cattle behavior recognition based on feature fusion under a dual attention mechanism","volume":"85","author":"Shang","year":"2022","journal-title":"J. Vis. Commun. Image Represent."},{"key":"ref_18","first-page":"347","article-title":"Behavior detection model of meat pigeons based on improved YOLOv4","volume":"54","author":"Guo","year":"2023","journal-title":"Trans. Chin. Soc. Agric. Mach."},{"key":"ref_19","first-page":"179","article-title":"Lightweight pig posture recognition method based on improved YOLOv5s","volume":"30","author":"Ge","year":"2025","journal-title":"J. China Agric. Univ."},{"key":"ref_20","doi-asserted-by":"crossref","first-page":"109099","DOI":"10.1016\/j.compag.2024.109099","article-title":"Lightweight network based on Fourth order Runge-Kutta scheme and Hybrid Attention Module for pig face recognition","volume":"223","author":"Guo","year":"2024","journal-title":"Comput. Electron. Agric."},{"key":"ref_21","first-page":"288","article-title":"Construction and application of a digital unmanned pig farming system","volume":"43","author":"Guo","year":"2024","journal-title":"J. Huazhong Agric. Univ."},{"key":"ref_22","first-page":"194","article-title":"Multimodal pig behavior recognition based on vision and sensor fusion","volume":"41","author":"Chen","year":"2025","journal-title":"Trans. Chin. Soc. Agric. Eng."},{"key":"ref_23","doi-asserted-by":"crossref","unstructured":"Wang, C., Yeh, I., and Mark Liao, H. (2024). Yolov9: Learning what you want to learn using programmable gradient information. European Conference on Computer Visio, Springer.","DOI":"10.1007\/978-3-031-72751-1_1"},{"key":"ref_24","first-page":"107984","article-title":"Yolov10: Real-time end-to-end object detection","volume":"37","author":"Wang","year":"2024","journal-title":"Adv. Neural Inf. Process. Syst."},{"key":"ref_25","unstructured":"Jocher, G., and Qiu, J. (2025, May 14). Ultralytics YOLO11. Available online: https:\/\/docs.ultralytics.com\/zh\/models\/yolo11."},{"key":"ref_26","unstructured":"Tian, Y., Ye, Q., and Doermann, D. (2025). Yolov12: Attention-centric real-time object detectors. arXiv."},{"key":"ref_27","unstructured":"Reis, D., Kupec, J., Hong, J., and Daoudi, A. (2023). Real-time flying object detection with YOLOv8. arXiv."},{"key":"ref_28","unstructured":"Jocher, G., Chaurasia, A., Stoken, A., Borovec, J., Kwon, Y., Michael, K., Fang, J., Wong, C., Yifu, Z., and Montes, D. (2022). ultralytics\/yolov5: V6. 2-yolov5 classification models, apple m1, reproducibility, clearml and deci. ai integrations. Zenodo."},{"key":"ref_29","doi-asserted-by":"crossref","unstructured":"Wang, C., Liao, H., Wu, Y., Chen, P., and Yeh, I. (2020). A new backbone that can enhance learning capability of CNN. 2020 IEEE. CVF Conference on Computer Vision and Pattern Recognition Workshops (CVPRW), IEEE.","DOI":"10.1109\/CVPRW50498.2020.00203"},{"key":"ref_30","doi-asserted-by":"crossref","unstructured":"Song, G., Liu, Y., and Wang, X. (2020, January 13\u201319). Revisiting the sibling head in object detector. Proceedings of the IEEE\/CVF Conference on Computer Vision and Pattern Recognition, Seattle, WA, USA.","DOI":"10.1109\/CVPR42600.2020.01158"},{"key":"ref_31","doi-asserted-by":"crossref","unstructured":"Zhang, S., Chi, C., Yao, Y., Lei, Z., and Li, S.Z. (2020, January 13\u201319). Bridging the gap between anchor-based and anchor-free detection via adaptive training sample selection. Proceedings of the IEEE\/CVF Conference on Computer Vision and Pattern Recognition, Seattle, WA, USA.","DOI":"10.1109\/CVPR42600.2020.00978"},{"key":"ref_32","first-page":"21002","article-title":"Generalized focal loss: Learning qualified and distributed bounding boxes for dense object detection","volume":"33","author":"Li","year":"2020","journal-title":"Adv. Neural Inf. Process. Syst."},{"key":"ref_33","doi-asserted-by":"crossref","unstructured":"Woo, S., Park, J., Lee, J., and Kweon, I.S. (2018, January 8\u201314). Cbam: Convolutional block attention module. Proceedings of the European Conference on Computer Vision (ECCV), Munich, Germany.","DOI":"10.1007\/978-3-030-01234-2_1"},{"key":"ref_34","unstructured":"Yang, L., Zhang, R., Li, L., and Xie, X. (2021, January 18\u201324). Simam: A simple, parameter-free attention module for convolutional neural networks. Proceedings of the International Conference on Machine Learning, Vienna, Austria."},{"key":"ref_35","doi-asserted-by":"crossref","unstructured":"Cao, Y., Xu, J., Lin, S., Wei, F., and Gcnet, H.H. (November, January 27). Non-Local Networks Meet Squeeze-Excitation Networks and Beyond, 2019 IEEE. Proceedings of the CVF International Conference on Computer Vision Workshop (ICCVW), Seoul, Republic of Korea.","DOI":"10.1109\/ICCVW.2019.00246"},{"key":"ref_36","doi-asserted-by":"crossref","first-page":"1489","DOI":"10.1109\/TPAMI.2022.3164083","article-title":"Contextual transformer networks for visual recognition","volume":"45","author":"Li","year":"2022","journal-title":"IEEE Trans. Pattern Anal. Mach. Intell."},{"key":"ref_37","first-page":"257","article-title":"Instance segmentation of broiler image based on attention mechanism and deformable convolution","volume":"52","author":"Fang","year":"2021","journal-title":"Trans. Chin. Soc. Agric. Mach."},{"key":"ref_38","doi-asserted-by":"crossref","unstructured":"Hu, J., Shen, L., and Sun, G. (2018, January 13\u201319). Squeeze-and-excitation networks. Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Seattle, WA, USA.","DOI":"10.1109\/CVPR.2018.00745"},{"key":"ref_39","doi-asserted-by":"crossref","first-page":"167","DOI":"10.1186\/s40494-023-00995-4","article-title":"A detection method for the ridge beast based on improved YOLOv3 algorithm","volume":"11","author":"Hou","year":"2023","journal-title":"Herit. Sci."},{"key":"ref_40","doi-asserted-by":"crossref","unstructured":"Mpofu, J.B., Li, C., Gao, X., and Su, X. (2024). Optimizing motion detection performance: Harnessing the power of squeeze and excitation modules. PLoS ONE, 19.","DOI":"10.1371\/journal.pone.0308933"},{"key":"ref_41","doi-asserted-by":"crossref","unstructured":"Han, K., Wang, Y., Tian, Q., Guo, J., Xu, C., and Xu, C. (2020, January 14\u201319). GhostNet: More Features From Cheap Operations. Proceedings of the 2020 IEEE\/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Seattle, WA, USA.","DOI":"10.1109\/CVPR42600.2020.00165"},{"key":"ref_42","unstructured":"Sapkota, R., Cheppally, R.H., Sharda, A., and Karkee, M. (2025). YOLO26: Key architectural enhancements and performance benchmarking for real-time object detection. arXiv."}],"container-title":["Computers"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/www.mdpi.com\/2073-431X\/15\/4\/230\/pdf","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2026,4,8]],"date-time":"2026-04-08T10:06:33Z","timestamp":1775642793000},"score":1,"resource":{"primary":{"URL":"https:\/\/www.mdpi.com\/2073-431X\/15\/4\/230"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2026,4,8]]},"references-count":42,"journal-issue":{"issue":"4","published-online":{"date-parts":[[2026,4]]}},"alternative-id":["computers15040230"],"URL":"https:\/\/doi.org\/10.3390\/computers15040230","relation":{},"ISSN":["2073-431X"],"issn-type":[{"value":"2073-431X","type":"electronic"}],"subject":[],"published":{"date-parts":[[2026,4,8]]}}}