B-Fit: A Fitness and Health Recommendation System

Page 1

International Research Journal of Engineering and Technology (IRJET) e ISSN: 2395 0056

Volume: 09 Issue: 07 | July 2022 www.irjet.net p ISSN: 2395 0072

B-Fit: A Fitness and Health Recommendation System

Brunda R1 , Preethi K S2 , Sushmitha N Reddy3, Khushi Aralikatte4, Dr. Manjula S5

1,2,3,4 Department of Computer Science And Engg, JSS Science and Technology University, Mysore, India 5 Associate Professor, Department of Computer Science And Engg, JSS Science and Technology University, Mysore, India ***

Abstract In the modern world, health and fitness plays a major role in one’s life. People are preferring a healthy lifestyle which can be achieved through regular exercises and a healthy diet. Due to lockdowns and people are staying at home every where, people are unable to access workout places like gyms, public parks or even go for a walk. So, ease their problems, our project” B Fit: A Fitness and Health Recommendation System” aims at bringing access to our users a wide range of fitness videos and personalized content based on the user preferences. Inthe same platform, the user can also access their diet chart based on the height, weight which is used to calculate their BMI (Body Mass Index) Also, healthy food recommendation is also availableto the user by classifying the user as healthy or unhealthy based on their age, weight, height, RBC, WBC, haemoglobin, platelets, sugar etc. in their blood parameters.

Key Words: Fitness, Recommendation, BMI, User Interests, collaborative filtering

1. INTRODUCTION

TheInternetanditsassociatedtechnologieshavebecome an indispensable tool to search products, services or frequently access information needed in our daily lives, e.g., bookingahotel,purchasinganewdeviceorconsulting the weather forecast.Weare presentlyreportedtospend an average6hoursperdayconnectedtotheInternet.Amidstthis phenomenon,thereis an increasing interest inseeking aid in the Internettoembracehealthierlifestyles,e.g.,through the search and sharing of information related to fitness exercises and wellnesspractices, or via smartphone apps. Althoughgymsandleisurecentersareacommonchoicefor users who desire to adoptor maintain an active lifestyle, they are not always withinthereachofeveryperson,e.g., owing to financial limitations, busy schedules, frequent traveling, etc. Also predicting the eligible Healthy Food’s qualityisachallengingtask.Usingclassificationalgorithms, wecanpredictifapersonishealthy ornotusingvariables likeage,weight,hemoglobin,BP,bloodgroup,sugar,platelets, RBC,WBCintheHealthyFood’sdatabase.

Taking advantage of the growing demand for online re sourcestopromoteexercising,onlineworkoutvideoshave proliferatedinrecentyearsasanalternativemeanstokeep users active from the comfort of home or beyond, with several advantageous characteristics.

Themainobjectiveincludes:

Foodrecommendationbasedontheuser’s BMI.

Video recommendation within the fitness domain to support an active lifestyle.

Platform for workout video recommendation, which benefitsfromtheYoutube 8Mlabeleddatasetandwhichhas a rich variety of categorized video labels.

Themainobjectiveofthisprojectisarecommendedmodel thatextendsprinciplesfromcontent basedandcollaborative filtering by introducing mechanisms to provideend users with meaningful and diverse workout video recommendations.

Classifyingauserashealthyorunhealthybasedonblood test parameters and predicting healthy food based on the factor of the blood test that they are lacking.

The scope of the project is that they are convenient, providing24/7accesstoawealthoffitnessresourcesfrom anywherewithanInternetconnection.Theydonotrequire commitment to work out at an externally imposed day or time.Withacarefulsearchanduseoftheresourcesavailable, they provide a wealth of workouts from a diversity of instructors.Theyarecost effectiveandcanbeundertakenin amoreindividualandprivate space

2. LITERATURE SURVEY

[1] Ezin, E., Kim, E., Palomares Carrascosa, I. In their paper“Fitnessthatfits”proposedamodelforworkoutvideo recommendation,usingtheYoutube 8Mlabelleddatasetand itsrichvarietyofcategorizedvideolabels,therebyenabling fitnessworkoutvideorecommendationspredicatedonthe users’ preferences and their recent viewing behavior YouTubeprovidesmillionsofuserswithaccesstoawealth of video resources to support them in practicing their preferredwork outsanywhereandanytime.Asaresultof classificationandsupervisedmachinelearningprocesseson data originating from YouTube videos, Youtube 8M incorporates labels associated to the videos, thereby describing the topic(s) to which they belong, including a number of fitness activity types: this amount of labelled video data has an untangled potential to investigate and enhance existing recommendation approaches on large

Š
Journal | Page1083
2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified

International Research Journal of Engineering and Technology (IRJET) e ISSN: 2395 0056

Volume: 09 Issue: 07 | July 2022 www.irjet.net p ISSN: 2395 0072

volumesofvideorelatedtospecificdomainssuchasfitness.

[2] ButtiGouthami,MaligeGangappapresentedin‘Nu tritionDietRecommendationSystemUsingUser’sInterest’ they discuss nutrition recommendations based on BMI calculationswhichfocusesondailydietplanandnutrition needs.Accordingtouserfoodpreferencesandconsumption we get suggestions, food nutrition’s, deficiencies and trackinghistoryofhisfoodhabits.Content BasedFiltering and Collaborative Filtering methods are used to get users choice of his food recommendation for the daily nutrition with the help of USDAdataset and grocery data. A healthy food pyramid is a combi nation of plant foods, moderate amount of animal products. Which includes vegetables, grains, fruits, oils and sweets, dairy, meat and beans. Generally, a person remains unaware of major causes behinddeficiencyorexcessofvariousvitalsubstances,such as calcium, proteins, and vitamins, and how to normalize such substances through a balanced diet. With the advantage of technology, the people can leave a healthier lifestyle. In this project to build a system that will aim to recommendappropriatenutritionintaketoitsusersbased onbodymassindex(BMI)andgrocerydatapreferences.BMI calculate weight status categories which includes underweight, healthy weight, overweight, obese. Grocery data includes seasonalfood, user’s interested food, plant foodsandanimalproducts.Thisprojectwillhelpusers’daily diet recommendations alongwith BMI range, healthy food choice,eatingbehavior,healthproblems,andtochangeuser behavior.

[3] JamesDavidson,Benjaminlieblad,JunningLiupro posed the YouTube Video Recommendation System. They discuss the video recommendation system in use at YouTube,theworld’smostpopularonlinevideocommunity. The systemrecommends personalized sets of videos to users based ontheiractivityonthesite.Theydiscusssome of the unique challenges that the system faces and how they address them.Inaddition,theyprovidedetailsonthe experimentationandevaluationframeworkusedtotestand tune new algorithms.

[4] Bernard’s,Inthesurveywork of authors conclude thatthefieldofsocialRecommendersSystems(RS)builton implicit social networks seems particularly promising, propose a social filtering formalism, and with their experimentsonmusicand movie preference datasets, they find that one has to test and try a full repertoire of candidate RS, fine tuneparametersandselectthebestRS for the performance indicator he/she cares for a Authors study the efficiency of social recommender networks merging the social graph with the co rating graph and considerseveral variationsbyaltering thegraphtopology and edge weights. With experiments on the help dataset, they conclude that social networks can improve the recommendations produced by collaborative filtering algorithmswhenausermakesmorethanoneconnection.In

thiswork,weconsiderourrecommendationsystemtobea socialoneasa)itappliestothesocialnetworkoftheusersof the application, but also b) it can integrate social graph basedinformationtoenhancetherecommendationprocess. The literature survey performed so far shows that most worksemployexistingdatasetsfrommusicormovierating networks to experimentally evaluate the models or algorithmsproposed,butnoneofthemappliestheproposed solutiontoareal worldapplication.

3. EXISTING METHOD

A recommender system will help us to follow user preferences and requirements and allow us to adjust diet andexercisevideorecommendation.Asimilarworkisdone in’FitnessthatFits’,aprototypeplatformforworkoutvideo recommendation, which relies on Youtube 8M video data describing fitness activities based on a hybrid approach incorporating basic principles from content based and neighborhood based collaborative filtering systems to provideendusersfitnessvideobasedontheirprofile.Their approach relies on (a) dataset by filtering the original Youtube 8M labeled video dataset and filtering based on Highly viewed, Fitness related, Videos having machine generated annotations of ’Beauty and Fitness’ narrowed down to 16 labels, associated with highly viewed and popular types of fitness activities. In this system, they consider user preferences and their watching history to model a recommender system. After gathering this information,adiverserecommendationismadetotheuser to increase user engagement, that is recommendation of videosthattheusermightnothaveseen,andtheusermight watch. Another existing system is CoCare. It recommends videos about physical activity based on a user profile, his/hercontext.ThemainchallengeofCoCAREisthesmall setofvideostoberecommended,becausetheselectionof thevideosisdonemanuallybyhealthexperts.Severalhealth recommendersystemshavethissameproblem.Todaythere aremanyvideoswhichareavailableontheInternetrelated to physical activity. These could not be included in the database of CoCARE; because these do not have enough informationtobecategorizedandprofiled.Anotherexisting system that uses user interest to make diet recommendationsisonethatusesUSDAdatabasenutrition factorinformationforeachindividualfooditem.Thevalues neededtocalculateBMI(bodymassindex)mustbeprovided as an input for the final diet recommendations to be calculated. The user’s diet recommendation is calculated usingthesecondinput,whichisbasedonthefoodingested thatday.Initially,thedeficitnutritioniscalculatedbasedon the food consumed for that day, and the input nutrients datasetissortedbasedontheBMIvalue,andthedeficitfood will be filled from the sorted grocery dataset. Food recommendations are based on the obesity parameter. Dietaryrecommendationsarederivedbasedonobesity

2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal |

Š
Page1084

International Research Journal of Engineering and Technology (IRJET) e ISSN: 2395 0056

Volume: 09 Issue: 07 | July 2022 www.irjet.net p ISSN: 2395 0072

4. PROPOSED SYSTEM

Extending the existing module by taking the implicit and explicitpreferencesfromtheuserslikeratingsgiventothe videos by a community of users. One of the aims of the proposed system is to provide users with recommended videos that are both relevant (in accordance with their current preferences) and diverse. Diversity in workout recommendationsmaynotonlyhelpexploring“new”types ofworkoutstheusermightpotentiallylike,butalsofosters varietyofworkoutsinsuchrecommendationstopreventan eventual sense of boredom Two sources of user data are taken as an input to model their current preferences: the userprofileandtherecentuserbehavior.

4.1 DATASET

Wehaveadatasetofopen sourceYouTubevideoswithits id’sand12differentlabelsforoursystem.YouTube 8Misa large scale labeled video dataset which, as of June 2018, consistsofover6millionofYouTubevideoinstances(which addupto350,000hoursof video), namelyvideoIDs with high quality annotations generated by machine learning techniques,describingahighlydiversevocabularyofover 3.8Kdifferententities(labels).Weremarkthatdespitethe considerablevolumeofreallabeledvideodataavailable,the proposedmodelusesasmallandsynthesizeddatasetthat has been achieved through using YouTube Data API v3 providedbygoogledevelopers.Thefooddatasetparticular to Indian cuisine is still not open source and has to be developed over time with the addition of more users and accesstoavarietyoffoodinformation.

4.2 RECOMMENDER SYSTEM

CollaborativeFiltering,whichisalsoknownasUser User Filtering, is a technique which uses other users to recommenditemstotheinputuser.Itattemptstofindusers thathavesimilarpreferencesandopinionsastheinputand then recommends items that they have liked to the input. There are several methods of finding similar users (Even somemakinguseofMachineLearning),andtheonewewill beusinghereisgoingtobebasedonthePearsonCorrelation Function.Wereadthedata havingvideotitlesandratings and BMI. The recommendation is based on the likes and ratingsoftheneighborsorotherusers.Eachuserhasgiven multipleratingsfordifferentvideos.Theprocessforcreating aUserBasedrecommendationsystemisasfollows:

•Selectauserwiththevideostheuserhaswatched

•Basedonhisratingtovideos,findthetopXneighbors

•Getthewatchedvideorecordoftheuserforeachneighbor

•Calculateasimilarityscoreusingsomeformula

•Recommendtheitemswiththehighestrelevance

Tofindthesimilarityofuserstoinputuserswearegoing tocomparealluserstoourspecifieduserandfindtheone thatismostsimilar.we’regoingtofindouthowsimilareach user is to the input through the Pearson Correlation Coefficient. It is used to measure the strength of a linear associationbetweentwovariables.Theformulaforfinding thiscoefficientbetweensetsXandYwithNvaluescanbe seenintheimagebelow.

4.3 WHY PEARSON CORRELATION?

Pearsoncorrelationisinvarianttoscaling,i.e.,multiplying allelementsbyanonzeroconstantoraddinganyconstant toallelements.Forexample,ifyouhavetwovectorsXand Y,then,Pearson(X,Y)==Pearson(X,2*Y+3).Thisisan importantpropertyinrecommendationsystemsbecause for example two users might rate two series of items totallydifferentintermsofabsoluterates,buttheywould besimilarusers(i.e.,withsimilarideas)withsimilarrates invariousscales.

Fig 1:PearsonCorrelationEquation

Thevaluesgivenbytheformulavaryfromr= 1tor=1, where1formadirectcorrelationbetweenthetwoentities (it means a perfect positive correlation) and 1 forms a perfectnegativecorrelation.Inourcase,a1meansthatthe twousershavesimilartasteswhilea 1meanstheopposite. Weusetheratingofselecteduserstoallvideosthisisdone bytakingtheweightedaverageoftheratingsofthemovies using the Pearson Correlation as the weight as a part of content basedfiltering,wearerecommendingvideosbased onthesimilaritybetweenitemsthatarevideosinthiscase. WecalculatethesimilaritybetweenthevideosusingtheML algorithm(KNNinourcase)andrecommendingthevideos whicharemostlikethetargetvideo.

5. DESIGN AND IMPLEMENTATION

Fig 2:UserDFD

Š 2022,
|
Certified Journal | Page1085
IRJET | Impact Factor value: 7.529
ISO 9001:2008

International Research Journal of Engineering and Technology (IRJET) e ISSN: 2395 0056

Volume: 09 Issue: 07 | July 2022 www.irjet.net p ISSN: 2395 0072

recommended videos to help them know if the video is authenticornot.Aprototypeforfoodrecommendationhas also been added and will be further improved with the additionofthediversedataset.Also,ausercanbeclassified ashealthyorunhealthybasedonhisbloodparametersand weareusingKNN/NaiveBayesalgorithmtoclassifytheuser as healthy or unhealthy and then recommend a food diet basedonthefactorwhichisclassifiedasunhealthy.

Fig 3:AdminDFD

Fig 4:ExpertDFD

Whenitcomestoconveyinghowinformationdataflows throughsystems(andhowthatdataistransformedinthe process), data flow diagrams (DFDs) are the method of choicefortheimplementation,

• We have used HTML, CSS, JS and Bootstrap for the frontendoftheapplication.

•Forthebackend,XAMPPserverhasbeenusedwithPHP andMYSQL.

• For the ML model, we have used Python and Anaconda environmentswiththehelpofVScode.

Input UserinformationlikeName,Age,Height,Weightetc.

Output Video and diet recommendations based on User informationlikeheight,age,weight,gender,preferencesetc.

The user enters his/her information in the user profilepageandaccordingtothatwestoretheinformation inthedatabase.Onceauserupdatestheinformation,based ontheBMIcalculated,thelabeledvideosarerecommended inonemodule.Anothermoduleisdedicatedfortheusersto ratethevideosbasedontheirlikingtoincreasethesocial capabilitiesofourproject.Theratinggivenbytheuserswill be used as a filter for the collaborative filtering algorithm along with BMI of the users to recommend videos to the users of similar tastes. The users can also view expert

Fig 5:Videorecommendationmodule

Theadminmodulehasprivilegesfortheadminwhich includeviewingtheusers,managingtheexperts,foodand videodatasets.Theexpertsareaddedtoratethevideos which are deemed to be authentic in the view of the expert.Theexpert can rate, add information about the video.

6. TESTING AND RESULTS

6.1 PRECISION

Precision is concerned about how many recommendations are relevant among the provided recommendations.

Chart 1:Precision

6.2 RECALL

Recallisconcernedabouthowmanyrecommendations areprovidedamongalltherelevantrecommendations.

Š
Certified Journal | Page1086
2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008

International Research Journal of Engineering and Technology (IRJET) e ISSN: 2395 0056

Volume: 09 Issue: 07 | July 2022 www.irjet.net p ISSN: 2395 0072

Chart -2:Recall

6.3 AVERAGE PRECISION@K

AP@Kisthesumofprecision@Kfordifferentvaluesof KdividedbythetotalnumberofrelevantitemsinthetopK results.

labeleddatasetandwhichhasarichvarietyofcategorized video labels. The main objective of this project is a recommendedmodelthatextendsprinciplesfromcontent basedandcollaborativefilteringbyintroducingmechanisms toprovideenduserswithmeaningfulanddiverseworkout video recommendations. Classifying a user as healthy or unhealthy based on blood test parameters and predicting healthyfoodbasedonthefactorofthebloodtestthatthey are lacking. The scope of the project is that they are convenient, providing 24/7 access to a wealth of fitness resourcesfromanywherewithanInternetconnection.They do not require commitment to work out at an externally imposeddayortime.Witha careful searchanduseofthe resourcesavailable,theyprovideawealthofworkoutsfrom adiversityofinstructors.Theyarecost effectiveandcanbe undertakeninamoreindividualandprivatespace.

8. FUTURE ENHANCEMENTS

We can provide composite video recommendations by providing smaller videos while providing diversity in recommendations. We can significantly improve the accuracyanddiversityoftherecommendedvideoswiththe availability of more profound datasets for e.g., datasets regardingIndiancuisine.Furtherenhancementcanalsobe done by introducing advance features such as Activity Tracking, a sensor based system measuring human movementsintermsofcalorie,stepstaken,cyclingactivity etc.whichhelpsimprovethelifestyle bykeepingitsusers awareabouttheirhealth.

REFERENCES

[1] Ezin, E., Kim, E., Palomares Carrascosa, I. (2018). ’Fitness that Fits’:A Prototype Model for Workout VideoRecommendation.

Chart 3:Averageprecision@k

6.3 MEAN AVERAGE PRECISION @ K

Themeanaverageprecision@Kmeasurestheaverage precision@Kaveragedoverallqueries.Themeanaverage precision@KisgivenbytakingtheaverageofAP@Kbythe totalnumberofrecommendations.Inoursamplecase,we gotthevalueas0.91428Averageprecisionmetricsaysthat the higher the value, the more relevant recommendations havebeenmade

7. CONCLUSION

B Fit:AFitnessandHealthRecommendationSystem,aimsat bringingaccesstoourusersawiderangeoffitnessvideos and personalized content based on the user preferences. Videorecommendationwithinthefitnessdomaintosupport an active lifestyle. It is a platform for workout video recommendation, which benefits from the Youtube 8M

[2] Aashita Chhabra, Chitrank Tyagi FITKIT ANDROID APPLICATIONInternationalJournalofEngineering AppliedSciencesandTechnology,2019Vol.4,Issue 4, ISSN No. 2455 2143, Pages 203 205, Published OnlineAugust 2019 inIJEAST

[3] Butti.GouthamiandMaligeGangappa,NutritionDiet Recommendation System Using User’s Interest, International Journal of Advanced Re search in Engineering and Technology, 11(12), 2020, pp. 2910 2919.

[4] G. M. Cero ´ n Rios, D. M. Lopez Gutierrez, B. D´Ĺaz Agudo,andJ.A.Recio Garc´Ĺa.2017.Recommendation SystembasedonCBRalgorithmforthePromotionof Healthier Habits. In Proceedings of ICCBR 2017 Workshops (CAW, CBRDL, POCBR), Doctoral Consortium, and Competitions co located with the 25th International Conference on Case Based Reasoning(ICCBR2017),Trondheim,Norway,June 26 28,2017.167 176.

Š
Page1087
2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal |

International Research Journal of Engineering and Technology (IRJET) e ISSN: 2395 0056

Volume: 09 Issue: 07 | July 2022 www.irjet.net p ISSN: 2395 0072

[5] E. Chen. 2017. Youtube 8M Video Understanding Challenge Approach and Applications. In CVPR’17 Workshop on YouTube 8M Large Scale Video Understanding.

[6] TheYouTubeVideoRecommendationSystem,James Davidson,Ben jaminlieblad, Junning Liu

[7] CLASSIFICATIONUSINGNA IVEBAYES ASURVEY ,Neha Sharma Department of Computer Science, GurukulInstituteofTech nology, Kota, Rajasthan

[8] Casestudy:Mydesignprocessforafitnessapp,Aaboli Kode,8 10 2022

[9] KNNModel BasedApproachinClassification,Gongde Guo,HuiWang,DavidBell,YaxinBi,andKieranGreer, 2004

[10] J.Berndsen,A.Lawlor,andB.Smyth.2017.Running withRecommen dation.InProc.2ndInternational Workshop on Health Recommender Systems;11th InternationalConferenceonRecommenderSystems (Rec Sys2017).18 21

[11] S.Dharia, M. Eirinaki, V. Jain, J. Patel, I. Varlamis, J. Vora, andR.Yamauchi.2018.Socialrecommendations for personalized fitness assistance. Personal and UbiquitousComputing22,2(01Apr2018),245 257.

[12] D.Elsweiler,B. Ludwig,A.Said,H.Schaefer,and C. Trattner. 2016. Engendering Health with RecommenderSystems. In Proceedings ofthe10th ACM Conference on Recommender Systems (RecSys’16).409 410.

[13] C. Trattner and D. Elsweiler. 2017. Food Recommender Systems: Important Contributions, Challenges and Future Research Directions. Collaborative Recommendations: Algorithms, Practical Challenges and Applications (World Scientific)abs/1711.02760 (2017).

2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal

| Page1088
Š

Turn static files into dynamic content formats.

Create a flipbook