基于改进YOLOv8s的大田甘蓝移栽状态检测算法OACSTPCD
Transplant Status Detection Algorithm of Cabbage in the Field Based on Improved YOLOv8s
[目的/意义]借助智能化识别及图像处理等技术来实现对移栽后蔬菜状态的识别和分析,将会极大提高识别效率.为了实现甘蓝大田移栽情况的实时监测和统计,提高甘蓝移栽后的成活率以及制定后续工作方案,减少人力和物力的浪费,研究一种自然环境下高效识别甘蓝移栽状态的算法.[方法]采集移栽后的甘蓝图像,利用数据增强方式对数据进行处理,输入YOLOv8s(You Only Look Once Version 8s)算法中进行识别,通过结合可变形卷积,提高算法特征提取和目标定位能力,捕获更多有用的目标信息,提高对目标的识别效果;通过嵌入多尺度注意力机制,降低背景因素干扰,增加算法对目标区域的关注,提高模型对不同尺寸的甘蓝的检测能力,降低漏检率;通过引入Focal-EIoU Loss(Focal Extended Intersection over Union Loss),优化算法定位精度,提高算法的收敛速度和定位精度.[结果和讨论]提出的算法经过测试,对甘蓝移栽状态的召回率R值和平均精度均值(Mean Average Precision,mAP)分别达到92.2%和96.2%,传输速率为146帧/s,可满足实际甘蓝移栽工作对移栽状态识别精度和速度的要求.[结论]提出的甘蓝移栽状态检测方法能够实现对甘蓝移栽状态识别的准确识别,可以提升移栽质量测量效率,减少时间和人力投入,提高大田移栽质量调查的自动化程度.
[Objective]Currently,the lack of computerized systems to monitor the quality of cabbage transplants is a notable shortcoming in the agricultural industry,where transplanting operations play a crucial role in determining the overall yield and quality of the crop.To ad-dress this problem,a lightweight and efficient algorithm was developed to monitor the status of cabbage transplants in a natural envi-ronment. [Methods]First,the cabbage image dataset was established,the cabbage images in the natural environment were collected,the collect-ed image data were filtered and the transplanting status of the cabbage was set as normal seedling(upright and intact seedling),buried seedling(whose stems and leaves were buried by the soil)and exposed seedling(whose roots were exposed),and the dataset was man-ually categorized and labelled using a graphical image annotation tool(LabelImg)so that corresponding XML files could be generat-ed.And the dataset was pre-processed with data enhancement methods such as flipping,cropping,blurring and random brightness mode to eliminate the scale and position differences between the cabbages in the test and training sets and to improve the imbalance of the data.Then,a cabbage transplantation state detection model based on YOLOv8s(You Only Look Once Version 8s)was designed.To address the problem that light and soil have a large influence on the identification of the transplantation state of cabbage in the natu-ral environment,a multi-scale attention mechanism was embedded to increase the number of features in the model,and a multi-scale attention mechanism was embedded to increase the number of features in the model.Embedding the multi-scale attention mechanism to increase the algorithm's attention to the target region and improve the network's attention to target features at different scales,so as to improve the model's detection efficiency and target recognition accuracy,and reduce the leakage rate;by combining with deform-able convolution,more useful target information was captured to improve the model's target recognition and convergence effect,and the model complexity increased by C3-layer convolution was reduced,which further reduced the model complexity.Due to the unsat-isfactory localization effect of the algorithm,the focal extended intersection over union loss(Focal-EIoU Loss)was introduced to solve the problem of violent oscillation of the loss value caused by low-quality samples,and the influence weight of high-quality sam-ples on the loss value was increased while the influence of low-quality samples was suppressed,so as to improve the convergence speed and localization accuracy of the algorithm. [Results and Discussions]Eventually,the algorithm was put through a stringent testing phase,yielding a remarkable recognition accura-cy of 96.2%for the task of cabbage transplantation state.This was an improvement of 2.8%over the widely used YOLOv8s.More-over,when benchmarked against other prominent target detection models,the algorithm emerged as a clear winner.It showcased a no-table enhancement of 3%and 8.9%in detection performance compared to YOLOv3-tiny.Simultaneously,it also managed to achieve a 3.7%increase in the recall rate,a metric that measured the efficiency of the algorithm in identifying actual targets among false posi-tives.On a comparative note,the algorithm outperformed YOLOv5 in terms of recall rate by 1.1%,2%and 1.5%,respectively.When pitted against the robust faster region-based convolutional neural network(Faster R-CNN),the algorithm demonstrated a significant boost in recall rate by 20.8%and 11.4%,resulting in an overall improvement of 13%.A similar trend was observed when the algo-rithm was compared to the single shot multibox detector(SSD)model,with a notable 9.4%and 6.1%improvement in recall rate.The final experimental results show that when the enhanced model was compared with YOLOv7-tiny,the recognition accuracy was in-creased by 3%,and the recall rate was increased by 3.5%.These impressive results validated the superiority of the algorithm in terms of accuracy and localization ability within the target area.The algorithm effectively eliminates interferenced factors such as soil and background impurities,thereby enhancing its performance and making it an ideal choice for tasks such as cabbage transplantation state recognition. [Conclusions]The experimental results show that the proposed cabbage transplantation state detection method can meet the accuracy and real-time requirements for the identification of cabbage transplantation state,and the detection accuracy and localization accuracy of the improved model perform better when the target is smaller and there are weeds and other interferences in the background.There-fore,the method proposed in this study can improve the efficiency of cabbage transplantation quality measurement,reduce the time and labor,and improve the automation of field transplantation quality survey.
吴小燕;郭威;朱轶萍;朱华吉;吴华瑞
广西大学 计算机与电子信息学院,广西南宁 530000,中国||国家农业信息化工程技术研究中心,北京 100097,中国国家农业信息化工程技术研究中心,北京 100097,中国||北京市农林科学院 信息技术研究中心,北京 100097,中国||农业农村部数字乡村技术重点实验室,北京 100097,中国||农业农村部农业信息技术重点实验室,北京 100097,中国国家农业信息化工程技术研究中心,北京 100097,中国
计算机与自动化
甘蓝移栽YOLOv8s目标检测多尺度注意力机制可变形卷积
transplantation of cabbageYOLOv8starget detectionmulti-scale attentiondeformable convolution
《智慧农业(中英文)》 2024 (002)
107-117 / 11
国家重点研发计划(2022YFD1600605);国家现代农业产业技术体系项目(CARS-23-D07);中央引导地方科技发展资金项目(2023ZY1-CGZY-01) National Key Research and Development Program of China(2022YFD1600605);National Modern Agricultural In-dustry Technology System Project(CARS-23-D07);Central Government Guide Local Science and Technology Development Fund Project(2023ZY1-CGZY-01)
评论