SlideShare a Scribd company logo
1
A Novel Approach on Preventing
Dehydration by Monitoring Water Intake
using Image Acquisition & Processing
Technologies
A pragmatic solution to preventing dehydration and cultivating healthier habits
Natasha Chugh
UNT: TAMS
First and foremost, this work would not have been possible without the academic
support of the Texas Academy of Mathematics and Science, a residential undergraduate
program at the University of North Texas. I would like to show my gratitude to Dr.
Jeffry Alan Kelber, my research mentor, for showing me, by his example, what a good
scientist (and person) should be. I am especially indebted to Dr. James Duban, the
Associate Dean for Research and National Scholarships, who commented on earlier
versions of this project’s manuscript and provided me with extensive personal and
professional guidance that taught me a great deal about scientific research. I would also
like to thank Dr. Glênisson de Oliveira, Dr. Eric L. Gruver, Mr. Samuel Earls, and Mr.
Russ Stukel for taking me under their wing and helping me fit in as a high school junior
at college. For many memorable moments, I thank the staff and students at McConnell
Residential Hall for providing me with a second home. Lastly, nobody has been
more important to me in the pursuit of this project than the members of my
family. I would like to thank my parents; whose knowledge and guidance
are with me in whatever I pursue. This slideshow stands as a
testament to their unconditional love
and encouragement.
Acknowledgements
Water is essential for all physiological processes. Lack
of water or dehydration can result in many health
disorders (listed at left). The good news is that
behavior-induced dehydration is easily preventable.
Yet, a study by CDC shows that 1/4 of children ages 6
to 19 don't drink water, turning to caffeinated
beverages instead. Likewise, a staggering percentage –
75% of all Americans are chronically dehydrated.
Thus, the purpose of this project is to prevent dehydration and encourage the
altering of unhealthy habits by constructing a system that not only monitors water-
intake activity but also provides periodic feedback. This project targets
human behavior through cognitive-motivation methodologies.
Early Signs Mature Signs
 Fatigue
 Anxiety
 Irritability
 Depression
 Cravings
 Cramps
 Headaches
 Heartburn
 Joint Pain
 Back Pain
 Migraines
 Fibromyalgia
 Constipation
 Colitis
Signs of Dehydrations
Introduction
Background Info & Purpose
Research
To understand important
concepts, notions, and
current technologies.
Develop
Image acquisition and processing
system should be constructed to
capture the water intake frequency
of an individual and help regulate an
individual’s fluid intake by sending
appropriate reminders.
Integrate
System should be tested
to analyze behavioral
responses & system
accuracy.
Engineering Goal
The goal is twofold, in that, one, an image acquisition system can be
constructed that will capture the water intake frequency of an individual,
and second, it should help regulate an individual’s fluid intake by sending
appropriate reminders.
System Overview
Step 1: Image Acquisition
• Acquire image feed from Webcam
Step 2: Image Processing
• Using Matlab s/w - the image feed
is classified with trained set of
images. Find best classifier.
Step 3: Record data in database
• Capture data in Oracle RDBMS
Step 4: Testing
• Confirm if trained set of images
can recognize the objects using
live feed
Step 5: Implementation
• Add audio reminders
• SMS Text-messaging connection
• APEX Front-end mobile app
• Give to human participants to test
Step 6: Analyze data - Statistics
• Error bars / Box Whisker plots and
ANOVA statistical model
MATLAB Detailed Procedure
MATLAB Toolbox Process Flow
Video to Frames Conversion
A webcam was connected to the laptop which captured the live video i.e. human activities
which was then converted to images in the laptop using MATLAB Image acquisition tool.
Image Features - BagOfFeatures
Further these images are classified using MATLAB image processing & machine
learning toolboxes if the activity in those images is a drinking or a non-drinking event.
The classifiers are trained using features extracted from a set of images (training set).
To identify these objects from an ongoing stream of close-range video, my program
extracts the BagofFeatures or dominant characteristics of each object. MATLAB
extracted 200 features from the training set of 400 to 600 pictures of each object.
Classifiers
LDA
(Linear Discriminant)
KNN
(K-nearest neighbor)
SVM
(Support Vector Machine)
https://www.ncbi.nlm.nih.gov
Each picture is a d-dimensional matrix that is then translated into a 2-dimensional
plot with its features graphed as coordinates. The program then analyzed the real-
time video feed and determined whether it was a “drinking” or “non-drinking
event” by analyzing the coordinates of each feature and seeing if it matches up
with any of the training set’s data. However, there are many classifiers out there.
Just to name a few that we tested were KNN, SVM, Linear Discriminant Analysis
(LDA), Complex Tree, and more.
LDA
Bayes Rule
Multivariate
Gaussian
distribution
density
Same
covariance
matrix
)()|(
)()|(
)(
)()|(
)|(
lyPlyXP
kyPkyXP
XP
kyPkyXP
XkyP
l 





Class
Conditional
Prior
Marginal
   





 


kk
t
k
k
n
XXkyXp 

1
2/1
2
1
exp
||)2(
1
)|(
     








)(
2
1
0
)|(
|
log 111
l
t
l
t
klk X
XlyP
XkyP

LDA Algorithm
MATLAB LDA Results
LDA Parallel Coordinates Plot
Image
Features
• To understand how the classifier performed.
• Rows show true class, columns show predicted class.
The diagonal cells show where both match.
• Green cells and high percentages show classifier has
performed well and classified this class correctly.
• To include/ exclude features
• It shows relationships between features and identifies
useful predictors for separating classes.
• Training data and misclassified points are visualized
• The misclassified points are seen as dashed lines.
LDA Confusion Matrix
As seen in the 300 trials performed, as well
as the confusion matrixes and parallel plots
on the previous slide, the Linear
Discriminant (LDA) classifier undoubtedly
outperformed KNN and SVM with an
estimated 90% Accuracy Rate.
Readings & Graphs – Per Classifier
LDA
Linear
SVM
Fine
KNN
Recognized
Correctly 89% 79% 49%
Recognized
Incorrectly 11% 21% 51%
Total Readings 80 80 80
89%
79%
49%
11%
21%
51%
0%
10%
20%
30%
40%
50%
60%
0%
10%
20%
30%
40%
50%
60%
70%
80%
90%
100%
Linear
Discriminant
Linear
SVM
Fine
KNN
LDA PERFORMED BEST
Recognized Correctly Recognized Incorrectly
Glass of Water
Mug No Event
Water Bottle
The events were captured using LDA for four individual scenarios: [1] Person drinking
water from water-bottle, [2] Glass, [3] Mug and [4] an individual not drinking water.
MATLAB Image Classification Results
Water Intake Personalization Calculations
Sampleparameters
Body Weight = W (in pounds)
Activity water requirement per chart = A (oz.)
Total Water Intake requirement
= 2/3 * W + A (in ounces)
Exercise
Intensity
Exercise
Duration
Amount of
Water
low
30 minutes 10 oz
60 minutes 24 oz
90 minutes 34 oz
medium
30 minutes 14 oz
60 minutes 27 oz
90 minutes 44 oz
Created simulated profiles of individuals
that included their weight, age, gender,
activity levels, and the general climate of
their region. These variables influenced
their water intake amounts. For example,
a young male in his 20’s who is highly
active should drink about 14 cups of
water per day. On the other hand, a girl
of age 4 with moderate activity levels
must drink about 8 cups. This was
calculated by taking 2/3’s of a person’s
weight and adding 12 ounces for every
30-minute exercise routine.
These calculations make the
system personalized! System
could potentially be coupled
with FitBit step-counter app
to determine activity levels
with no manual entry.
Mobile App Simulation Example
Required by
Weight
Required by
Exercise Drank
Missing/
Excess
SUN 8 2 6 4
MON 8 1 8 1
TUE 8 0 6 2
WED 8 1 6 3
THU 8 0 8 0
FRI 8 1 7 2
SAT 8 0 8 0
All measurements are in cups 
The event data was
captured and stored
in an Oracle
database, and
corresponding
graphs and reports
were published on
APEX Front-End to
create Mobile App.
Behavioral Aspect of Project
Multiple input signals are proven to act stronger
behaviorally than a single strong signal, creating a
phenomenon in which 1+1 >2, as humans have
multi-sensory neurons. This concept is titled
“Context dependency” or the fusion of sensory
signals modulated depending on the sensed context
– for different contexts, different combinations of
sensory signals are made. In this system, I
employed the use of a [1] text message report, [2]
self-efficacy app, and [3] auditory feedback.
[1] The text message report was delivered at the
end of every day to summarize whether water
intake requirement was met or not. This constructs
reward- punishment system.
[2] As literature finds the Infralimbic (IL) Cortex to
be the psychobiological location and the site of
where progress as a proxy for self-efficacy is
understood, my mobile app is crucial to eliciting
habitual improvement for behavior change. Users
need to realize first that “change” is actually
possible. Neurological Details shown at right.
[3] In addition, it is important that individuals drink
water at regular intervals to continuously stay
hydrated. Thus, audio reminders were delivered if
individual did not drink water in threshold of time
given (based upon personalization of variables in
Slide 15). The audio influences the amygdala
directly with fear-induced tonal frequency for short-
term behavioral change. Auditory feedback centers
around concept of sensitization and classical fear
conditioning for structured habit formation.
Sensitization is a non-associative learning process in
which the repeated administration of a stimulus,
such as 5000hz tone, results in the progressive
amplification of a response. For instance, if a
drinking event does not happen for a specific
interval of time, then an audio reminder is played
over the speaker to remind the individual. This
periodic stimulus acts as a modicum of control for
cued operant conditioning and helps remind the
individual to keep themselves hydrated.
5000hz tone = fast response; shown at right.
Human
Participant
Survey –
Questionnaire
Form
To test the performance of
the system in real-life, 70
human participant volunteers
were requested to fill out a
BIS/BAS scale questionnaire
and who’s water levels were
then carefully monitored
over a 5-week period.
Implementation Plan
Without Audio
Reminders
With Audio
Reminders
Without the
System
Week 1 Week 2,3,4 Week 5
Stage 1: Baseline Stage 2: Treatment Stage 3: Effect
The need for external
cues to enhance water
intake behavior is
developed.
Helps to converts a
time-based water
intake activity to an
event based activity.
The transtheoretical model proposes change as
a process of five stages.
A planned intervention, such as auditory
stimulus, helps provide motivation to move
through the stages. The audio trigger targets
“Consciousness-Raising” and “Self-Reevaluation,”
in which increasing awareness of the causes and
inviting individuals to make cognitive assessments
of their self-image helps behavioral change.
Variation (%age) = (Actual Water Intake/ Total Water Intake Requirement)*100
Water Intake Consistency Rank/ Level: is calculated as per the table.
• Water Intake ideal consistency Level was reached by Week 5 as seen in the
Box & Whisker Plot.
• Linear Correlation graph clearly shows the straight line in Week 5
FROM
% TO % RANK
0 10 1
10 20 2
20 30 3
30 40 4
40 50 5
50 60 6
60 70 7
70 80 8
80 90 9
90 100 10
100 110 10
Statistical Analysis
5.542857143
7.442857143
8.628571429
9.242857143
9.857142857
0
2
4
6
8
10
12
Week1 Week2 Week3 Week4 Week5
WaterIntakeVariation
Gradual Decrease of Deviation shows Positive Trend towards
Consistent Water Intake Levels
ANOVA
Source of Variation SS df MS F P-value F crit
Between Groups 814.4286 4 203.6071429 170.3191029 2.47354E-80 2.39782821
Within Groups 412.4286 345 1.195445135
Total 1226.857 349
0
2
4
6
8
10
12
0 10 20 30 40 50 60 70 80
WaterIntakeConsistencyLevels
Linear Correlation shows Regular & Consistent Water Intake Levels in Week Five
Week1 Week2 Week3 Week4 Week5
Linear (Week1) Linear (Week2) Linear (Week3) Linear (Week4) Linear (Week5)
Using statistical analysis, the direct decreasing deviation trend as time of system-implementation progresses shows
that the participants were attaining consistent water-intake level readings by the end of the study.
Descriptive Statistics
Week1 Week2 Week3 Week4 Week5
Mean 5.542857143 7.442857 8.628571 9.242857 9.857143
Standard Error 0.206203697 0.135951 0.113611 0.09851 0.042126
Median 5 7 9 9 10
Mode 5 7 9 10 10
Standard Deviation 1.725223903 1.137448 0.950537 0.824194 0.352454
Sample Variance 2.976397516 1.293789 0.90352 0.679296 0.124224
In order to reject the Null Hypothesis, I conducted the ANOVA test and found that the F
value was greater than F Critical. Accordingly, p value is negligible and week 5 values
show less fluctuation/variance/deviation in hydration levels.
ANOVA: Single Factor
SUMMARY
Groups Count Sum Average Variance Avg %age Std. Dev Low High
Week1 70 388 5.542857143 2.976397516 55.43% 17.25% 38.2% 73%
Week2 70 521 7.442857143 1.29378882 74.43% 11.37% 63.1% 86%
Week3 70 604 8.628571429 0.903519669 86.29% 9.51% 76.8% 96%
Week4 70 647 9.242857143 0.679296066 92.43% 8.24% 84.2% 101%
Week5 70 690 9.857142857 0.124223602 98.57% 3.52% 95.0% 102%
Errors/Problems Solutions
Images not recognized correctly
• Enhanced system with machine learning classifiers (Linear
discriminant, KVM, SVM) and used trained set of images
• Increased number of images + more close-up’s
Performance of system
• Improved the performance by using more powerful computer
(intel core i7 processor with 16GB memory)
• Use of imageSet class – it operates on image file locations,
and therefore does not load all the images into memory.
Text reminders not always effective
• Developed audio reminders and kept text messages to be sent
only once at the end of each day for showing the final
summary of water intake.
High Cost
• Availability of software’s like MATLAB
• Use of new and cheaper web cam
Errors Identified & Solutions Taken
Conclusion
What were the
results?
• The Linear discriminant Classifier used by machine learning
algorithm performed the best in image classification and hence
capturing water intake activities
• Image acquisition was successfully implemented to capture
water intake frequency
• Appropriate audio & text reminders were sent as per
expectations and were successful in increasing awareness and in
most cases improving the habits of water intake of participants
surveyed.
Benefits of the
system?
• Simple & cost effective system
• Low maintenance
• High accuracy and instant response times
• Can be used for wide possibilities of events if trained
• Helps in reducing fatigue, migraines, high blood pressure, and
other correlated diseases due to water dehydration.
The stated goal was accomplished
Human Health Community & Social Economy/Cost
Improves overall health –
mental health, athletic
performance, appearance,
feelings & immune system
Mild dehydration can alter a
person’s mood, energy levels,
and ability to think - hence
impacting families/communities.
According to U. S. statistics,
$1.36 billion is spent to treat
hospitalized elderly patients with
dehydration as primary diagnosis
Reduces vulnerability to chronic
health conditions - high blood
pressure, digestive disorders,
asthma, obesity, high cholesterol,
dermatitis/psoriasis, bladder and
kidney diseases, acidosis, etc
Hydration improves mental
performance and decreases
sensitivity to environmental &
social factors. Hence, it reduces
unhappiness, depression,
suicide and drug/ alcohol use.
At aggregate level, the potential
national saving from avoidable
hospitalizations in elderly
patients hospitalized for
dehydration has been estimated
in $114 billion for 1999
Research & Commercialization of System can Lead to Global Benefits
Future Applications
1. The system can be implemented in daycare centers and senior homes as to address both
younger generation’s misplaced priorities and senior population’s forgetfulness.
2. System can be linked to a Fitbit or smartphone for more active users.
3. The system can be enhanced to capture various activities and events. Database could be
linked to medical records; thus improving patient wellbeing.
4. Text alerts could be sent to multiple caretakers and family members, in case of emergency.

More Related Content

PDF
Fitness Trainer Application Using Artificial Intelligence
PDF
Draft scientific paper
PDF
Fitomatic: A Web Based Automated Healthcare Supervision and Monitoring App
PPTX
Lisa Marriott - Working with Local Schools on Nutrition Education
PPSX
Can We Use Fitbits in Our Work?
PDF
Hack The NECSTCamp: fooday
PPTX
Thesis proposal presentation
PPTX
Digital biomarkers for preventive personalised healthcare
Fitness Trainer Application Using Artificial Intelligence
Draft scientific paper
Fitomatic: A Web Based Automated Healthcare Supervision and Monitoring App
Lisa Marriott - Working with Local Schools on Nutrition Education
Can We Use Fitbits in Our Work?
Hack The NECSTCamp: fooday
Thesis proposal presentation
Digital biomarkers for preventive personalised healthcare

Similar to Sigma Xi Research Showcase Submission (20)

PPTX
Exploring Different Methods of Dietary Assessment for Food.pptx
PPTX
DDRS Presentation Dec 19
PPTX
Using new technologies for understanding and changing behaviors
PDF
IRJET- A Food Recognition System for Diabetic Patients based on an Optimized ...
PDF
Designing with Data
KEY
Impact of data review q selfsilivalley10132011
PDF
Effective Nutrition Label Use on Smartphones
PPTX
Sensors and Big Data for Health and Well-being
PPTX
dietary_mobile_applications_that-informs_the_user.pptx
PDF
Food id pres
PPTX
A Sensorized and Health aspect-based framework to improve the continuous moni...
PDF
Tamr presentation
PPTX
Digital biomarkers for preventive personalised healthcare
PDF
Healthify; Motivating students to live healthier
PDF
Eating Habit and Health Monitoring System using Android Based Machine Learning
DOCX
Crowdsourcing predictors of behavioral outcomes
PDF
IRJET- Assessing Food Volume and Nutritious Values from Food Images using...
PPTX
The Quantified Self: From Idiosyncratic Hobby to an Emerging Growth Industry
PDF
CLICKNL DRIVE 2019 | Health and healthcare: data for designing behavioural ch...
PDF
Health monitoring catalogue based on human activity classification using mac...
Exploring Different Methods of Dietary Assessment for Food.pptx
DDRS Presentation Dec 19
Using new technologies for understanding and changing behaviors
IRJET- A Food Recognition System for Diabetic Patients based on an Optimized ...
Designing with Data
Impact of data review q selfsilivalley10132011
Effective Nutrition Label Use on Smartphones
Sensors and Big Data for Health and Well-being
dietary_mobile_applications_that-informs_the_user.pptx
Food id pres
A Sensorized and Health aspect-based framework to improve the continuous moni...
Tamr presentation
Digital biomarkers for preventive personalised healthcare
Healthify; Motivating students to live healthier
Eating Habit and Health Monitoring System using Android Based Machine Learning
Crowdsourcing predictors of behavioral outcomes
IRJET- Assessing Food Volume and Nutritious Values from Food Images using...
The Quantified Self: From Idiosyncratic Hobby to an Emerging Growth Industry
CLICKNL DRIVE 2019 | Health and healthcare: data for designing behavioural ch...
Health monitoring catalogue based on human activity classification using mac...
Ad

Recently uploaded (20)

PDF
Model Code of Practice - Construction Work - 21102022 .pdf
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PPTX
Geodesy 1.pptx...............................................
PPTX
UNIT 4 Total Quality Management .pptx
PPTX
Internet of Things (IOT) - A guide to understanding
DOCX
573137875-Attendance-Management-System-original
PPTX
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
PPT
introduction to datamining and warehousing
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
PPTX
Foundation to blockchain - A guide to Blockchain Tech
PPTX
Safety Seminar civil to be ensured for safe working.
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PDF
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
PDF
PPT on Performance Review to get promotions
PPTX
CH1 Production IntroductoryConcepts.pptx
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PDF
Digital Logic Computer Design lecture notes
PPT
Mechanical Engineering MATERIALS Selection
PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
Model Code of Practice - Construction Work - 21102022 .pdf
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
Operating System & Kernel Study Guide-1 - converted.pdf
Geodesy 1.pptx...............................................
UNIT 4 Total Quality Management .pptx
Internet of Things (IOT) - A guide to understanding
573137875-Attendance-Management-System-original
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
introduction to datamining and warehousing
UNIT-1 - COAL BASED THERMAL POWER PLANTS
Foundation to blockchain - A guide to Blockchain Tech
Safety Seminar civil to be ensured for safe working.
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
PPT on Performance Review to get promotions
CH1 Production IntroductoryConcepts.pptx
Embodied AI: Ushering in the Next Era of Intelligent Systems
Digital Logic Computer Design lecture notes
Mechanical Engineering MATERIALS Selection
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
Ad

Sigma Xi Research Showcase Submission

  • 1. 1 A Novel Approach on Preventing Dehydration by Monitoring Water Intake using Image Acquisition & Processing Technologies A pragmatic solution to preventing dehydration and cultivating healthier habits Natasha Chugh UNT: TAMS
  • 2. First and foremost, this work would not have been possible without the academic support of the Texas Academy of Mathematics and Science, a residential undergraduate program at the University of North Texas. I would like to show my gratitude to Dr. Jeffry Alan Kelber, my research mentor, for showing me, by his example, what a good scientist (and person) should be. I am especially indebted to Dr. James Duban, the Associate Dean for Research and National Scholarships, who commented on earlier versions of this project’s manuscript and provided me with extensive personal and professional guidance that taught me a great deal about scientific research. I would also like to thank Dr. Glênisson de Oliveira, Dr. Eric L. Gruver, Mr. Samuel Earls, and Mr. Russ Stukel for taking me under their wing and helping me fit in as a high school junior at college. For many memorable moments, I thank the staff and students at McConnell Residential Hall for providing me with a second home. Lastly, nobody has been more important to me in the pursuit of this project than the members of my family. I would like to thank my parents; whose knowledge and guidance are with me in whatever I pursue. This slideshow stands as a testament to their unconditional love and encouragement. Acknowledgements
  • 3. Water is essential for all physiological processes. Lack of water or dehydration can result in many health disorders (listed at left). The good news is that behavior-induced dehydration is easily preventable. Yet, a study by CDC shows that 1/4 of children ages 6 to 19 don't drink water, turning to caffeinated beverages instead. Likewise, a staggering percentage – 75% of all Americans are chronically dehydrated. Thus, the purpose of this project is to prevent dehydration and encourage the altering of unhealthy habits by constructing a system that not only monitors water- intake activity but also provides periodic feedback. This project targets human behavior through cognitive-motivation methodologies. Early Signs Mature Signs  Fatigue  Anxiety  Irritability  Depression  Cravings  Cramps  Headaches  Heartburn  Joint Pain  Back Pain  Migraines  Fibromyalgia  Constipation  Colitis Signs of Dehydrations Introduction Background Info & Purpose
  • 4. Research To understand important concepts, notions, and current technologies. Develop Image acquisition and processing system should be constructed to capture the water intake frequency of an individual and help regulate an individual’s fluid intake by sending appropriate reminders. Integrate System should be tested to analyze behavioral responses & system accuracy. Engineering Goal The goal is twofold, in that, one, an image acquisition system can be constructed that will capture the water intake frequency of an individual, and second, it should help regulate an individual’s fluid intake by sending appropriate reminders.
  • 6. Step 1: Image Acquisition • Acquire image feed from Webcam Step 2: Image Processing • Using Matlab s/w - the image feed is classified with trained set of images. Find best classifier. Step 3: Record data in database • Capture data in Oracle RDBMS Step 4: Testing • Confirm if trained set of images can recognize the objects using live feed Step 5: Implementation • Add audio reminders • SMS Text-messaging connection • APEX Front-end mobile app • Give to human participants to test Step 6: Analyze data - Statistics • Error bars / Box Whisker plots and ANOVA statistical model MATLAB Detailed Procedure
  • 8. Video to Frames Conversion A webcam was connected to the laptop which captured the live video i.e. human activities which was then converted to images in the laptop using MATLAB Image acquisition tool.
  • 9. Image Features - BagOfFeatures Further these images are classified using MATLAB image processing & machine learning toolboxes if the activity in those images is a drinking or a non-drinking event. The classifiers are trained using features extracted from a set of images (training set). To identify these objects from an ongoing stream of close-range video, my program extracts the BagofFeatures or dominant characteristics of each object. MATLAB extracted 200 features from the training set of 400 to 600 pictures of each object.
  • 10. Classifiers LDA (Linear Discriminant) KNN (K-nearest neighbor) SVM (Support Vector Machine) https://www.ncbi.nlm.nih.gov Each picture is a d-dimensional matrix that is then translated into a 2-dimensional plot with its features graphed as coordinates. The program then analyzed the real- time video feed and determined whether it was a “drinking” or “non-drinking event” by analyzing the coordinates of each feature and seeing if it matches up with any of the training set’s data. However, there are many classifiers out there. Just to name a few that we tested were KNN, SVM, Linear Discriminant Analysis (LDA), Complex Tree, and more.
  • 11. LDA Bayes Rule Multivariate Gaussian distribution density Same covariance matrix )()|( )()|( )( )()|( )|( lyPlyXP kyPkyXP XP kyPkyXP XkyP l       Class Conditional Prior Marginal              kk t k k n XXkyXp   1 2/1 2 1 exp ||)2( 1 )|(               )( 2 1 0 )|( | log 111 l t l t klk X XlyP XkyP  LDA Algorithm
  • 12. MATLAB LDA Results LDA Parallel Coordinates Plot Image Features • To understand how the classifier performed. • Rows show true class, columns show predicted class. The diagonal cells show where both match. • Green cells and high percentages show classifier has performed well and classified this class correctly. • To include/ exclude features • It shows relationships between features and identifies useful predictors for separating classes. • Training data and misclassified points are visualized • The misclassified points are seen as dashed lines. LDA Confusion Matrix
  • 13. As seen in the 300 trials performed, as well as the confusion matrixes and parallel plots on the previous slide, the Linear Discriminant (LDA) classifier undoubtedly outperformed KNN and SVM with an estimated 90% Accuracy Rate. Readings & Graphs – Per Classifier LDA Linear SVM Fine KNN Recognized Correctly 89% 79% 49% Recognized Incorrectly 11% 21% 51% Total Readings 80 80 80 89% 79% 49% 11% 21% 51% 0% 10% 20% 30% 40% 50% 60% 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100% Linear Discriminant Linear SVM Fine KNN LDA PERFORMED BEST Recognized Correctly Recognized Incorrectly
  • 14. Glass of Water Mug No Event Water Bottle The events were captured using LDA for four individual scenarios: [1] Person drinking water from water-bottle, [2] Glass, [3] Mug and [4] an individual not drinking water. MATLAB Image Classification Results
  • 15. Water Intake Personalization Calculations Sampleparameters Body Weight = W (in pounds) Activity water requirement per chart = A (oz.) Total Water Intake requirement = 2/3 * W + A (in ounces) Exercise Intensity Exercise Duration Amount of Water low 30 minutes 10 oz 60 minutes 24 oz 90 minutes 34 oz medium 30 minutes 14 oz 60 minutes 27 oz 90 minutes 44 oz Created simulated profiles of individuals that included their weight, age, gender, activity levels, and the general climate of their region. These variables influenced their water intake amounts. For example, a young male in his 20’s who is highly active should drink about 14 cups of water per day. On the other hand, a girl of age 4 with moderate activity levels must drink about 8 cups. This was calculated by taking 2/3’s of a person’s weight and adding 12 ounces for every 30-minute exercise routine. These calculations make the system personalized! System could potentially be coupled with FitBit step-counter app to determine activity levels with no manual entry.
  • 16. Mobile App Simulation Example Required by Weight Required by Exercise Drank Missing/ Excess SUN 8 2 6 4 MON 8 1 8 1 TUE 8 0 6 2 WED 8 1 6 3 THU 8 0 8 0 FRI 8 1 7 2 SAT 8 0 8 0 All measurements are in cups  The event data was captured and stored in an Oracle database, and corresponding graphs and reports were published on APEX Front-End to create Mobile App.
  • 17. Behavioral Aspect of Project Multiple input signals are proven to act stronger behaviorally than a single strong signal, creating a phenomenon in which 1+1 >2, as humans have multi-sensory neurons. This concept is titled “Context dependency” or the fusion of sensory signals modulated depending on the sensed context – for different contexts, different combinations of sensory signals are made. In this system, I employed the use of a [1] text message report, [2] self-efficacy app, and [3] auditory feedback. [1] The text message report was delivered at the end of every day to summarize whether water intake requirement was met or not. This constructs reward- punishment system. [2] As literature finds the Infralimbic (IL) Cortex to be the psychobiological location and the site of where progress as a proxy for self-efficacy is understood, my mobile app is crucial to eliciting habitual improvement for behavior change. Users need to realize first that “change” is actually possible. Neurological Details shown at right.
  • 18. [3] In addition, it is important that individuals drink water at regular intervals to continuously stay hydrated. Thus, audio reminders were delivered if individual did not drink water in threshold of time given (based upon personalization of variables in Slide 15). The audio influences the amygdala directly with fear-induced tonal frequency for short- term behavioral change. Auditory feedback centers around concept of sensitization and classical fear conditioning for structured habit formation. Sensitization is a non-associative learning process in which the repeated administration of a stimulus, such as 5000hz tone, results in the progressive amplification of a response. For instance, if a drinking event does not happen for a specific interval of time, then an audio reminder is played over the speaker to remind the individual. This periodic stimulus acts as a modicum of control for cued operant conditioning and helps remind the individual to keep themselves hydrated. 5000hz tone = fast response; shown at right.
  • 19. Human Participant Survey – Questionnaire Form To test the performance of the system in real-life, 70 human participant volunteers were requested to fill out a BIS/BAS scale questionnaire and who’s water levels were then carefully monitored over a 5-week period.
  • 20. Implementation Plan Without Audio Reminders With Audio Reminders Without the System Week 1 Week 2,3,4 Week 5 Stage 1: Baseline Stage 2: Treatment Stage 3: Effect The need for external cues to enhance water intake behavior is developed. Helps to converts a time-based water intake activity to an event based activity. The transtheoretical model proposes change as a process of five stages. A planned intervention, such as auditory stimulus, helps provide motivation to move through the stages. The audio trigger targets “Consciousness-Raising” and “Self-Reevaluation,” in which increasing awareness of the causes and inviting individuals to make cognitive assessments of their self-image helps behavioral change.
  • 21. Variation (%age) = (Actual Water Intake/ Total Water Intake Requirement)*100 Water Intake Consistency Rank/ Level: is calculated as per the table. • Water Intake ideal consistency Level was reached by Week 5 as seen in the Box & Whisker Plot. • Linear Correlation graph clearly shows the straight line in Week 5 FROM % TO % RANK 0 10 1 10 20 2 20 30 3 30 40 4 40 50 5 50 60 6 60 70 7 70 80 8 80 90 9 90 100 10 100 110 10 Statistical Analysis
  • 22. 5.542857143 7.442857143 8.628571429 9.242857143 9.857142857 0 2 4 6 8 10 12 Week1 Week2 Week3 Week4 Week5 WaterIntakeVariation Gradual Decrease of Deviation shows Positive Trend towards Consistent Water Intake Levels ANOVA Source of Variation SS df MS F P-value F crit Between Groups 814.4286 4 203.6071429 170.3191029 2.47354E-80 2.39782821 Within Groups 412.4286 345 1.195445135 Total 1226.857 349
  • 23. 0 2 4 6 8 10 12 0 10 20 30 40 50 60 70 80 WaterIntakeConsistencyLevels Linear Correlation shows Regular & Consistent Water Intake Levels in Week Five Week1 Week2 Week3 Week4 Week5 Linear (Week1) Linear (Week2) Linear (Week3) Linear (Week4) Linear (Week5) Using statistical analysis, the direct decreasing deviation trend as time of system-implementation progresses shows that the participants were attaining consistent water-intake level readings by the end of the study.
  • 24. Descriptive Statistics Week1 Week2 Week3 Week4 Week5 Mean 5.542857143 7.442857 8.628571 9.242857 9.857143 Standard Error 0.206203697 0.135951 0.113611 0.09851 0.042126 Median 5 7 9 9 10 Mode 5 7 9 10 10 Standard Deviation 1.725223903 1.137448 0.950537 0.824194 0.352454 Sample Variance 2.976397516 1.293789 0.90352 0.679296 0.124224 In order to reject the Null Hypothesis, I conducted the ANOVA test and found that the F value was greater than F Critical. Accordingly, p value is negligible and week 5 values show less fluctuation/variance/deviation in hydration levels. ANOVA: Single Factor SUMMARY Groups Count Sum Average Variance Avg %age Std. Dev Low High Week1 70 388 5.542857143 2.976397516 55.43% 17.25% 38.2% 73% Week2 70 521 7.442857143 1.29378882 74.43% 11.37% 63.1% 86% Week3 70 604 8.628571429 0.903519669 86.29% 9.51% 76.8% 96% Week4 70 647 9.242857143 0.679296066 92.43% 8.24% 84.2% 101% Week5 70 690 9.857142857 0.124223602 98.57% 3.52% 95.0% 102%
  • 25. Errors/Problems Solutions Images not recognized correctly • Enhanced system with machine learning classifiers (Linear discriminant, KVM, SVM) and used trained set of images • Increased number of images + more close-up’s Performance of system • Improved the performance by using more powerful computer (intel core i7 processor with 16GB memory) • Use of imageSet class – it operates on image file locations, and therefore does not load all the images into memory. Text reminders not always effective • Developed audio reminders and kept text messages to be sent only once at the end of each day for showing the final summary of water intake. High Cost • Availability of software’s like MATLAB • Use of new and cheaper web cam Errors Identified & Solutions Taken
  • 26. Conclusion What were the results? • The Linear discriminant Classifier used by machine learning algorithm performed the best in image classification and hence capturing water intake activities • Image acquisition was successfully implemented to capture water intake frequency • Appropriate audio & text reminders were sent as per expectations and were successful in increasing awareness and in most cases improving the habits of water intake of participants surveyed. Benefits of the system? • Simple & cost effective system • Low maintenance • High accuracy and instant response times • Can be used for wide possibilities of events if trained • Helps in reducing fatigue, migraines, high blood pressure, and other correlated diseases due to water dehydration. The stated goal was accomplished
  • 27. Human Health Community & Social Economy/Cost Improves overall health – mental health, athletic performance, appearance, feelings & immune system Mild dehydration can alter a person’s mood, energy levels, and ability to think - hence impacting families/communities. According to U. S. statistics, $1.36 billion is spent to treat hospitalized elderly patients with dehydration as primary diagnosis Reduces vulnerability to chronic health conditions - high blood pressure, digestive disorders, asthma, obesity, high cholesterol, dermatitis/psoriasis, bladder and kidney diseases, acidosis, etc Hydration improves mental performance and decreases sensitivity to environmental & social factors. Hence, it reduces unhappiness, depression, suicide and drug/ alcohol use. At aggregate level, the potential national saving from avoidable hospitalizations in elderly patients hospitalized for dehydration has been estimated in $114 billion for 1999 Research & Commercialization of System can Lead to Global Benefits Future Applications 1. The system can be implemented in daycare centers and senior homes as to address both younger generation’s misplaced priorities and senior population’s forgetfulness. 2. System can be linked to a Fitbit or smartphone for more active users. 3. The system can be enhanced to capture various activities and events. Database could be linked to medical records; thus improving patient wellbeing. 4. Text alerts could be sent to multiple caretakers and family members, in case of emergency.