广西师范大学学报(自然科学版) ›› 2024, Vol. 42 ›› Issue (5): 79-90.doi: 10.16088/j.issn.1001-6600.2023120303

• 研究论文 • 上一篇    下一篇

基于改进YOLOv7-Tiny的轻量化百香果检测方法

涂智荣1, 凌海英1, 李帼1,2, 陆声链1,2*, 钱婷婷3*, 陈明1,2   

  1. 1.教育区块链与智能技术教育部重点实验室(广西师范大学),广西 桂林 541004;
    2.广西师范大学 计算机科学与工程学院,广西 桂林 541004;
    3.上海市农业科学院 农业科技信息研究所,上海 201403
  • 收稿日期:2023-12-03 修回日期:2024-03-03 出版日期:2024-09-25 发布日期:2024-10-11
  • 通讯作者: 陆声链(1979—),男,广西桂平人,广西师范大学教授,博士。E-mail: lsl@gxnu.edu.cn; 钱婷婷(1983—),女,山东淄博人,上海市农业科学院副研究员,博士。E-mail: qiantingting@saas.sh.cn
  • 基金资助:
    国家自然科学基金(61762013); 农业农村部长三角智慧农业技术重点实验室开放基金(KSAT-YRD2023011)

Lightweight Passion Fruit Detection Method Based on Improved YOLOv7-Tiny

TU Zhirong1, LING Haiying1, LI Guo1,2, LU Shenglian1,2*, QIAN Tingting3*, CHEN Ming1,2   

  1. 1. Key Lab of Education Blockchain and Intelligent Technology, Ministry of Education(Guangxi Normal University), Guilin Guangxi 541004, China;
    2. College of Computer Science and Engineering, Guangxi Normal University, Guilin Guangxi 541004, China;
    3. Institutes of Agricultural Science and Technology Information, Shanghai Academy of Agriculture Sciences, Shanghai 201403, China
  • Received:2023-12-03 Revised:2024-03-03 Online:2024-09-25 Published:2024-10-11

摘要: 在果园中,准确且快速的果实检测是水果产量预测和自动化采摘等农业智能化应用的关键任务之一。针对目前目标检测模型参数量和计算量大,难以满足嵌入式设备实时性要求的问题,本文提出一种基于改进YOLOv7-Tiny的轻量化检测方法,用于复杂果园环境中百香果的检测。首先,在主干网络中使用全维动态卷积(ODConv),提高主干网络的特征提取能力,使平均精度均值(mAP)提升2个百分点;其次,为了减少颈部网络的参数量和计算量,融合GhostNet网络和MobileOne网络,提出GMConv轻量化模块,使模型参数量下降约30%,计算量下降约20%,FPS提高约50 frame/s。在百香果数据集上的实验结果表明,与YOLOv7-Tiny相比,改进后算法的参数量和计算量分别下降32.1%和25.4%,mAP提升2.6个百分点。在降低计算量和参数量的前提下,改进后算法进一步提高了检测精度,有利于在嵌入式设备中部署。

关键词: 目标检测, YOLOv7-Tiny, 百香果, 轻量化网络, GMConv模块, ODConv

Abstract: Accurate and fast detection of fruits in orchards is one of the key tasks for intelligent agricultural approaches,such as fruit yield prediction and automated harvesting. A lightweight detection method based on an improved YOLOv7-Tiny is proposed in this paper to address the current issue of large parameters and FLOPs in object detection models. The method is specifically designed for detecting passion fruit in complex orchard environments,aiming to enhance real-time applicability on embedded devices. Firstly,the Omni-dimensional Dynamic Convolution (ODConv) is employed in the backbone network to enhance its feature extraction capability,thereby increasing the mean Average Precision (mAP) by 2 percentage points. Furthermore,to reduce the parameters and FLOPs of the neck network,the GMConv lightweight module is proposed by integrating the GhostNet network and the MobileOne network. The parameters and FLOPs have decreased by approximately 30% and 20%,respectively,and the model's FPS has increased by around 50 frame/s. Experimental results on the passion fruit dataset reveal that,compared with YOLOv7-Tiny,the parameters and FLOPs of the improved algorithm have decreased by 32.1% and 25.4% respectively,while the mAP has increased by 2.6 percentage points. With the reduction of FLOPs and parameters,the improved algorithm further enhances detection accuracy,offering theoretical research and technical support for deployment on embedded devices.

Key words: object detection, YOLOv7-Tiny, passion fruit, lightweight network, GMConv module, ODConv

中图分类号:  TP391.41

[1] 龙燕,杨智优,何梦菲. 基于改进YOLOv7的疏果期苹果目标检测方法[J]. 农业工程学报,2023,39(14):191-199. DOI: 10.11975/j.issn.1002-6819.202305069.
[2] GAO F F,FANG W T,SUN X M,et al. A novel apple fruit detection and counting methodology based on deep learning and trunk tracking in modern orchard[J]. Computers and Electronics in Agriculture,2022,197:107000. DOI: 10.1016/j.compag.2022.107000.
[3] 王立舒,秦铭霞,雷洁雅,等. 基于改进YOLOv4-Tiny的蓝莓成熟度识别方法[J]. 农业工程学报,2021,37(18):170-178. DOI: 10.11975/j.issn.1002-6819.2021.18.020.
[4] 吕佳,李帅军,曾梦瑶,等. 基于半监督SPM-YOLOv5的套袋柑橘检测算法[J]. 农业工程学报,2022,38(18):204-211. DOI: 10.11975/j.issn.1002-6819.2022.18.022.
[5] LINKER R,COHEN O,NAOR A. Determination of the number of green apples in RGB images recorded in orchards[J].Computers and Electronics in Agriculture,2012,81:45-57. DOI: 10.1016/j.compag.2011.11.007.
[6] LECUN Y,BENGIO Y,HINTON G. Deep learning[J]. Nature,2015,521(7553):436-444. DOI: 10.1038/nature14539.
[7] 张文龙,南新元. 基于改进YOLOv5的道路车辆跟踪算法[J]. 广西师范大学学报(自然科学版),2022,40(2):49-57. DOI: 10.16088/j.issn.1001-6600.2021081303.
[8] 陈文康,陆声链,刘冰浩,等. 基于改进YOLOv4的果园柑橘检测方法研究[J]. 广西师范大学学报(自然科学版),2021,39(5):134-146. DOI: 10.16088/j.issn.1001-6600.2020111404.
[9] 郭希岳,李劲松,郑立华,等. 利用Re-YOLOv5和检测区域搜索算法获取大豆植株表型参数[J]. 农业工程学报,2022,38(15):186-194. DOI: 10.11975/j.issn.1002-6819.2022.15.020.
[10] 张秀花,静茂凯,袁永伟,等. 基于改进YOLOv3-Tiny的番茄苗分级检测[J]. 农业工程学报,2022,38(1):221-229. DOI: 10.11975/j.issn.1002-6819.2022.01.025.
[11] TU S Q,PANG J,LIU H F,et al. Passion fruit detection and counting based on multiple scale faster R-CNN using RGB-D images[J]. Precision Agriculture,2020,21(5):1072-1091. DOI: 10.1007/s11119-020-09709-3.
[12] SUN J,HE X F,GE X,et al. Detection of key organs in tomato based on deep migration learning in a complex background[J]. Agriculture,2018,8(12):196. DOI: 10.3390/agriculture8120196.
[13] 涂淑琴,黄健,林跃庭,等. 基于改进Faster R-CNN的百香果自动检测[J]. 实验室研究与探索,2021,40(11):32-37. DOI: 10.19927/j.cnki.syyt.2021.11.008.
[14] 唐熔钗,伍锡如. 基于改进YOLO-V3网络的百香果实时检测[J]. 广西师范大学学报(自然科学版),2020,38(6):32-39. DOI: 10.16088/j.issn.1001-6600.2020.06.004.
[15] LU S L,CHEN W K,ZHANG X,et al. Canopy-attention-YOLOv4-based immature/mature apple fruit detection on dense-foliage tree architectures for early crop load estimation[J]. Computers and Electronics in Agriculture,2022,193:106696. DOI: 10.1016/j.compag.2022.106696.
[16] REDMON J,FARHADI A. YOLOv3:an incremental improvement[EB/OL]. (2018-04-08)[2023-11-29]. https://arxiv.org/abs/1804.02767. DOI: 10.48550/arXiv.1804.02767.
[17] BOCHKOVSKIY A,WANG C Y,LIAO H Y M,et al. YOLOv4:optimal speed and accuracy of object detection[EB/OL].(2020-04-23)[2023-11-29]. https://arxiv.org/abs/2004.10934. DOI: 10.48550/arXiv.2004.10934.
[18] GE Z,LIU S T,WANG F,et al. YOLOX:exceeding YOLO series in 2021[EB/OL]. (2021-08-06)[2023-11-29]. https://arxiv.org/abs/2107.08430. DOI: 10.48550/arXiv.2107.08430.
[19] WANG C Y,BOCHKOVSKIY A,LIAO H Y M. YOLOv7:trainable bag-of-freebies sets new state-of-the-art for real-time object detectors[C] // 2023 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). Los Alamitos,CA:IEEE Computer Society,2023:7464-7475. DOI: 10.1109/CVPR52729.2023.00721.
[20] OU J J,ZHANG R H,LI X M,et al. Research and explainable analysis of a real-time passion fruit detection model based on FSOne-YOLOv7[J]. Agronomy,2023,13(8):1993. DOI: 10.3390/agronomy13081993.
[21] 孙俊,吴兆祺,贾忆琳,等. 基于改进YOLOv5s的果园环境葡萄检测[J]. 农业工程学报,2023,39(18):192-200. DOI: 10.11975/j.issn.1002-6819.202306135.
[22] JI W,PAN Y,XU B,et al. A real-time apple targets detection method for picking robot based on ShufflenetV2-YOLOX[J]. Agriculture,2022,12(6):856. DOI: 10.3390/agriculture12060856.
[23] 罗志聪,李鹏博,宋飞宇,等. 嵌入式设备的轻量化百香果检测模型[J]. 农业机械学报,2022,53(11):262-269,322. DOI: 10.6041/j.issn.1000-1298.2022.11.026.
[24] 张日红,区建爽,李小敏,等. 基于改进YOLOv4的轻量化菠萝苗心检测算法[J]. 农业工程学报,2023,39(4):135-143. DOI: 10.11975/j.issn.1002-6819.202210133.
[25] PONGENER A,SAGAR V,PAL R K,et al. Physiological and quality changes during postharvest ripening of purple passion fruit (Passiflora edulis Sims)[J]. Fruits,2014,69(1):19-30. DOI: 10.1051/fruits/2013097.
[26] LI C,ZHOU A J,YAO A B. Omni-dimensional dynamic convolution[EB/OL]. (2022-09-16)[2023-11-29]. https://arxiv.org/abs/2209.07947. DOI: 10.48550/arXiv.2209.07947.
[27] HAN K,WANG Y H,TIAN Q,et al. GhostNet:more features from cheap operations[C] // 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). Los Alamitos,CA:IEEE Computer Society,2020:1577-1586. DOI: 10.1109/CVPR42600.2020.00165.
[28] VASU P K A,GABRIEL J,ZHU J,et al. MobileOne:an improved one millisecond mobile backbone[C] // 2023 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). Los Alamitos,CA:IEEE Computer Society,2023:7907-7917. DOI: 10.1109/CVPR52729.2023.00764.
[29] MA N N,ZHANG X Y,ZHENG H T,et al. ShuffleNet V2:practical guidelines for efficient CNN architecture design[C] // Computer Vision-ECCV 2018:LNCS Volume 11218. Cham:Springer Nature Switzerland AG,2018:122-138. DOI: 10.1007/978-3-030-01264-9_8.
[30] HOWARD A,SANDLER M,CHEN B,et al. Searching for MobileNetV3[C] // 2019 IEEE/CVF International Conference on Computer Vision (ICCV). Los Alamitos,CA:IEEE Computer Society,2019:1314-1324. DOI: 10.1109/ICCV.2019.00140.
[31] YANG B,BENDER G,LE Q V,et al. CondConv:conditionally parameterized convolutions for efficient inference[C] //Advances in Neural Information Processing Systems 32 (NeurIPS 2019). Red Hook,NY:Curran Associates Inc.,2019:1307-1318.
[32] CHEN Y P,DAI X Y,LIU M C,et al. Dynamic convolution:attention over convolution kernels[C] // 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). Los Alamitos,CA:IEEE Computer Society,2020:11027-11036. DOI: 10.1109/CVPR42600.2020.01104.
[33] LI Y S,CHEN Y P,DAI X Y,et al. Revisiting dynamic convolution via matrix decomposition[EB/OL]. (2021-03-15)[2023-11-29]. https://arxiv.org/abs/2103.08756. DOI: 10.48550/arXiv.2103.08756.
[1] 吕辉, 吕卫峰. 基于改进YOLOv5的眼底出血点检测算法[J]. 广西师范大学学报(自然科学版), 2024, 42(3): 99-107.
[2] 曾亮, 胡谦, 杨腾飞, 谭微微. 基于L-ConvNeXt网络的变电站人员安全操作检测方法[J]. 广西师范大学学报(自然科学版), 2024, 42(1): 102-110.
[3] 黄叶祺, 王明伟, 闫瑞, 雷涛. 基于改进的YOLOv5金刚石线表面质量检测[J]. 广西师范大学学报(自然科学版), 2023, 41(4): 123-134.
[4] 陈文康, 陆声链, 刘冰浩, 李帼, 刘晓宇, 陈明. 基于改进YOLOv4的果园柑橘检测方法研究[J]. 广西师范大学学报(自然科学版), 2021, 39(5): 134-146.
[5] 唐熔钗, 伍锡如. 基于改进YOLO-V3网络的百香果实时检测[J]. 广西师范大学学报(自然科学版), 2020, 38(6): 32-39.
[6] 刘英璇, 伍锡如, 雪刚刚. 基于深度学习的道路交通标志多目标实时检测[J]. 广西师范大学学报(自然科学版), 2020, 38(2): 96-106.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
[1] 李文博, 董青, 刘超, 张奇. 基于对比学习的儿科问诊对话细粒度意图识别[J]. 广西师范大学学报(自然科学版), 2024, 42(4): 1 -10 .
[2] 高盛祥, 杨元樟, 王琳钦, 莫尚斌, 余正涛, 董凌. 面向域外说话人适应场景的多层级解耦个性化语音合成[J]. 广西师范大学学报(自然科学版), 2024, 42(4): 11 -21 .
[3] 朱格格, 黄安书, 覃盈盈. 基于Web of Science的国际红树林研究发展态势分析[J]. 广西师范大学学报(自然科学版), 2024, 42(5): 1 -12 .
[4] 何静, 冯元柳, 邵靖雯. 基于CiteSpace的多源数据融合研究进展[J]. 广西师范大学学报(自然科学版), 2024, 42(5): 13 -27 .
[5] 左钧元, 李欣彤, 曾子涵, 梁超, 蔡进军. 金属有机骨架基催化剂在糠醛选择性加氢反应中的应用研究进展[J]. 广西师范大学学报(自然科学版), 2024, 42(5): 28 -38 .
[6] 谭全伟, 薛贵军, 谢文举. 基于VMD和RDC-Informer的短期供热负荷预测模型[J]. 广西师范大学学报(自然科学版), 2024, 42(5): 39 -51 .
[7] 刘畅平, 宋树祥, 蒋品群, 岑明灿. 基于开关电容的差分无源N通道滤波器[J]. 广西师范大学学报(自然科学版), 2024, 42(5): 52 -60 .
[8] 王党树, 孙龙, 董振, 贾如琳, 杨黎康, 吴家驹, 王新霞. 变化负载下全桥LLC谐振变换器参数优化设计[J]. 广西师范大学学报(自然科学版), 2024, 42(5): 61 -71 .
[9] 张锦忠, 韦笃取. PMSM混沌系统无初始状态约束的固定时间有界控制[J]. 广西师范大学学报(自然科学版), 2024, 42(5): 72 -78 .
[10] 杜帅文, 靳婷. 基于用户行为特征的深度混合推荐算法[J]. 广西师范大学学报(自然科学版), 2024, 42(5): 91 -100 .
版权所有 © 广西师范大学学报(自然科学版)编辑部
地址:广西桂林市三里店育才路15号 邮编:541004
电话:0773-5857325 E-mail: gxsdzkb@mailbox.gxnu.edu.cn
本系统由北京玛格泰克科技发展有限公司设计开发