Automated Detection of Patients in Hospital Video Recordings

Siddharth Sharma, Florian Dubost, Christopher Lee-Messer, Daniel RubinarXiv 2021

TL;DR

Researchers at Stanford have developed a specialized pipeline for detecting epilepsy patients in hospital video recordings, a task where standard "off-the-shelf" AI models typically fail. By fine-tuning a Mask R-CNN on a custom dataset of clinical footage, they achieved a mean average precision (mAP50) of 0.64, providing a crucial first step toward automated seizure monitoring and localization.

What Problem Does This Paper Address?

In neurology, patients with epilepsy are often monitored using video electroencephalogram (vEEG) tests. While EEG tracks brainwaves, the video provides essential context for physical movements. However, manually monitoring these videos is incredibly resource-intensive for clinical staff.

Automating this process is surprisingly difficult for standard computer vision models. Unlike benchmark datasets (like COCO or ImageNet) where humans are usually standing or sitting in clear view, hospital patients are often:

  • Partially or almost entirely covered by blankets.
  • Wearing bulky EEG electrode caps and tangled in wires.
  • Recorded from unusual overhead camera angles.
  • Surrounded by medical equipment or obscured by visiting relatives.

The authors address the lack of automated methods for tracking patient locations in these cluttered, high-occlusion environments.

Methods

The authors employed Mask R-CNN, a standard two-stage deep learning framework for object detection and instance segmentation. They tested two backbone architectures: ResNet-50 and ResNet-101.

The core of their approach was Model Fine-tuning. They took models pre-trained on ImageNet and fine-tuned them on their specific clinical dataset. To improve the model's ability to generalize to different hospital rooms and lighting conditions, they implemented a custom training loop with heavy data augmentation, including:

  • Random brightness and contrast changes (±10%).
  • Random horizontal flipping.
  • Resizing, cropping, and random rotations (up to 15 degrees).

Datasets

The study utilized a newly curated dataset of 45 video recordings of hospital patients (originally 50, but 5 were dropped due to formatting errors).

  • Composition: The dataset includes neonates, children, teenagers, and adults, with a higher concentration on younger patients.
  • Scale: Each 40-second clip was sampled at 15 fps, totaling 30,000 frames.
  • Annotation: Bounding boxes were created using the Computer Vision Annotation Tool (CVAT). Crucially, the authors included body parts occluded by blankets within the bounding boxes to help the model learn the patient's full spatial extent.
Figure 1: Sample annotated EEG patient video frames. Patient faces are redacted for privacy.

Key Insights and Ideas

  • The Domain Gap is Real: Standard models pre-trained on general images perform poorly in clinical settings. Without fine-tuning, the models often failed to detect the patient entirely, especially when covered by bedding.
  • Blankets as Obstacles: The primary challenge identified was the "disappearance" of limbs and torsos under hospital sheets. Fine-tuning allows the model to learn the specific visual cues of a patient in a hospital bed, even when only a head or a small portion of the body is visible.
  • High Variance: Performance varied significantly between video clips. In cases where the patient was clearly visible without covers, even baseline models did okay. However, in "difficult" clips with heavy occlusion or complex backgrounds, fine-tuning was the difference between success and total failure.

Key Results

The results demonstrate that domain-specific fine-tuning is mandatory for clinical applications:

  • Fine-tuned ResNet-101: Achieved the best performance with a mAP50 of 64.0.
  • Fine-tuned ResNet-50: Followed closely with a mAP50 of 53.9.
  • Baseline (No Fine-tuning): Performed poorly, reaching only 19.3 (ResNet-50) and 14.1 (ResNet-101) mAP50.
Figure 2: Comparison of fine-tuned models to pre-trained only models with mAP at IoU of 0.5. Results are reported on the test set.

Limitations and Future Work

  • Lack of Temporal Context: The current model processes every video frame independently. The authors note that leveraging temporal information (how a patient moves over time) using 3D ResNets or RNNs could significantly improve tracking stability.
  • Dataset Size: While 30,000 frames is a solid start, the model was tested on only 5 videos. Expanding the dataset to include more diverse hospital environments and lighting conditions is necessary for a production-ready system.
  • Post-processing: The authors suggest that smoothing the predicted bounding box coordinates across frames could be a simple second optimization step to reduce "jitter" in patient tracking.

Summary updated

BibTeX
@misc{sharma2021automated,
  author = {Siddharth Sharma and Florian Dubost and Christopher Lee-Messer and Daniel Rubin},
  title = {{Automated Detection of Patients in Hospital Video Recordings}},
  year = {2021},
  eprint = {2111.14270},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2111.14270},
}
Figure