| ---
|
| license: mit
|
| tags:
|
| - health
|
| - fitness
|
| - calorie-prediction
|
| - tensorflow
|
| - wellness
|
| datasets:
|
| - synthetic
|
| metrics:
|
| - mae
|
| - rmse
|
| library_name: tensorflow
|
| pipeline_tag: tabular-regression
|
| ---
|
|
|
| # 🏃♂️ VitaMind AI - Calorie Goal Predictor
|
|
|
| **Personalized daily calorie recommendations using AI**
|
|
|
| ## Model Description
|
|
|
| VitaMind AI predicts optimal daily calorie intake based on:
|
| - Demographics (age, gender, height, weight)
|
| - Activity metrics (steps, heart rate)
|
| - Lifestyle factors (sleep, stress, mood)
|
| - Activity level (sedentary to athlete)
|
|
|
| ## Performance
|
|
|
| - **MAE**: 75 kcal
|
| - **RMSE**: 95 kcal
|
| - **MAPE**: 3.2%
|
| - **R² Score**: 0.89
|
|
|
| ## Quick Start
|
|
|
| ```python
|
| from huggingface_hub import hf_hub_download
|
| import tensorflow as tf
|
| import joblib
|
| import numpy as np
|
|
|
| # Download model
|
| model = tf.keras.models.load_model(
|
| hf_hub_download(repo_id="developerPratik/vitamind-calorie-predictor", filename="model.keras")
|
| )
|
| scaler = joblib.load(
|
| hf_hub_download(repo_id="developerPratik/vitamind-calorie-predictor", filename="scaler.joblib")
|
| )
|
| encoders = joblib.load(
|
| hf_hub_download(repo_id="developerPratik/vitamind-calorie-predictor", filename="encoders.joblib")
|
| )
|
|
|
| # Example prediction
|
| user_data = {
|
| 'age': 30, 'weight': 75, 'height': 175, 'steps': 8000,
|
| 'heart_rate': 72, 'sleep_hours': 7.5, 'stress_level': 4,
|
| 'activity_level': 'Active', 'gender': 'M', 'mood': 'happy'
|
| }
|
|
|
| # Feature engineering
|
| bmi = user_data['weight'] / ((user_data['height'] / 100) ** 2)
|
| good_sleep = 1 if user_data['sleep_hours'] >= 7 else 0
|
| high_stress = 1 if user_data['stress_level'] >= 7 else 0
|
| activity_scores = {'Sedentary': 1, 'Lightly Active': 2, 'Active': 3, 'Very Active': 4, 'Athlete': 5}
|
|
|
| # Encode
|
| activity_encoded = encoders['activity_level'].transform([user_data['activity_level']])[0]
|
| gender_encoded = encoders['gender'].transform([user_data['gender']])[0]
|
| mood_encoded = encoders['mood'].transform([user_data['mood']])[0]
|
|
|
| # Create feature vector (14 features)
|
| features = np.array([[
|
| user_data['age'], user_data['weight'], user_data['height'],
|
| user_data['steps'], user_data['heart_rate'], user_data['sleep_hours'],
|
| user_data['stress_level'], bmi, activity_encoded, gender_encoded,
|
| mood_encoded, good_sleep, high_stress, activity_scores[user_data['activity_level']]
|
| ]])
|
|
|
| # Predict
|
| features_scaled = scaler.transform(features)
|
| calories = model.predict(features_scaled, verbose=0)[0][0]
|
| print(f"Recommended daily calories: {calories:.0f} kcal")
|
| ```
|
|
|
| ## Model Architecture
|
|
|
| ```
|
| Input (14 features)
|
| ↓
|
| Dense(256) + BatchNorm + Dropout(0.3)
|
| ↓
|
| Dense(128) + BatchNorm + Dropout(0.3) [Residual Connection]
|
| ↓
|
| Dense(128) + BatchNorm + Dropout(0.3)
|
| ↓
|
| Dense(64) + BatchNorm + Dropout(0.2)
|
| ↓
|
| Output (1 - calories)
|
| ```
|
|
|
| **Total Parameters**: ~85,000
|
|
|
| ## Features
|
|
|
| | Feature | Type | Description |
|
| |---------|------|-------------|
|
| | age | int | Age in years (18-100) |
|
| | weight | float | Weight in kg (40-150) |
|
| | height | float | Height in cm (140-220) |
|
| | steps | int | Daily steps (0-30000) |
|
| | heart_rate | int | Resting heart rate (50-120) |
|
| | sleep_hours | float | Hours of sleep (3-12) |
|
| | stress_level | int | Stress rating (1-10) |
|
| | bmi | float | Calculated BMI |
|
| | activity_level | str | Sedentary/Lightly Active/Active/Very Active/Athlete |
|
| | gender | str | M/F |
|
| | mood | str | happy/neutral/sad/anxious |
|
| | good_sleep | binary | 1 if sleep >= 7 hours |
|
| | high_stress | binary | 1 if stress >= 7 |
|
| | activity_score | int | 1-5 based on activity level |
|
|
|
| ## Limitations
|
|
|
| ⚠️ **Important Disclaimers**:
|
| - For educational/wellness purposes only
|
| - NOT a substitute for professional medical advice
|
| - Individual metabolism varies significantly
|
| - Does not account for medical conditions
|
| - Consult healthcare providers for medical decisions
|
|
|
| ## Training Details
|
|
|
| - **Framework**: TensorFlow 2.15
|
| - **Training samples**: 5,000 synthetic
|
| - **Validation split**: 15%
|
| - **Test split**: 15%
|
| - **Optimizer**: Adam (lr=0.001 with ReduceLROnPlateau)
|
| - **Loss**: MSE
|
| - **Regularization**: L2 (0.001) + Dropout + BatchNorm
|
| - **Early stopping**: Patience=30
|
|
|
| ## License
|
|
|
| MIT License - Free for commercial and personal use
|
|
|
| ## Citation
|
|
|
| ```bibtex
|
| @software{vitamind_ai_2025,
|
| author = {{Your Name}},
|
| title = {{VitaMind AI Calorie Predictor}},
|
| year = {2025},
|
| publisher = {Hugging Face},
|
| url = {{https://huggingface.co/developerPratik/vitamind-calorie-predictor}}
|
| }
|
| ```
|
|
|
| ## Contact
|
|
|
| - **Issues**: Open an issue on this model's discussion page
|
| - **Email**: your.email@example.com
|
|
|
| ---
|
|
|
| Built with ❤️ using TensorFlow and scikit-learn
|
| |