Automated measurement of ascorbic acid levels in camu-camu using Vision Transformer - Gutiérrez Cáceres, Juan Carlos; Blancas Lopez, Paolo Cesar Leonel; Gaviria Huanio, Richard Esmith; Ayra Apac, Nilton Cesar; Panduro Padilla, Euclides; Agurto Cherre, Cesar Augusto (Frontiers in Plant Science, 2025)
This study introduces a fully automated and cost effective approach to quantify ascorbic acid levels in camu-camu (Myrciaria dubia), a tropical super fruit renowned for its exceptionally high vitamin C content. Conventional analytical techniques depend on specialized laboratory equipment, limiting their applicability in field settings and among small-scale producers. To address this issue, we developed an integrated pipeline that combines a real-time Detection Transformer (RT-DETR) for precise fruit detection with a Vision Transformer (ViT) to classify fruits across four ripening stages. Building on these outputs, we designed an image-based estimation model that predicts ascorbic acid concentration using fruit size and ripening stage as key indicators. The RT-DETR achieved excellent detection performance, with a precision of 0.970 and a recall of 0.976, outperforming YOLOv8 (0.946 and 0.913, respectively). Likewise, the ViT classifier reached a precision of 0.970, surpassing VGG16, which achieved 0.946. The proposed estimation model yielded a very low prediction error, confirming its reliability. Overall, this work offers a practical, scalable, and accurate solution for estimating ascorbic acid directly from images, delivering significant benefits to producers and advancing the application of computer vision in the pharmaceutical industry.