ORIGINAL RESEARCH article
Front. Artif. Intell.
Sec. AI in Food, Agriculture and Water
This article is part of the Research TopicIntelligent Evolution: Practice and Breakthrough of Non-destructive Testing Technology for Fruits and VegetablesView all 3 articles
Classification of Lupinus seeds into sweet and bitter categories using VIS–NIR spectroscopy and machine learning
Provisionally accepted- 1University of Extremadura, Badajoz, Spain
- 2Universidad de Extremadura. Tecnología de los Computadores y Comunicaciones. Centro Universitario de Mérida, Mérida, Spain
- 3Pasture and Forage Crops Area, Finca La Orden-Valdesequera” Agricultural Research Institute, which belongs to the Extremadura Scientific and Technological Research Centre (CICYTEX),, Guadajira (Badajoz), Spain
- 4Dpto. Ingeniería de Sistemas Informáticos y Telemáticos. Centro Universitario de Mérida. Universidad de Extremadura,, Mérida, Spain
Select one of your emails
You have multiple emails registered with Frontiers:
Notify me on publication
Please enter your email address:
If you already have an account, please login
You don't have a Frontiers account ? You can register here
ABSTRACT Purpose: The Lupinus germplasm includes sweet and bitter materials distinguished by compounds responsible for bitterness. Conventional identification is often destructive. This study assesses a non-destructive approach based on visible–near infrared (VIS-NIR) spectroscopy and machine learning to classify whole seeds from seven Lupinus species into sweet or bitter classes. Methods: Five machine-learning algorithms were evaluated on two datasets (reflectance and absorbance) acquired with VIS-NIR spectroscopy. Analyses were conducted on raw spectra and on spectra transformed using four spectral-transformation techniques. Because classes were imbalanced, five resampling methods were compared to improve classification performance. Results: Performance was assessed using F1-score and ROC-AUC. On reflectance, LGR and SVC reached 92.5% and 92.0%; on absorbance, SVC and RF achieved 93.2% and 92.5%. Hybrid transformations consistently improved discrimination, and resampling reduced overfitting associated with class imbalance. Conclusion: The results indicate that combining VIS–NIR spectroscopy with machine learning provides a suitable non-destructive alternative to discriminate sweet and bitter Lupinus materials/ecotypes.
Keywords: absorbance spectra, artificial intelligence, food sustainability, Resampling Methods, seed phenotyping, spectral reflectance
Received: 13 Nov 2025; Accepted: 09 Feb 2026.
Copyright: © 2026 Díaz Álvarez, Galea-Gragera, Chávez de la O, Salguero-López and Llera Cid. This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) or licensor are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.
* Correspondence: Josefa Díaz Álvarez
Disclaimer: All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article or claim that may be made by its manufacturer is not guaranteed or endorsed by the publisher.
