Cargando…

An Improved Pig Counting Algorithm Based on YOLOv5 and DeepSORT Model

Pig counting is an important task in pig sales and breeding supervision. Currently, manual counting is low-efficiency and high-cost and presents challenges in terms of statistical analysis. In response to the difficulties faced in pig part feature detection, the loss of tracking due to rapid movemen...

Descripción completa

Detalles Bibliográficos
Autores principales: Huang, Yigui, Xiao, Deqin, Liu, Junbin, Tan, Zhujie, Liu, Kejian, Chen, Miaobin
Formato: Online Artículo Texto
Lenguaje:English
Publicado: MDPI 2023
Materias:
Acceso en línea:https://www.ncbi.nlm.nih.gov/pmc/articles/PMC10383308/
https://www.ncbi.nlm.nih.gov/pubmed/37514604
http://dx.doi.org/10.3390/s23146309
_version_ 1785080877603094528
author Huang, Yigui
Xiao, Deqin
Liu, Junbin
Tan, Zhujie
Liu, Kejian
Chen, Miaobin
author_facet Huang, Yigui
Xiao, Deqin
Liu, Junbin
Tan, Zhujie
Liu, Kejian
Chen, Miaobin
author_sort Huang, Yigui
collection PubMed
description Pig counting is an important task in pig sales and breeding supervision. Currently, manual counting is low-efficiency and high-cost and presents challenges in terms of statistical analysis. In response to the difficulties faced in pig part feature detection, the loss of tracking due to rapid movement, and the large counting deviation in pig video tracking and counting research, this paper proposes an improved pig counting algorithm (Mobile Pig Counting Algorithm with YOLOv5xpig and DeepSORTPig (MPC-YD)) based on YOLOv5 + DeepSORT model. The algorithm improves the detection rate of pig body parts by adding two different sizes of SPP networks and using SoftPool instead of MaxPool operations in YOLOv5x. In addition, the algorithm includes a pig reidentification network, a pig-tracking method based on spatial state correction, and a pig counting method based on frame number judgment on the DeepSORT algorithm to improve pig tracking accuracy. Experimental analysis shows that the MPC-YD algorithm achieves an average precision of 99.24% in pig object detection and an accuracy of 85.32% in multitarget pig tracking. In the aisle environment of the slaughterhouse, the MPC-YD algorithm achieves a correlation coefficient (R(2)) of 98.14% in pig counting from video, and it achieves stable pig counting in a breeding environment. The algorithm has a wide range of application prospects.
format Online
Article
Text
id pubmed-10383308
institution National Center for Biotechnology Information
language English
publishDate 2023
publisher MDPI
record_format MEDLINE/PubMed
spelling pubmed-103833082023-07-30 An Improved Pig Counting Algorithm Based on YOLOv5 and DeepSORT Model Huang, Yigui Xiao, Deqin Liu, Junbin Tan, Zhujie Liu, Kejian Chen, Miaobin Sensors (Basel) Article Pig counting is an important task in pig sales and breeding supervision. Currently, manual counting is low-efficiency and high-cost and presents challenges in terms of statistical analysis. In response to the difficulties faced in pig part feature detection, the loss of tracking due to rapid movement, and the large counting deviation in pig video tracking and counting research, this paper proposes an improved pig counting algorithm (Mobile Pig Counting Algorithm with YOLOv5xpig and DeepSORTPig (MPC-YD)) based on YOLOv5 + DeepSORT model. The algorithm improves the detection rate of pig body parts by adding two different sizes of SPP networks and using SoftPool instead of MaxPool operations in YOLOv5x. In addition, the algorithm includes a pig reidentification network, a pig-tracking method based on spatial state correction, and a pig counting method based on frame number judgment on the DeepSORT algorithm to improve pig tracking accuracy. Experimental analysis shows that the MPC-YD algorithm achieves an average precision of 99.24% in pig object detection and an accuracy of 85.32% in multitarget pig tracking. In the aisle environment of the slaughterhouse, the MPC-YD algorithm achieves a correlation coefficient (R(2)) of 98.14% in pig counting from video, and it achieves stable pig counting in a breeding environment. The algorithm has a wide range of application prospects. MDPI 2023-07-11 /pmc/articles/PMC10383308/ /pubmed/37514604 http://dx.doi.org/10.3390/s23146309 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
Huang, Yigui
Xiao, Deqin
Liu, Junbin
Tan, Zhujie
Liu, Kejian
Chen, Miaobin
An Improved Pig Counting Algorithm Based on YOLOv5 and DeepSORT Model
title An Improved Pig Counting Algorithm Based on YOLOv5 and DeepSORT Model
title_full An Improved Pig Counting Algorithm Based on YOLOv5 and DeepSORT Model
title_fullStr An Improved Pig Counting Algorithm Based on YOLOv5 and DeepSORT Model
title_full_unstemmed An Improved Pig Counting Algorithm Based on YOLOv5 and DeepSORT Model
title_short An Improved Pig Counting Algorithm Based on YOLOv5 and DeepSORT Model
title_sort improved pig counting algorithm based on yolov5 and deepsort model
topic Article
url https://www.ncbi.nlm.nih.gov/pmc/articles/PMC10383308/
https://www.ncbi.nlm.nih.gov/pubmed/37514604
http://dx.doi.org/10.3390/s23146309
work_keys_str_mv AT huangyigui animprovedpigcountingalgorithmbasedonyolov5anddeepsortmodel
AT xiaodeqin animprovedpigcountingalgorithmbasedonyolov5anddeepsortmodel
AT liujunbin animprovedpigcountingalgorithmbasedonyolov5anddeepsortmodel
AT tanzhujie animprovedpigcountingalgorithmbasedonyolov5anddeepsortmodel
AT liukejian animprovedpigcountingalgorithmbasedonyolov5anddeepsortmodel
AT chenmiaobin animprovedpigcountingalgorithmbasedonyolov5anddeepsortmodel
AT huangyigui improvedpigcountingalgorithmbasedonyolov5anddeepsortmodel
AT xiaodeqin improvedpigcountingalgorithmbasedonyolov5anddeepsortmodel
AT liujunbin improvedpigcountingalgorithmbasedonyolov5anddeepsortmodel
AT tanzhujie improvedpigcountingalgorithmbasedonyolov5anddeepsortmodel
AT liukejian improvedpigcountingalgorithmbasedonyolov5anddeepsortmodel
AT chenmiaobin improvedpigcountingalgorithmbasedonyolov5anddeepsortmodel