An XAI-enabled 2D-CNN model for non-destructive detection of natural adulterants in the wonder hot variety of red chilli powder†
Abstract
AI revolutionizes the food sector by improving production, supply chains, quality assurance, and consumer safety. Therefore, this work addresses the alarming issue of red chilli powder (RcP) adulteration, with the introduction of an AI-driven framework for RcP adulteration detection, leveraging an empirical evaluation of DenseNet-121 and 169. To optimize convergence and enhance the performance, the AdamClr optimizer was incorporated, in a learning rate range between 0.00005 and 0.01. Two datasets (DS I and DS II) were developed for evaluation of DenseNet models. DS I consists of two classes: Class 1 (Label = C1_PWH) representing pure RcP (variety = Wonder Hot (WH)) and Class 2 (Label = C2_AWH) containing samples adulterated with five natural adulterants (wheat bran (WB), rice hull (RB), wood saw (WS), and two low-grade RcP), whereas DS II comprises 16 classes, including one class of pure RcP and 15 classes representing adulterated RcP with varying concentrations of the five adulterants (each at 5%, 10%, and 15% concentration). For binary classification (for DS I), DenseNet-169 at batch size (BS) 16 delivered an accuracy of 99.99%, while, in multiclass classification (for DS II) for determination of the percentage of adulterant, DenseNet-169 at BS 64 produced the highest accuracy of 95.16%. Furthermore, Grad-CAM explains the DenseNet-169 predictions, amd the obtained heatmaps highlighting the critical regions influencing classification decisions. The proposed framework demonstrated high efficacy in detecting RcP adulteration in binary as well as multiclass classification. Overall, DenseNet-169 and XAI present a transformative approach for enhancing quality control and assurance in the spice industry.