Suppr超能文献

基于改进的YOLOv5n模型的多场景少参数猪只计数算法

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

作者信息

Wang Yongsheng, Yang Duanli, Chen Hui, Wang Lianzeng, Gao Yuan

机构信息

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

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

出版信息

Animals (Basel). 2023 Nov 3;13(21):3411. doi: 10.3390/ani13213411.

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.

摘要

生猪计数是大型养猪场养殖过程中的一项重要工作。为了在猪相互遮挡、光照差异、多场景以及猪的数量和成像尺寸不同的条件下实现高精度的猪只识别,同时减少模型参数数量,提出了一种改进的YOLOv5n生猪计数算法。首先,通过从几个不同的养猪场选择图像创建多场景数据集,以提高模型的泛化性能;其次,将YOLOv5n的骨干网络替换为FasterNet模型,减少参数数量和计算量,为模型应用于安卓系统奠定基础;第三,使用E-GFPN结构优化YOLOv5n的颈部,增强模型的特征融合能力;最后,使用Focal EIoU损失函数替换YOLOv5n的CIoU损失函数,提高模型的识别准确率。结果表明,改进模型的平均精度(AP)为97.72%,与YOLOv5n相比,参数数量、计算量和模型大小分别减少了50.57%、32.20%和47.21%,检测速度达到75.87帧/秒。改进后的算法在多场景和复杂猪舍环境中具有更好的准确性和鲁棒性,既保证了模型的准确性,又尽可能减少了参数数量。同时,基于优化后的模型开发了安卓系统的生猪计数应用程序,真正实现了该技术的实际应用。改进后的算法和应用程序可以轻松扩展并应用于牛羊鹅等畜禽计数领域,具有广泛的实用价值。

文献AI研究员

20分钟写一篇综述,助力文献阅读效率提升50倍。

立即体验

用中文搜PubMed

大模型驱动的PubMed中文搜索引擎

马上搜索

文档翻译

学术文献翻译模型,支持多种主流文档格式。

立即体验