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模型对训练数据进行了创新性的标注,生成了咖啡果的机器生成颜色类别,并在图像中表征了相关物体。最后,我们尝试开发一款基于人工智能的手机应用程序,不仅能够高效地预测收获时间、估量咖啡产量和质量,还能及时通报植物健康状况。结果,我们开发的模型能够高效地分析测试数据,平均精度可达0.89。值得注意的是,我们的创新性半监督方法在多类模式下的平均精度为0.77,超越了仅有0.60的监督方法,实现了更快速、更准确的标注。我们根据已有的代码设计了基于开发代码的手机应用程序,名为CoffeApp,它具有从手机相机拍摄的图像中分析水果的多种功能,可以实时跟踪果实的成熟过程。