YOLOv5-SA-FC: A Novel Pig Detection and Counting Method Based on Shuffle Attention and Focal Complete Intersection over Union

The efficient detection and counting of pig populations is critical for the promotion of intelligent breeding. Traditional methods for pig detection and counting mainly rely on manual labor, which is either time-consuming and inefficient or lacks sufficient detection accuracy. To address these issue...

Full description

Bibliographic Details
Main Authors: Wangli Hao, Li Zhang, Meng Han, Kai Zhang, Fuzhong Li, Guoqiang Yang, Zhenyu Liu
Format: Article
Language:English
Published: MDPI AG 2023-10-01
Series:Animals
Subjects:
Online Access:https://www.mdpi.com/2076-2615/13/20/3201
_version_ 1827721972451115008
author Wangli Hao
Li Zhang
Meng Han
Kai Zhang
Fuzhong Li
Guoqiang Yang
Zhenyu Liu
author_facet Wangli Hao
Li Zhang
Meng Han
Kai Zhang
Fuzhong Li
Guoqiang Yang
Zhenyu Liu
author_sort Wangli Hao
collection DOAJ
description The efficient detection and counting of pig populations is critical for the promotion of intelligent breeding. Traditional methods for pig detection and counting mainly rely on manual labor, which is either time-consuming and inefficient or lacks sufficient detection accuracy. To address these issues, a novel model for pig detection and counting based on YOLOv5 enhanced with shuffle attention (SA) and Focal-CIoU (FC) is proposed in this paper, which we call YOLOv5-SA-FC. The SA attention module in this model enables multi-channel information fusion with almost no additional parameters, enhancing the richness and robustness of feature extraction. Furthermore, the Focal-CIoU localization loss helps to reduce the impact of sample imbalance on the detection results, improving the overall performance of the model. From the experimental results, the proposed YOLOv5-SA-FC model achieved a mean average precision (mAP) and count accuracy of 93.8% and 95.6%, outperforming other methods in terms of pig detection and counting by 10.2% and 15.8%, respectively. These findings verify the effectiveness of the proposed YOLOv5-SA-FC model for pig population detection and counting in the context of intelligent pig breeding.
first_indexed 2024-03-10T21:30:23Z
format Article
id doaj.art-750a11b16553456f86f1dfe7dd8fc1d4
institution Directory Open Access Journal
issn 2076-2615
language English
last_indexed 2024-03-10T21:30:23Z
publishDate 2023-10-01
publisher MDPI AG
record_format Article
series Animals
spelling doaj.art-750a11b16553456f86f1dfe7dd8fc1d42023-11-19T15:24:34ZengMDPI AGAnimals2076-26152023-10-011320320110.3390/ani13203201YOLOv5-SA-FC: A Novel Pig Detection and Counting Method Based on Shuffle Attention and Focal Complete Intersection over UnionWangli Hao0Li Zhang1Meng Han2Kai Zhang3Fuzhong Li4Guoqiang Yang5Zhenyu Liu6School of Software, Shanxi Agricultural University, Jingzhong 030801, ChinaSchool of Software, Shanxi Agricultural University, Jingzhong 030801, ChinaSchool of Software, Shanxi Agricultural University, Jingzhong 030801, ChinaSchool of Software, Shanxi Agricultural University, Jingzhong 030801, ChinaSchool of Software, Shanxi Agricultural University, Jingzhong 030801, ChinaSchool of Software, Shanxi Agricultural University, Jingzhong 030801, ChinaSchool of Software, Shanxi Agricultural University, Jingzhong 030801, ChinaThe efficient detection and counting of pig populations is critical for the promotion of intelligent breeding. Traditional methods for pig detection and counting mainly rely on manual labor, which is either time-consuming and inefficient or lacks sufficient detection accuracy. To address these issues, a novel model for pig detection and counting based on YOLOv5 enhanced with shuffle attention (SA) and Focal-CIoU (FC) is proposed in this paper, which we call YOLOv5-SA-FC. The SA attention module in this model enables multi-channel information fusion with almost no additional parameters, enhancing the richness and robustness of feature extraction. Furthermore, the Focal-CIoU localization loss helps to reduce the impact of sample imbalance on the detection results, improving the overall performance of the model. From the experimental results, the proposed YOLOv5-SA-FC model achieved a mean average precision (mAP) and count accuracy of 93.8% and 95.6%, outperforming other methods in terms of pig detection and counting by 10.2% and 15.8%, respectively. These findings verify the effectiveness of the proposed YOLOv5-SA-FC model for pig population detection and counting in the context of intelligent pig breeding.https://www.mdpi.com/2076-2615/13/20/3201pigdetectioncountingshuffle attentionfocal loss
spellingShingle Wangli Hao
Li Zhang
Meng Han
Kai Zhang
Fuzhong Li
Guoqiang Yang
Zhenyu Liu
YOLOv5-SA-FC: A Novel Pig Detection and Counting Method Based on Shuffle Attention and Focal Complete Intersection over Union
Animals
pig
detection
counting
shuffle attention
focal loss
title YOLOv5-SA-FC: A Novel Pig Detection and Counting Method Based on Shuffle Attention and Focal Complete Intersection over Union
title_full YOLOv5-SA-FC: A Novel Pig Detection and Counting Method Based on Shuffle Attention and Focal Complete Intersection over Union
title_fullStr YOLOv5-SA-FC: A Novel Pig Detection and Counting Method Based on Shuffle Attention and Focal Complete Intersection over Union
title_full_unstemmed YOLOv5-SA-FC: A Novel Pig Detection and Counting Method Based on Shuffle Attention and Focal Complete Intersection over Union
title_short YOLOv5-SA-FC: A Novel Pig Detection and Counting Method Based on Shuffle Attention and Focal Complete Intersection over Union
title_sort yolov5 sa fc a novel pig detection and counting method based on shuffle attention and focal complete intersection over union
topic pig
detection
counting
shuffle attention
focal loss
url https://www.mdpi.com/2076-2615/13/20/3201
work_keys_str_mv AT wanglihao yolov5safcanovelpigdetectionandcountingmethodbasedonshuffleattentionandfocalcompleteintersectionoverunion
AT lizhang yolov5safcanovelpigdetectionandcountingmethodbasedonshuffleattentionandfocalcompleteintersectionoverunion
AT menghan yolov5safcanovelpigdetectionandcountingmethodbasedonshuffleattentionandfocalcompleteintersectionoverunion
AT kaizhang yolov5safcanovelpigdetectionandcountingmethodbasedonshuffleattentionandfocalcompleteintersectionoverunion
AT fuzhongli yolov5safcanovelpigdetectionandcountingmethodbasedonshuffleattentionandfocalcompleteintersectionoverunion
AT guoqiangyang yolov5safcanovelpigdetectionandcountingmethodbasedonshuffleattentionandfocalcompleteintersectionoverunion
AT zhenyuliu yolov5safcanovelpigdetectionandcountingmethodbasedonshuffleattentionandfocalcompleteintersectionoverunion