A Distributed System Using MS Kinect and Event Calculus for Adaptive Physiotherapist Rehabilitation

12
A Distributed System Using MS Kinect and Event Calculus for Adaptive Physiotherapist Rehabilitation Stefano Bragaglia University of Bristol Stefano Di Monte University of Bologna IIBM 2014 Birmingham, 2 July 2014 Paola Mello University of Bologna

description

In many countries of the world, the life expectancy increases but the population ages so rapidly that it is expected that soon it will be difficult to ensure a good life quality to the elder people when health issues arise. In this paper, we consider this problem from the point of view of the physiotherapy rehabili- tation which nowadays is perceived as costly and inconvenient for the elder patients. In order to lessen these problems, we propose a distributed architecture to allow the physiotherapists to remotely assist their patients while they comfortably do exercises from home. As in other proposals, the Human Pose Recognition is delegated to a computer equipped with MS Kinect and neural networks. Our approach, however, differs from others because it includes a logical framework based on Event Calculus augmented with Expectations which provides a higher-level description of the exercises and a mean to measure how well they were done.

Transcript of A Distributed System Using MS Kinect and Event Calculus for Adaptive Physiotherapist Rehabilitation

Page 1: A Distributed System Using MS Kinect and Event Calculus for Adaptive Physiotherapist Rehabilitation

A Distributed SystemUsing MS Kinect and Event Calculus

for Adaptive Physiotherapist Rehabilitation

Stefano BragagliaUniversity of Bristol

Stefano Di MonteUniversity of Bologna

IIBM 2014Birmingham, 2 July 2014

Paola MelloUniversity of Bologna

Page 2: A Distributed System Using MS Kinect and Event Calculus for Adaptive Physiotherapist Rehabilitation

IIBM 2014 2

Introduction

• Population ageing fast: fewer young people to support the elderly

• Life expectancy increases, as well as health issues in older age

• Proven correlation between improperly treated issues and consequent more serious health problems

2 July 2014

Page 3: A Distributed System Using MS Kinect and Event Calculus for Adaptive Physiotherapist Rehabilitation

IIBM 2014 3

Use Case Scenario

• Physiotherapy rehabilitation for elder people– Hospitals and LHUs can be source of anxiety– Very unbalanced patients/doctor ratio– Exercises: generally low chances of a proper cure• Frequent visits to costly physiotherapy centres• Many causes lead to desist from a proper cure…• or insist with an improper cure!

2 July 2014

Page 4: A Distributed System Using MS Kinect and Event Calculus for Adaptive Physiotherapist Rehabilitation

IIBM 2014 4

Our proposal

• Use non-invasive technology to virtually bring the physiotherapist in the patient’s house

• Distributed system– LHU’s data server– Physiotherapist’s application– Patient’s device

2 July 2014

Page 5: A Distributed System Using MS Kinect and Event Calculus for Adaptive Physiotherapist Rehabilitation

IIBM 2014 5

Computer Vision

• Human pose prediction with MS Kinect– 6 networks, one per limb/body part with Weka• Multi-Layer Perceptrons *• Decision Trees• Logistic Model Trees• Support Vector Machines *

– Input: the coordinates of the appropriate joints– Output: a selection of partial frontal poses– For each frame and network:

the ID of the predicted pose and its likelihood

2 July 2014

Page 6: A Distributed System Using MS Kinect and Event Calculus for Adaptive Physiotherapist Rehabilitation

IIBM 2014 6

An Overlying Logic Framework

• Provides – a convenient high-level way to describe exercises– a low-level operational way to review them

• Based on– Event Calculus: streamlined and resilient formalism to

reason about actions and their effects on a domain– Expectations: formalism to declaratively describe

expected and/or undesired workflows within a domain• Implemented as forward rules with Drools

2 July 2014

Page 7: A Distributed System Using MS Kinect and Event Calculus for Adaptive Physiotherapist Rehabilitation

IIBM 2014 7

1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0101 0111 1001 1001 0111 1001 1001 0101 0111 1001

Example

• Example: sit-to-stand– Event: FrameAcquired (parametric)– Fluents: leftLegPose, leftLegPoseScore, …– Workflow: sit, stand, compute score

2 July 2014

Page 8: A Distributed System Using MS Kinect and Event Calculus for Adaptive Physiotherapist Rehabilitation

IIBM 2014 8

1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0101 0111 1001 1001 0111 1001 1001 0101 0111 1001

Example: Sit-to-Stand (1/4)

on FrameAcquired( ... , leftLegPose, leftLegPoseScore, rightLegPose, rightLegPoseScore, ... ) ... , set LeftLegPose to leftLegPose, set LeftLegPoseScore to leftLegPoseScore, ... .

2 July 2014

Page 9: A Distributed System Using MS Kinect and Event Calculus for Adaptive Physiotherapist Rehabilitation

IIBM 2014 9

1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0101 0111 1001 1001 0111 1001 1001 0101 0111 1001

Example: Sit-to-Stand (2/4)

on FrameAcquired if SittingScore < 0 expect LeftLegPose == 1 and RightLegPose == 1 when fulfilled set SittingScore to LeftLegPoseScore * RightLegPoseScore when violated set SittingScore to min(LeftLegPoseScore, RightLegPoseScore).

2 July 2014

Page 10: A Distributed System Using MS Kinect and Event Calculus for Adaptive Physiotherapist Rehabilitation

IIBM 2014 10

1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0101 0111 1001 1001 0111 1001 1001 0101 0111 1001

Example: Sit-to-Stand (1/4)

on FrameAcquired if SittingScore >= 0 and StandingScore < 0 expect LeftLegPose == 0 and RightLegPose == 0 before 2s when fulfilled set StandingScore to LeftLegPoseScore * RightLegPoseScore when violated set StandingScore to min(LeftLegPoseScore, RightLegPoseScore).

2 July 2014

Page 11: A Distributed System Using MS Kinect and Event Calculus for Adaptive Physiotherapist Rehabilitation

IIBM 2014 11

1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0111 1001 1001 0101 0101 0111 1001 1001 0111 1001 1001 0101 0111 1001

Example: Sit-to-Stand (4/4)

on FrameAcquired if SittingScore >= 0 and StandingScore >= 0 and ExerciseScore < 0 set ExerciseScore to SittingScore * StandingScore.

2 July 2014

Page 12: A Distributed System Using MS Kinect and Event Calculus for Adaptive Physiotherapist Rehabilitation

IIBM 2014 12

Conclusions

• Contributions– Distributed architecture to assist elder people in

physiotherapy rehabilitation– Combines CV techniques with a powerful logic

framework– Proof-of-concept, not trained with proper data

• Future works– With the approval of an ethical committee,

creation of a postural dataset for data mining

2 July 2014