CSD-YOLOv8s:基于无人机图像的密集小目标羊只检测模型OACSTPCD
CSD-YOLOv8s:Dense Sheep Small Target Detection Model Based on UAV Images
[目的/意义]天然牧场下放牧牲畜数量的准确检测是规模化养殖场改造升级的关键.为满足规模化养殖场对大批羊群实现精准实时的检测需求,提出一种高精度、易部署的小目标检测模型CSD-YOLOv8s(CBAM SP-PFCSPC DSConv-YOLOv8s),实现无人机高空视角下小目标羊只个体的实时检测.[方法]首先,使用无人机获取天然草原牧场中包含不同背景及光照条件下的羊群视频数据并与下载的部分公开数据集共同构成原始图像数据.通过数据清洗和标注整理生成羊群检测数据集.其次,为解决羊群密集和相互遮挡造成的羊只检测困难问题,基于YOLO(You Only Look Once)v8模型构建具有跨阶段局部连接的SPPFCSPC(Spatial Pyramid Pooling Fast-CSPC)模块,提升网络特征提取和特征融合能力,增强模型对小目标羊只的检测性能.在模型的Neck部分引入了卷积注意力模块(Convolutional Block Attention Module,CBAM),从通道和空间两个维度增强网络的抗干扰能力,提升网络对复杂背景的抑制能力,进一步提高对密集羊群的检测性能.最后,为提升模型的实时性和可部署性,将Neck网络的标准卷积改为具有可变化内核的轻量卷积C2f_DS(C2f-DSConv)模块,减小了模型的参数量并提升了模型的检测速度.[结果和讨论]与YOLO、Faster R-CNN(Faster Regions with Convolutional Neural Networks)及其他经典网络模型相比,改进后的CSD-YOLOv8s模型在检测速度和模型大小相当的情况下,在羊群检测任务中具有更高的检测精度.Precision达到95.2%,mAP达到93.1%,FPS(Frames Per Second)达到87 f/s,并对不同遮挡程度的羊只目标具有较强的鲁棒性,有效解决了无人机检测任务中因羊只目标小、背景噪声大、密集程度高导致羊群漏检和误检严重的问题.公开数据集验证结果表明,提出的模型对其他不同物体的检测精度均有所提高,特别是在羊只检测方面,检测精度提升了9.7%.[结论]提出的CSD-YOLOv8s在无人机图像中更精准地检测草原放牧牲畜,对不同程度的聚集和遮挡目标实现精准检测,且具有较好的实时性,为养殖场大规模畜禽检测提供了技术支撑,具有广泛的应用潜力.
[Objective]The monitoring of livestock grazing in natural pastures is a key aspect of the transformation and upgrading of large-scale breeding farms.In order to meet the demand for large-scale farms to achieve accurate real-time detection of a large number of sheep,a high-precision and easy-to-deploy small-target detection model:CSD-YOLOv8s was proposed to realize the real-time detection of small-targeted individual sheep under the high-altitude view of the unmanned aerial vehicle(UAV). [Methods]Firstly,a UAV was used to acquire video data of sheep in natural grassland pastures with different backgrounds and lighting conditions,and together with some public datasets downloaded formed the original image data.The sheep detection dataset was gener-ated through data cleaning and labeling.Secondly,in order to solve the difficult problem of sheep detection caused by dense flocks and mutual occlusion,the SPPFCSPC module was constructed with cross-stage local connection based on the you only look once(YOLO)v8 model,which combined the original features with the output features of the fast spatial pyramid pooling network,fully re-tained the feature information at different stages of the model,and effectively solved the problem of small targets and serious occlu-sion of the sheep,and improved the detection performance of the model for small sheep targets.In the Neck part of the model,the con-volutional block attention module(CBAM)convolutional attention module was introduced to enhance the feature information capture based on both spatial and channel aspects,suppressing the background information spatially and focusing on the sheep target in the channel,enhancing the network's anti-jamming ability from both channel and spatial dimensions,and improving the model's detection performance of multi-scale sheep under complex backgrounds and different illumination conditions.Finally,in order to improve the real-time and deploy ability of the model,the standard convolution of the Neck network was changed to a lightweight convolutional C2f_DS module with a changeable kernel,which was able to adaptively select the corresponding convolutional kernel for feature ex-traction according to the input features,and solved the problem of input scale change in the process of sheep detection in a more flexi-ble way,and at the same time,the number of parameters of the model was reduced and the speed of the model was improved. [Results and Discussions]The improved CSD-YOLOv8s model exhibited excellent performance in the sheep detection task.Compared with YOLO,Faster R-CNN and other classical network models,the improved CSD-YOLOv8s model had higher detection accuracy and frames per second(FPS)of 87 f/s in the flock detection task with comparable detection speed and model size.Compared with the YOLOv8s model,Precision was improved from 93.0%to 95.2%,mAP was improved from 91.2%to 93.1%,and it had strong robust-ness to sheep targets with different degree of occlusion and different scales,which effectively solved the serious problems of missed and misdetection of sheep in the grassland pasture UAV-on-ground sheep detection task due to the small sheep targets,large back-ground noise,and high degree of densification.misdetection serious problems.Validated by the PASCAL VOC 2007 open dataset,the CSD-YOLOv8s model proposed in this study improved the detection accuracy of 20 different objects,including transportation vehi-cles,animals,etc.,especially in sheep detection,the detection accuracy was improved by 9.7%. [Conclusions]This study establishes a sheep dataset based on drone images and proposes a model called CSD-YOLOv8s for detecting grazing sheep in natural grasslands.The model addresses the serious issues of missed detections and false alarms in sheep detection under complex backgrounds and lighting conditions,enabling more accurate detection of grazing livestock in drone images.It achieves precise detection of targets with varying degrees of clustering and occlusion and possesses good real-time performance.This model provides an effective detection method for detecting sheep herds from the perspective of drones in natural pastures and offers technical support for large-scale livestock detection in breeding farms,with wide-ranging potential applications.
翁智;刘海鑫;郑志强
内蒙古大学 电子信息工程学院,内蒙古呼和浩特 010021,中国||内蒙古大学草原家畜生殖调控与繁育国家重点实验室,内蒙古呼和浩特 010030,中国
计算机与自动化
羊只检测YOLOv8小目标SPPFCSPC注意力机制深度可分离卷积
sheep detectionYOLOv8small targetSPPFCSPCattention mechanismdepthwise separable convolution
《智慧农业(中英文)》 2024 (004)
42-52 / 11
国家自然科学基金项目(61966026);内蒙古自治区高等学校青年科技英才支持计划(NJYT23063) National Natural Science Foundation of China Under Grant(61966026);Program for Young Talents of Science and Technology in Universities of Inner Mongolia Autonomous Region Grant(NJYT23063)
评论