Hackaday Prize Entry: Detecting Adulterated Food Using AI

Adulterated food detection

Adulterated food is food that has a substance added to it to save on manufacturing costs. It can have a negative effect, it can reduce the food’s potency or it can have no effect at all. In many cases it’s done illegally. It’s also a widespread problem, one which [G. Vignesh] has decided to take on as his entry for the 2017 Hackaday Prize, an AI Based Adulteration Detector.

On his hackaday.io Project Details page he outlines some existing methods for testing food, some which you can do at home: adulterated sugar may have chalk added to it, so put it in water and the sugar will dissolve while the chalk will not. His approach is to instead take high-definition photos of the food and, on a Raspberry Pi, apply filters to them to reveal various properties such as density, size, color, texture and so on. He also mentions doing image analysis using a deep learning neural network. This project touches us all and we’ll be watching it with interest.

If all this talk of adulterated food makes you nervous about your food supply then consider growing our own, hacker style. One such project we’ve seen here on Hackaday is Farmbot, an open-source CNC farming robot. Another such is MIT’s OpenAg Food Computer, a robotic control and monitoring growing chamber.

17 thoughts on “Hackaday Prize Entry: Detecting Adulterated Food Using AI

  1. At first i thought this was a project aimed at detecting the sort of contaminants that might be added to food by disgruntled fast foox workers. That would make for a very usefull phone app!

      1. I would hazard a guess that this “fake rice” was really a fragrant short grain rice, which would have an unexpected smell raw and be very starchy and sticky when cooked up.
        It would have seemed “strange and fake” to some-one who has never seen something like fragrant sushi rice.

    1. Nah man, nutrient depletion from soils, nutritional tables are mostly based on dept of Agriculture tables from the 1960s and those soils have had 50 more years of crops sucking out the potassium, magnesium, calcium, iodine and other bulk and trace nutrients.

  2. Judging by the examples, [Milk, ghee, mustard oil, turmeric, dal] there may be a serious problem with food adulteration in India. Or maybe a serious problem with people *believing* there’s such a problem. Please forgive me if I fail to be kindly constructive.

    Doing science is fun, but baseless assertions are not fun.
    The “Magnetic breakfast cereal” (google if unfamiliar) test shows that there’s iron in my cereal. It must be there because evil people want to adulterate my food!

    Chalk is Calcium carbonate (CaCO3) and is used as an antacid (TUMS) and also a perfectly legal (US) anticaking agent, even for sugar. However, Metanil Yellow seems to be a real problem. Pubchem says it’s pretty bad. According to one pubmed abstract “Metanil yellow is the principal non-permitted food colour used extensively in India.” This tells me people may really want a simple test for Metanil Yellow, but I worry about the underinformed or desperate. See also: weight gain, hair loss, cancer/disease cure, quick wealth, and everything about penises (wow, men are insecure!)

    I’m also skeptical about the project itself. I can imagine an AI+camera to be able to identify crystal powders, maybe by how they scatter or sparkle or something. I have a hard time believing a camera can do much for milk or beans. It would take a lot to convince me that a camera can detect density.

    Maybe start with smaller projects? How about training a neural network to distinguish between salt and sugar crystals, then work up from there?

    TL;DR:
    Thanks for trying to make the world better, but please don’t fall into the easy trap of reinventing quackery.

    1. Agreed. If it were possible to easily and reliably determine the density of liquids using cameras, winemakers and brewers would almost certainly be the ones to discover it, and probably would already have done so if it were possible

  3. I work in the food industry and a lot of this type of “detection” is looking for materials on the borderline between necessary additives/ingredients and adulteration with undeclared ingredients. There are bigger challenges, such as those food ingredients that are outright fakes.

    If you want to go after “adulterated” foods go after the big players: Seafood (much of it is mislabeled, but it requires DNA testing to tell the difference), Olive oil (much of that is not from olives and it’s very difficult to tell the difference even with good analytical equipment – the Italians keep working on this since it’s an important part of the economy) or something simple like paprika, nearly all of which comes from huge farms in China, despite the label on the can.

  4. This has already been done. IMEC which is into hyperspectral imaging has integrated with the CMOSIS sensors their hyperspectral filter and created very compact cameras for detection.

Leave a Reply to Jeff NMECancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.