Automated Infantile Spasm Detection from Video¶
Overview¶
During my PhD, I investigated whether infantile epileptic spasms could be detected using standard video recordings.
Infantile spasms are brief epileptic events, typically lasting between 0.5 and 2 seconds. They can be difficult to distinguish from normal infant movements, and diagnosis generally requires specialized video-EEG monitoring.
My research explored whether computer vision could provide an additional way to identify these events, particularly in situations where specialized equipment is unavailable.
The work involved several challenges: collecting and annotating clinical recordings, processing large video archives under hardware constraints, and developing models capable of identifying subtle movements from limited training data.
Research Approaches¶
I developed and evaluated two main approaches to infantile spasm detection.
Action Recognition¶
The first approach used X3D-M, a video action-recognition network pretrained on Kinetics-400.
Rather than training a video model from scratch on a relatively small clinical dataset, I used the pretrained network to extract spatio-temporal features from video segments.
I then evaluated several classification algorithms, including Random Forest, XGBoost, SVM, KNN, and MLP, with different temporal windows and dimensionality-reduction methods.
The best configuration combined X3D-M features with XGBoost, without dimensionality reduction, achieving a ROC-AUC of 0.813 ± 0.058 on three-second video windows.
Optical Flow¶
The second approach used DualTVL1 optical flow to measure movement between consecutive video frames.
I converted the resulting motion fields into a one-dimensional temporal signal by averaging the magnitude of the motion vectors across each frame.
This representation allowed me to investigate whether infantile spasms could be identified from changes in movement intensity over time.
I evaluated several classifiers, including KNN, Random Forest, and Gaussian Mixture Models.
The GMM approach achieved a ROC-AUC of 0.964, with 0.989 sensitivity and 0.941 specificity, on the Kremlin-Bicêtre dataset.
Unlike the action-recognition approach, this method provided a motion signal that could be inspected alongside the original video.
Supporting Engineering Work¶
Developing the detection methods required additional work on data acquisition, processing, and child detection.
Clinical Data Collection¶
I developed a data-collection application connecting an iPad interface, a Node.js backend, and Raspberry Pi recording devices.
The system operated on an internal hospital server without internet connectivity and supported data collection across five patient rooms.
The deployed system collected data from approximately 50 patients.
The broader research involved clinical data collection across six epilepsy centers, with the necessary CNIL authorization.
Video Processing¶
The clinical recordings included long videos that could not always be loaded entirely into memory.
I developed video-processing tools to read recordings in smaller chunks and process frames without loading complete files.
I also optimized the X3D-M evaluation pipeline by replacing OpenCV decoding with PyAV and exporting the model to TensorRT.
Together, these changes improved end-to-end evaluation throughput by approximately 10× on an NVIDIA RTX 3090.
Child Detection¶
To better locate children in complex scenes, I created the Child Detection Dataset (CDD) and fine-tuned YOLO models for pediatric subject detection.
The dataset contains approximately 1,930 images of children in different environments, poses, and occlusion conditions.
In a medical video evaluation, the specialized detector achieved 96.6% precision, compared with 59.5% for the baseline YOLO model.
Limitations and Project Status¶
The research demonstrated that video-based methods could identify patterns associated with infantile spasms, but several limitations remain.
Some spasms produce very little visible movement and may not be detectable from video alone. The available datasets were also relatively small, limiting how confidently the results could be generalized to other patients and clinical environments.
The detection models remained research prototypes and were not deployed for clinical decision-making.
The data-collection application, however, was deployed and used by clinical staff.
The research was completed as part of my PhD in 2025.
For the full methodology and experimental results, see my doctoral thesis, Automated Characterization of Infantile Spasms.