摘要 An improved YOLOv5n model for automatically detecting aggressive behaviors among sheep in scale and intensive farming was proposed. In the YOLOv5n lightweight architecture, the traditional convolution module was displaced by the ghost convolution module to reduce the model's parameters and computing overhead. Subsequently, the coordinate attention (CA) mechanism was introduced to the key locations on the network to enhance the channel and localization information. Additionally, an efficient intersection over union (EIOU) loss function was introduced and improved to increase the accuracy of the predictive frame and reduce false detection. Finally, the stochastic gradient descent (SGD) optimizer was replaced with Ranger21 to compensate for the poor performance of the ghost module in feature extraction and hasten convergence. To improve the model's generalization capacity for all weather conditions, three weather conditions (snowy, rainy, and foggy) were added to half of the sample data. Experiments revealed that compared to the original YOLOv5n model, our revised model required only 83% of the parameters. Its size was only 3 MB and boosted the accuracy by 0.7%, recall by 1.3%, mean average precision (mAP) by 0.5%, and F1 by 1.01%. It also outperforms other popular lightweight YOLO models.
Abstract:An improved Y0L0v5n model for automatically detecting aggressive behaviors among sheep inscale and intensive farming was proposed. In the YOLOvSn lightweight architecture, the traditional con-volution module was displaced by the ghost convolution module to reduce the model's parameters andcomputing overhead. Subsequently, the coordinate attention (CA) mechanism was introduced to the keylocations on the network to enhance the channel and localization information. Additionally, an efficientintersection over union (ElOU) loss funetion was introduced and improved to increase the accuracy of thepredictive frame and reduce false detection. Finally, the stochastic gradient descent (SGD)optimizerwas replaced with Ranger2l to compensate for the poor performance of the ghost module in feature extrac-tion and hasten convergence. To improve the model's generalization capacity for all weather conditions,three weather conditions (snowy, rainy, and foggy) were added to half of the sample data. Experimentsrevealed that compared to the original YOL0v5n model, our revised model required only 83% of the param-eters. lts size was only 3 MB and boosted the accuracy by 0.7% ,recall by 1.3% , mean average precision(mAP)by 0.5% , and Fl by 1.01%. It also outperforms other popular lightweight YOL0 models.
引用本文:
冯大春,徐亚磊,聂晶,刘双印,李景彬,Shahbaz Gul Hassan,刘同来,徐龙琴,温宝琴. 基于注意机制和YOLOv5n的肉羊攻击性行为检测方法(英文)[J]. 仲恺农业工程学院学报, 2023, 36(4): 79-89.