Detection of food adulteration using machine learning tools
Loading...
Date
Publisher
BRAC University
Citation
Abstract
Adulteration of food has been an urgent concern for the health and food safety of
the people, and the affected area is particularly the developing countries due to the
inefficient infrastructure and limited resources available to test the food items. Some
traditional forms of detection, like chemical analysis and chromatographic analysis,
are usually slow, costly, and require competent manpower. This paper explores an
affordable and scalable Machine Learning (ML) system to identify food adulteration
in sugar and poppy seed, and also another criteria is to identify the freshness of meat.
The methodology of the study uses a modular approach to using self created RGB
image dataset of sugar mixed with Magnesium Sulfate as adulterant which is one
of its first kind in food adulteration detection of sugar and another one is of poppy
seed dataset which is mixed with semolina as adulterant, collected through online
to predict different fixed adulteration levels. Additionally, the dataset of meat is
collected from an existing paper for further working on meat freshness detection.
A self proposed ensembled model using pretrained models including: Densenet121,
Conv-Next Tiny and Resnet50 with soft voting is used for detecting adulterants of
sugar with Grad-CAM visualization, also showed some success in detecting other
unknown adulterants. The ensembled model for sugar has shown about 88.96%
accuracy. Whereas for poppyseed, Convolutional Neural Networks (CNN), and its
pretrained model- EfficientNetB0 shows very high accuracy - 98.25% itself to measure
the level of adulterants in class-wise manner without requiring any ensemble
learning. As per previous works, there are few models that have satisfactory accuracy
rate in terms of adulterant detection but there still exist issues, especially in
covering diverse food items like sugar and poppyseed and as of for meat freshness,
the Misclassification Cost based on some shown pretrained models was much higher
in a previous work, which has been addressed by this study. For meat dataset,
a Swin Transformer integrated with Explainable AI succesfully identified spots of
spoilage, solving the black-box problem, showed increased accuracy upto 98% which
is higher compared to that of the models shown in the existing paper from where
the meat data set was collected and along with this, the study addressed the misclassification
cost, an evalutation metric proposed by the original paper, which was
lowered by many folds compared to the exisiting misclassification cost of the original
paper. This research highlights that image data by mobile or obtained on accessible
platform with AI can facilitate fast, dependable food safety testing and aid food
quality inspection in supply chains.
Description
This thesis is submitted in partial fulfillment of the requirements for the degree of Bachelor of Science in Computer Science and Engineering, 2026.
Cataloged from PDF version of thesis.
Includes bibliographical references (pages 68-71).
Cataloged from PDF version of thesis.
Includes bibliographical references (pages 68-71).
Publisher Link
Type
Thesis
Creative Commons license

Except where otherwise noted, this item's license is described as
Attribution-NonCommercial-NoDerivatives 4.0 International