农业工程学报2024,Vol.40Issue(6) :277-284.DOI:10.11975/j.issn.1002-6819.202308163

基于模型剪枝的棉花氮素营养水平诊断

Diagnosing the nitrogen content of cotton using model pruning

陈沛沛 戴建国 张国顺 侯文庆 穆正阳
农业工程学报2024,Vol.40Issue(6) :277-284.DOI:10.11975/j.issn.1002-6819.202308163

基于模型剪枝的棉花氮素营养水平诊断

Diagnosing the nitrogen content of cotton using model pruning

陈沛沛 1戴建国 1张国顺 1侯文庆 2穆正阳1
扫码查看

作者信息

  • 1. 石河子大学信息科学与技术学院,石河子 832003;兵团空间信息工程技术研究中心,石河子 832003
  • 2. 新疆政法学院信息网络安全学院,图木舒克 843900
  • 折叠

摘要

确定棉花的氮素营养水平是实施精准施肥的先决条件和基础.近年来,深度学习逐渐应用于氮素营养水平诊断中,但该方法对高性能设备的依赖性较高,限制了其在资源受限边缘设备上的部署应用.针对这一问题,该研究提出一种基于树莓派4B的棉花氮素营养水平诊断方法.研究采用ResNet101网络构建诊断模型,并通过网络瘦身算法对模型进行剪枝优化,最终将剪枝比例为87%的模型部署在资源受限的树莓派4B上.试验结果表明:当剪枝比例达到87%时,模型精度损失2.55个百分点,同时剪枝后模型参数量、计算量和存储体积分别为4.37 M、1.05 G和16.65 MB,明显提高模型在计算能力有限设备上的推理速度,有助于快速、准确地评估田间棉花的氮素营养状况,从而实现对棉花的精准施肥,提高产量和质量.该研究不仅为实现棉花氮素营养水平的大面积快速诊断提供了技术参考,同时对于作物营养水平诊断的智能终端装备研发具有参考价值.

Abstract

Cotton nitrogen deficiency can seriously reduce the grain yield and quality.It is the prerequisite condition to detect the nitrogen nutrition level of cotton,and then implement the accurate fertilization and foundation.Traditional diagnostic technology cannot fully meet the large-scale production in recent years,due to the destructive,time-consuming and labor consuming.Artificial intelligent(AI)technology can be expected to identify the nitrogen nutrient level of cotton in a shorter period of time without any breakage to the cotton.Among them,deep learning has been gradually applied to the diagnosis of the nitrogen nutrition level of crops,due to its automation,high accuracy,and robustness.But the high dependence on high-performance devices has limited the deployment and application of resource-constrained edge devices.In this study,a Raspberry Pi 4B-based model was proposed to diagnose the nitrogen nutrient level of cotton.The data was collected at different nitrogen levels(0,72,144,192,and 240 kg/hm2)during the boiling stage.The images were converted from the RGB to HSI color space.The overexposed or underexposed noises in the images were adjusted to make the features clearer using the gamma function(Gamma).Random flip,rotation and mirroring were also utilized for data enhancement.The final dataset with 5 780 images was randomly divided into training,validation and test sets,according to the ratio of 8∶1∶1.The ResNet 101 network was used to construct the diagnostic model,due to the special structure and powerful performance.The model was also pruned and optimized by the network thinning.A comparison was made on the model accuracy,the number of parameters,FLOPs,and model storage volume of the models with different pruning ratios.The results showed that the model with a pruning ratio of 87%was suitable for diagnostic modeling.The model with 87%was suitable to be deployed on Raspberry Pi 4B with limited resources;The model inference time was shortened from 3.22 to 0.91s when the model was converted from PyTorch to ONNX format.Raspberry Pi 4B was ported for the inference with ONNX Runtime.The experimental results show that when the model pruning ratio reached 87%,the loss of model accuracy was 2.55%,while the number of model parameters,FLOPs,and storage volume were 4.37 M,1.05 G,and 16.65 MB,respectively.The inference speed of the model was significantly improved on the equipment with limited computing power.The nitrogen nutritional status of cotton was rapidly and accurately assessed in the field.The precise application of nitrogen to cotton was realized in this case.Thus,the accurate fertilization of cotton was realized to improve the yield and quality.This finding can provide a technical reference to realize the rapid diagnosis of the nitrogen nutrition level of cotton over a large area.A strong reference was also offered for the research and development of intelligent terminal equipment to detect the crop nutrition level.

关键词

棉花//模型/氮素营养水平/卷积神经网络/模型轻量化/边缘智能

Key words

cotton/nitrogen/model/nitrogen nutrition levels/convolutional neural network/model lightweight/edge intelligence

引用本文复制引用

基金项目

国家自然科学基金(32260388)

兵团英才支持计划()

出版年

2024
农业工程学报
中国农业工程学会

农业工程学报

CSTPCDCSCD北大核心
影响因子:2.529
ISSN:1002-6819
参考文献量18
段落导航相关论文