How Mobile AI Can Improve Coffee Harvesting: A Deep Learning Approach for Robusta Cherry Ripeness Classification

Coffee quality begins long before roasting. One of the most influential factors is the maturity of coffee cherries at harvest, as cherries picked too early or too late can reduce bean quality, consistency, and market value. Despite the importance of accurate harvesting, many coffee farmers still rely on manual visual inspection, a process that is labor-intensive, subjective, and highly dependent on individual experience. These challenges are particularly significant in regions where access to advanced agricultural technologies remains limited. This study presents a mobile application powered by the YOLOv5 object detection algorithm that performs real-time classification of Robusta coffee cherry ripeness directly on a smartphone without requiring an internet connection. The research demonstrates how artificial intelligence can become an accessible decision-support tool for improving harvesting efficiency and supporting sustainable coffee production.

Bibliographic Information

Item Information
Article Title A mobile application based on object detection algorithm for classifying robusta coffee cherry ripeness
Authors Natasha Marie D. Relampagos and Kristine Mae P. Dunque
Journal Innovation in Engineering
Volume & Issue Volume 2, Issue 2
Publication Year 2025
Pages 114–125
DOI https://doi.org/10.58712/ie.v2i2.39
Publisher Researcher and Lecturer Society
License Creative Commons Attribution 4.0 International (CC BY 4.0)

1. Research Background

  • Coffee harvesting quality depends heavily on fruit maturity. Harvesting coffee cherries at the appropriate ripeness stage is a critical factor influencing bean quality, flavour characteristics, and overall coffee value. Immature or overripe cherries may negatively affect the final product and reduce production efficiency.
  • The Philippine coffee industry continues to face production challenges. Although coffee consumption has steadily increased, domestic production has not kept pace with demand. The country remains highly dependent on imported coffee despite having favourable climatic and geographical conditions for cultivating commercially important coffee varieties.
  • Manual ripeness assessment is labour-intensive and inconsistent. Coffee cherries mature at different times, requiring repeated harvesting and careful visual inspection. This process depends largely on farmers' experience and may lead to inconsistent harvesting decisions, particularly during large-scale operations.
  • Coffee farmers have limited access to intelligent harvesting technologies. According to the study, local Robusta coffee farmers in Bukidnon still lack practical technological tools capable of accurately classifying coffee cherries according to their maturity level under real farming conditions.
  • Previous studies have several practical limitations. Earlier image-processing and deep learning approaches generally focused on offline analysis, non-real-time detection, or older object detection algorithms. Some studies also classified only three maturity levels instead of providing a more detailed ripeness categorization.
  • Internet connectivity remains a practical constraint. Many coffee-growing regions experience unreliable internet access. Consequently, cloud-based recognition systems may not be suitable for field deployment, creating a need for offline mobile solutions that can operate directly on smartphones.
  • The study introduces an improved computer vision solution. Instead of relying on conventional image processing or earlier YOLO versions, the researchers adopted YOLOv5 to perform real-time object detection and classification using a smartphone camera while maintaining high recognition accuracy.
  • The proposed application classifies four maturity categories. The system recognizes unripe, semi-ripe, ripe, and overripe Robusta coffee cherries, providing a more detailed assessment than several previously reported approaches.
  • The research bridges artificial intelligence and precision agriculture. By integrating deep learning with a mobile application, the study demonstrates how computer vision can become an accessible assistive technology that supports harvesting decisions and contributes to improving coffee production practices.

2. Research Objectives

  • To develop a smartphone-based mobile application capable of automatically detecting and classifying Robusta coffee cherries according to their ripeness level.
  • To implement the YOLOv5 object detection algorithm for real-time recognition of coffee cherries directly from smartphone camera images.
  • To classify coffee cherries into four maturity categories consisting of unripe, semi-ripe, ripe, and overripe.
  • To evaluate the classification performance of the proposed application using validation and testing datasets representing different ripeness levels.
  • To provide an offline assistive technology that supports coffee farmers in improving harvesting accuracy and reducing dependence on manual visual inspection.

3. Why This Research Matters

  • Supports precision agriculture. Automated ripeness detection enables harvesting decisions to be based on consistent visual analysis rather than subjective human judgement.
  • Improves coffee quality. Accurate identification of cherry maturity helps ensure that only appropriately ripened cherries are harvested, contributing to better bean quality and more consistent coffee products.
  • Reduces farmers' workload. A mobile application capable of real-time classification can simplify sorting activities and reduce the time required for manual inspection during harvesting.
  • Provides an accessible field solution. Because the application operates on a smartphone without requiring internet connectivity, it is suitable for deployment in rural coffee-growing areas with limited digital infrastructure.
  • Demonstrates the practical application of artificial intelligence. The study illustrates how deep learning and computer vision can be integrated into agricultural practice through user-friendly mobile technologies.
  • Supports sustainable coffee production. Better harvesting decisions may contribute to higher production efficiency, improved crop value, and greater competitiveness for local coffee farmers.
  • Creates opportunities for future smart farming technologies. The proposed system establishes a technological foundation that could be expanded into automated sorting systems and other intelligent agricultural applications.

4. Research Methodology

  • Research Design

    The study adopted a developmental research design to develop and evaluate a mobile application capable of detecting and classifying Robusta coffee cherry ripeness using computer vision. The research focused on designing an offline intelligent system that integrates deep learning with smartphone technology to support harvesting activities under actual farming conditions.

  • Research Location

    Image acquisition was conducted at local Robusta coffee farms located in Pangantucan and Lantapan, Bukidnon, Philippines. These locations were selected because Robusta coffee is actively cultivated in the area and local farmers were willing to provide coffee cherry samples representing different maturity stages.

  • Data Collection

    The researchers collected photographs of Robusta coffee cherries using a Huawei Nova 3i smartphone camera. Images represented four maturity levels: unripe, semi-ripe, ripe, and overripe. A total of 1,200 annotated images were used for model training, while 400 validation images and 400 testing images were prepared to evaluate classification performance across all ripeness categories.

  • Research Framework

    The proposed framework consisted of three sequential stages. First, live images captured by the smartphone camera served as the system input. Second, the YOLOv5 object detection algorithm processed each image by detecting coffee cherries and classifying their maturity level. Finally, the application displayed the predicted ripeness category directly on the smartphone screen in real time.

  • Object Detection Model

    The study implemented the You Only Look Once version 5 (YOLOv5) object detection algorithm because it offers faster inference speed, improved detection accuracy, and suitability for mobile devices with relatively limited computational resources. Compared with earlier YOLO versions reported in previous studies, YOLOv5 provides improved real-time performance for field deployment.

  • Deep Learning Architecture

    The YOLOv5 model employs a convolutional neural network architecture consisting of three principal components. The backbone network extracts visual features from input images, the neck network combines features from different scales to improve object representation, and the detection head predicts bounding boxes together with ripeness classifications for detected coffee cherries.

  • Image Processing Workflow

    Prior to model training, image preprocessing procedures such as resizing and normalization were applied to standardize the input data. During inference, captured frames were processed through feature extraction, feature aggregation, object prediction, bounding box estimation, and non-maximum suppression before assigning the final ripeness label.

  • Mobile Application Development

    The trained YOLOv5 model was deployed as a smartphone application capable of operating without internet connectivity. Users simply direct the smartphone camera toward coffee cherries, allowing the application to detect multiple fruits simultaneously and display their respective maturity classifications in real time.

  • Experimental Setup

    Performance evaluation was conducted indoors using a typical coffee sorting tray ("nigo"). The smartphone camera was positioned approximately 12–15 inches above the sample surface. Two testing scenarios were performed: individual coffee cherry detection to evaluate classification performance and multiple-object detection using 20, 50, and 100 coffee cherries within a single image frame to examine application consistency under increasingly complex conditions.

  • Performance Evaluation

    The classification model was evaluated using a confusion matrix together with several commonly used computer vision metrics, including Precision, Recall, Average Precision (AP), Mean Average Precision (mAP), Specificity, F1-score, False Detection, Missed Detection, and overall Accuracy. These indicators provided a comprehensive assessment of the model's detection and classification performance.


5. Key Findings

The Mobile Application Achieved High Overall Classification Accuracy

One of the most significant outcomes of the study is the successful development of a smartphone application capable of performing real-time classification of Robusta coffee cherries without requiring an internet connection. The application achieved an overall classification accuracy of 95.63%, demonstrating that modern deep learning techniques can provide reliable support for agricultural field operations using ordinary mobile devices.

The high level of accuracy indicates that integrating YOLOv5 with smartphone technology offers a practical solution for assisting coffee farmers during harvesting. Rather than relying exclusively on subjective visual judgement, users receive immediate classification results directly from the application.

YOLOv5 Successfully Distinguished Four Ripeness Categories

Unlike several previous studies that focused on only three maturity levels, the proposed system successfully classified coffee cherries into four categories: unripe, semi-ripe, ripe, and overripe. This additional level of classification provides a more detailed assessment of fruit maturity and better reflects actual harvesting conditions.

The ability to differentiate intermediate maturity stages is particularly valuable because coffee cherries do not ripen simultaneously. More detailed classification allows harvesting decisions to be made with greater precision, supporting improvements in coffee quality and consistency.

Unripe Cherries Produced the Highest Recognition Performance

Performance evaluation showed that the highest classification accuracy was achieved for the unripe category, reaching 98.50%. The remaining maturity classes also demonstrated strong recognition performance, with semi-ripe and ripe cherries each achieving 94.75%, while overripe cherries reached 94.50%.

Although minor misclassifications occurred, particularly between ripe and overripe cherries whose colour characteristics are visually similar, the overall results indicate that the trained model consistently distinguished the four maturity levels with high reliability.

The Confusion Matrix Demonstrated Consistent Classification Performance

Results obtained from the confusion matrix showed that the model correctly classified the vast majority of validation samples across all maturity categories. High numbers of true positive predictions were observed for each ripeness level, indicating that the trained YOLOv5 model effectively learned the visual characteristics associated with different stages of coffee cherry development.

The confusion matrix also revealed that most classification errors occurred between neighbouring maturity stages rather than completely different classes. This pattern suggests that the remaining errors were primarily caused by gradual colour transitions during the natural ripening process instead of failures in object detection.

The Application Performed Real-Time Detection on Multiple Coffee Cherries

Beyond classifying individual coffee cherries, the application successfully detected and labelled multiple cherries appearing within a single camera frame. Performance testing was conducted using image frames containing 20, 50, and 100 coffee cherries with mixed maturity levels to evaluate operational consistency under increasingly complex visual conditions.

These experiments demonstrated that the proposed application is capable of supporting practical harvesting and sorting activities where numerous coffee cherries must be analysed simultaneously rather than individually.

The Proposed System Demonstrates Practical Potential for Smart Agriculture

The completed mobile application represents more than a computer vision prototype. By combining offline operation, smartphone accessibility, and real-time object detection, the system provides a practical assistive technology that can support coffee farmers who have limited access to advanced agricultural equipment or reliable internet infrastructure.

The researchers also highlighted that the developed model could serve as the foundation for future automatic coffee sorting systems implemented on microcontroller-based hardware. Such developments may further reduce manual labour while improving harvesting efficiency and quality control throughout the coffee production process.


6. Scientific Contribution

  • Introduces an offline AI-based mobile application for coffee harvesting. The study demonstrates that a deep learning model can be successfully deployed on a smartphone to perform real-time coffee cherry ripeness classification without requiring internet connectivity, making the technology suitable for rural agricultural environments.
  • Extends previous coffee ripeness classification research. Unlike several earlier studies that classified only three maturity levels or relied on non-real-time image processing, the proposed system recognizes four ripeness categories—unripe, semi-ripe, ripe, and overripe—while operating in real time.
  • Demonstrates the practical implementation of YOLOv5 in precision agriculture. The research validates that the YOLOv5 object detection algorithm can achieve high classification accuracy for agricultural applications using images acquired directly from a smartphone camera under realistic operating conditions.
  • Provides a complete end-to-end intelligent classification framework. The research integrates image acquisition, deep learning-based object detection, mobile application development, and real-time visualization into a unified system that can directly support harvesting decisions.
  • Contributes to computer vision applications in agricultural engineering. The study expands the application of modern object detection algorithms beyond laboratory experiments by demonstrating their feasibility in solving practical agricultural problems encountered by local coffee farmers.
  • Establishes a technological foundation for future smart harvesting systems. The developed application provides a baseline that can support future research involving automated sorting machines, intelligent harvesting equipment, and integrated smart farming technologies.

7. Industrial Implications

  • Improves harvesting consistency. Real-time ripeness classification can assist farmers in selecting coffee cherries at appropriate maturity stages, reducing variability caused by manual judgement.
  • Supports quality control in coffee production. More consistent selection of mature cherries can contribute to improved bean quality, helping producers achieve higher-value coffee products.
  • Reduces dependence on experienced labour. The application provides decision support for inexperienced workers by automatically identifying coffee cherry maturity based on computer vision rather than personal experience.
  • Increases operational efficiency. Real-time smartphone-based detection reduces the time required for manual inspection and sorting, allowing harvesting activities to become more efficient.
  • Encourages digital transformation in agriculture. The research demonstrates how artificial intelligence and mobile computing can be incorporated into everyday agricultural operations through affordable and accessible technologies.
  • Provides opportunities for automated sorting systems. Because the developed classification model already performs object detection in real time, it has potential to become the recognition component of future automated coffee sorting equipment.
  • Supports sustainable agricultural production. More accurate harvesting decisions may reduce unnecessary waste, improve crop utilization, and contribute to higher productivity throughout the coffee production chain.
  • Illustrates practical implementation of AI in agricultural engineering. The study provides an example of how deep learning can be translated into practical field applications rather than remaining solely as laboratory research.

8. Research Limitations

  • The application was developed and evaluated using images collected from Robusta coffee farms located in Bukidnon, Philippines. Additional validation using datasets from other geographical regions may further demonstrate the model's robustness.
  • The research focused exclusively on Robusta coffee cherries. Performance for other commercially important coffee varieties such as Arabica, Liberica, or Excelsa was not investigated.
  • The training dataset consisted of annotated images collected under the study conditions. Expanding the diversity of image backgrounds, lighting conditions, and environmental variations may further improve model generalization.
  • Although the application successfully performs real-time classification, the research evaluates only software performance and does not include integration with automated mechanical sorting equipment.
  • Performance testing was conducted using controlled experimental arrangements before field deployment. Additional evaluation during routine harvesting operations would provide further evidence of operational performance under more variable environmental conditions.
  • The study primarily evaluates classification accuracy and related computer vision metrics. Broader assessments of harvesting productivity, economic benefits, and long-term operational impacts remain opportunities for future investigation.

9. Future Research Opportunities

  • Expand the image dataset by including more coffee farms, geographical regions, lighting conditions, and seasonal variations to improve model robustness.
  • Evaluate the proposed application using additional commercially important coffee species, including Arabica, Liberica, and Excelsa.
  • Compare YOLOv5 with newer object detection models to investigate potential improvements in accuracy, computational efficiency, and mobile deployment performance.
  • Integrate the classification model into automated coffee sorting machines using embedded systems or microcontroller-based hardware.
  • Investigate real-time field performance under different weather conditions, natural illumination levels, and harvesting environments.
  • Incorporate additional fruit quality indicators such as size, shape, surface defects, and disease symptoms into the classification framework.
  • Develop cloud-assisted farm management systems that combine ripeness detection with production monitoring, yield estimation, and digital farm records while maintaining offline functionality where necessary.
  • Evaluate the economic impact of AI-assisted harvesting by measuring labour savings, productivity improvements, and coffee quality enhancement under commercial farming conditions.
  • Investigate explainable artificial intelligence techniques that provide visual explanations for classification decisions, increasing user confidence in automated harvesting recommendations.
  • Explore the applicability of similar mobile computer vision systems for other horticultural crops requiring maturity assessment before harvesting.

10. Potential for Public Policy Citation (Overton)

This article demonstrates moderate potential for citation in public policy documents because it addresses an important challenge in agricultural modernization through the practical application of artificial intelligence. The research supports technology adoption in coffee farming by providing an accessible mobile solution that can improve harvesting consistency and product quality without requiring sophisticated infrastructure.

The findings could inform government initiatives related to digital agriculture, agricultural innovation, precision farming, rural technology adoption, and capacity-building programs for coffee-producing communities. Agencies responsible for agricultural extension services may also consider similar technologies when promoting digital transformation among smallholder farmers.

The study may also contribute to regional development strategies that encourage sustainable coffee production and value-added agricultural industries. Although the research focuses primarily on the technical development and validation of a mobile application rather than policy implementation, its practical orientation provides evidence that artificial intelligence can be deployed using affordable consumer devices to support agricultural productivity.

Because the research is based on a specific case study involving Robusta coffee farms in the Philippines, broader policy adoption would benefit from additional validation across different coffee-growing regions and production systems. Nevertheless, the study provides a valuable technological reference for future smart agriculture initiatives and digital farming roadmaps.


11. Who Should Read This Paper?

  • Researchers working in computer vision, artificial intelligence, and precision agriculture.
  • Agricultural engineers developing intelligent farming technologies.
  • Computer scientists and software developers interested in mobile deep learning applications.
  • Graduate and undergraduate students studying agricultural engineering, electronics engineering, computer engineering, or artificial intelligence.
  • Coffee farmers seeking practical digital tools to improve harvesting accuracy and crop quality.
  • Agricultural extension officers promoting technology adoption in rural farming communities.
  • Entrepreneurs and agritech startups developing smart farming solutions.
  • Quality control specialists involved in coffee processing and post-harvest management.
  • Government agencies supporting digital agriculture and agricultural innovation.
  • Educators teaching computer vision, embedded systems, mobile computing, and smart agriculture.

12. Final Thoughts

This study presents a practical example of how artificial intelligence can be translated into an accessible tool for addressing a real agricultural challenge. By combining the YOLOv5 object detection algorithm with a smartphone-based mobile application, the researchers developed a system capable of classifying Robusta coffee cherry ripeness in real time while operating without internet connectivity. This characteristic makes the application particularly relevant for coffee-producing regions where digital infrastructure remains limited.

A notable strength of the research lies in its balance between technical performance and practical usability. Rather than focusing solely on algorithm development, the study demonstrates the complete implementation of an intelligent application that can assist farmers during harvesting activities. The reported classification accuracy indicates that deep learning can provide reliable support for improving harvesting consistency and reducing dependence on subjective visual assessment.

Although additional validation across different coffee varieties, environmental conditions, and farming systems would further strengthen the general applicability of the proposed approach, the research represents a meaningful contribution to precision agriculture. It illustrates how advances in computer vision and mobile computing can be transformed into affordable technologies that support agricultural productivity, improve coffee quality, and encourage wider adoption of digital farming practices. As artificial intelligence continues to expand into agricultural engineering, studies such as this provide valuable evidence that intelligent mobile applications can become practical decision-support tools for sustainable food production.


Suggested Citation

UNP–Teknomekanik Style

Relampagos NMD, Dunque KMP. A mobile application based on object detection algorithm for classifying robusta coffee cherry ripeness. Innovation in Engineering. 2025;2(2):114–125. DOI: https://doi.org/10.58712/ie.v2i2.39.

APA (7th Edition)

Relampagos, N. M. D., & Dunque, K. M. P. (2025). A mobile application based on object detection algorithm for classifying robusta coffee cherry ripeness. Innovation in Engineering, 2(2), 114–125. https://doi.org/10.58712/ie.v2i2.39

IEEE Style

N. M. D. Relampagos and K. M. P. Dunque, "A mobile application based on object detection algorithm for classifying robusta coffee cherry ripeness," Innovation in Engineering, vol. 2, no. 2, pp. 114–125, 2025, doi: 10.58712/ie.v2i2.39.

Harvard Style

Relampagos, N.M.D. & Dunque, K.M.P., 2025. A mobile application based on object detection algorithm for classifying robusta coffee cherry ripeness. Innovation in Engineering, 2(2), pp.114–125. Available at: https://doi.org/10.58712/ie.v2i2.39.

Vancouver Style

Relampagos NMD, Dunque KMP. A mobile application based on object detection algorithm for classifying robusta coffee cherry ripeness. Innovation in Engineering. 2025;2(2):114–125. doi: 10.58712/ie.v2i2.39.

Chicago (Author–Date)

Relampagos, Natasha Marie D., and Kristine Mae P. Dunque. 2025. "A Mobile Application Based on Object Detection Algorithm for Classifying Robusta Coffee Cherry Ripeness." Innovation in Engineering 2 (2): 114–125. https://doi.org/10.58712/ie.v2i2.39.

MLA (9th Edition)

Relampagos, Natasha Marie D., and Kristine Mae P. Dunque. "A Mobile Application Based on Object Detection Algorithm for Classifying Robusta Coffee Cherry Ripeness." Innovation in Engineering, vol. 2, no. 2, 2025, pp. 114–125. https://doi.org/10.58712/ie.v2i2.39.

Editorial Note

Editorial Note: This blog post is an independent scholarly review intended for educational and scientific communication purposes. It summarizes and discusses the published article in the author's own words while providing full attribution to the original publication, consistent with the principles of the Creative Commons Attribution 4.0 International (CC BY 4.0) license.


SEO Information

SEO Meta Description

An in-depth scholarly review of a 2025 study on a YOLOv5-based mobile application for real-time Robusta coffee cherry ripeness classification. Discover the research methodology, key findings, industrial implications, scientific contributions, and the future of AI-powered precision agriculture.

SEO Keywords

YOLOv5, coffee cherry ripeness classification, Robusta coffee, object detection, computer vision, mobile application, artificial intelligence, precision agriculture, smart farming, deep learning, agricultural engineering, image classification, coffee harvesting, Innovation in Engineering, Engineering Research Insights

Recommended URL Slug

how-yolov5-mobile-ai-improves-robusta-coffee-cherry-ripeness-classification

Discoverability

  • Primary Research Area: Artificial Intelligence in Agriculture
  • Engineering Discipline: Agricultural Engineering, Electronics Engineering, Computer Engineering
  • Technology Focus: Computer Vision, Deep Learning, Mobile Computing
  • Application Domain: Precision Agriculture and Smart Farming
  • Target Audience: Researchers, Engineers, Coffee Farmers, Agritech Developers, Graduate Students, Policymakers
  • Related Topics: YOLOv5, Image Recognition, Object Detection, Digital Agriculture, Agricultural Automation, Sustainable Farming
  • Potential Search Queries:
    • YOLOv5 coffee ripeness classification
    • AI for coffee harvesting
    • Mobile application for coffee farmers
    • Computer vision in agriculture
    • Robusta coffee maturity detection
    • Deep learning for precision agriculture
    • Offline AI mobile application agriculture

Comments