Example of the Chrome Browser Extension
Food Analyzer displaying the calories of specific ingredients in the recipe
As busy college students who enjoy cooking, we often turn to the Internet for recipes. We realized that in our effort to be healthy, we'd end up forgoing our favorite recipes in favor of healthier alternatives. However, we decided that it would be helpful for others like us to create an extension that displayed calorie breakdown of ingredients, allowing us to pinpoint the most unhealthy portions and find a healthier alternative. This quick solution allows us to keep cooking our favorite foods all while eating healthy.
We decided to develop the Food Analyzer extension in order to make it easier for users to gain access to nutritional information while they are browsing online, obtaining information such as the calorie-count instantaneously without leaving the page. This has great potential for enhancing web-page browsing online, as this can be expanded to countless other categories that could benefit from immediate recovery of information.
What it does
Food Analyzer is a Chrome extension that uses web scrapers, machine learning, and natural language processing to instantaneously obtain relevant nutritional information for recipes and ingredients seen online. It allows the user to identify unhealthy ingredients and make alternative decisions.
How we built it
There were multiple parts during the development of this project. One of the main parts was the Chrome Extension--built with HTML/CSS/JS--that would continuously run in the background and analyze the contents of the recipes seen online.
This was done through a web scraper, created using Python, BeautifulSoup and Scrapy, that would aggregate information like the calorie count from the USDA Food Composition Database.
In order to link the Chrome extension with nutrient information, we wrote another web scraper to access ingredients and used the Google Cloud Platform's Natural Language Processing API to analyze and categorize the relevant nutritional information.
Challenges we ran into
We ran into various challenges with the web scraper and with configuring the Natural Language Processing API for the Google Cloud Platform. We also ran into problems while trying to get the Chrome Browser Extension working on our webpages.
Accomplishments that we're proud of
We felt extremely accomplished when we were able to successfully use the Natural Language Processing API to analyze the gathered nutritional information, as we felt that using machine learning was an efficient and intelligent solution for this extension. Another aspect that we are proud of is the web scraper that we created to browse the USDA Database, as it was the first time many of us used web scraping within an application.
What we learned
Machine learning and natural language processing were topics that many of us encountered for the first time and were definitely extremely important for us to learn. We also delved into new APIs, packages, and frameworks like Beautiful Soup, Scrapy, and Flask while building Chrome extensions for the first time.
What's next for Food Analyzer
In the future, we plan to expand this service beyond recipes and ingredients into different fields, such as for revealing information about medicine seen online or for any types of objects on web pages. We believe that there is great potential for this extension and that it can benefit the browsing experience of countless users.