赵辉, 曹宇航, 岳有军, 王红君. 基于改进DenseNet的田间杂草识别[J]. 农业工程学报, 2021, 37(18): 136-142. DOI: 10.11975/j.issn.1002-6819.2021.18.016
    引用本文: 赵辉, 曹宇航, 岳有军, 王红君. 基于改进DenseNet的田间杂草识别[J]. 农业工程学报, 2021, 37(18): 136-142. DOI: 10.11975/j.issn.1002-6819.2021.18.016
    Zhao Hui, Cao Yuhang, Yue Youjun, Wang Hongjun. Field weed recognition based on improved DenseNet[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2021, 37(18): 136-142. DOI: 10.11975/j.issn.1002-6819.2021.18.016
    Citation: Zhao Hui, Cao Yuhang, Yue Youjun, Wang Hongjun. Field weed recognition based on improved DenseNet[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2021, 37(18): 136-142. DOI: 10.11975/j.issn.1002-6819.2021.18.016

    基于改进DenseNet的田间杂草识别

    Field weed recognition based on improved DenseNet

    • 摘要: 精确、快速地获取作物和杂草的类别信息是实现自动化除草作业的重要前提。为解决复杂环境下农作物田间杂草种类的高效准确识别问题,该研究提出一种基于改进DenseNet的杂草识别模型。首先,在DenseNet-121网络的基础上,通过在每个卷积层后引入高效通道注意力(Efficient Channel Attention,ECA)机制,增加重要特征的权重,强化杂草特征并抑制背景特征;其次,通过DropBlock正则化随机隐藏杂草图像部分特征块,以提升模型的泛化能力,增强模型识别不同类型杂草的适应性;最后,以自然环境下玉米幼苗和6类伴生杂草作为样本,在相同试验条件下与VggNet-16、ResNet-50和未改进的DenseNet-121模型进行对比试验。结果表明,改进的DenseNet模型性能最优,模型大小为26.55 MB,单张图像耗时0.23 s,平均识别准确率达到98.63%,较改进前模型的平均识别准确率提高了2.09个百分点,且综合性能高于VggNet-16、ResNet-50模型;同时,通过采用梯度加权类激活映射图(Gradient-weighted Class Activation Mapping,Grad-CAM)可视化热度图方法分析,得出改进前后模型的类别判断概率分别为0.68和0.99,本文模型明显高于未改进模型,进一步验证了改进模型的有效性。该模型能够很好地解决复杂环境下农作物和杂草的种类精准识别问题,为智能除草机器人开发奠定了坚实的技术基础。

       

      Abstract: Abstract: Accurate and rapid acquisition of crop and weed category information has been one of the most important steps for automatic weeding operations. In this research, a weed recognition model was proposed using improved DenseNet, particularly for the efficient and accurate identification of weeds in crop fields under complex environments. Firstly, data augmentation was utilized to expand the number of images for the collected crop and weed pictures, thereby increasing the diversity of data, but avoiding network learning irrelevant features, and finally enhancing the recognition ability of the model. Secondly, Efficient Channel Attention (ECA) was introduced into the DenseNet-121 network after each convolutional layer. As such, the accuracy of weed recognition was improved to effectively focus the attention on the weeds in the main part of images, where the weight of important features increased further to strengthen the weed features, but to suppress the extraction of background features. At the same time, DropBlock regularization was also added after each DenseBlock block, further to randomly hide some feature maps and noise. Correspondingly, the generalization, robustness, and adaptability of the model were improved to identify different types of weeds. Finally, taking maize seedlings and six types of associated weeds in natural environments as samples, a comparison test was performed on the test set using VggNet-16, ResNet-50, and the unimproved DenseNet-121 model, where the batch size was 64, and the initial learning rate was 0.01. More importantly, an Stochastic Gradient Descent (SGD) optimizer was used to train the CNN model, and the batch size was set to 64, the initial learning rate was set to 0.01, and the VggNet-16, ResNet-50 and the unimproved DenseNet-121 model was compared and tested on the test set. The results show that the improved DenseNet model presented the best performance, where the model size was 26.55 MB, the single image took 0.23 s, and the average recognition accuracy reached 98.63%, increased by 2.09 percentage points before the improvement. It infers that the overall performance of improved DenseNet-121 was significantly higher than that of VggNet-16 and ResNet-50. Gradient-weighted Class Activation Mapping (Grad-CAM) was also used to visualize the heat map for the subsequent comparison. The improved DenseNet decision was obtained, where the important weight position of classification was more focused on the main part of weeds than before. Specifically, the category judgment probability was 0.99, significantly higher than that of the unimproved model, further verifying the effectiveness of the improved model. Consequently, the DenseNet network with ECA attention and DropBlock regularization can widely be expected to improve the recognition accuracy and the generalization of the model, further to ensure the efficient and accurate recognition of weeds in complex environments. The findings can provide a strong reference for the accurate identification of other crops and associated weeds. The versatility of the model in weed identification can also be improved for the technical development of intelligent weeding robots.

       

    /

    返回文章
    返回