Post-harvest quality control of white quinoa on smartphones using deep learning

Read the full article See related articles

Discuss this preprint

Start a discussion What are Sciety discussions?

Listed in

This article is not in any list yet, why not save it to one of your lists.
Log in to save this article

Abstract

The global expansion of quinoa demands optimized non-invasive, objective, and standardized methodologies to ensure uniform quality. In this study, we developed and validated an on-device artificial vision system for regulatory classification of white quinoa according to Peruvian standard (NTP) 011.462:2025. A total of 3000 Sample Units (SU) from Puno (Peru) were used. Each grain was segmented into 64×64 px regions of interest (ROIs) and fed into a Convolutional Neural Network (CNN) based on MobileNet_v1_0.50_224, evaluated using GroupKFold (k = 5, by SU) as the grouping unit. Metrics were estimated with 95% confidence intervals (CIs) using Wilson/Bootstrap, and probabilistic calibration via temperature scaling (TS). The CNN labelled individual grains under 4 size classes and 5 morphologies, enabling each SU to be assigned a type and category via a rule-based engine consistent with NTP thresholds. The system achieved 97.14% Accuracy (pooled SU-level), 94.15% F1_macro, and 0.94 MCC, with specificities > 99% (size) and > 98% (category). Expected Calibration Error (ECE) improved substantially; size: 0.061 to 0.028, defect: 0.094 to 0.052, and category: 0.048 to 0.023, enabling reliable decision thresholds without loss of discrimination. On-device inference required 0.345 s per sample and 0.188 s for capture. The AVS provides an objective, reproducible, and auditable decision for Android mid-range devices, maintaining high generalization and full traceability. Its modular architecture may serve as a reference for other grains and agro-food matrices under their respective chromatic/morphological standards.

Article activity feed