π Welcome to the FoodSnap AI Hackathon! π
Get ready to combine your coding skills with the fascinating world of artificial intelligence and nutrition! We're excited to see what innovative solutions you come up with.
The Challenge: Your mission, should you choose to accept it, is to develop a solution that can estimate the caloric content (and ideally, macronutrient breakdown β protein, carbs, fats) of a food item from an input image.
- Project Overview
- Why This Project?
- Scope & Implementation Freedom
- Key Objectives / Potential Features
- Helpful Resources & APIs
- Getting Started: Git & Submission Workflow
- What to Include in Your Submission
- Judging Criteria (General Pointers)
Project Name: FoodSnap AI
The Challenge: Develop a solution that can estimate the caloric content (and ideally, macronutrient breakdown β protein, carbs, fats) of a food item from an input image.
Understanding calorie intake is crucial for health and fitness. Manually logging food can be tedious. FoodSnap AI aims to simplify this process, making nutritional awareness more accessible to everyone. Imagine snapping a photo of your meal and instantly getting its nutritional information!
You have complete freedom in how you bring FoodSnap AI to life!
- Platform: Mobile App (iOS, Android, cross-platform), Web App, Website, or even a Command Line Interface (CLI) tool.
- Technology Stack: Use any programming languages, frameworks, libraries, or APIs you prefer. Python, JavaScript, Java, Swift, Kotlin, Ruby, Go β the choice is yours!
- Approach: You can use pre-trained machine learning models, train your own, leverage existing food recognition APIs, or come up with a completely novel approach.
- Image Input: The system must accept an image of food as input.
- Food Identification (Implicit or Explicit): The system needs to identify the food item(s) in the image. This could be a direct output or an internal step.
- Calorie Estimation: Based on the identified food, estimate its total calories.
- Macronutrient Breakdown (Bonus): If possible, also estimate protein, carbohydrates, and fats.
- Portion Size Consideration (Advanced Bonus): Accurately estimating portion size from an image is challenging but would be a significant enhancement.
- User Interface (for non-CLI): If you're building an app or website, make it user-friendly and intuitive.
- Multiple Food Items (Advanced Bonus): Can your solution handle an image with multiple food items on a plate?
To get you started, here are some resources that might be useful. You are not limited to these and are encouraged to explore!
(For training/inspiration if you go the custom ML route)
- Food-101: https://data.vision.ee.ethz.ch/cvl/datasets_extra/food-101/ (101 food categories, 101,000 images)
- UECFood-100 / UECFood-256: http://foodcam.mobi/dataset.html (Japanese food primarily, good for object detection)
- Recipe1M+: http://pic2recipe.csail.mit.edu/ (Images and recipes)
- Google Images / Flickr: Can be used for scraping specific food images (be mindful of terms of service).
(For calorie/macro lookup)
- USDA FoodData Central API: https://fdc.nal.usda.gov/api-guide.html (Comprehensive US food composition database)
- Edamam Food Database API: https://developer.edamam.com/food-database-api (Offers free tier for recipe analysis and food database lookup)
- Spoonacular API: https://spoonacular.com/food-api (Nutrition, recipes, food products, free tier available)
- MyFitnessPal / CalorieKing / FatSecret: While direct API access might be limited or paid, these websites are excellent sources for manual data collection or understanding how nutritional information is presented. Web scraping could be an option, but always respect
robots.txtand terms of service. - Open Food Facts: https://world.openfoodfacts.org/ (A collaborative, free, and open database of food products from around the world. They have an API.)
- TensorFlow / Keras: For building and training custom models.
- PyTorch: Another popular deep learning framework.
- OpenCV: For image processing tasks.
- Pre-trained Image Recognition Models: (e.g., MobileNet, ResNet, InceptionV3 available via TensorFlow Hub, PyTorch Hub, etc.) These can often be fine-tuned for food recognition.
- Cloud AI Services: Google Cloud Vision AI, AWS Rekognition, Azure Computer Vision (these often have free tiers for experimentation and can perform object/food recognition out-of-the-box).
We will be using GitHub for version control and submission. Please follow these steps carefully.
This Repository (Main Project): https://github.com/WeCode-Community-Dev/foodsnap-ai
- Go to the main project repository:
https://github.com/WeCode-Community-Dev/foodsnap-ai - In the top-right corner of the page, click the "Fork" button.
- This will create a copy of the repository under your own GitHub account (e.g.,
https://github.com/YOUR_USERNAME/foodsnap-ai). This is your personal remote copy.
- On your GitHub page for your forked repository (
https://github.com/YOUR_USERNAME/foodsnap-ai), click the green "Code" button. - Copy the HTTPS or SSH URL.
- Open your terminal or Git client and run:
(Replace
git clone https://github.com/YOUR_USERNAME/foodsnap-ai.git cd foodsnap-aiYOUR_USERNAMEwith your actual GitHub username.)
- It's crucial to work on a new branch rather than directly on
mainormaster. - Choose a descriptive branch name, for example,
feature/your-team-nameorsolution-john-doe. - In your terminal, inside the
foodsnap-aidirectory, run:(e.g.,git checkout -b feature/your-team-name
git checkout -b feature/awesome-codersorgit checkout -b solution-jane-doe) - You are now on your new branch. Verify by running
git branch.
- Start coding! Add your files, write your logic, and build your FoodSnap AI solution.
- Commit your changes frequently with clear commit messages:
# Stage all new and modified files git add . # Or stage specific files # git add path/to/your/file.py path/to/another/file.js # Commit your changes git commit -m "feat: Implement image upload functionality" # Example commit types: feat, fix, docs, style, refactor, test, chore
- When you're ready to save your progress to your remote fork on GitHub, push your branch:
(Replace
git push origin feature/your-team-name
feature/your-team-namewith your actual branch name.) - If it's the first time pushing this branch, Git might suggest a command like
git push --set-upstream origin feature/your-team-name. Use that command.
- Once your project is complete (or at a submittable stage), go to your forked repository on GitHub (
https://github.com/YOUR_USERNAME/foodsnap-ai). - You should see a prompt saying "
feature/your-team-namehad recent pushes". Click the "Compare & pull request" button. - If you don't see the prompt, go to the "Pull requests" tab and click "New pull request".
- Crucially, ensure the settings are:
- Base repository:
WeCode-Community-Dev/foodsnap-ai - Base branch:
main(ormaster, whichever is the default for this repository) - Head repository:
YOUR_USERNAME/foodsnap-ai - Compare branch:
feature/your-team-name(your development branch)
- Base repository:
- Write a clear title and a detailed description for your Pull Request (PR). Include:
- A brief overview of your solution.
- Technologies used.
- How to run/test your project (setup, commands, etc.).
- Any known issues or limitations.
- A link to a live demo if applicable (e.g., Heroku, Netlify, GitHub Pages).
- Screenshots or a short video showcasing your project can be very helpful!
- Click "Create pull request".
(In your project's directory, pushed to your branch and included in the PR)
- Source Code: All the code for your project.
README.md(Your Project's README): This is very important! Your project'sREADME.md(different from this main hackathonREADME.md) should include:- Project Title & Team Name/Members (if applicable).
- A brief description of your FoodSnap AI solution.
- What features you implemented.
- Tech stack used.
- Clear instructions on how to set up and run your specific project locally. This includes dependencies, environment variables, build steps, and run commands.
- Any API keys or environment variables needed (explain how to get them, but DO NOT COMMIT ACTUAL KEYS to the repository). Use a
.env.examplefile to show what's needed. - Link to a live demo (if any).
- (Optional but Recommended) A short demo video or presentation slides (you can link these in your PR description or in your project's README).
While specific criteria might be announced, generally projects are evaluated on:
- Functionality: Does it work as intended? Does it achieve the core goal of calorie estimation from an image?
- Accuracy: How close are the calorie/macro estimations? (We understand this is complex!)
- Innovation & Creativity: Did you come up with a unique approach or an interesting feature?
- Technical Implementation: Quality of code, choice of technology, and complexity handled.
- User Experience (UX/UI): If applicable, is the application easy and pleasant to use?
- Presentation/Demo: How well you explain and showcase your project.
- Adherence to Submission Guidelines: Including a good project
README.mdand following the Git workflow.
Good luck, innovators! We can't wait to see your FoodSnap AI creations. Remember to have fun, learn, and collaborate!
Happy Hacking! The WeCode Community Dev Team