Coffee which is prepared from the grinded roasted seeds of harvested coffee cherries, is one of the most consumed beverage and traded commodity, globally. To manually monitor the coffee field regularly, and inform about plant and soil health, as well as estimate yield and harvesting time, is labor-intensive, time-consuming and error-prone. Some recent studies have developed sensors for estimating coffee yield at the time of harvest, however a more inclusive and applicable technology to remotely monitor multiple parameters of the field and estimate coffee yield and quality even at pre-harvest stage, was missing. Following precision agriculture approach, we employed machine learning algorithm YOLO, for image processing of coffee plant. In this study, the latest version of the state-of-the-art algorithm YOLOv7 was trained with 324 annotated images followed by its evaluation with 82 unannotated images as test data. Next, as an innovative approach for annotating the training data, we trained K-means models which led to machine-generated color classes of coffee fruit and could thus characterize the informed objects in the image. Finally, we attempted to develop an AI-based handy mobile application which would not only efficiently predict harvest time, estimate coffee yield and quality, but also inform about plant health. Resultantly, the developed model efficiently analyzed the test data with a mean average precision of 0.89. Strikingly, our innovative semi-supervised method with an mean average precision of 0.77 for multi-class mode surpassed the supervised method with mean average precision of only 0.60, leading to faster and more accurate annotation. The mobile application we designed based on the developed code, was named CoffeApp, which possesses multiple features of analyzing fruit from the image taken by phone camera with in field and can thus track fruit ripening in real time.
翻译:咖啡由收获的咖啡樱桃经研磨烘焙种子制成,是全球消费量最大的饮品及交易商品之一。定期人工监测咖啡田、获取植物与土壤健康状况、估算产量及收获时间,不仅劳动密集、耗时且易出错。近期研究虽开发了用于收获期估算咖啡产量的传感器,但仍缺乏一种更具包容性和实用性的技术,能够远程监测田地的多项参数,并在收获前阶段估算咖啡产量与品质。本研究遵循精准农业方法,采用机器学习算法YOLO对咖啡植株进行图像处理。我们使用最新版本的最优算法YOLOv7,以324张标注图像训练模型,并以82张未标注图像作为测试数据进行评估。随后,作为训练数据标注的创新方法,我们训练了K-means模型,生成机器定义的咖啡果实颜色类别,从而表征图像中的目标对象。最终,我们尝试开发了一款基于人工智能的便携式移动应用,不仅能高效预测收获时间、估算咖啡产量与品质,还可提供植物健康状况信息。结果表明,所开发模型对测试数据实现了平均精度(mAP)0.89的高效分析。值得注意的是,我们提出的创新半监督方法在多类别模式下平均精度达0.77,超越了平均精度仅为0.60的有监督方法,实现了更快速、更准确的标注。基于所开发代码设计的移动应用命名为CoffeApp,具备通过手机相机拍摄现场图像分析果实的功能,并可实时追踪果实成熟进程。