Counting coffee cherries in dense foliage with edge AI
How a low-cost camera and a vision AI pipeline turn photos of coffee branches into berry counts, ripeness maps and yield estimates, with AI-assisted labeling that cuts the manual annotation work.
Scores are from a test set of 45 images. The cost estimate uses Gemini 3.6 Flash list prices for about 27,000 tokens per image.
High-yield plants are the hardest to count
Coffee estates need reliable berry counts to forecast yield, schedule harvesting across the estate and support commodities trading. Today those counts are mostly manual, slow and subjective. Productive plants grow dense, overlapping clusters that defeat standard detection.
- Severe occlusionLeaves and branches hide many cherries from the camera.
- Harsh, uneven lightDeep shadows and overexposed patches confuse standard detection algorithms.
- Green-on-green camouflageUnripe green cherries blend into the surrounding foliage.
- Costly labelingTraining a model needs thousands of hand-labeled berries, which is slow and expensive.
A four-stage vision pipeline
Each stage narrows the problem for the next one, so lightweight models can run on low-cost devices in the field.
Photograph one branch at a time
Low-cost devices capture images of individual branches. GPS coordinates are extracted and images are standardized to 1024×1024.
Find the clusters that matter
A YOLO26x model finds in-focus foreground clusters. Overlapping boxes are merged so berries aren't split and double counted.
Segment and grade every berry
YOLO26x-Seg detects, outlines and classifies each berry by ripeness. The pixel-level outlines let people see what the model counted.
Turn counts into yield maps
Counts feed a yield model and are plotted on satellite maps, sized by plant yield and colored by dominant ripeness stage.
From pilot to production
- All agricultural commoditiesThis solution can be applied to all agricultural commodities to predict yield, not just coffee.
- Autonomous harvestingGuidance systems for harvesting robots, addressing farm labor shortages.
- Commodities tradingQuantitative mid-season yield forecasts to replace subjective estimates.
- Security and scaleA data security reference design, scalable cloud storage and compute, and data lifecycle policies.
Have images, documents or sensor data to put to work?
We help mid-market companies apply computer vision and AI to real operational problems, one use case at a time.