Fitness Trainer Application Using Artificial Intelligence

Page 1

Fitness Trainer Application Using Artificial Intelligence

1Assistant Professor, Dept. of Computer Science and Engineering, ATME College of Engineering, Karnataka, India

2,3,4,5Students, Dept. of Computer Science and Engineering, ATME College of Engineering, Karnataka, India

***

Abstract - Artificial intelligence in fitness is revolutionizing the fitness industry which is making home workouts smarter and better. In our work, we introduce DietFit, which is a combination of diet planner and exercise tracker. This is an application that detects the user’s exercise pose, counts the specified exercise repetitions, provides an alert on each set of repetitions, also alerts how manycaloriesareburntduringthe workout and how the user can improve their form by providing the user with completedietaryplan.The application uses the MediaPipe to detect a person’s pose, later analyses the geometry of the pose from the dataset in real-time video and counts the repetitions of the particular exercise. In this application we use the Harris-Benedict formula for BMR calculation and for recommending the diet. In that Breakfast, Lunch, Dinner all these three things are recommended along with snacks. We have used TDEE (total daily energy expenditure) formula to calculate the amount of energy in calories you burn per day. This application allow users to do their regular exercise with the help of an AI trainer at home, also this application is beneficial to users to maintain their physical fitness and diet in order to get solved their various health problems.

Key Words: Media Pipe, TensorFlow, Opencv, Harris BenedictFormula,TotalDailyEnergyExpenditure

1. INTRODUCTION

Inourwork,weintroduceanapplicationthatisusefulfor bothexercisetrackinganddietplanning.ThisisanAI-based workout assistant and fitness guide to guide people who don’thaveaccesstoagymbutarestillwillingtoworkoutat home.

Inthe21stcenturypeoplearemovingtowardsanunhealthy natureandbadhealth.therearevariousreasonsbecausethe peoplearegettinglazyincaseoftheirphysicalfitnessand getting crazy about food due to the food vloggers for example,socialmediaisthere,thentheirworkload,lackof motivation, and there are so many people who think that physicalfitnessanddietaryplansrequirealotofinvestment incaseofagymorforfitnessequipmentsandmayleadto lackoftastefortheirtastebudsiftheygowithdietaryplans. Butinfact,ifyoudon'thaveanyequipmentandtastydietary plans,thenalsoyoucanabletoperformtheexercisealong withyourdietaryplansandbecomefitandhealthy.

Ourapplicationwillbeusefulforthefollowingcategoriesof people:

1. People who have a very huge workload: From that people,wearegoingtotakeverylesstimearound20-25 minperdayfromthere24hourstomaketheirphysical fitness,healthyandmakethemfeelfresh.

2. People who feel gym fees are not Affordable to them: For that people, we are making an online AI-based trainer,whichwillhelpthemtodothecorrectexercise and also alerts them for each set of repetitions along with to know how many calories burnt to make them liveacomfortablelife.

3. People who feel dietician’s fees are not Affordable to them:Forthatpeople,wearemakinganonlineAI-based dietary plans, which will help them to maintain their dietaryplansandkeepthemhealthy.

2. EXISTING SYSTEM

Inthecurrentsystem,peoplehastogotothegymtokeep their physical health in a balanced state, but many people cannotaffordthem,andalsonowadaystheymaynotbeable todoworkoutsinthegymproperlyduetothehugecrowd, andalsoforsomepeopleitslackofmotivation,andalsoifwe cometothedietaryplansfortheirfooddiet,mostofthemare notabletotakedietaryplansduetothefoodcravings,nowa days it happens mostly because of the food vlogs which temptsthepeopletotheirfavoritefooditemsandruintheir fooddietandpeoplearenotabletomaintainthehealthylife.

DISADVANTAGESOFEXISTINGSYSTEM

1.Therequirementofapersonaltrainerfortheworkout.

2.Thecostisexpensivetopayforgymtrainersanddieticians.

3.Therepetitioncountsmaymiss.

4.Hardtorememberthedietplan.

3. PROPOSED SYSTEM

Thesuggestedmethodisdetectingposturesoftheworkout along with displaying repetitions count, set count also alertingtheuserwithabeepsoundforeachsetandalsogive informationregardinghowmanycaloriesareburntduring the workout and the proper dietary food plan is

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 10 Issue: 05 | May 2023 www.irjet.net p-ISSN: 2395-0072 © 2023, IRJET | Impact Factor value: 8.226 | ISO 9001:2008 Certified Journal | Page821

recommended.Herewedevelopanapplicationinwhichuser willgetartificialintelligence-basedtrainerswiththehelpof imageprocessing&videoprocessing.Andalsodietaryplans usingartificialintelligencewithoutanydieticians.

ADVANTAGESOFPROPOSEDSYSTEM

1. Therearenumerousapplicationsavailableinthemarket which guide the user about the exercises to be performed. But through our application, we not only guidetheuserregardingwhichexercisetoperformbut alsocorrectthepostureandcounttherepetitionsusing computervisionalongwithalertingsystemforeachset.

2. Monitor the user in real-time keeping track of the qualityrepetitionsofaparticularexercise,thuskeeping his formintactand correct throughout their workout. This will educate newbies about different exercise routinesandtheircorrectposturestopreventinjuries.

3. Theapplicationalsooffers personalizedhealthadvice andnutritionideaswhilekeepingthedailycalorielogin thedatabase.

4. Theapplicationcannotonlybeusedbyindividualsat homebutbyincreasingthescopecanbeusedingymsas smarttrainersthusreducinghumanintervention.

5. Our main motive is to spread awareness about the importance of good health and fitness among the commonpeople.

5. METHEDOLOGY

Ourprojectisdividedintotwomodulesnamely

1. DietaryPlan

2. ExerciseCorrectorandrepetitioncounter

5.1 Dietary Plan

FordietaryplanimplementationwewillusetheTDEE(total dailyenergyexpenditure)formula.

TDEE,totaldailyenergyexpenditure,istheamountofenergy in calories you burn per day. TDEE is best calculated by factoring in your BMR, or basal metabolic rate, and your activitylevel.BMRistheamountofcaloriesyouwouldburn perdayatrest.

Harris-Benedictformula

Male:BMR=66+(13.7xweightinkg)+(5xheightincm)

(6.8xageinyears)

Female:BMR=655+(9.6xweightinkg)+(1.8xheightin cm)–(4.7xageinyears)

TDEEiscalculatedbymultiplyingBMRwithActivityFactor dependingonPhysicalActivity.

1.Sedentary=BMRx1.2(littleornoexercise,deskjob)

2. Lightlyactive=BMRx1.375(lightexercise/sports1-3 days/week)

3.Moderately active = BMR x 1.55 (moderate exercise/ sports6-7days/week)

4. Veryactive=BMR x1.725(hardexerciseeveryday,or exercising2xs/day)

5.Extremelyactive=BMR x1.9(hardexercise2ormore timesperday)

5.2 Exercise Corrector and repetition counter

Poseestimationisamachinelearningtaskthatestimatesthe poseofapersonfromanimageoravideobyestimatingthe spatial locations of specific body parts (key points). Pose estimation is a computer vision technique to track the movements of a person or an object. This is usually performedbyfindingthelocationofkeypointsforthegiven objects.Basedonthesekeypointswecancomparevarious movementsandposturesanddrawinsights.

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 10 Issue: 05 | May 2023 www.irjet.net p-ISSN: 2395-0072 © 2023, IRJET | Impact Factor value: 8.226 | ISO 9001:2008 Certified Journal | Page822
4. SYSTEM ARCHITECTURE Fig -1:SystemArchitectureofdietaryplan Fig -2:SystemArchitectureofexercise
–

Mediapipeisanopen-sourcecross-platformframeworkfor building multimodal machine learning pipelines. It can be used to implement cutting-edge models like human face detection, multi-hand tracking, hair segmentation, object detectionandtracking,andsoon.

TensorFlow is an end-to-end open source platform for machinelearning.Itisarichsystemformanagingallaspects ofamachinelearningsystem.However,thisclassfocuseson using a particular TensorFlow API to develop and train machinelearningmodels.

6.

The DFD is also called as bubble chart. It is a simple graphicalformalismthatcanbeusedtorepresentasystem in terms of input data to the system, various processing carriedoutonthisdata,andtheoutputdataisgeneratedby thissystem.

Thedataflowdiagram(DFD)isoneofthemostimportant modelingtools.Itisusedtomodelthesystemcomponents. Thesecomponentsarethesystemprocess,thedatausedby theprocess,anexternalentitythatinteractswiththesystem andtheinformationflowsinthesystem.

DFDshowshowtheinformationmovesthroughthesystem andhowitismodifiedbyaseriesoftransformations.Itisa graphical technique that depicts information flow and the transformationsthatareappliedasdatamovesfrominputto output.

DFDisalsoknownasbubblechart.ADFDmaybeusedto representasystematanylevelofabstraction.DFDmaybe partitionedintolevelsthatrepresentincreasinginformation flowandfunctionaldetail.

7.

Activity diagrams are graphical representations of workflowsofstepwiseactivitiesandactionswithsupportfor choice,iterationandconcurrency.IntheUnifiedModeling Language, activity diagrams can be used to describe the business and operational step-by-step workflows of components in a system. An activity diagram shows the overallflowofcontrol.

8 LIMITATIONS

1. The application can estimate the poses and count repetitionsforalimitednumberofexercises.

2. The application is limited with single-person compatibilityatatime.

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 10 Issue: 05 | May 2023 www.irjet.net p-ISSN: 2395-0072 © 2023, IRJET | Impact Factor value: 8.226 | ISO 9001:2008 Certified Journal | Page823
Fig -3: 33 Landmarksdetectedonthehumanbodyusing MediaPipe 1. Mediapipe 2. TensorFlow DATA FLOW DIAGRAM Fig -4:Dataflowdiagram ACTIVITY DIAGRAM Fig -5:Activitydiagram

9. CONCLUSIONS

Thereareseveralapplicationsforposedetectioninreal-life. Here, we develop into one such application to learn more about pose detection. We present an application for monitoringworkoutswithoutanyinvolvementofapersonal trainer.Theapplicationoffersfeatureslikeposeestimation, real-time workout analysis and is getting the best results. The emerging technologies like machine learning and artificial intelligence playing a important part in the developmentof theIT(InformationTechnology)industries. We have made use of these technologies and create a websiteforpeoplewhoareconsultabouttheirdietandwant toleadahealthylife.Theimportanceofnutritionalguidance isincreasingdaybydaytoleadahealthyandfitlifeandby acceptingtheuser’spreferencesandauser’sprofileinthe systemahealthydietplanisgenerated.

FUTURE ENHANCEMENT

In future we can improve this project by adding more exercises and also linking both the modules. This web application can be implemented as mobile application so thattheuserfindsiteasiertouseandoperate.Further,our work canalsobe enhanced byintroducingreal timevoice instructions to the user so that the user can follow those instructionsanddoworkoutsmoreaccurately.

ACKNOWLEDGEMENT

Special thanksto ourteam guide,Mrs.Sushma V forall of her support and direction, which helped the project to be successfullycompletedandyieldpositiveresultsattheend.

SNAPSHOTS OF DIET RECOMMENDATION

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 10 Issue: 05 | May 2023 www.irjet.net p-ISSN: 2395-0072 © 2023, IRJET | Impact Factor value: 8.226 | ISO 9001:2008 Certified Journal | Page824
Fig -6:HomePage Fig -7:Userregistration Fig -8:Userregistrationsuccessful Fig -9:Userlogin Fig -10:Userhomepage Fig -11:Takinguserinput Fig -12:Dietrecommendation
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 10 Issue: 05 | May 2023 www.irjet.net p-ISSN: 2395-0072 © 2023, IRJET | Impact Factor value: 8.226 | ISO 9001:2008 Certified Journal | Page825
Fig -13:Previewofpreviousdietplan Fig -14:Contactdetails SNAPSHOTS OF EXERCISE POSE DETECTION Fig -15:Startingpositionofbicepcurl Fig -16:Userperformingbicepcurl Fig -17:Usercompleted1setofbicepcurl Fig -18:Userperformingbicepcurlcorrectly Fig -19:Usercompleted2setsofbicepcurl Fig -20:Startingpositionofsquat Fig -21:Userperformingsquat

REFERENCES

1. “PersonLab: Person Pose Estimation & Instance Segmentation with a Bottom-Up, Part-Based, GeometricEmbeddingModel”G.Papandreou,T.Zhu, L.-C.Chen,S.Gidaris,J.Tompson,K.Murphy

2. “Deep Learning-based Human Pose Estimation usingOpenCV”ByVGupta.

3. “Pose Trainer: Correcting Exercise Posture using PoseEstimation”.ByS.Chen,R.R.YangDepartment ofCS.,StanfordUniversity.

4. “MediaPipe Hands: On-device Real-time Hand Tracking.” F.Zhang, V.Bazarevsky, A.Vakunov, A.Tkachenka,G.Sung,C.L.Chang,M.Grundmann.

5. “Compositefieldsforhumanposeestimation”byS Kreiss,L Bertoni,and AAlah,IEEEConferenceon Computer Vision and Pattern Recognition pages 11977–11986,2019.

6. https://www.omnicalculator.com/health/bmrharris-benedict-equation#how-can-you-calculateyour-bmr

BIOGRAPHIES

Sushma V hasbeenawardedwithB.E andM.TechdegreefromVisvesvaraya TechnologicalUniversity.Currentlyshe is working as Assistant Professor in ATMECollegeofEngineering,Mysuru. Her research interests include optimizationinsensornetworks,data transmission and security in cloud computing.

Kavya L G is a UG student currently pursuing B.E. in the department of computer science and engineering in ATMECollegeofEngineering,Mysuru.

Kavya G D is a UG student currently pursuing B.E. in the department of computer science and engineering in ATMECollegeofEngineering,Mysuru.

Deekshitha B S is a UG student currently pursuing B.E. in the department of computer science and engineering in ATME College of Engineering,Mysuru.

Harshitha K G is a UG student currently pursuing B.E. in the department of computer science and engineering in ATME College of Engineering,Mysuru.

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 10 Issue: 05 | May 2023 www.irjet.net p-ISSN: 2395-0072 © 2023, IRJET | Impact Factor value: 8.226 | ISO 9001:2008 Certified Journal | Page826
Fig -22:Userperformingsquatcorrectly Fig -23:Usercompleted1setofsquat Fig -24:Usercompleted3setsofsquat

Turn static files into dynamic content formats.

Create a flipbook