Journal Article

Geographic-scale coffee cherry counting with smartphones and deep learning

Deep learning and computer vision, using remote sensing and drones, are 2 promising nondestructive methods for plant monitoring and phenotyping. However, their applications are infeasible for many crop systems under tree canopies, such as coffee crops, making it challenging to perform plant monitoring and phenotyping at a large spatial scale at a low cost. This study aims to develop a geographic-scale monitoring method for coffee cherry counting, supported by an artificial intelligence (AI)-powered citizen science approach. The approach uses basic smartphones to take a few pictures of coffee trees; 2,968 trees were investigated with 8,904 pictures in Junín and Piura (Peru), Cauca, and Quindío (Colombia) in 2022, with the help of nearly 1,000 smallholder coffee farmers. Then, we trained and validated YOLO (You Only Look Once) v8 for detecting cherries in the dataset in Peru. An average number of cherries per picture was multiplied by the number of branches to estimate the total number of cherries per tree. The model's performance in Peru showed an R2 of 0.59. When the model was tested in Colombia, where different varieties are grown in different biogeoclimatic conditions, the model showed an R2 of 0.71. The overall performance in both countries reached an R2 of 0.72. The results suggest that the method can be applied to much broader scales and is transferable to other varieties, countries, and regions. To our knowledge, this is the first AI-powered method for counting coffee cherries and has the potential for a geographic-scale, multiyear, photo-based phenotypic monitoring for coffee crops in low-income countries worldwide.