Create a Calorie Counting App for the Holidays

Kevin Gong
IBM watsonx Assistant
2 min readNov 22, 2017

With the holidays just around the corner, it’s easy to lose track of healthy eating habits when faced with heavy homemade meals and endless desserts. Part of the challenge, too, is the cumbersome process of needing to look up every dish in a food database to figure out its nutritional contents. Thanks to the Watson Visual Recognition API service however, it’s easier than ever to quickly snap a photo of a tempting bite and see if it fits into your diet plan.

Since launching the food model (beta) as part of Watson Visual Recognition, we’ve received heavy interest from users regarding its applications toward calorie counting and nutrition analysis. With over 2,200 food-centric tags in its vocabulary, the food model is perfectly suited to replace the arduous and manual process of food logging with automatic food identification using image recognition.

Today, we’re excited to announce a new code pattern that allows you to create your own calorie counting app for Android! When users take a photo with this mobile app, the image is first sent to Watson Visual Recognition’s food model to be identified. The resulting tags are then matched to corresponding database entries in Nutritionix, the world’s largest verified nutrition database, to provide users with information regarding calories, serving sizes, and total fat.

As with all IBM code patterns, you can find the code and step-by-step instructions on the project’s Github repository. For visual learners, we also provide a video walkthrough for getting set up with your app.

Already built this project? Working on your own Watson apps? Let us know about any fun Watson projects you’ve put together in the comments below — we may feature you in our future posts!

You can find more details on the project’s code pattern page and get started with Watson Visual Recognition through IBM Cloud.

--

--

Kevin Gong
IBM watsonx Assistant

Product manager @IBMWatson. Photographer. UX/UI designer. DIYer. Data tinkerer. Social good supporter. Formerly @McKinsey, @TEDx, @Cal, @ColumbiaSIPA