Transfer Learning of Deep Spatiotemporal Networks to Model Arbitrarily Long Videos of Seizures

Fernando Pérez-García, Catherine Scott, Rachel Sparks, Beate Diehl, Sébastien OurselinarXiv 2021 · DOI

TL;DR

GESTURES is a novel deep learning architecture that classifies arbitrarily long seizure videos by combining spatiotemporal feature extraction with recurrent neural networks. By leveraging transfer learning from large-scale human action recognition datasets, the model achieves a remarkable 98.9% accuracy in distinguishing between focal and bilateral tonic-clonic seizures.

What Problem Does This Paper Address?

Analyzing "seizure semiology"—the specific sequence of symptoms and physical signs during an epileptic event—is vital for diagnosing and treating epilepsy. However, manual visual analysis by clinicians is notoriously subjective, leading to poor inter-rater reliability.

While computer vision offers a path toward objective assessment, two major hurdles exist:

  1. Temporal Scale: Seizures can last anywhere from seconds to tens of minutes. Most existing deep learning models focus on short snippets (under 2 seconds), ignoring the critical chronological progression of the seizure.
  2. Data Scarcity: Curating high-quality, annotated clinical video datasets is expensive and time-consuming, making it difficult to train complex models from scratch.

Methods

The authors introduce GESTURES (Generalized Epileptic Seizure classification from video-Telemetry Using REcurrent convolutional neural networkS). The architecture follows a three-stage pipeline:

  1. Feature Extraction (Transfer Learning): Instead of training from scratch, they use a spatiotemporal CNN (STCNN), specifically R(2+1)D-34, pre-trained on massive human action recognition (HAR) datasets (Instagram and YouTube). This network extracts motion and spatial features from short 0.5s snippets.
  2. Temporal Segment Sampling: To handle long videos, they adopt a Temporal Segment Network (TSN) approach. The video is divided into $n$ non-overlapping segments. Within each segment, a snippet is sampled using a symmetric beta distribution. This probabilistic sampling (controlled by a parameter $\gamma$) ensures the model sees different parts of the segment during training, improving generalization.
  3. Sequence Modeling: The sequence of extracted features is fed into a Recurrent Neural Network (RNN). The authors compared standard LSTMs with Bidirectional LSTMs (BLSTMs) to aggregate these features into a final seizure-level classification.
Fig. 1: Left: The GESTURES architecture. We train only the models with thick red borders. Right: Probability distributions used to sample snippets from video segments.

Datasets

The study utilized a curated dataset from the National Hospital for Neurology and Neurosurgery, London:

  • Participants: 68 patients.
  • Videos: 218 seizure recordings (141 Focal Onset Seizures [FOS] and 77 Focal to Bilateral Tonic-Clonic Seizures [TCS]).
  • Ground Truth: Annotations were provided by a neurophysiologist and confirmed via EEG.
  • Pre-training: The feature extractors were pre-trained on generic HAR datasets containing over 65 million videos.

Key Insights and Ideas

  • Action Recognition as a Proxy: A key "aha moment" is that models trained to recognize everyday human actions (like walking or cooking) encode motion representations that are highly effective for medical semiology, even though seizures are not "actions" in the traditional sense.
  • The Importance of Order: TCS seizures often begin with FOS-like symptoms. Simple averaging of snippet predictions (a common technique) fails because the early parts of a TCS look identical to an FOS. The RNN’s ability to model the sequence of events is what allows for high-accuracy classification.
  • Sampling Matters: Using a Dirac delta distribution (always picking the middle snippet) was less effective than distributions that allowed for some dispersion, suggesting that temporal variety during training helps the model learn more robust features.

Key Results

The GESTURES model demonstrated exceptional performance in the FOS vs. TCS classification task:

  • Top Accuracy: 98.9% using the BLSTM aggregator with 16 segments.
  • STCNN vs. SFCNN: Spatiotemporal (3D) networks significantly outperformed single-frame (2D) networks ($p < 10^{-7}$), proving that capturing motion over time is essential for seizure analysis.
  • Aggregation Performance: As shown in the figure below, accuracy generally improved as the number of segments increased, with BLSTM consistently outperforming simple mean-averaging.
Fig. 2: Quantitative results for seizure-level classification. Marker brightness is proportional to the dispersion associated with the probability distribution used to sample snippets from the video segments (see Fig. 1b).

Limitations and Future Work

While the results are impressive, the authors note a few areas for improvement:

  • Field of View Issues: One of the few false positives was caused by the patient being partially out of the camera's field of view.
  • Scope: The current proof-of-concept focuses on the FOS vs. TCS distinction. Future work aims to classify more nuanced seizure types and investigate the model's ability to localize the epileptogenic zone (EZ)—the specific area of the brain where seizures originate.
  • Multi-Center Validation: The model was developed on a single-center dataset; testing on data from multiple Epilepsy Monitoring Units (EMUs) will be a critical next step for clinical adoption.

Summary updated

BibTeX
@misc{perezgarcia2021transfer,
  author = {Fernando Pérez-García and Catherine Scott and Rachel Sparks and Beate Diehl and Sébastien Ourselin},
  title = {{Transfer Learning of Deep Spatiotemporal Networks to Model Arbitrarily Long Videos of Seizures}},
  year = {2021},
  eprint = {2106.12014},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2106.12014},
}

Loading related content...

Figure