Welcome to Smart Agriculture

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

• Special Issue--Key Technologies and Equipment for Smart Orchard • Previous Articles     Next Articles

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


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

CLC Number: