摘要 果园环境下柑橘的快速准确检测是自主采摘机器人作业的关键.针对现有的模型过于冗余、检测速度与精度不平衡等问题,提出一种轻量型果园环境果实检测方法.在YOLOv4算法的基础上引入焦点损失函数(Focal Loss)来提高模型在二分类检测任务中的负样本挖掘能力,并针对模型参数冗余等问题提出一种优化的模型剪枝方法.试验结果表明:提出的方法在果园环境中柑橘果实数据集检测得到的平均精度均值(mean average precision,MAP)达到94.22%,相较于YOLOv4模型提高了1.18%,模型参数减小了95.22%,模型尺寸为原来的4.84%,检测速度为原来的4.03倍.
Abstract: Rapid and accurate detection of citrus in orchard environment is the key for autonomous picking robot. To solve the problems of excessive redundancy and imbalanced detection speed with accuracy of existing models, the light weight environmental fruit detection method was proposed. Based on YOLOv4, the Focal Loss was introduced to improve the negative sample mining ability of the model in binary classification detection task, and the optimized model pruning method was proposed to solve the problem of model parameter redundancy. The experimental results show that by the proposed method,the MAP of citrus fruit data set in orchard environment reaches 94.22%, which is improved by 1.18% compared with YOLOv4 model.The model parameters are reduced by 95.22%, and the model size is 4.84% of the original size with the detection speed increased by 4.03 times.
ZHAO Y, GONG L, HUANG Y, et al. A review of key techniques of vision-based control for harvesting robot[J]. Computers and Electronics in Agriculture, 2016, 127:311-323.
[2]
PATHAN M, PATEL N, YAGNIK H, et al. Artificial cognition for applications in smart agriculture: a comprehensive review[J]. Artificial Intelligence in Agriculture, 2020, 4:81-95.
[3]
LUO L, TANG Y, ZOU X, et al. Robust grape cluster detection in a vineyard by combining the adaboost framework and multiple color components[J]. Sensors, DOI:10.3390/s16122098.
[4]
FU L, DUAN J, ZOU X J, et al. Banana detection based on color and texture features in the natural environment[J]. Computers and Electronics in Agriculture, 2019, 167: 105057-105069.
[5]
ARAD B, BALENDONCK J,BARTH R,et al. Development of a sweet pepper harvesting robot[J]. Journal of Field Robotics, 2020, 37(6): 1027-1039.
LI H, ZHANG M, GAO Y,et al. Green ripe tomato detection method based on machine vision in greenhouse[J]. Transactions of the CSAE, 2017, 33(Sup1): 328-334. (in Chinese)
HUANG H J, DUAN X H, HUANG X C. Research and improvement of fruits detection based on deep learning[J]. Computer Engineering and Applications, 2020, 56(3):127-133. (in Chinese)
[8]
FU L, FRNG Y L, MAJEED Y, et al. Kiwifruit detection in field images using Faster R-CNN with ZFNet[J]. IFAC PapersOnLine, 2018, 51(17): 45-50.
[9]
PARVATHI S, SELVI S T. Detection of maturity stages of coconuts in complex background using Faster R-CNN model[J]. Biosystems Engineering, 2021, 202(6): 119-132.
[10]
LIU W,ANGUELOV D,ERHAN D,et al. SSD:single shot multibox detector [C]∥Proceedings of the 14th European Conference on Computer Vision. Netherlands: ECCV, 2016: 21-37
PENG H X, HUANG B, SHAO Y Y,et al. General improved SSD model for picking object recognition of multiple fruits in natural environment[J]. Transactions of the CSAE, 2018, 34(16): 155-162. (in Chinese)
[12]
REDMON J, DIVVALA S, GIRSHICK R, et al. You only look once: unified, real-time object detection[C]∥2016 IEEE Conference on Computer Vision & Pattern Recognition, 2016: 779-788.
[13]
TIAN Y, YANG G D, WANG Z, et al. Apple detection during different growth stages in orchards using the improved YOLO-V3 model[J]. Computers and Electronics in Agriculture, 2019, 157: 417-426.
CAI S P, SUN Z M, LIU H, et al. Real-time detection methodology for obstacles in orchards using improved YOLOv4[J]. Transactions of the CSAE, 2021, 37(2): 36-43. (in Chinese)
YI S, LI J J, ZHANG P, et al. Detecting and counting of spring-see citrus using YOLOv4 network model and recursive fusion of features[J]. Transactions of the CSAE, 2021, 37(18): 161-169. (in Chinese)
[16]
LYU S, LI R, ZHAO Y, et al. Green citrus detection and counting in orchards based on YOLOv5-CS and AI edge system[J].Sensors, 2022, 22: 576-596.
[17]
BOCHKOVSKIY A, WANG C Y, LIAO H Y M. YOLOv4: optimal speed and accuracy of object detection[EB/OL]. [2022-01-16]. https:∥github.com/AlexeyAB/darknet.
[18]
REDMON J, FARHADI A. YOLOv3: an incremental improvement[EB/OL].[2022-01-16]. https:∥pjreddie.com/yolo.
[19]
WANG C Y, LIAO H Y M, WU Y H, et al. CSPNet: a new backbone that can enhance learning capability of CNN[C]∥2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops (CVPRW).New York: IEEE, 2020: 1571-1580.
[20]
HE K, ZHANG X, REN S, et al. Spatial pyramid pooling in deep convolutional networks for visual recognition[J]. IEEE Transactions on Pattern Analysis & Machine Intelligence, 2014, 37(9): 1904-1920.
[21]
LIU S, QI L, QIN H F, et al. Path aggregation network for instance segmentation[C]∥2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition. New York: IEEE, 2018: 8759-8768.
[22]
LIN T Y, DOLLAR P, GIRSHICK R, et al. Feature pyramid networks for object detection[C]∥2017 IEEE Conference on Computer Vision and Pattern Recognition. New York: IEEE, 2017: 936-944.
[23]
LIN T Y, GOYAL P, GIRSHICK R, et al. Focal loss for dense object detection[J]. IEEE Transactions on Pattern Analysis & Machine Intelligence, 2017, 99:2999-3007.
[24]
DENIL M, SHAKIBI B, DINH L, et al. Predicting parameters in deep learning[J]. Advances in Neural Information Processing Systems, 2013, 26: 1-9.
[25]
HUANG H, HUANG T, LI Z, et al. Design of citrus fruit detection system based on mobile platform and edge computer device[J]. Sensors, 2022, 22(1):59-68.
ZENG H Q,HU H L,LIN X W,et al. Deep neural network compression and acceleration: an overview[J]. Journal of Signal Processing, 2022, 38(1):183-194. (in Chinese)
[27]
ZHANG P, ZHONG Y, LI X. SlimYOLOv3: narrower, faster and better for real-time UAV applications[C]∥Proceedings of the IEEE/CVF International Conference on Computer Vision Workshops,2019: 1-9.