3 3 months ago

Weight Manager AI Auto Analyze Assistant

tools 3b 8b

3 months ago

8a4814df28cd · 2.0GB ·

llama
·
3.21B
·
Q4_K_M
<|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 {{ if .System }}{{
LLAMA 3.2 COMMUNITY LICENSE AGREEMENT Llama 3.2 Version Release Date: September 25, 2024 “Agreemen
**Llama 3.2** **Acceptable Use Policy** Meta is committed to promoting safe and fair use of its tool
You are a nutrition analysis AI specialized in food macro calculation. Your ONLY job is to analyze f
{ "num_ctx": 4096, "repeat_penalty": 1.2, "stop": [ "<|im_start|>", "<|i

Readme

Weight Manager - AI Nutrition Analysis Model

A specialized AI model for automatic nutrition analysis and macro calculation from food descriptions.

Model Overview

This model is specifically fine-tuned for nutrition analysis, designed to extract accurate nutritional information from natural language food descriptions. It powers the AI auto-tracking feature in the Weight Manager application.

Key Features

  • Accurate Macro Calculation: Precisely estimates protein, calories, carbohydrates, and fat content
  • Portion Size Intelligence: Understands standard serving sizes and portion descriptions
  • Cooking Method Awareness: Accounts for different preparation methods (grilled, fried, baked, etc.)
  • Comprehensive Food Recognition: Recognizes thousands of foods, ingredients, and preparations
  • Structured JSON Output: Returns consistent, machine-readable nutrition data

Usage

Basic Usage

# Pull the model
ollama pull pranavverma/weight-manager:3b

# Run a simple analysis
ollama run pranavverma/weight-manager:3b "2 scrambled eggs with buttered toast and a banana"

Expected Output Format

The model returns structured JSON with nutritional information:

{
  "log_protein": 18.5,
  "log_calories": 420.0,
  "log_carbs": 45.2,
  "log_fat": 16.8,
  "notes": "2 scrambled eggs with buttered toast and banana"
}

Example Prompts and Responses

Breakfast Example

Input: "Two scrambled eggs with one slice of buttered whole wheat toast"

Output:

{
  "log_protein": 14.5,
  "log_calories": 320.0,
  "log_carbs": 18.0,
  "log_fat": 22.0,
  "notes": "2 scrambled eggs with buttered whole wheat toast"
}

Lunch Example

Input: "Large chicken caesar salad with croutons and parmesan cheese"

Output:

{
  "log_protein": 35.0,
  "log_calories": 470.0,
  "log_carbs": 12.0,
  "log_fat": 32.0,
  "notes": "Large chicken caesar salad with croutons and dressing"
}

Dinner Example

Input: "Grilled salmon fillet with steamed broccoli and brown rice"

Output:

{
  "log_protein": 42.0,
  "log_calories": 450.0,
  "log_carbs": 35.0,
  "log_fat": 18.0,
  "notes": "Grilled salmon with steamed broccoli and brown rice"
}

Integration with Weight Manager App

This model is designed to work seamlessly with the Weight Manager application. When integrated:

  1. Users describe their meals in natural language
  2. The model analyzes the description and extracts nutrition data
  3. Results are presented for review and editing
  4. Data is automatically logged to the nutrition tracking system

API Integration

The Weight Manager app uses this model through the following endpoint:

POST /api/analyze-nutrition
{
  "description": "food description here",
  "mealType": "breakfast|lunch|dinner|snack"
}

Best Practices for Accurate Results

Be Specific About Portions

  • ✅ “2 medium eggs” instead of “some eggs”
  • ✅ “1 cup of rice” instead of “rice”
  • ✅ “6 oz chicken breast” instead of “chicken”

Include Cooking Methods

  • ✅ “grilled chicken” vs “fried chicken”
  • ✅ “steamed vegetables” vs “sautéed vegetables”
  • ✅ “baked potato” vs “french fries”

Mention Added Fats and Sauces

  • ✅ “salad with olive oil dressing”
  • ✅ “toast with butter”
  • ✅ “pasta with cream sauce”

Provide Context

  • ✅ “large restaurant portion” vs “small home portion”
  • ✅ “breakfast smoothie” vs “post-workout protein shake”

Model Specifications

  • Base Model: Llama 3.2 3B
  • Specialization: Nutrition analysis and macro calculation
  • Training Data: Comprehensive food database with nutritional information
  • Output Format: Structured JSON
  • Accuracy: Optimized for common foods and standard portions
  • Model Size: ~2GB

System Requirements

  • RAM: Minimum 8GB (16GB recommended)
  • Storage: 4-8GB free space
  • CPU: Modern multi-core processor
  • OS: Linux, macOS, or Windows with Ollama support

Limitations

  • Most accurate with common foods and standard preparations
  • Estimates may vary for highly processed or restaurant foods
  • Regional food variations may not be fully captured
  • Complex multi-ingredient dishes may require detailed descriptions

Use Cases

  • Personal Nutrition Tracking: Log daily food intake automatically
  • Diet Planning: Analyze meal nutrition before preparation
  • Health Applications: Integrate nutrition analysis into health apps
  • Research: Automate nutrition data collection for studies
  • Meal Planning Services: Provide instant nutrition facts

Installation and Setup

With Weight Manager App

  1. Install Ollama: https://ollama.ai
  2. Pull the model: ollama pull pranavverma/weight-manager
  3. Start Ollama: ollama serve
  4. Configure the Weight Manager app to use this model

Standalone Usage

# Install Ollama
curl -fsSL https://ollama.ai/install.sh | sh

# Pull the model
ollama pull pranavverma/weight-manager

# Run the model
ollama run pranavverma/weight-manager

Model Performance

  • Response Time: 2-5 seconds for most queries
  • Accuracy: 85-95% for common foods and portions
  • Consistency: Reliable JSON output format
  • Memory Usage: ~2-4GB during inference

License and Usage

This model is released under the same license as the Weight Manager application. It’s free to use for personal and commercial applications.

Contributing and Feedback

For issues, improvements, or feedback: - GitHub: Weight Manager Repository - Model Issues: Report through the Weight Manager GitHub issues - Feature Requests: Submit via GitHub or contact the maintainer

Related Projects

  • Weight Manager App: Full nutrition and fitness tracking application
  • Nutrition Database: Comprehensive food nutrition information
  • Health Tracking Tools: Integration with popular health platforms

Developed by: Pranav Verma
Repository: https://github.com/PranavVerma-droid/Weight
App Documentation: See README.md in the Weight Manager repository