Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
24 views51 pages

8510011719CS402

Fsfyujgdffsg6

Uploaded by

aromalponnu04
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views51 pages

8510011719CS402

Fsfyujgdffsg6

Uploaded by

aromalponnu04
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 51

VISVESVARAYA TECHNOLOGICAL UNIVERSITY

"Jnana Sangama", Belgavi-590 018, Karnataka, India

A
PROJECT REPORT
On
“BMI Prediction using Kinect and Data Mining techniques
for Healthcare System”

Submitted in Partial Fulfillment of the requirements for the award of the degree of

BACHELOR OF ENGINEERING
IN
COMPUTER SCIENCE AND ENGINEERING

Submitted By

Sameer Pasha R 1SJ18CS085


Srikanth V N 1SJ18CS100
Venkatesh Murthy S R 1SJ18CS117
Chethan S M 1SJ19CS402

Carried out at
B G S R&D Centre,
Dept of CSE,
SJCIT

Under the guidance of


Prof. Srinath G M(B E, MTech)
Assistant Professor
Dept. of CSE

S.J.C.INSTITUTE OF TECHNOLOGY
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
CHIKKABALLAPUR-562101
2021-2022
||Jai Sri Gurudev||
Sri Adichunchanagiri Shikshana Trust®
DECLARATION

We Sameer Pasha R(1SJ18CS085), Srikanth V N(1SJ18CS100), Venkatesh Murthy S


R(1SJ18CS117), Chethan S M(1SJ19CS402), Student of VIII semester B.E in Computer Science
and Engineering at S J C Institute of Technology, Chickballapur, hereby declare that this dissertation
work entitled “BMI Prediction using Kinect and Data Mining techniques for Healthcare System”
has been carried out at B.G.S R&D Centre, Dept. of CSE, SJCIT under the guidance of guide Srinath
G M Assistant Professor, Dept. of CSE, SJC Institute of Technology, Chickballapur and submitted
in the partial fulfilment for the award of degree Bachelor of Engineering in Computer Science and
Engineering of Visvesvaraya Technological University, Belagavi during the academic year 2021-2022.
We further declare that the report had not been submitted to another university for the award of any
other degree.

Place: Chikkaballapur Sameer Pasha R


Date : (1SJ18CS085)
Srikanth V N
(1SJ18CS100)
Venkatesh Murthy S R
(1SJ18CS117)
Chethan S M
(1SJ19CS402)

i
ACKNOWLEDGEMENT

With reverential pranam, we express my sincere gratitude and salutations to the feet of his
holiness Paramapoojya Jagadguru Byravaikya Padmabhushana Sri Sri Sri Dr.
Balagangadharanatha Maha Swamiji, his holiness Paramapoojya Jagadguru Sri Sri Sri
Dr. Nirmalanandanatha Maha Swamiji, and Sri Sri Mangalnath Swamiji , Sri
Adichunchanagiri Mutt for their unlimited blessings.
First and foremost we wish to express our deep sincere feelings of gratitude to
our institution, Sri Jagadguru Chandrashekaranatha Swamiji Institute of Technology, for
providing us an opportunity for completing the Project Work Phase-II successfully.
We extend deep sense of sincere gratitude to Dr. G T Raju, Principal, S J C Institute of
Technology, Chickballapur, for providing an opportunity to complete the Project Work Phase-II.
We extend special in-depth, heartfelt, and sincere gratitude to HOD Dr. Manjunatha
Kumar B H, Head of the Department, Computer Science and Engineering, S J C Institute of
Technology, Chickballapur, for hisconstant support and valuable guidance of the Project Work
Phase-II.
We convey our sincere thanks to Project Guide Srinath G M, Assistant Professor,
Department of Computer Science and Engineering, S J C Institute of Technology, for his
constant support, valuable guidance and suggestions of the Project Work Phase-II.
We also feel immense pleasure to express deep and profound gratitude to Project Co-
ordinators Prof. PradeepKumar G M and Prof. Shrihari MR, Assistant Professors,
Department of Computer Science and Engineering, S J C Institute of Technology, for their
guidance and suggestions of the Project Work phase-II.
Finally, we would like to thank all faculty members of Department of Computer Science
and Engineering,S J C Institute of Technology, Chickaballapur for their support.
We also thank all those who extended their support and co-operation while bringing out
this Project WorkPhase-II

Sameer Pasha R
(1SJ18CS085)
Srikanth V N
(1SJ18CS100)
Venkatesh Murthy S R
(1SJ18CS117)
Chethan S M
(1SJ19CS402)

ii
ABSTRACT
Body mass index (BMI) is a person’s weight in kilograms divided by the square of height in
meters. Body mass index is a measurement of obesity based on measured height and weight.
Traditional method of calculating BMI is inconvenient and requires physical measuring of a
person and particular instruments. A proposed healthcare system to predict BMI using Kinect
and data mining techniques so that everybody can easily predict their BMI values using Facial
images.Face detection and feature extraction component using haar cascade to detect useful
face information. Framework by using facial images that uses machine learning algorithms for
data mining namely, Data Preprocessing, Data Extraction, data evaluation and presentation to
train models that would help predict obesity levels (Classification), Bodyweight, and fat
percentage levels (Regression) using various parameters. System helps to advance the study
aspect based on body weights and patients that are paralyzed or severely ill patient who unable
to undergo basic measurement for emergency medical service.

ii
CONTENTS
Declaration i
Abstract ii
Acknowledgement iii
Contents iv
List of Figures vii
List of Tables viii

Chapter No Chapter Title Page No


1 INTRODUCTION
Overview
Problem Statement
Significance and Relevance of Work
Objectives
Methodology
Organization of the Report

2 LITERATURE SURVEY

SYSTEM REQUIREMENTS AND


SPECIFICATION
System Requirement Specification
Specific Requirement
Hardware Specification
Software Specification
Functional Requirements
Non Functional Requirements
Performance Requirement
4 SYSTEM ANALYSIS
Existing System
4.1.1Limitation

iv
Proposed System
Advantages
5 SYSTEM DESIGN
5.1Project Modules
5.2Activity Diagram
5.3Use Case Diagram
5.4Data flow Diagram

5.5Sequence Diagram
6 IMPLEMENTATION
6.1 Algorithm/Pseudo code module wise

TESTING
7.1 Methods of Testing
7.1.1 Unit Testing
7.1.2Validation Testing
7.1.3Functional Testing
7.1.4Integration Testing
7.1.5User Acceptance Testing
7.2 Test Cases
8 PERFORMANCE ANALYSIS

9 CONCLUSION & FUTURE ENHANCEMENT

BIBLIOGRAPHY

APPENDIX
Appendix A: Screen Shots
Appendix B: Abbreviations
PAPER PUBLICATION DETAILS

v
LIST OF FIGURES

Figure No. Name of the Figure Page No.


Figure 5.1 System Architecture 11

Figure 5.3.1 Use Case Model 13

Figure 5.4.1 Data Flow Diagram 14

Figure A.1 Dashboard of Face to BMI Calculator 28


Figure A.2 Uploading Image and Address of the uploaded image 28
Figure A.3 Predicted BMI Value and Health Status of healthy Person 29
Figure A.4 Predicted BMI Value and Health Status of Obese Person 29

vii
LIST OF TABLES
Table No. Name of the Table Page No.
Table 7.1.3 Functional Testing 22
Table 7.1.7 Unit Testing 23
Table 7.1.9 Integration Testing 24
Table B.1 Abbreviations 30

viii
CHAPTER 1
INTRODUCTION
CHAPTER - 1

INTRODUCTION

1.1 Overview
According to an article published in GBD 2017 Obesity Collaborators, over 4 million
people die each year due to excessive weight. From 1975 to 2016, the number of
children and adults experiencing obesity had increased from 4% to 18%. The problem
of overweight and obesity is not only a problem of developed countries, even low-
income and developing countries are overtaking the total number which is 30% excess
than the total cases in developed countries.

The effects of being overweight have different measurements, from psychological


health issues to trivial medical conditions. Nonetheless, there is no real link between
emotional health and obesity. However, due to isolation, there is a greater risk of low
self-confidence, mood, and motivational issues, eating disorders, relational
communication issues, and all of which directly or implicitly affect personal
satisfaction. Physical medical conditions include type 2 diabetes, high blood pressure,
heart and kidney diseases, asthma, back pain, and more.

1.2 Problem Statement


Determining the health of a person by predicting the BMI value which requires factors
like height and weight of an individual which is a complicated process.

To overcome this problem, a BMI prediction system using Kinect and data mining
techniques will be implemented so that individual can easily monitor their BMI values
by taking a snapshot of their face.

1.3 Significance and Relevance of Work

 The scope of the project is, it is user friendly for aged, severely ill patients and
physically challenged people.
 The traditional method of calculating BMI is inconvenient and requires physical
measuring of a person and particular instruments.
 The system is useful for society to overcome the traditional method and predict the
BMI using facial images.
1
BMI Prediction using Kinect and Data Mining techniques for Healthcare System Introduction

1.4 Objectives

 Face detection and feature extraction component using Kinect to detect useful face
outline information.
 Recognition of Useful Facial Information, not only detect the face position but also
obtain face outline information that is useful for BMI prediction.
 Features Extractions from recognised facial information then data will be
normalized for extracting features of good quality for the BMI prediction.

1.5 Methodology

Random Forest Algorithm: Random forest is a Supervised Machine Learning


Algorithm that is used widely in Classification and Regression problems. It builds
decision trees on different samples and takes their majority vote for classification and
average in case of regression.

KNN Algorithm: K-Nearest Neighbour is one of the simplest Machine Learning


algorithms based on Supervised Learning technique.K-NN algorithm assumes the
similarity between the new case/data and available cases and put the new case into the
category that is most similar to the available categories.

Decision Tree Algorithm: Decision Tree algorithm belongs to the family of supervised
learning algorithms. Unlike other supervised learning algorithms, the decision tree
algorithm can be used for solving regression and classification problems too.

1.6 Organization of the Report

We have organized the report into chapters. Firstly the report contains the certification
and acknowledgement. It is then followed by an abstract. The chapter 1 is about
introduction which gives a brief idea about the project. Chapter 2 consists of a literature
survey. Chapter 3 is about the functional and nonfunctional requirements. Chapter 4 is
the expected outcome. chapter 5 is the advantages and application of the project. At the
last the report is concluded by bibliography.

Dept. of CSE, SJCIT 2 2021-2022


CHAPTER -2
LITERATURE SURVEY
CHAPTER – 2
LITERATURE SURVEY

2.1 “Estimation of BMI from Facial Images using Semantic Segmentation based
Region-Aware Pooling”, computers in biology and medicine, Volume 133, June
2021, PP 104392.

Authors: Nadeem Yousaf, Sarfaraz Hussein, Waqas Sultani

Body-Mass-Index (BMI) conveys important information about one‟s life such as health
and socioeconomic conditions. Large-scale automatic estimation of BMIs can help
predict several societal behaviors such as health, job opportunities, friendships, and
popularity. The recent works have either employed hand-crafted geometrical face
features or face-level deep convolutional neural network features for face to BMI
prediction. The hand-crafted geometrical face feature lack generalizability and face-
level deep features don‟t have detailed local information. Although useful, these
methods missed the detailed local information which is essential for exact BMI
prediction. In this paper, we propose to use deep features that are pooled from different
face and demonstrate that this explicit pooling from face regions can significantly boost
the performance of BMI prediction. To address the problem of accurate and pixel-level
face regions localization, we propose to use face semantic segmentation in our
framework. Extensive experiments are performed using different Convolutional Neural
Network (CNN) backbones including FaceNet and VGG-face on three publicly
available datasets: VisualBMI, Bollywood and VIP attributes. Experimental results
demonstrate that, as compared to the recent works, the proposed Reg-GAP gives a
percentage improvement of 22.4% on VIP-attribute, 3.3% on VisualBMI, and 63.09%
on the Bollywood dataset.

Disadvantages

• Lack of face level deep features.


• Hand crafted.

3
BMI Prediction using Kinect and Data Mining techniques for Healthcare System Literature Survey

2.2 “AI based BMI Inference from Facial Images: An


Afvrsnyey5hrtvt4wrtyrhewgshdzcpplication to Weight Monitoring”, Computer
Vision and Pattern Recognition, Oct 2020

Authors: Hera Siddiqui, Ajita Rattani, Dakshina Ranjan Kisku, Tanner Dean

Self-diagnostic image-based methods for healthy weight monitoring is gaining


increased interest following the alarming trend of obesity. Only a handful of academic
studies exist that investigate AI-based methods for Body Mass Index (BMI) inference
from facial images as a solution to healthy weight monitoring and management. To
promote further research and development in this area, we evaluate and compare the
performance of five different deeplearning based Convolutional Neural Network
(CNN) architectures i.e., VGG19, ResNet50, DenseNet, MobileNet, and lightCNN for
BMI inference from facial images. Experimental results on the three publicly available
BMI annotated facial image datasets assembled from social media, namely, VisualBMI,
VIP-Attributes, and Bollywood datasets, suggest the efficacy of the deep learning
methods in BMI inference from face images with minimum Mean Absolute Error
(MAE) of $1.04$ obtained using ResNet50.

Disadvantages

• Computation time is more


• No accurate dataset.

2.3 “Investigation on Body Mass Index Prediction from Face Images”, 2020 IEEE-
EMBS Conference on Biomedical Engineering and Sciences (IECBES), March
2021. Authors : Chong Yen Fook, Cheechin Lim, Vikneswaran Vijean

Body mass index is a measurement of obesity based on measured height and weight of
a person and classified as underweight, normal, overweight and obese. This paper
reviews the investigation and evaluation of the body mass index prediction from face
images. Human faces contain a number of cues that are able to be a subject of a study.
Hence, face image is used to predict BMI especially for rural folks, patients that are
paralyzed or severely ill patient who unable to undergoes basic BMI measurement and
for emergency medical service. In this framework, 3 stages will be implemented
including image pre-processing such as face detection that uses the technique of Viola-
Jones, iris detection, image enhancement and image resizing, face feature extraction

Dept. of CSE, SJCIT 4 2021-2022


BMI Prediction using Kinect and Data Mining techniques for Healthcare System Literature Survey

that use facial metric and classification that consists of 3 types of machine learning
approaches which are artificial neural network, Support Vector Machine and k-nearest
neighbor to analyze the performance of the classification. From the results obtained,
artificial neural network is the best classifier for BMI prediction system with the highest
recognition rate of 95.50% by using the data separation of 10% of testing data and 90%
of training data. In a conclusion, this system will help to advance the study of social
aspect based on the body weight.

Disadvantages

• High difference in ratio between testing and traning data.


• Highest recognition rate of 95.50%.

2.4 “Detecting Body Mass Index from a Facial Photograph in Lifestyle


Intervention, Information and Communication Technologies, August 2018

Authors: Makenzie L. Barr, Guodong Guo, Sarah E. Colby, Melissa D. Olfert This
study aimed to identify whether a research participant‟s body-mass index (BMI) can be
correctly identified from their facial image (photograph) in order to improve data
capturing in dissemination and implementation research. Facial BMI (fBMI) was
measured using an algorithm formulated to identify points on each enrolled
participant‟s face from a photograph. Once facial landmarks were detected, distances
and ratios between them were computed to characterize facial fatness. A regression
function was then used to represent the relationship between facial measures and BMI
values to then calculate fBMI from each photo image. Simultaneously, BMI was
physically measured (mBMI) by trained researchers, calculated as weight in kilograms
divided by height in meters squared (adult BMI). Correlation analysis of fBMI to mBMI
(n = 1210) showed significant correlation between fBMI and BMIs in normal and
overweight categories (p < 0.0001). Further analysis indicated fBMI to be less accurate
in underweight and obese participants. Matched pair data for each individual indicated
that fBMI identified participant BMI an average of 0.4212 less than mBMI (p < 0.0007).
Contingency table analysis found 109 participants in the „obese‟ category of mBMI
were positioned into a lower category for fBMI. Facial imagery is a viable measure for
dissemination of human research; however, further testing to sensitize fBMI measures
for underweight and obese individuals are necessary.

Dept. of CSE, SJCIT 5 2021-2022


BMI Prediction using Kinect and Data Mining techniques for Healthcare System Literature Survey

Disadvantages

• Inefficient end-to-end delay.


• Lack of identification of facial points.

2.5 “A computational approach to body mass index prediction from face images”,
Image and Vision Computing, Volume 31, Issue 5, May 2013, PP 392- 400

Authors: LingyunWen, GuodongGuo

Human faces encode plenty of useful information. Recent studies in psychology and
human perception have found that facial features have relations to human weight or
body mass index (BMI). These studies focus on finding the correlations between facial
features and the BMI. Motivated by the recent psychology studies, we develop a
computational method to predict the BMI from face images automatically. We
formulate the BMI prediction from facial features as a machine vision problem, and
evaluate our approach on a large database with more than 14,500 face images. A
promising result has been obtained, which demonstrates the feasibility of developing a
computational system for BMI prediction from face images at a large scale.

Disadvantages

• Not optimal prediction.


• Redundancy with more Unneccesary data.

2.6 “Al-based BMI Inference from Facial Images: An Application to Weight


Monitoring” , 2020 19th IEEE International Conference on Machine Learning and
Applications (ICMLA), February 2021

Authors:Hera Siddiqui, Ajita Rattani, Dakshina Ranjan Kisku

Self-diagnostic image-based methods for healthy weight monitoring is gaining


increased interest following the alarming trend of obesity. Only a handful of academic
studies exist that investigate AI-based methods for Body Mass Index (BMI) inference
from facial images as a solution to healthy weight monitoring and management. To
promote further research and development in this area, we evaluate and compare the
performance of five different deeplearning based Convolutional Neural Network
(CNN) architectures i.e., VGG19, ResNet50, DenseNet, MobileNet, and lightCNN for

Dept. of CSE, SJCIT 6 2021-2022


BMI Prediction using Kinect and Data Mining techniques for Healthcare System Literature Survey

BMI inference from facial images. Experimental results on the three publicly available
BMI annotated facial image datasets assembled from social media, namely, VisualBMI,
VIP-Attributes, and Bollywood datasets, suggest the efficacy of the deep learning
methods in BMI inference from face images with minimum Mean Absolute Error
(MAE) of 1.04 obtained using ResNet50.

Disadvantages

• Delay should be improved.


• General utility and facial points should be achieved.

2.7 “A Framework for Healthcare Everywhere: BMI Prediction Using Kinect and
Data Mining Techniques on Mobiles”, 2015 16th IEEE International Conference
on Mobile Data Management, September 2015.

AuthorsChih-Hua Tai, Daw-Tung Lin

Recently, health-care has become a popular issue. Having a good physique is also
commonly regarded as important for being healthy. For evaluating our body status, the
Body Mass Index (BMI) is a widely used indicator. However, calculating BMI is
inconvenient and requires the physical measuring of people's weights and heights. In
this paper, we are interested in building a mobile-based BMI prediction system using
Kinect and data mining techniques so that everybody can easily monitor their BMI
everywhere by taking a snapshot of their face. The rationale behind this is the intuition
that there is a correlation between the shape of one's face and one's BMI values, which
people often act on when noticing a friend has either gained or lost weight. Through the
evaluations of 50 volunteers, we show that the rules for training BMI prediction match
with people's common intuitions.

Disadvantages

• System is unstable
• Redundancy
• Complex Algorithms

Dept. of CSE, SJCIT 7 2021-2022


CHAPTER -3
SYSTEM REQUIREMENTS AND
SPECIFICATIONS
CHAPTER – 3
SYSTEM REQUIREMENTS AND SPECIFICATION

3.1 System Requirement Specification System


Requirement Specification is used for the programming contexture that are basically being for
the functionality of the system can do, and also for the work behind the organization for
describing and to understand the client’s needs. The purpose of SRS gives the requirement to
be master planned of a system or sub-system. It generally provides for the capable clients’
needful conditions at a particular instance of time before the work is finalize.

Minimum Hardware Specifications :

Processor - Intel core i3 or above


Speed - 500Mhz or above
RAM - 4 GB
Hard Disk - 32 GB

Minimum Software Specifications:


Operating System - Windows
Application Server - Tomcat5.0/6.X/8.X
Front End - python Tkinter
Database Connectivity - Mysql

3.3 Functional Requirements


 The system should allow administrator to manage the information and focus on the user
requirements.
 The system should allow access of the camera and files for the facial images used to
predict the BMI value.
 The system should generate the predicted body mass index value of a particular person
provided to the administrator.
 Provide the BMI value and all the necessary measures to be taken for fast recovery in
case of the obesity.
 The test execution has to be done before the Non functional testing

8
BMI Prediction using Kinect and Data Mining techniques for Healthcare System System Requirements Specification

3.4 Non Functional Requirements


 It is a requirement specification that specifies criteria that can be used to judge the
operations of a system rather than specific behavior. These requirements are also called
quality attributes of a system as these include the majority those metrics that define the
standard and quality for the system, Some of the parameters coming under this includes
Performance, Security etc.
 Performance: Performance term is mainly used to measure the parameters called time
& space. This project uses verify less space and the actions up or operations
 performed are done very quickly in fraction of seconds. There is no issue of memory
size out of bounds.
 Security: Security or authorization is one of the major parameters of all computerized
applications. As details are confidential, no malicious user must be allowed to operate
on.

3.5 Performance Requirements

The process of breaking down a complex topic or substance into smaller bits in
order to get a better knowledge of it is known as analysis. The Analysis Phase's
main draw is gathering requirements. In most cases, obtaining requirements
entails more than merely asking consumers what they require and writing down
their responses. The method for gathering requirements has its own clearly
defined process, depending on the complexity of the application.

Dept. of CSE, SJCIT 9 2021-2022


CHAPTER 4
SYSTEM ANALYSIS
CHAPTER 4
SYSTEM ANALYSIS
4.1 Existing System

• Some of the works related to automated face-based estimation of BMI include a study
by Wen and Guo because the health consciousness has become an increasing
preoccupation with modern people. Being too overweight or too thin appears as not just
an issue of appearance but also health.
• It is based on the MORPH-II dataset, which obtained mean absolute errors (MAEs) for
BMI in the range from 2.65−4.29 for different ethnic categories.
• The study explored handcrafted features for BMI-estimation and specifically in the
method the face was detected, normalized, and an active shape model was fitted, based
on which, geometry and ratio features were extracted
• Features are cheekbone to jaw width, width to upper facial height ratio, perimeter to
area ratio, eye size, lower face to face height ratio, face width to lower face height ratio
and mean of eyebrow height.
• The extracted features are normalized and finally subjected to support vector
regression.

4.1.1 Disadvantages of existing system:


• Absolute errors of 2.3
• This approach failed to identify the outline of the face and spatial features.
• Traditional method, the health of a person by predicting the BMI value which requires
factors like height and weight of an individual is a complicated process.
• The traditional method of calculating BMI is inconvenient and requires physical
measuring of a person and particular instruments.

4.2 Proposed System

• Proposed BMI prediction system is composed of two stages:


• Extraction of face embeddings using a pre-trained face-net architecture
• Training regression models and finding out the best one.
• Features are cheekbone to jaw width, width to upper facial height ratio, perimeter to

10
BMI Prediction Using Kinect and Datamining Techniques For Healthcare System System Analysis

area ratio, eye size, lower face to face height ratio, face width to lower face height ratio
and mean of eyebrow height. The extracted features are normalized and finally
subjected to support regression.
• we used python face recognition library which is based on ResNet-34 from the Deep
Residual Learning for Image Recognition .

• The fewer layers and the number of filters reduced by half. It maps a “face” into a
feature vector of 128-d which can comprise various features like:
 a. Height of face (cm)
 b. Width of face (cm)
 c. Average color of face (R, G, B)
 d. Width of lips (cm) e. Height of nose (cm)
• We trained various regression models like simple linear regression model, ridge linear
regression model, random forest regressor and kernel ridge regression on images from
the given dataset and calculated the goodness metric for each model.
• Goodness metric consists of mean square error, variance score i.e., r2 score, mean
absolute error and accuracy of the model. We compared models based on this criterion
and used the best one for final prediction.
• Data Preprocessing, Data Extraction, data evaluation and presentation is carried out in
the mining phase, mining is done to gather the relevant information of the image
features.
• The term "normalization" refers to a process that alters the range of pixel intensity levels
to make the image more familiar or normal to the eyes.
• Image Normalization may be used to remove high-frequency noise and extremely low
noise from an image, which is highly valuable, Our objective is to restore an image's
contrast such that it is normal to our senses when it has low contrast.

4.2.1 Advantages
• Considered large number of facial features.
• Huge dataset about thousand subjects.
• The scope of the project is, it is user friendly for aged, severely ill patients and
physically challenged people, The system is useful for society to overcome the
traditional method and predict the BMI using facial images.

Dept. of CSE, SJCIT 11 2021-2022


CHAPTER 5
SYSTEM DESIGN
CHAPTER 5
SYSTEM DESIGN
5.1 System Architecture

BMI prediction system consists of two parts as shown in Fig 4.1. The first part is a face
detection and feature extraction component using Harr Cascade to grab useful face outline
information. Here Harr Cascade is chosen because they are very fast at computing Haar-like
features due to the use of integral images (also called summed area tables). They are also very
efficient for feature selection through the use of the AdaBoost algorithm. The second part of
the system is the BMI predictor. The predictor responses for extracting facial features related
to the BMI values and perform the prediction using keras model, which uses CNN algorithm.

Fig 5.1System Architecture

12
BMI Prediction using Kinect and Data Mining techniques for Healthcare System System Design

5.2 Project Modules


5.2.1 Recognition Of Useful Facial Information

Most of current approaches can only provide an approximate approximation of facial location
and cannot provide accurate information on facial contours. We use Haar Cascade, an Object
Detection Algorithm, to address this problem. Haar Cascade is an Object Detection Algorithm
that is used to recognize faces in a picture or a real-time video. Viola and Jones proposed edge
or line detection features in their research paper "Rapid Object Detection using a Boosted
Cascade of Simple Features," published in 2001. To train on, the algorithm is given a large
number of positive photos with faces and a large number of negative images with no faces. The
model developed as a result of this training may be found on the OpenCV GitHub repository.
The models are saved in XML files in the repository and can be accessed using OpenCV
techniques. Face detection, eye detection, upper and lower body detection, licence plate
detection, and other models are among them.

5.2.2 BMI Prediction

The angles and distances from which photographs are taken can have a significant impact on
the face features captured. To obtain relevant facial features, we must first identify valuable
images, such as the frontal face, and then do normalization, such as rectification of the slanting
face. Many other characteristics, including gender, age, and human DNA, will have an impact
on the relationship between facial curves and BMIs. As a first step, we want to create a basic
BMI prediction system so that we can collect additional data. We used Keras Application
Programming Interface (Keras API) to create this BMI prediction model. Keras is a Python-
based neural network Application Programming Interface (API) that is tightly linked with
TensorFlow (a machine learning framework). This model provides a straightforward, user-
friendly method of defining a neural network, which TensorFlow will subsequently construct
for the user. TensorFlow is a set of open-source frameworks for developing and dealing with
neural networks, such as those used in ML and Deep Learning applications. Convolutional
Neural Network(CNN) is the algorithm utilized in this research. CNN is a Deep Learning
system that can take an input picture, give relevance (learnable weights and biases) to various
aspects/objects in the image, and distinguish between them.

Dept. of CSE,SJCIT 13 2021-2022


BMI Prediction using Kinect and Data Mining techniques for Healthcare System System Design

5.3 Use Case Diagram

A use case is a collection of interactions between external entities and the system under
examination that has a specific aim. Actors are the external entities that interact with the
system.

Use Case Diagram’s have only 4 major elements:

1) Actors

2) System

3) services

4) relationships between elements.

A set of use cases describes the system's whole functionality at a specific level of detail, and
it can be represented graphically using a use case diagram. Fig 4.4 depicts the proposed
system's use case diagram.

A use case model is made up of several model parts. The use case, actors, and their relationships
are the most significant model pieces. To simplify communications, a use case diagram is used
to graphically describe a portion of the model. One of them is the use case diagram, which is
used to collect system needs and actors. Use case diagrams show how a system's events and
flows are represented. However, the use case graph does not explain how they are implemented.

Fig 5.3.1 Use case model

Dept. of CSE,SJCIT 14 2021-2022


BMI Prediction using Kinect and Data Mining techniques for Healthcare System System Design

5.4 Data Flow Diagram

Data flow diagrams depict the flow of data in a corporate information system graphically. Data
Flow Diagram symbols are standardized notations, like rectangles, circles, arrows, and short-
text labels, that describe a system or process’ data flow direction, data inputs, data outputs, data
storage points, and its various sub-processes. DFD denotes the steps involved in transferring
data from the input to file storage and report production in a system. There are two types of
data flow diagrams: logical and physical. The logical data flow diagram depicts the movement
of data through a system in order to fullfil specific business functions. The physical data flow
graphic depicts how the logical data flow is implemented.

Fig 5.4.1 Data flow model

Dept. of CSE,SJCIT 15 2021-2022


CHAPTER 6
IMPLEMENTATIONS
CHAPTER 6
IMPLEMENTATIONS
• Implementation includes mainly 4 steps:
 Face detection or Recognition
 BMI Prediction
 Data Mining Phase
 Image Normalization

• Face Recognition:
 python face recognition library based on ResNet-34 from the Deep Residual
Learning for Image Recognition .
 Haar Cascade is an Object Detection Algorithm, used for faces recognition in
images it is used to overcome rough estimation and provide precise information.

• BMI Prediction:

 The angle and distance at which photo is taken can have a big impact on the facial
features that are captured
 normal front face is taken and normalization is performed such as rectification of
the slanting face in order to get relevant facial features.
 This BMI prediction model was built using the Keras Application Programming
Interface (Keras API), it is a neural network API written in Python that is closely
tied to TensorFlow, a machine learning framework.
 The algorithm used is Convolutional Neural Network (CNN), which is a Deep
Learning system that can take an input image and assign learnable weights to
various objects in the image.

• Data Mining Phase:


 Data Preprocessing, Data Extraction, data evaluation and presentation is carried out
in the mining phase, mining is done to gather the relevant information of the image
features.

16
BMI Prediction using Kinect and Data Mining techniques for Healthcare System Implementation

• Normalization:
 The term "normalization" refers to a process that alters the range of pixel intensity
levels to make the image more familiar or normal to the eyes.
 Image Normalization may be used to remove high-frequency noise and extremely
low noise from an image, which is highly valuable, Our objective is to restore an
image's contrast such that it is normal to our senses when it has low contrast .

Pseudo Code:
(i) BMI Prediction Code
from email.mime import image
from tkinter import *
import tkinter
from tkinter import filedialog
import numpy as np
from tkinter.filedialog import askopenfilename
import pandas as pd
from tkinter import simpledialog
import numpy as np
import cv2
import os
from Model import get_model

main = tkinter.Tk()
main.title("FACE TO BMI") #designing main screen
main.geometry("800x700")

global filename
global image
global Model
global faceCascade

def loadModel():
global model
global faceCascade
textarea.delete('1.0', END)
cascPath = "model/haarcascade_frontalface_default.xml"
faceCascade = cv2.CascadeClassifier(cascPath)
model = get_model(ignore_age_weights=True)
model.load_weights('model/bmi_model_weights.h5')
textarea.insert(END,"BMI Prediction & Face Detection Models loaded\n")

def upload():
global filename
textarea.delete('1.0', END)
filename = filedialog.askopenfilename(initialdir="images")
textarea.insert(END,filename+" image loaded")

Dept. of CSE,SJCIT 17 2021-2022


BMI Prediction using Kinect and Data Mining techniques for Healthcare System Implementation

def predictBMI():
global model
global faceCascade
global filename
textarea.delete('1.0', END)
frame = cv2.imread(filename)
gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
faces = faceCascade.detectMultiScale(gray,scaleFactor=1.1, minNeighbors=5, minSize=(30, 30),
flags = cv2.CASCADE_SCALE_IMAGE)
print("Found {0} faces!".format(len(faces)))
img = None
for (x, y, w, h) in faces:
img = frame[y:y + (h+10), x:x + (w+10)]
if img is not None:
img = cv2.resize(img,(224,224))
temp = []
temp.append(img)
temp = np.asarray(temp)
prediction = model.predict(temp)
bmi = prediction[0][0]
bmi = bmi / 20
result = ''
if bmi <19.5:
textarea.insert(END,"Your BMI predicted as : "+str(bmi)+"\n")
textarea.insert(END,"The Person is underweight \n")
result = " The Person is Underweight "

if bmi > 19.5 and bmi < 24.9:


textarea.insert(END,"Your BMI predicted as : "+str(bmi)+"\n")
textarea.insert(END,"The Person is healthy \n")
result = " The Person is healthy "
if bmi >= 25 and bmi < 30:
textarea.insert(END,"Your BMI predicted as : "+str(bmi)+"\n")
textarea.insert(END," The Person is overweight \n")
result = " The Person is overweight "
if bmi >= 30 and bmi < 40:
textarea.insert(END,"Your BMI predicted as : "+str(bmi)+"\n")
textarea.insert(END," The Person is obese \n")
result = " The Person is obese"
img = cv2.imread(filename)
img = cv2.resize(img, (800,400))
cv2.putText(img, 'Predicted BMI based on facial features is : '+str(bmi), (10, 25),
cv2.FONT_HERSHEY_SIMPLEX,0.7, (255, 0, 0), 2)
cv2.putText(img, result, (10, 45), cv2.FONT_HERSHEY_SIMPLEX,0.7, (255, 0, 0), 2)
cv2.imshow('Predicted BMI based on facial features is : '+str(bmi), img)
cv2.waitKey(0)
else:
textarea.insert(END,"Facial Features not detected in uploaded image\n")

Dept. of CSE,SJCIT 18 2021-2022


BMI Prediction using Kinect and Data Mining techniques for Healthcare System Implementation

def exit():
global main
main.destroy()

font = ('times', 16, 'bold')


title = Label(main, text='FACE TO BMI', justify=LEFT)
title.config(bg='lavender blush', fg='DarkOrchid1')
title.config(font=font)
title.config(height=3, width=120)
title.place(x=100,y=5)
title.pack()

font1 = ('times', 14, 'bold')


model = Button(main, text="Generate & Load BMI & Face Detection Models",
command=loadModel)
model.place(x=200,y=100)
model.config(font=font1)

uploadimage = Button(main, text="Upload Image", command=upload)


uploadimage.place(x=200,y=150)
uploadimage.config(font=font1)

bmiimage = Button(main, text="Run Face & BMI Detection Algorithm", command=predictBMI)


bmiimage.place(x=200,y=200)
bmiimage.config(font=font1)

exitapp = Button(main, text="Exit", command=exit)


exitapp.place(x=200,y=250)
exitapp.config(font=font1)

font1 = ('times', 12, 'bold')


textarea=Text(main,height=15,width=60)
scroll=Scrollbar(textarea)
textarea.configure(yscrollcommand=scroll.set)
textarea.place(x=10,y=300)
textarea.config(font=font1)

main.config(bg='light coral')
main.mainloop()

(ii) Model

from pyexpat import model


from tensorflow.python.keras.applications import ResNet50
from keras.applications import ResNet50
from tensorflow.python.keras.layers import Dense

def get_age_model():

age_model = ResNet50(
include_top=False,
weights='imagenet',
input_shape=(224,224, 3),
pooling='avg'

Dept. of CSE,SJCIT 19 2021-2022


BMI Prediction using Kinect and Data Mining techniques for Healthcare System Implementation

prediction = Dense(units=101,
kernel_initializer='he_normal',
use_bias=False,
activation='softmax',
name='pred_age')(age_model.output)

age_model = Model(inputs=age_model.input, outputs=prediction)


return age_model

def get_model(ignore_age_weights=False):

base_model = get_age_model()
if not ignore_age_weights:
base_model.load_weights('age_only_resnet50_weights.061-3.300-4.410.hdf5')
print('Loaded weights from age classifier')
else:
print("not require")
last_hidden_layer = base_model.get_layer(index=-2)

base_model = Model(
inputs=base_model.input,
outputs=last_hidden_layer.output)
prediction = Dense(1, kernel_initializer='normal')(base_model.output)

model = Model(inputs=base_model.input, outputs=prediction)


return model

Dept. of CSE,SJCIT 20 2021-2022


CHAPTER 7
TESTING
CHAPTER 7

TESTING
The purpose of testing is to discover errors. Testing is the process of trying to discover every
conceivable fault or weakness in a work product. It provides a way to check the functionality
of components, subassemblies, assemblies and/or a finished product It is the process of
exercising software with the intent of ensuring that the Software system meets its requirements
and user expectations and does not fail in an unacceptable manner. There are various types of
test. Each test type addresses a specific testing requirement.

7.1 TYPES OF TESTS


7.1.1 Unit testing
Unit testing involves the design of test cases that validate that the internal program logic
is functioning properly, and that program inputs produce valid outputs. All decision branches
and internal code flow should be validated. It is the testing of individual software units of the
application .it is done after the completion of an individual unit before integration. This is a
structural testing, that relies on knowledge of its construction and is invasive. Unit tests perform
basic tests at component level and test a specific business process, application, and/or system
configuration. Unit tests ensure that each unique path of a business process performs accurately
to the documented specifications and contains clearly defined inputs and expected results.

7.1.2 Integration testing


Integration tests are designed to test integrated software components to determine if
they actually run as one program. Testing is event driven and is more concerned with the basic
outcome of screens or fields. Integration tests demonstrate that although the components were
individually satisfaction, as shown by successfully unit testing, the combination of components
is correct and consistent. Integration testing is specifically aimed at exposing the problems
that arise from the combination of components.

7.1.3 Functional test


Functional tests provide systematic demonstrations that functions tested are available as
specified by the business and technical requirements, system documentation, and user manuals.

Functional testing is centered on the following items:

Valid Input : identified classes of valid input must be accepted.

21
BMI Prediction using Kinect and Data Mining techniques for Healthcare System Testing

Invalid Input : identified classes of invalid input must be rejected.

Functions : identified functions must be exercised.

Output : identified classes of application outputs must be exercised.

Systems/Procedures : interfacing systems or procedures must be invoked.

Organization and preparation of functional tests is focused on requirements, key functions,


or special test cases. In addition, systematic coverage pertaining to identify Business process
flows; data fields, predefined processes, and successive processes must be considered for
testing. Before functional testing is complete, additional tests are identified and the effective
value of current tests is determined.

Table 7.1.3 Functinal Testing

Functional Testing BMI Prediction


Feature being Tested Prediction of BMI Value
Description BMI predictions along with health parameters
Sample input Image
Expected output BMI Value prediction
Actual Output BMI Value along with health parameters[whether person
is under weight, normal weight, overweight or obese]
Remarks Success

7.1.4 System Test


System testing ensures that the entire integrated software system meets requirements. It tests
a configuration to ensure known and predictable results. An example of system testing is the
configuration oriented system integration test. System testing is based on process descriptions
and flows, emphasizing pre-driven process links and integration points.

7.1.5 White Box Testing


White Box Testing is a testing in which in which the software tester has knowledge of the
inner workings, structure and language of the software, or at least its purpose. It is purpose. It
is used to test areas that cannot be reached from a black box level.

Dept.of CSE,SJCIT 22 2021-2022


BMI Prediction using Kinect and Data Mining techniques for Healthcare System Testing

7.1.6 Black Box Testing


Black Box Testing is testing the software without any knowledge of the inner workings,
structure or language of the module being tested. Black box tests, as most other kinds of tests,
must be written from a definitive source document, such as specification or requirements
document, such as specification or requirements document. It is a testing in which the software
under test is treated, as a black box .you cannot “see” into it. The test provides inputs and
responds to outputs without considering how the software works.

7.1.7 Unit Testing:

Unit testing is usually conducted as part of a combined code and unit test phase of the
software lifecycle, although it is not uncommon for coding and unit testing to be conducted as
two distinct phases.

Table 7.1.7 Unit Testing

Unit Testing Data set upload


Feature being Tested Live Data set
Description Through Image live BMI value will be retrieved
Sample input Image
Expected output BMI Value
Actual Output BMI Value along with health parameters
Remarks Success

7.1.8 Test strategy and approach


Field testing will be performed manually and functional tests will be written in detail.

Test objectives
• All field entries must work properly.
• Pages must be activated from the identified link.
• The entry screen, messages and responses must not be delayed.

Features to be tested
• Verify that the entries are of the correct format
• No duplicate entries should be allowed

Dept.of CSE,SJCIT 23 2021-2022


BMI Prediction using Kinect and Data Mining techniques for Healthcare System Testing

• All links should take the user to the correct page.

7.1.9 Integration Testing


Software integration testing is the incremental integration testing of two or more
integrated software components on a single platform to produce failures caused by interface
defects. The task of the integration test is to check that components or software applications,
e.g. components in a software system or – one step up – software applications at the company
level – interact without error.

Table 7.1.9 Integration Testing

Integration Test Data set Normalization

Feature being Tested Preprocessing of Dataset


Description Read live predefined datasets, perform the normalization
any null values will be removed
Sample input Dataset of BMI Value
Expected output Successful preprocessing of dataset
Actual Output Preprocessing will be done and BMI Value will be
displayed.
Remarks Success

Test Results: All the test cases mentioned above passed successfully. No defects encountered.

7.1.10 Acceptance Testing


User Acceptance Testing is a critical phase of any project and requires significant
participation by the end user. It also ensures that the system meets the functional requirements.

Test Results: All the test cases mentioned above passed successfully. No defects encountered.

Dept.of CSE,SJCIT 24 2021-2022


CHAPTER 8
PERFORMANCE ANALYSIS
CHAPTER 8
PERFORMANCE ANALYSIS

Performance analysis is the technique of studying or comparing the performance of a specific


situation in contrast to the aim and yet executed.

Process Of Execution

We will use the python CNN (convolution neural networks) technique to estimate BMI by
evaluating face characteristics in this project. CNN will take a picture as input, extract face
characteristics from the image, then estimate BMI based on the facial features. We created the
following modules to implement this project.

1) Generate & Load BMI & Face Detection Models:

This module will load the CV2 library for face detection and the CNN model for BMI
detection. The facial detection library assists us in detecting a human face from an uploaded
image, which is subsequently fed into the CNN model to estimate BMI.

2) Upload Image:

We will use this module to upload an image to the application and the Dashboard shows the
address of the uploaded image.

3) Run the Face and BMI Detection Algorithm:

This model extracts a face from an input picture and analyses facial characteristics to estimate
BMI value. Based on the BMI Value one can check the health status, Users may also be given
insurance quotes based on their estimated BMI.

25
CHAPTER - 9
CONCLUSION AND FUTURE SCOPE
CHAPTER-9
CONCLUSION AND FUTURE ENHANCEMENT

Conclusion

The System provides the BMI values using data mining technique’s. This system used data
to assess any participants BMI-related facial traits, as well as visualization to guarantee that
human judgements matched intuitions. This BMI values gives a understanding about the
person’s health based on the values person should take care of his health. This work deve
loped a BMI prediction system using data mining approaches. Our technology ensures the
use of front-facing photos using Harr Cascade object detection algorithm and calculates BMI
by creating a model using inbuilt Tensorflow, Keras modules where we use CNN algorithm.
This study employed data to determine the BMI-related face characteristics of any
participants, and visualization to ensure that human judgments were consistent with
intuitions and it also classifies the person into given categories such as under-weight (BMI
value below 18), healthy (BMI value between 18.1 to 30), over-weight (BMI value between
30.1 to 40), obesity (BMI value above 40).

Future Enhancement
➢ The efficient future enhancement could be the BMI detection system in a mobile as a
application.
➢ The mobile app is more user friendly than a PC/Laptop as vast number of users uses
smart phone’s.
➢ The Enhanced Application may also generate a typical health report based on the
prediction.

26
BIBILOGRAPHY
BIBILOGRAPHY

[1] P.-N. Tan, M. Steinbach, V. Kumar, Pearson: “Introduction to Data Mining”, Addison-
Wesley, Communications and Network, Vol.8 No.3, August 17, 2016.

[2] T. Leyvand, C. Meekhof, Y.-C. Wei, J. Sun, and B. Guo, “Kinect identity: technology and
experience,” Computer, 44(4), 2011. DOI: 10.1007/978-81-322-0740-5_21.

[3] L. Wen, and G. Guo, “A Computational Approach to Body Mass Index Prediction from
Face Images,” Image and Vision Computing, Lane Department of Computer Science and
Electrical Engineering, West Virginia University, Morgantown, WV, 26506, United States, 31:
392-400, 2013.

[4] V. Coetzee, D.I. Perrett, L.D. Stephen, “Facial Adiposity: a Cue to Health?” Perception,
38: 1700–1711, 2009. PMID: 20120267 DOI: 10.1068/p6423.

[5] V. Coetzee, D.I. Perrett, L.D. Stephen, “Deciphering Faces: Quantifiable Visual Cues to
Weight,” Perception, 39: 51–61, 2010;39(1):51-61. DOI: 10.1068/p6560.

[6] D. D. Pham, J.-H. Do, B. Ku, H. J. Lee, H. Kim, and J. Y. Kim, “Body Mass Index and
Facial Cues in Sasang Typology for Young and Elderly Persons,” Evidence- Based
Complementary and Alternative Medicine, 2011. Integr Med Res. 2015 Dec; 4(4): 189–194.
Published online 2015 Aug 17. doi: 10.1016/j.imr.2015.08.001.

[7] B.-J. Lee, J.-S. Jang and J.-Y. Kim, “Prediction of Body Mass Index from Facial Features
of Females and Males,” International Journal of BioScience and Bio-Technology, 4(3), 2012.

27
APPENDIX
APPENDIX A: Screen Shots

Figure A.1: Dashboard of Face to BMI Calculator

Figure A.2: Uploading Image and Address of the uploaded image

28
BMI Prediction using Kinect and Data Mining techniques for Healthcare System Appendix

Figure A.3: Predicted BMI Value and Health Status of healthy Person

Figure A.4: Predicted BMI Value and Health Status of Obese Person

Dept. of CSE, SJCIT 29 2021-2022


BMI Prediction using Kinect and Data Mining techniques for Healthcare System Appendix

APPENDIX B: Abbreviations

Table B.1: Abbreviations


BMI Body Mass Index

CNN Convolution Neural Network

DFD Data Flow Diagram

Tkinter Toolkit Interface

API Application Programming Interface

Dept. of CSE, SJCIT 30 2021-2022


PAPER PUBLICATION DETAILS
The paper has been published in International Journal of Advanced Research in Science,
Communication and Technology. (IJARSCT) journal Volume 02, Issue 09 June 2022 and
entitled as ― BMI Prediction using Kinect and Data Mining Techniques for healthcare System.
The authors of this paper are Prof Srinath G M, Sameer Pasha R, Srikanth, Venkatesh Murthy
S R, Chethan S M.
This paper shows the insights about the project which consists of Abstract, Introduction,
Methodology, Conclusion and so on

31
BMI Prediction using Kinect and Data Mining techniques for Healthcare System Paper Publication Details

Dept. of CSE, SJCIT 32 2021-2022

You might also like