Cargando…
Pig Counting Algorithm Based on Improved YOLOv5n Model with Multiscene and Fewer Number of Parameters
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...
Autores principales: | , , , , |
---|---|
Formato: | Online Artículo Texto |
Lenguaje: | English |
Publicado: |
MDPI
2023
|
Materias: | |
Acceso en línea: | https://www.ncbi.nlm.nih.gov/pmc/articles/PMC10650535/ https://www.ncbi.nlm.nih.gov/pubmed/37958166 http://dx.doi.org/10.3390/ani13213411 |
_version_ | 1785135802703937536 |
---|---|
author | Wang, Yongsheng Yang, Duanli Chen, Hui Wang, Lianzeng Gao, Yuan |
author_facet | Wang, Yongsheng Yang, Duanli Chen, Hui Wang, Lianzeng Gao, Yuan |
author_sort | Wang, Yongsheng |
collection | PubMed |
description | 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. 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. |
format | Online Article Text |
id | pubmed-10650535 |
institution | National Center for Biotechnology Information |
language | English |
publishDate | 2023 |
publisher | MDPI |
record_format | MEDLINE/PubMed |
spelling | pubmed-106505352023-11-03 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 Animals (Basel) Article 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. 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. MDPI 2023-11-03 /pmc/articles/PMC10650535/ /pubmed/37958166 http://dx.doi.org/10.3390/ani13213411 Text en © 2023 by the authors. https://creativecommons.org/licenses/by/4.0/Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/). |
spellingShingle | Article Wang, Yongsheng Yang, Duanli Chen, Hui Wang, Lianzeng Gao, Yuan Pig Counting Algorithm Based on Improved YOLOv5n Model with Multiscene and Fewer Number of Parameters |
title | Pig Counting Algorithm Based on Improved YOLOv5n Model with Multiscene and Fewer Number of Parameters |
title_full | Pig Counting Algorithm Based on Improved YOLOv5n Model with Multiscene and Fewer Number of Parameters |
title_fullStr | Pig Counting Algorithm Based on Improved YOLOv5n Model with Multiscene and Fewer Number of Parameters |
title_full_unstemmed | Pig Counting Algorithm Based on Improved YOLOv5n Model with Multiscene and Fewer Number of Parameters |
title_short | Pig Counting Algorithm Based on Improved YOLOv5n Model with Multiscene and Fewer Number of Parameters |
title_sort | pig counting algorithm based on improved yolov5n model with multiscene and fewer number of parameters |
topic | Article |
url | https://www.ncbi.nlm.nih.gov/pmc/articles/PMC10650535/ https://www.ncbi.nlm.nih.gov/pubmed/37958166 http://dx.doi.org/10.3390/ani13213411 |
work_keys_str_mv | AT wangyongsheng pigcountingalgorithmbasedonimprovedyolov5nmodelwithmultisceneandfewernumberofparameters AT yangduanli pigcountingalgorithmbasedonimprovedyolov5nmodelwithmultisceneandfewernumberofparameters AT chenhui pigcountingalgorithmbasedonimprovedyolov5nmodelwithmultisceneandfewernumberofparameters AT wanglianzeng pigcountingalgorithmbasedonimprovedyolov5nmodelwithmultisceneandfewernumberofparameters AT gaoyuan pigcountingalgorithmbasedonimprovedyolov5nmodelwithmultisceneandfewernumberofparameters |