Machine Learning based Framework for Food Quality Assurance Using NMR relaxometry

Paper: Detecting Harmful Dyes from Vegetables by Low Field NMR Relaxometry

Work under review

Overview: Dyeing vegetables with harmful compounds has been an alarming issue from the past few years. Excessive consumption of these dyed vegetables can cause severe health hazards including cancer. Copper sulfate, Malachite green, Sudan red, and Metanil yellow are some of the non-food grade dyes widely used on the vegetables by the untrusted entities in food supply chain to make them look fresh and vibrant. In this study, we determine the presence and quantity of the adulteration in vegetables caused by added non-food grade dyes by applying 1H-nuclear magnetic resonance (NMR) relaxometry and a supervised machine learning model.

Fig.: Non-food grade dyes are used in vegetables to provide them a fresh and vibrant look

The proposed dye detection technique consists of two major building blocks: NMR relaxometry to collect relaxation time (T2) for each substances at a given concentration (C) and a supervised classification algorithm to detect presence/absence of dyes based on the obtained T2 and C value. To illustrate, first, we obtain numerous T2 values for each substance (dye) by allowing different C values using NMR relaxometry. Now that several T2-C value pairs are obtained, a supervised learning method is applied on them to determine the relationship between the parameters and a library is established containing the T2-C pairs for each substance. Finally, when the T2 from an unknown substance is available, using the library, an approximate C of the unknown substance is determined and the presence of certain substance can be easily predicted utilizing the established T2-C relationship.