Skip to content
This repository has been archived by the owner on Sep 3, 2023. It is now read-only.
/ Victus Public archive

An iOS application that uses CoreML to identify nutritional information of food items

License

Notifications You must be signed in to change notification settings

lambda-shuttle/Victus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📦 ARCHIVED — Victus

👉 Update

Hello there! 👋 Further development on this project has ceased; well, unless the forks say otherwise. Please note that most, if not all, of the code in this repository was written in the "hackathon rush". Thus, the codebase does not adhere to well-known industry practices and/or standards - it's quite messy (as expected for short-term rapid prototyping). Please do not consider this codebase as an example of representative work from any of the contributors. 😀


Latin translation: 'that which sustains life'

Victus is an iOS application that provides nutritional information of food items, coupled with recipe suggestions for vegan, sustainable, and immunity-boosting alternatives. The app was developed in collaboration with Archit Soni and Siddhant Sharma as a submission for Oxford Hack 2020.

Inspiration

Eating habits have always had an impact not only on our immunity but also on our environment. Lockdowns have only made these habits worse. To this end, we set to develop Victus - an iOS application that provides the nutritional information of food items while informing the user of sustainable and immunity-boosting alternatives.

Changing eating habits is crucial for sustainability since, according to an Oxford University study, one can reduce one's carbon footprint by 73% by switching to a vegan diet! Further, as noted by Dr Deanna Minich, food items that help boost immunity could help one in COVID-19 prevention and recovery.

Function

Victus enables the user to capture an image of a food item and uses a machine learning model to classify it. Then, it makes a few API calls to Edamam to extract nutritional information — calories, protein, fat, carbohydrates, and fibres — and inform the user with environmentally-sustainable recipes, which include vegan, immunity-boosting, and keto alternatives.

Construction

The original plan was to create Victus using React Native and Python Flask. However, we pivoted to building an iOS application using Swift to better take advantage of native tools available to developers such as CoreML and SwiftUI. We build the user interface primarily using SwiftUI and used the Food101 CoreML model to classify the food item. Image transformation helpers were used to scale the captured image to the dimensions required by the model. The model's output result was then parsed and sent over to the Edamam Food Database via an API call to obtain the required information. This is then displayed to the user through a dismissable modal sheet.

Challenges

The challenges we faced were in regards to connecting and sending data between the third-party tools we chose to use. Specifically, extracting the data received through the Edamam API call proved to be a challenge. Through experimentation, however, we figured it out just a few hours before the hackathon deadline! Other minor challenges included the resizing and cropping of the image and familiarising ourselves with Swift and Xcode in general. We can't deny that Apple's documentation and a few posts on Stack Overflow, which are listed below, saved us quite a lot of time.

Accomplishments

All members of our team are not only passionate about technology but also about using it to aid in pressing social issues facing society today. Through the course of the hack, our team gained significant experience in rapid prototyping and development, and we believe that this was our most significant accomplishment. And although Victus is primitive as a functional application, it made us realise the meaningful impact of apps that promote environmental-sustainability and healthy living. We're also quite pleased that we incorporated a 'fact-finding' mission in our development cycle, which ultimately provided the app purpose. We identified that our daily diets have an impact on greenhouse gas emissions than transportation and that a vegan diet was the most sustainable option! We're proud to be able to create a solution that helps educate users on making the right choice for their health and our environment.

Reflection

Building Victus has been a valuable learning opportunity for the entire team. With the team being relatively new to mobile app development and machine learning, we gained quite a bit of experience in connecting the dots. We believe that such experiences broaden the scope of our development knowledge and help us adapt to a wide range of challenging situations.

Future

Although our team is composed of students working under strict academic schedules, we do plan to continue the development of Victus for iOS as an opportunity to understand the 'quirks and features' of iOS development. We intend to add more features to the app, such as an option to upload an image and the ability to provide allergy information.

References

Oxford Hack Submission Video: YouTube
Devpost Project: Devpost

Stack Overflow

Other

About

An iOS application that uses CoreML to identify nutritional information of food items

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages