Skip to content

WeCode-Community-Dev/foodsnap-ai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 

Repository files navigation

FoodSnap AI - Hackathon Project

πŸŽ‰ 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.

Table of Contents

  1. Project Overview
  2. Why This Project?
  3. Scope & Implementation Freedom
  4. Key Objectives / Potential Features
  5. Helpful Resources & APIs
  6. Getting Started: Git & Submission Workflow
  7. What to Include in Your Submission
  8. Judging Criteria (General Pointers)

Project Overview

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.

Why This Project?

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!

Project Scope & Implementation Freedom

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.

Key Objectives / Potential Features

  1. Image Input: The system must accept an image of food as input.
  2. 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.
  3. Calorie Estimation: Based on the identified food, estimate its total calories.
  4. Macronutrient Breakdown (Bonus): If possible, also estimate protein, carbohydrates, and fats.
  5. Portion Size Consideration (Advanced Bonus): Accurately estimating portion size from an image is challenging but would be a significant enhancement.
  6. User Interface (for non-CLI): If you're building an app or website, make it user-friendly and intuitive.
  7. Multiple Food Items (Advanced Bonus): Can your solution handle an image with multiple food items on a plate?

Helpful Resources & APIs

To get you started, here are some resources that might be useful. You are not limited to these and are encouraged to explore!

Food Image Datasets

(For training/inspiration if you go the custom ML route)

Nutrition Information Databases & APIs

(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.txt and 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.)

Machine Learning / AI Tools

  • 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).

Getting Started: Git & Submission Workflow

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

1. Fork the Repository

  • 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.

2. Clone Your Forked Repository

  • 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:
    git clone https://github.com/YOUR_USERNAME/foodsnap-ai.git
    cd foodsnap-ai
    (Replace YOUR_USERNAME with your actual GitHub username.)

3. Create a New Branch

  • It's crucial to work on a new branch rather than directly on main or master.
  • Choose a descriptive branch name, for example, feature/your-team-name or solution-john-doe.
  • In your terminal, inside the foodsnap-ai directory, run:
    git checkout -b feature/your-team-name
    (e.g., git checkout -b feature/awesome-coders or git checkout -b solution-jane-doe)
  • You are now on your new branch. Verify by running git branch.

4. Develop Your Project

  • 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

5. Push Your Branch to Your Fork

  • When you're ready to save your progress to your remote fork on GitHub, push your branch:
    git push origin feature/your-team-name
    (Replace feature/your-team-name with 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.

6. Submit Your Project (Create a Pull Request)

  • 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-name had 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 (or master, whichever is the default for this repository)
    • Head repository: YOUR_USERNAME/foodsnap-ai
    • Compare branch: feature/your-team-name (your development branch)
  • 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".

What to Include in Your Submission

(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's README.md (different from this main hackathon README.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.example file 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).

Judging Criteria (General Pointers)

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.md and 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

About

Find your calories just from a snap

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published