Automated Detection of Adulterated Milk using Computer Vision and Deep Learning

Local Chapter Nairobi, Kenya Chapter

Coordinated byKenya ,

Status: Completed

Project Duration: 18 Apr 2023 - 20 Jun 2023

Open Source resources available from this project

Project background.

The adulteration of milk is a problem affecting Kenyans and many people all over the world. 1, 2 The problem is that some farmers and milk vendors add illegal substances (adulterants) to milk to prolong its shelf life or increase its volume quantity.3, 4 Adulterants like soap, starch, table sugar, detergent, urea, formalin, glucose, salt, water, etc are added to milk making it lose its nutritive value, organoleptic properties, and even hazardous for human consumption. The problem is on the rise because of existing market gaps in the demand and supply of milk products and is causing a significant public health issue.

Currently, adulteration of milk is determined using test kits that are based on reagents for colour detection and laboratory chemicals for qualitative analysis. Chemicals and reagents like hydrochloric acid, methylene blue, iodine solution, phenolphthalein, sodium hypochloride, etc. are used to determine the presence of table sugar, micro-organisms, starch, soap, ammonium sulphate respectively. These chemicals and reagents are non-reused once consumed making them costly. Again it takes time to transport milk samples to laboratories for testing and even setting up several milk tests. Furthermore, the test results require skilled labour to analyze and make interpretations.

Switching from using test kits and reagents to determine the presence of adulterants in milk to an automated Artificial Intelligent data product would have significant benefits in improving milk’s demand and supply value chain as well as cost benefits.

The problem.

Determining adulteration of milk is critical in milk’s demand and supply value chain. However, the current approaches to distinguishing between adulterated milk and adulteration-free milk are constrained by the requirement of human interpretation. In addition, the current methods only measure the presence or lack of adulterants in milk but are limited in measuring the concentration levels of adulterants in the milk being tested.

Milk product has characteristics that can be extracted using computer vision and deep learning technologies and analyzed. These artificial intelligence (AI) techniques have not been widely used in analyzing milk product. An AI solution can help identify adulterated milk from adulteration-free milk with precision.

Project goals.

In this project, the Omdena Kenya, Nairobi Chapter team aims to develop a computer vision solution that detects the presence of adulterants in milk using features learned from the milk product (Deep Learning).The project's chief goal is to build an AI data tool/product for distinguishing adulterated milk from non-adulterated milk.With a duration of 8-weeks, this project aims to achieve the following: - Data collection - Data Preprocessing - Feature Extraction - Model Development and Training - Model Evaluation - App development

Project plan.

  • Week 1

    Research previous work (Literature Review)

  • Week 2

    Data Collection

  • Week 3


  • Week 4

    Feature Extraction

  • Week 5

    Model Development

  • Week 6

    Model Training

  • Week 7

    Model Evaluation

  • Week 8

    App Development

Learning outcomes.

Video and Image processing, computer vision, Video and Image Analysis, Deep Learning, Pattern Recognition, Data Science, Project Management.

Share project on: