NutriVision : harnessing AI for personalized healthy food recommendations
Holappa, Aleksi; Myllymäki, Ossi; Sotaniemi, Jere (2025-06-06)
Holappa, Aleksi
Myllymäki, Ossi
Sotaniemi, Jere
A. Holappa; O. Myllymäki; J. Sotaniemi
06.06.2025
© 2025 Aleksi Holappa, Ossi Myllymäki, Jere Sotaniemi. Ellei toisin mainita, uudelleenkäyttö on sallittu Creative Commons Attribution 4.0 International (CC-BY 4.0) -lisenssillä (https://creativecommons.org/licenses/by/4.0/). Uudelleenkäyttö on sallittua edellyttäen, että lähde mainitaan asianmukaisesti ja mahdolliset muutokset merkitään. Sellaisten osien käyttö tai jäljentäminen, jotka eivät ole tekijän tai tekijöiden omaisuutta, saattaa edellyttää lupaa suoraan asianomaisilta oikeudenhaltijoilta.
Julkaisun pysyvä osoite on
https://urn.fi/URN:NBN:fi:oulu-202506064191
https://urn.fi/URN:NBN:fi:oulu-202506064191
Tiivistelmä
A balanced diet is crucial for human well-being, yet accurately tracking daily nutritional intake and receiving personalized dietary guidance presents rather signifcant challenges. This thesis introduces NutriVision, a web-based application designed to simplify nutritional management and encourage healthier eating habits through the integration of artifcial intelligence.
NutriVision features a React frontend for an intuitive user experience and an Express.js backend for robust server-side logic and secure API communication. Its core functionality depends on image-based food recognition, which utilizes the Clarifai model to identify food items from images uploaded by the user. These identifed food items are then cross-referenced with the Fineli dataset via a Flask API to retrieve as precise macronutrient information as possible. For detailed nutritional analysis, personalized dietary advice and recipe suggestions, the application leverages locally deployed Large Language Models (LLMs), specifcally a customized version of Llama3.1 model managed by Ollama. This setup prioritizes user privacy, cost-effectiveness, and effortless model customization.
A critical aspect of NutriVision’s development involves extensive prompt engineering and an iterative refnement process to ensure the LLM’s adherence to persona, conversational fow, and accurate handling of data. The system employs a multi-model strategy for tasks like focused information extraction from user input, alongside a MongoDB database for persistent storage of user profles and chat history. Robust security measures, including JSON Web Token (JWT) authentication and password encryption, ensure the safety of user information. The application is deployed on CSC’s Rahti and Pouta services for a robust and production-ready system.
Testing demonstrated NutriVision’s ability to identify diverse food items, provide relevant nutritional insights and personalized recipe suggestions tailored to user profles, including specifc health conditions and dietary preferences. While the application successfully integrates its components, relatively high average response times and occasional food misclassifcations were identifed as areas for future improvement.
This project highlights a practical and accessible application of artifcial intelligence in health informatics, laying a strong foundation for future advancements in personalized nutrition applications.
NutriVision features a React frontend for an intuitive user experience and an Express.js backend for robust server-side logic and secure API communication. Its core functionality depends on image-based food recognition, which utilizes the Clarifai model to identify food items from images uploaded by the user. These identifed food items are then cross-referenced with the Fineli dataset via a Flask API to retrieve as precise macronutrient information as possible. For detailed nutritional analysis, personalized dietary advice and recipe suggestions, the application leverages locally deployed Large Language Models (LLMs), specifcally a customized version of Llama3.1 model managed by Ollama. This setup prioritizes user privacy, cost-effectiveness, and effortless model customization.
A critical aspect of NutriVision’s development involves extensive prompt engineering and an iterative refnement process to ensure the LLM’s adherence to persona, conversational fow, and accurate handling of data. The system employs a multi-model strategy for tasks like focused information extraction from user input, alongside a MongoDB database for persistent storage of user profles and chat history. Robust security measures, including JSON Web Token (JWT) authentication and password encryption, ensure the safety of user information. The application is deployed on CSC’s Rahti and Pouta services for a robust and production-ready system.
Testing demonstrated NutriVision’s ability to identify diverse food items, provide relevant nutritional insights and personalized recipe suggestions tailored to user profles, including specifc health conditions and dietary preferences. While the application successfully integrates its components, relatively high average response times and occasional food misclassifcations were identifed as areas for future improvement.
This project highlights a practical and accessible application of artifcial intelligence in health informatics, laying a strong foundation for future advancements in personalized nutrition applications.
Kokoelmat
- Avoin saatavuus [38506]