Skip to content

This mobile application is designed for fitness and nutrition enthusiasts. It allows users to monitor their exercises (using a pose detection model), track their nutritional intake, and set personalized fitness and nutrition plans.

License

Notifications You must be signed in to change notification settings

vladduta/MyHealthFuel

Repository files navigation

banner

Overview

This project is a mobile application developed to assist users in maintaining and improving their fitness and nutritional habits. It provides tools to track physical activity and manage nutritional intake

Features

  • Activity Monitoring: Track your daily physical activities including step counting by using the built-in sensor of the mobile device
  • Nutritional Tracking: Log your meals and monitor your calorie and macronutrient intake
  • Exercise Automation: Automated counting of exercise repetitions to help precise recording of each movement
  • Personalized Plans: Create and manage custom fitness and nutrition plans tailored to your goals
  • Notifications: Receive reminders and updates to keep you on track with your meals and your fitness goals

Technologies used

  • Android Studio: For developing the Android application.
  • Firebase: Backend services including authentication, notifications and database management
  • ML Kit: Used for the pose detection, pre-trained model
  • ZXing Library: For barcode scanning to log nutritional information from scanned food items
  • Open Food Facts API: To fetch detailed nutritional information of a variaty foods from the entire world

Caloric requirement calculation (Mifflin-St. Jeor equation):

  • for men: BMR = 10 × weight (kg) + 6.25 × height (cm) - 5 × age (years) + 5
  • for women: BMR = 10 × weight (kg) + 6.25 × height (cm) - 5 × age (years) - 161
  • Weight loss: TDEE = 0.8 x BMR
  • Maintenance: TDEE = BMR
  • Weight gain: TDEE = 1.2 x BMR

Macronutrients calculation:

  • Protein: 0.8 g/kg for sedentary individuals; 1.2 g/kg for active individuals
  • Fats: 25% of total caloric intake (TDEE)
  • Carbohydrates: Remaining calories = TDEE - (protein calories + fat calories)

Calorie burn calculation during physical activity:

  • Calories burned = 3.5 × MET × weight (kg) × time (minutes) / 200

Image processing:

  • Capture frames: Using the device camera to capture the frames
  • Detect positions: Using ML Kit to detect shoulder, elbow, and wrist positions

image

Calculation of the angle between the 3 landmarks (shoulder, elbow, wrist):

  • Define vectors: Define shoulder-elbow and elbow-wrist vectors by calculating the coordinate differences

  • dx1 = x1 - x2; dy1 = y1 - y2

  • dx2 = x3 - x2; dy2 = y3 - y2

  • dot product = (dx1 × dx2) + (dy1 × dy2)

  • cos(θ) = (dot product) / (magnitude1 × magnitude2), where:magnitude = √(dx^2 + dy^2)

  • θ = arccos(cos(θ))

  • angle = θ × 180 / π

The calculated angle represents the angle between the shoulder-elbow segment and the elbow-wrist segment

A repetition is counted when the elbow angle is less than 50 degrees and the previous state was "down.

Screenshots

Navigation Graph Quiz

Navigation-graph-quiz

Fragments

HomeFragment MealFragment WorkoutFragment
HomeFragment MealFragment WorkoutFragment
FoodFragment ExerciseFragment
FoodFragment ExerciseFragment
FoodFragmentClick ExerciseFragmentClick
FoodFragmentClick ExerciseFragmentClick

About

This mobile application is designed for fitness and nutrition enthusiasts. It allows users to monitor their exercises (using a pose detection model), track their nutritional intake, and set personalized fitness and nutrition plans.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages