Machine Learning and Queuing Algorithm Integration for Real-Time Citrus Size Classification on an Industrial Sorting Machine
The classification of lemons by size is a crucial industrial process that ensures specific quality standards. Lemon sorting is typically performed by hand or often using expensive, outdated machines. In this article, we develop Machine Learning and Queuing algorithms, program them on low-cost hardware—specifically, a microcontroller and a single-board computer—and integrate them with an existing fruit-sorting machine, which classifies lemons by size. We acquired a dataset of 3127 lemon images in six industry-standardized sizes. We developed algorithms to extract geometric features, including one based on the peduncle location, which is estimated using a pre-trained Faster Objects, More Objects (FOMO) model. We used these features to train and evaluate five machine learning models, with the best-performing model achieving 87.22% accuracy over a set of lemons acquired under controlled conditions. We tested the proposed system in a real industrial environment, proving its feasibility by sorting 1558 lemons and obtaining an accuracy of 78.00%, despite the industrial-standard sizes having considerable overlap.
Authors
- José Hugo Barrón-Zambrano (ORCID: https://orcid.org/0000-0002-0965-6714)
- Said Polanco-Martagón
- Ángel Dagoberto Cantú-Castro
- Yahir Hernández-Mier
- Marco Aurelio Nuño-Maganda
- Rubén Posada-Gómez
Institutions
- National Institute of Astrophysics, Optics and Electronics (MX)
- Instituto Tecnologico de Orizaba (MX)
Publication Details
- Journal
- Processes
- Published
- 2026-01-04
- DOI
- https://doi.org/10.3390/pr14010164
- Primary Topic
- Smart Agriculture and AI
- Type
- article
- Field-Weighted Citation Impact
- 0.00