欢迎您访问《智慧农业(中英文)》官方网站! English

Smart Agriculture ›› 2022, Vol. 4 ›› Issue (3): 120-131.doi: 10.12133/j.smartag.SA202207001

• 专刊--智慧果园关键技术与装备 • 上一篇    下一篇

基于改进YOLOX的自然环境中火龙果检测方法

商枫楠1,2,3(), 周学成1,2,3(), 梁英凯1,2,3, 肖明玮1,2,3, 陈桥1,2,3, 罗陈迪1,2,3   

  1. 1.华南农业大学 工程学院,广东 广州 510642
    2.广东省农业人工智能重点实验室,广东 广州 510642
    3.南方农业机械与装备关键技术教育部重点实验室,广东 广州 510642
  • 收稿日期:2022-06-30 出版日期:2022-09-30
  • 基金资助:
    国家重点研发计划项目(2017YFD0700602)
  • 作者简介:商枫楠(1994-),男,硕士研究生,研究方向为机器视觉与图像分析。E-mail:shangfengnan@163.com
  • 通信作者:

Detection Method for Dragon Fruit in Natural Environment Based on Improved YOLOX

SHANG Fengnan1,2,3(), ZHOU Xuecheng1,2,3(), LIANG Yingkai1,2,3, XIAO Mingwei1,2,3, CHEN Qiao1,2,3, LUO Chendi1,2,3   

  1. 1.College of Engineering, South China Agricultural University, Guangzhou 510642, China
    2.Guangdong Provincial Key Laboratory of Agricultural Artificial Intelligence, Guangzhou 510642, China
    3.Key Laboratory of Key Technology on Agricultural Machine and Equipment, Ministry of Education, Guangzhou 510642, China
  • Received:2022-06-30 Online:2022-09-30

摘要:

自然环境下果实的精准检测是火龙果采摘机器人执行采摘作业的先决条件。为提高自然环境下果实识别的精确性、鲁棒性和检测效率,本研究对YOLOX(You Only Look Once X)网络进行改进,提出了一种含有注意力模块的目标检测方法。为便于在嵌入式设备上部署,本方法以YOLOX-Nano网络为基准,将卷积注意力模块(Convolutional Block Attention Module,CBAM)添加到YOLOX-Nano的主干特征提取网络中,通过为主干网络提取到不同尺度的特征层分配权重系数来学习不同通道间特征的相关性,加强网络深层信息的传递,降低自然环境背景下对火龙果识别的干扰。对该方法进行性能评估和对比试验,经过训练后,该火龙果目标检测网络在测试集的AP0.5值为98.9%,AP0.5:0.95的值为72.4%。在相同试验条件下对比其它YOLO网络模型,该方法平均检测精度分别超越YOLOv3、YOLOv4-Tiny和YOLOv5-S模型26.2%、9.8%和7.9%。最后对不同分辨率的火龙果果园自然环境下采集的视频进行实时测试。试验结果表明,本研究提出的改进YOLOX-Nano目标检测方法,每帧平均检测时间为21.72 ms,F1值为0.99,模型大小仅3.76 MB,检测速度、检测精度和模型大小满足自然环境下火龙果采摘的技术要求。

关键词: 水果采摘, 自然环境, 火龙果, 目标检测, YOLOX, 注意力机制, 深度学习

Abstract:

Dragon fruit detection in natural environment is the prerequisite for fruit harvesting robots to perform harvesting. In order to improve the harvesting efficiency, by improving YOLOX (You Only Look Once X) network, a target detection network with an attention module was proposed in this research. As the benchmark, YOLOX-Nano network was chose to facilitate deployment on embedded devices, and the convolutional block attention module (CBAM) was added to the backbone feature extraction network of YOLOX-Nano, which improved the robustness of the model to dragon fruit target detection to a certain extent. The correlation of features between different channels was learned by weight allocation coefficients of features of different scales, which were extracted for the backbone network. Moreover, the transmission of deep information of network structure was strengthened, which aimed at reducing the interference of dragon fruit recognition in the natural environment as well as improving the accuracy and speed of detection significantly. The performance evaluation and comparison test of the method were carried out. The results showed that, after training, the dragon fruit target detection network got an AP0.5 value of 98.9% in the test set, an AP0.5:0.95 value of 72.4% and F1 score was 0.99. Compared with other YOLO network models under the same experimental conditions, on the one hand, the improved YOLOX-Nano network model proposed in this research was more lightweight, on the other hand, the detection accuracy of this method surpassed that of YOLOv3, YOLOv4 and YOLOv5 respectively. The average detection accuracy of the improved YOLOX-Nano target detection network was the highest, reaching 98.9%, 26.2% higher than YOLOv3, 9.8% points higher than YOLOv4-Tiny, and 7.9% points higher than YOLOv5-S. Finally, real-time tests were performed on videos with different input resolutions. The improved YOLOX-Nano target detection network proposed in this research had an average detection time of 21.72 ms for a single image. In terms of the size of the network model was only 3.76 MB, which was convenient for deployment on embedded devices. In conclusion, not only did the improved YOLOX-Nano target detection network model accurately detect dragon fruit under different lighting and occlusion conditions, but the detection speed and detection accuracy showed in this research could able to meet the requirements of dragon fruit harvesting in natural environment requirements at the same time, which could provide some guidance for the design of the dragon fruit harvesting robot.

Key words: fruits picking, natural environment, dragon fruit, object detection, YOLOX, attention mechanism, deep learning

中图分类号: