Pig Counting Algorithm Based on Improved YOLOv5n Model with Multiscene and Fewer Number of Parameters

Author:

Wang Yongsheng12,Yang Duanli12,Chen Hui34,Wang Lianzeng5,Gao Yuan12

Affiliation:

1. College of Information Science and Technology, Hebei Agricultural University, Baoding 071001, China

2. Hebei Key Laboratory of Agricultural Big Data, Baoding 071001, China

3. College of Animal Science and Technology, Hebei Agricultural University, Baoding 071001, China

4. Key Laboratory of Broiler and Layer Facilities Engineering, Ministry of Agriculture and Rural Affairs, Baoding 071001, China

5. Hebei Layer Industry Technology Research Institute, Handan 056007, China

Abstract

Pig counting is an important work in the breeding process of large-scale pig farms. In order to achieve high-precision pig identification in the conditions of pigs occluding each other, illumination difference, multiscenes, and differences in the number of pigs and the imaging size, and to also reduce the number of parameters of the model, a pig counting algorithm of improved YOLOv5n was proposed. Firstly, a multiscene dataset is created by selecting images from several different pig farms to enhance the generalization performance of the model; secondly, the Backbone of YOLOv5n was replaced by the FasterNet model to reduce the number of parameters and calculations to lay the foundation for the model to be applied to Android system; thirdly, the Neck of YOLOv5n was optimized by using the E-GFPN structure to enhance the feature fusion capability of the model; Finally, Focal EIoU loss function was used to replace the CIoU loss function of YOLOv5n to improve the model’s identification accuracy. The results showed that the AP of the improved model was 97.72%, the number of parameters, the amount of calculation, and the size of the model were reduced by 50.57%, 32.20%, and 47.21% compared with YOLOv5n, and the detection speed reached 75.87 f/s. The improved algorithm has better accuracy and robustness in multiscene and complex pig house environments, which not only ensured the accuracy of the model but also reduced the number of parameters as much as possible. Meanwhile, a pig counting application for the Android system was developed based on the optimized model, which truly realized the practical application of the technology. The improved algorithm and application could be easily extended and applied to the field of livestock and poultry counting, such as cattle, sheep, geese, etc., which has a widely practical value.

Funder

National Natural Science Foundation of China

China Agriculture Research System of MOF, MARA

Special Funds of Hebei Science and Technology R & D platform Foundation

Innovation Ability Support Project for PostGraduates of Hebei Province

Publisher

MDPI AG

Subject

General Veterinary,Animal Science and Zoology

Reference37 articles.

1. Automated pig counting using deep learning;Tian;Comput. Electron. Agric.,2019

2. LSSA_CAU: An interactive 3D point clouds analysis software for body measurement of livestock with similar forms of cows or pigs;Guo;Comput. Electron. Agric.,2017

3. Pig Counting Algorithm Based on Improved YOLOv5n;Yang;Trans. Chin. Soc. Agric. Mach.,2023

4. Perner, P. (2001, January 28–30). Motion Tracking of Animals for Behavior Analysis. Proceedings of the Visual Form 2001: 4th International Workshop on Visual Form, IWVF4, Capri, Italy.

5. Development of a real-time computer vision system for tracking loose-housed pigs;Ahrendt;Comput. Electron. Agric.,2011

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3