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

Autor: Wang, Yongsheng, Yang, Duanli, Chen, Hui, Wang, Lianzeng, Gao, Yuan
Předmět:
Zdroj: Animals (2076-2615); Nov2023, Vol. 13 Issue 21, p3411, 22p
Abstrakt: Simple Summary: Pig counting is important work in the breeding process of large-scale pig farms. Currently, animal counting is mainly observed manually, which leads to increased labor costs and is also prone to animal stress. The noncontact computer vision method avoids the above problems. Therefore, we propose a method for pig counting using machine vision technology. Meanwhile, a pig counting application for the Android system was developed, which truly realized the practical application of the technology. 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. [ABSTRACT FROM AUTHOR]
Databáze: Complementary Index
Nepřihlášeným uživatelům se plný text nezobrazuje