中国农业机械化科学研究院集团有限公司 主管

北京卓众出版有限公司 主办

留言板

尊敬的读者、作者、审稿人, 关于本刊的投稿、审稿、编辑和出版的任何问题, 您可以本页添加留言。我们将尽快给您答复。谢谢您的支持!

姓名
邮箱
手机号码
标题
留言内容
验证码

基于YOLOX的作物种子自动计数方法

逄正钧 董峦 温钊发 张世豪 秦立浩

逄正钧,董峦,温钊发,等.基于YOLOX的作物种子自动计数方法[J].农业工程,2023,13(1):29-35. doi: 10.19998/j.cnki.2095-1795.2023.01.005
引用本文: 逄正钧,董峦,温钊发,等.基于YOLOX的作物种子自动计数方法[J].农业工程,2023,13(1):29-35. doi: 10.19998/j.cnki.2095-1795.2023.01.005
PANG Zhengjun,DONG Luan,WEN Zhaofa,et al.Automatic crop seed counting method based on YOLOX model[J].Agricultural Engineering,2023,13(1):29-35. doi: 10.19998/j.cnki.2095-1795.2023.01.005
Citation: PANG Zhengjun,DONG Luan,WEN Zhaofa,et al.Automatic crop seed counting method based on YOLOX model[J].Agricultural Engineering,2023,13(1):29-35. doi: 10.19998/j.cnki.2095-1795.2023.01.005

基于YOLOX的作物种子自动计数方法

doi: 10.19998/j.cnki.2095-1795.2023.01.005
详细信息
    作者简介:

    逄正钧,硕士生,主要从事计算机视觉、目标检测研究 E-mail:320203307@xjau.edu.cn

    董峦,通信作者,博士,副教授,主要从事人工智能、深度学习和计算机视觉研究 E-mail:dl@xjau.edu.cn

  • 中图分类号: S126

Automatic Crop Seed Counting Method Based on YOLOX Model

  • 摘要:

    种子计数是获取作物种子千粒质量指标时关键而又烦琐的步骤。目前种子计数一般通过人工和千粒质量测量仪器实现,然而人工计数效率低,千粒质量测量仪器成本高、不易携带。以手机拍摄的6种常见作物种子图像构建数据集,在YOLOX模型的基础上引入注意力机制改进损失函数提出YOLOX-P模型,实现种子自动计数。结果表明,YOLOX-P相比YOLOX模型参数量仅增加0.09 M,mAP改进0.74个百分点,达到99.38%;模型在显存6 GB的NVIDIA GeForce RTX 2060显卡上的推理时间为18.68 ms,适宜部署在移动端。提出的模型显著改善千粒质量测定工作的效率和效果。

     

  • 图 1  数据集部分种子图像

    Figure 1.  Crop seed image samples

    图 2  种子标注框面积占图像面积的平均比值

    Figure 2.  Average ratio of single seed bounding box to whole image

    图 3  Focus模块

    Figure 3.  Focus module

    图 4  通道注意力模块

    Figure 4.  Channel attention module

    图 5  空间注意力模块

    Figure 5.  Spatial attention module

    图 6  YOLOX-P

    Figure 6.  YOLOX-P

    图 7  不同训练方法效果

    Figure 7.  Effect of different training methods

    图 8  YOLOX-P模型计数效果示例

    Figure 8.  YOLOX-P model test results

    图 9  YOLOX与YOLOX-P检测对比样例

    Figure 9.  Sample comparison of YOLOX and YOLOX-P detection

    图 10  YOLOX-P对玉米的具体计数示例

    Figure 10.  Example of YOLOX-P corn seed counting

    表  1  YOLOX检测6类种子的指标数据

    Table  1.   Indicator data for YOLOX detection of six types of seeds 单位:%

    指标种类PrecisionAP
    葵花籽98.8099.69
    西瓜籽99.4099.78
    红豆95.6199.03
    小麦91.7393.71
    花生100.00100.00
    玉米97.5499.65
    下载: 导出CSV

    表  2  YOLOX与YOLOX-P对比数据

    Table  2.   YOLOX versus YOLOX-P data

    模型YOLOXYOLOX-P
    玉米AP/%99.6599.88
    红豆AP/%99.0399.02
    小麦AP/%93.7197.88
    mAP/%98.6499.38
    模型参数/M8.949.03
    推理时间/ ms16.5918.68
    下载: 导出CSV

    表  3  消融试验各个指标数据

    Table  3.   Indicator data for ablation study

    CBAMCIOUPrecision/%小麦AP/%mAP/%
    91.7393.7198.64
    93.6696.3699.16
    94.0797.7099.35
    95.2497.8899.38
    下载: 导出CSV

    表  4  CenterNet、YOLOv4-M1和YOLOX-P对比数据

    Table  4.   Comparison data of CenterNet、YOLOv4-M1 and YOLOX-P

    模型mAP/%模型参数/M
    CenterNet73.9532.66
    YOLOv4-M184.3512.29
    YOLOX-P99.389.03
    下载: 导出CSV

    表  5  YOLOX-P对每组玉米计数的数据

    Table  5.   YOLOX-P data on corn count per group

    组次真值第1次预测第2次预测第3次预测
    第1组100100100100
    第2组200200200200
    第3组300300300300
    第4组400401400400
    第5组500500499500
    第6组600600600599
    第7组700701699700
    第8组800800802801
    第9组900901902899
    第10组1000100110001002
    下载: 导出CSV
  • [1] FENG Ao,LI Hongxiang,LIU Zixi,et al.Research on a rice counting algorithm based on an improved MCNN and a density map[J].Entropy,2021,23(6):721. doi: 10.3390/e23060721
    [2] 吕泽鑫,郭慧东,伍恒,等.光电式数种器的设计与试验[J].塔里木大学学报,2019,31(1):84-88. doi: 10.3969/j.issn.1009-0568.2019.01.012

    LV Zexin,GUO Huidong,WU Heng,et al.Design and test of photoelectric counters type[J].Journal of Tarim University,2019,31(1):84- 88. doi: 10.3969/j.issn.1009-0568.2019.01.012
    [3] 张霖,赵祚喜,可欣荣,等.压电式种子计数系统[J].农业机械学报,2011,42(8):41-45.

    ZHANG Lin,ZHAO Zuoxi,KE Xinrong,et al.Seed-counting system design using piezoelectric sensor[J].Transactions of the Chinese Society for Agricultural Machinery,2011,42(8):41-45.
    [4] 胡正方,向阳,熊瑛,等.基于机器视觉的千粒质量测量仪的设计与试验[J].湖南农业大学学报(自然科学版),2021,47(4):476-481.

    HU Zhengfang,XIANG Yang,XIONG Ying,et al.Design and test of 1000-grain weight rapid measuring instrument based on machine vision[J].Journal of Hunan Agricultural University (Natural Science Edition),2021,47(4):476-481.
    [5] LIN Zhe,GUO Wenxuan.Cotton stand counting from unmanned aerial system imagery using MobileNet and CenterNet deep learning models[J].Remote Sensing,2021,13(14): 2822 . doi: 10.3390/RS13142822
    [6] HOWARD A G, ZHU M, CHEN B, et al.Mobilenets: efficient convolutional neural networks for mobile vision applications[J].arXiv e-prints, 2017.DOI: 10.48550/arXiv.1704.04861
    [7] DUAN K, BAI S, XIE L, et al.CenterNet: Keypoint triplets for object detection[J].arXiv e-prints, 2019.DOI: 10.48550/arXiv.1904.08189.
    [8] JANOWSKI A,KAMIERCZAK R,KOWALCZYK C,et al.Detecting apples in the wild:potential for harvest quantity estimation[J].Sustainability,2021,13(14): 8054 . doi: 10.3390/su13148054
    [9] REDMON J, DIVVALA S K, GIRSHICK R B, et al.You only look once: unified, real-time object detection[C]// Computer Vision & Pattern Recognition, 2016.DOI: 10.1109/CVPR.2016.91
    [10] 朱学岩,张新伟,顾梦梦,等.基于无人机可见光图像的云杉计数方法[J].林业工程学报,2021,6(4):140-146.

    ZHU Xueyan,ZHANG Xinwei,GU Mengmeng,et al.Spruce counting method based on UAV visible images[J].Journal of Forestry Engineering,2021,6(4):140-146.
    [11] REDMON J, FARHADI A.Yolov3: an incremental improvement[J].arXiv e-prints, 2018.DOI: 10.48550/arXiv.1804.02767
    [12] 王超,张运楚,孙绍涵,等.改进YOLOv5算法的钢筋端面检测[J].计算机系统应用,2022,31(4):68-80.

    WANG Chao,ZHANG Yunchu,SUN Shaohan,et al.Steel-bar end face detection based on improved YOLOv5 Algorithm[J].Computer System & Applications,2022,31(4):68-80.
    [13] GE Z, LIU S, WANG F, et al.Yolox: exceeding YOLO series in 2021[J].arXiv e-prints, 2021.DOI: 10.48550/arXiv.2107.08430
    [14] BOCHKOVSKIY A, WANG C Y, LIAO H Y M.Yolov4: optimal speed and accuracy of object detection[J].arXiv preprint, 2020.DOI: 10.48550/arXiv.2004.10934
    [15] REN S,HE K,GIRSHICK R,et al.Faster R-CNN:towards real-time object detection with region proposal networks[J].IEEE Transactions on Pattern Analysis & Machine Intelligence,2017,39(6): 1137 - 1149.
    [16] LIU S, QI L, QIN H, et al.Path aggregation network for instance segmentation[C]// Proceedings of the IEEE conference on computer vision and pattern recognition, 2018: 8 759-8 768.
    [17] WOO S, PARK J, LEE J Y, et al.Cbam: convolutional block attention module[C]// Proceedings of the European conference on computer vision (ECCV), 2018: 3-19.
    [18] ZHENG Z, WANG P, LIU W, et al.Distance-IoU loss: Faster and better learning for bounding box regression[C]// Proceedings of the AAAI conference on artificial intelligence, 2020, 34(7): 12 993-13 000.
  • 加载中
图(10) / 表(5)
计量
  • 文章访问数:  55
  • HTML全文浏览量:  9
  • PDF下载量:  11
  • 被引次数: 0
出版历程
  • 收稿日期:  2022-08-29
  • 修回日期:  2022-10-21
  • 出版日期:  2023-01-20

目录

    /

    返回文章
    返回