In this paper, we present an efficient solution for weed classification in agriculture. We focus on optimizing model performance at inference while respecting the constraints of the agricultural domain. We propose a Quantized Deep Neural Network model that classifies a dataset of 9 weed classes using 8-bit integer (int8) quantization, a departure from standard 32-bit floating point (fp32) models. Recognizing the hardware resource limitations in agriculture, our model balances model size, inference time, and accuracy, aligning with practical requirements. We evaluate the approach on ResNet-50 and InceptionV3 architectures, comparing their performance against their int8 quantized versions. Transfer learning and fine-tuning are applied using the DeepWeeds dataset. The results show staggering model size and inference time reductions while maintaining accuracy in real-world production scenarios like Desktop, Mobile and Raspberry Pi. Our work sheds light on a promising direction for efficient AI in agriculture, holding potential for broader applications. Code: https://github.com/parikshit14/QNN-for-weed
翻译:本文提出了一种面向农业中杂草分类的高效解决方案。我们聚焦于在满足农业领域约束条件的前提下优化模型推理性能,提出了一种量化深度神经网络模型,该模型采用8位整数量化(int8)对包含9种类别的杂草数据集进行分类,突破了传统的32位浮点(fp32)模型范式。针对农业场景中硬件资源受限的特点,我们的模型在模型规模、推理时间与精度之间实现了平衡,契合实际应用需求。我们基于ResNet-50与InceptionV3架构评估了该方法,并将其性能与相应int8量化版本进行对比。通过DeepWeeds数据集应用迁移学习与微调技术。结果表明,在桌面端、移动端及树莓派等实际生产场景下,模型在保持精度的同时实现了显著的模型体积压缩与推理时间缩短。本研究为农业领域高效人工智能的发展提供了具有前景的方向,并具备广泛的应用潜力。代码地址:https://github.com/parikshit14/QNN-for-weed