Food doesn’t always come with an ingredients label, but sometimes — when you’ve got an allergy, for instance, or if you’re dying to make a restaurant dish at home — it sure would come in handy. MIT and QCRI researchers are trying to make that a possibility with Pic2Recipe, an artificial intelligence system designed to pick out a food’s ingredients and recipe with just a photo.
Flour, Butter, and Sugar
They’re not the first to attempt such a feat. In 2014, Danish researchers used a dataset of 101,000 images to create an algorithm that eventually was able to identify food with 80 percent accuracy, but never got beyond that. Researchers at the City University of Hong Kong created such a system with 110,000 images and 65,000 recipes, and while it works fine, it’s only Chinese cuisine.
Researchers from MIT’s Computer Science and Artificial Intelligence Laboratory (CSAIL) teamed up with the Qatar Computing Research institute to take this a little further. They used sites like Allrecipes.com and Food.com to amass a giant database of 800,000 images and more than 1 million recipes covering a wide range of dishes. Then they let a neural network loose on them to make connections between the recipes, their photos, and their ingredients lists.
Once it was done learning, Pic2Recipe could look at a picture of sugar cookies and successfully name eight out of its 11 ingredients. In fact, it did particularly well with baked goods, since the recipe sites had baking as a central focus. For more ambiguous dishes that could have a range of ingredients, like sushi rolls and smoothies, it didn’t do as well, but the researchers are still working out the kinks. In the future, Pic2Recipe could start picking out nuances like preparation style (fresh vs. cooked tomatoes, for example) or certain variations on individual ingredients (white mushrooms vs. portabella). For now, the team has created an online version to let users try it on their own.
Photographing your food just got useful
As systems like this get more advanced, the possibilities are huge. You could stealthily steal Susan’s lasagna recipe at the potluck, sure, but you might also be able to know whether Evan’s cookies have any allergens. You could track the nutrition in your food with a snap of your camera, or even take a picture of the stuff in your fridge to get a customized recommendation for what to make for dinner tonight. Pic2Recipe is in its early stages right now, but researchers are working hard to make all of the those potentials a reality.