Deep learning to classify the ripeness of coffee fruit in the mechanized harvesting process

ABSTRACT The coffee industry is a vital sector of global agriculture. Coffee is one of the most widely traded plant products in the world. Coffee fruit ripeness affects the taste and aroma of the final brewed beverage, coffee farms’ overall yield and economic viability. Traditional methods of assess...

Full description

Saved in:
Bibliographic Details
Main Authors: Marco Antonio Zanella, Mikel Barrio-Conde, Jaime Gomez-Gil, Javier Manuel Aguiar-Perez, María Ángeles Pérez-Juárez, Fabio Moreira da Silva
Format: Article
Language:English
Published: Universidade de São Paulo 2025-06-01
Series:Scientia Agricola
Subjects:
Online Access:http://www.scielo.br/scielo.php?script=sci_arttext&pid=S0103-90162025000100103&lng=en&tlng=en
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1850106905442123776
author Marco Antonio Zanella
Mikel Barrio-Conde
Jaime Gomez-Gil
Javier Manuel Aguiar-Perez
María Ángeles Pérez-Juárez
Fabio Moreira da Silva
author_facet Marco Antonio Zanella
Mikel Barrio-Conde
Jaime Gomez-Gil
Javier Manuel Aguiar-Perez
María Ángeles Pérez-Juárez
Fabio Moreira da Silva
author_sort Marco Antonio Zanella
collection DOAJ
description ABSTRACT The coffee industry is a vital sector of global agriculture. Coffee is one of the most widely traded plant products in the world. Coffee fruit ripeness affects the taste and aroma of the final brewed beverage, coffee farms’ overall yield and economic viability. Traditional methods of assessing coffee fruit ripeness, which rely on manual inspection by skilled workers, are labor-intensive, time-consuming, and prone to subjective interpretation. In this study, we have used the YOLOv9 (You Only Look Once) algorithm that outperformed previous versions particularly by using a new lightweight network architecture called the gelan-c model. The objective of this study was to identify and classify quickly and accurately the degree of ripeness of the harvested coffee fruits into the following classes: unripe, ripe-red, ripe-yellow, and overripe. The images were captured during harvesting with a commercial harvester in a coffee farm in the southern region of the state of Minas Gerais, Brazil. Data augmentation was performed to increase the dataset in terms of images and bounding boxes. Detection performance was obtained for image sizes between 128 and 640 px. The best performance was achieved with an image size of 640 px, reaching a precision level of 99 %, a recall of 98.5 %, an F1-Score of 98.75 %, a mAP@0.5 of 99.25 %, and a mAP@0.5:0.95 of about 85 % during the validation phase. Our study significantly outperforms previous studies on fruit classification in terms of models used, data augmentation strategies, and overall performance.
format Article
id doaj-art-7e981a278d4a42dea8f1eb6d601a37c5
institution OA Journals
issn 1678-992X
language English
publishDate 2025-06-01
publisher Universidade de São Paulo
record_format Article
series Scientia Agricola
spelling doaj-art-7e981a278d4a42dea8f1eb6d601a37c52025-08-20T02:38:43ZengUniversidade de São PauloScientia Agricola1678-992X2025-06-018210.1590/1678-992x-2024-0156Deep learning to classify the ripeness of coffee fruit in the mechanized harvesting processMarco Antonio Zanellahttps://orcid.org/0000-0001-7306-7976Mikel Barrio-Condehttps://orcid.org/0009-0004-6586-1116Jaime Gomez-Gilhttps://orcid.org/0000-0003-3333-0148Javier Manuel Aguiar-Perezhttps://orcid.org/0000-0001-7054-0369María Ángeles Pérez-Juárezhttps://orcid.org/0000-0003-2263-7355Fabio Moreira da Silvahttps://orcid.org/0000-0002-6367-5422ABSTRACT The coffee industry is a vital sector of global agriculture. Coffee is one of the most widely traded plant products in the world. Coffee fruit ripeness affects the taste and aroma of the final brewed beverage, coffee farms’ overall yield and economic viability. Traditional methods of assessing coffee fruit ripeness, which rely on manual inspection by skilled workers, are labor-intensive, time-consuming, and prone to subjective interpretation. In this study, we have used the YOLOv9 (You Only Look Once) algorithm that outperformed previous versions particularly by using a new lightweight network architecture called the gelan-c model. The objective of this study was to identify and classify quickly and accurately the degree of ripeness of the harvested coffee fruits into the following classes: unripe, ripe-red, ripe-yellow, and overripe. The images were captured during harvesting with a commercial harvester in a coffee farm in the southern region of the state of Minas Gerais, Brazil. Data augmentation was performed to increase the dataset in terms of images and bounding boxes. Detection performance was obtained for image sizes between 128 and 640 px. The best performance was achieved with an image size of 640 px, reaching a precision level of 99 %, a recall of 98.5 %, an F1-Score of 98.75 %, a mAP@0.5 of 99.25 %, and a mAP@0.5:0.95 of about 85 % during the validation phase. Our study significantly outperforms previous studies on fruit classification in terms of models used, data augmentation strategies, and overall performance.http://www.scielo.br/scielo.php?script=sci_arttext&pid=S0103-90162025000100103&lng=en&tlng=enYOLOcoffee farmingfruit detectionprecision agriculture
spellingShingle Marco Antonio Zanella
Mikel Barrio-Conde
Jaime Gomez-Gil
Javier Manuel Aguiar-Perez
María Ángeles Pérez-Juárez
Fabio Moreira da Silva
Deep learning to classify the ripeness of coffee fruit in the mechanized harvesting process
Scientia Agricola
YOLO
coffee farming
fruit detection
precision agriculture
title Deep learning to classify the ripeness of coffee fruit in the mechanized harvesting process
title_full Deep learning to classify the ripeness of coffee fruit in the mechanized harvesting process
title_fullStr Deep learning to classify the ripeness of coffee fruit in the mechanized harvesting process
title_full_unstemmed Deep learning to classify the ripeness of coffee fruit in the mechanized harvesting process
title_short Deep learning to classify the ripeness of coffee fruit in the mechanized harvesting process
title_sort deep learning to classify the ripeness of coffee fruit in the mechanized harvesting process
topic YOLO
coffee farming
fruit detection
precision agriculture
url http://www.scielo.br/scielo.php?script=sci_arttext&pid=S0103-90162025000100103&lng=en&tlng=en
work_keys_str_mv AT marcoantoniozanella deeplearningtoclassifytheripenessofcoffeefruitinthemechanizedharvestingprocess
AT mikelbarrioconde deeplearningtoclassifytheripenessofcoffeefruitinthemechanizedharvestingprocess
AT jaimegomezgil deeplearningtoclassifytheripenessofcoffeefruitinthemechanizedharvestingprocess
AT javiermanuelaguiarperez deeplearningtoclassifytheripenessofcoffeefruitinthemechanizedharvestingprocess
AT mariaangelesperezjuarez deeplearningtoclassifytheripenessofcoffeefruitinthemechanizedharvestingprocess
AT fabiomoreiradasilva deeplearningtoclassifytheripenessofcoffeefruitinthemechanizedharvestingprocess