Development of a Wearable Camera and AI Algorithm for Medication Behavior Recognition

Hwiwon Lee, Sekyoung Youm2021

TL;DR

This paper introduces a novel wearable smartwatch system with an integrated camera and an AI algorithm designed to automatically recognize medication-taking behavior. By combining object detection (Faster R-CNN) and action recognition (LSTM), the system achieves a high accuracy of 92.7%, offering a promising solution for improving medication adherence and enabling timely interventions.

What Problem Does This Paper Address?

A significant challenge in healthcare is medication non-adherence, with estimates suggesting 40-50% of patients with chronic conditions fail to take their medications as prescribed. This non-adherence leads to poor health outcomes, increased healthcare costs, and inefficiencies in clinical trials. Current monitoring methods are often manual, rely on patient self-reporting (which can be inaccurate), or require active patient participation, limiting their real-world applicability. The paper aims to bridge this gap by developing an unobtrusive, automated system that can accurately track medication-taking behavior without requiring users to change their habits.

Methods

The core of the proposed system is a two-module AI approach:

  • Module 1: Object Detection (Model 1): This module utilizes a Faster R-CNN (Region-based Convolutional Neural Network) architecture. Faster R-CNN is a well-established deep learning technique for identifying and localizing objects within images by first proposing regions of interest and then classifying them. This module is responsible for detecting key objects related to medication intake, such as pill bottles, pills, cups, and the user's hand.
  • Module 2: Action Recognition (Model 2): This module employs a Long Short-Term Memory (LSTM) network. LSTMs are particularly well-suited for processing sequential data, making them ideal for analyzing video frames to recognize actions over time. Model 2 takes the object detection results from Model 1 and uses them as input to classify the overall medication-taking action, distinguishing between successful intake and other related behaviors.

The system is implemented on a custom-built smartwatch featuring a Raspberry Pi Zero, a camera module, and a battery. The camera captures video of the user's hand and medication, which is then processed by the AI algorithm.

Datasets

The study utilized a custom dataset collected from 89 participants. This dataset comprised approximately 50,000 image frames derived from video clips of participants taking medication. For training Model 1 (object detection), 40,000 images were used, with 10,000 reserved for testing. For Model 2 (action recognition), a separate dataset of 270 samples was used, with 160 for training and 110 for testing, balanced between medication-taking and non-medication-taking activities. The objects for Model 1 were labeled, including categories like "Cup," "Hand," "Bottle," "Open Bottle," and "Pill."

Key Insights and Ideas

  • Unobtrusive Monitoring: The integration of a camera into a wearable smartwatch allows for continuous, passive monitoring of medication behavior without requiring users to actively engage with the device or alter their routines.
  • Synergistic AI Approach: The combination of a robust object detection model (Faster R-CNN) with a sequence-aware action recognition model (LSTM) proved effective in accurately capturing the nuances of medication-taking actions.
  • Practical Application of Deep Learning: The study demonstrates the successful application of advanced deep learning techniques (CNNs and LSTMs) to a real-world healthcare problem, achieving high accuracy in a complex behavioral task.
  • Potential for Broader Applications: The underlying technology, which focuses on hand movements and object interaction, suggests potential for extending this system to monitor other health-related behaviors, such as using inhalers, glucometers, or autoinjectors.

Key Results

The developed AI algorithm achieved an overall accuracy of 92.7% for medication behavior recognition. Model 1 (object detection) demonstrated strong performance, with an average Intersection over Union (IoU) of 86.1% across various objects. Model 2, when combined with Model 1, significantly outperformed other evaluated algorithms like logistic regression, boosted decision trees, SVMs, and decision forests in terms of accuracy. The confusion matrix showed a low number of false positives (3) and false negatives (5) out of 110 test cases.

Limitations and Future Work

The authors acknowledge that the study was conducted in a laboratory environment, which may not fully represent real-world conditions. Future work should focus on:

  • Robustness Testing: Conducting tests in diverse environments to confirm the system's robustness.
  • Data Augmentation: Collecting more data from various situations to further improve accuracy.
  • Expanded Object Recognition: Enhancing the system to distinguish between different types of pills, not just classify them as "pill."
  • Broader Application Scope: Extending the system to recognize a wider range of objects and behaviors, including inhaler usage, glucometer readings, autoinjector use, and polypharmacy.
  • Smart Alarm Functionality: Developing an alarm function based on motion sensor data and learned arm patterns to promote timely medication intake.
  • Telemedicine Integration: Applying the system to non-face-to-face telemedicine platforms for disease prevention and management.

Summary updated

BibTeX
@misc{lee2021development,
  author = {Hwiwon Lee and Sekyoung Youm},
  title = {{Development of a Wearable Camera and AI Algorithm for Medication Behavior Recognition}},
  year = {2021},
  doi = {10.3390/s21113594},
}
Figure