Evaluation of machine learning methods for organic apple authentication based on diffraction grating and image processing

Weiran Song, Nanfeng Jiang, Hui Wang, Gongde Guo

Research output: Contribution to journalArticlepeer-review

23 Citations (Scopus)
215 Downloads (Pure)


Optical measuring technologies coupled with machine learning algorithms can be used to build a home-made sensor system. We built such a sensor system using a smartphone and a diffraction grating sheet. Diffraction images were captured under white light illumination and converted into a data matrix for data analysis. In this paper we present a systematic evaluation of this sensor system on the task of differentiating organic apples from conventional ones. We used the sensor system to measure 150 organic and conventional apples as rainbow images. We processed the rainbow images using computer vision techniques, built machine learning and chemometrics models, and used the resultant models to classify testing samples. Moreover, a comparative study was conducted where the same set of apples were scanned by a commercial spectrometer resulting in spectral data of the apple samples and classification was undertaken using partial least squares discriminant analysis (PLS-DA). Experimental results show that state of the art machine learning algorithms such as support vector machine (SVM) and locally weighted partial least squares classifier (LW-PLSC) are effective in handling low-quality image data with classification accuracies of 93 − 100%. These results suggest that the sensor system is convenient and low-cost, and provides a fast, effective, non-destructive and viable solution for in-line food authentication.

Original languageEnglish
Article number103437
JournalJournal of Food Composition and Analysis
Early online date30 Jan 2020
Publication statusPublished (in print/issue) - 31 May 2020

Bibliographical note

This work was supported by Fujian science and technology department project (No. JK2017007), Natural Science Foundation of Fujian Province, China (No. 2018J01776), Natural Science Foundation of Fujian Province, China (No. 2018J01775) and the National Natural Science Foundation of China under Grant (No. 61672157)


  • Chemometrics
  • Diffraction grating
  • Food authentication
  • Machine learning
  • Organic apple


Dive into the research topics of 'Evaluation of machine learning methods for organic apple authentication based on diffraction grating and image processing'. Together they form a unique fingerprint.

Cite this