
Medicine and Health
Automated assessment of cardiac dynamics in aging and dilated cardiomyopathy Drosophila models using machine learning
Y. Melkani, A. Pant, et al.
This groundbreaking research by Yash Melkani, Aniket Pant, Yiming Guo, and Girish C. Melkani introduces an innovative machine learning platform that automates the assessment of cardiac dynamics in Drosophila models. Using deep learning, the researchers achieved high accuracy in predicting fly age and assessed cardiac dysfunction, paving the way for broader applications in cardiac physiology.
~3 min • Beginner • English
Introduction
Cardiovascular disease is a leading cause of morbidity and mortality, with aging as a major risk factor. Drosophila melanogaster provides a powerful in vivo model to study conserved cardiac pathways relevant to human disease, including aging and cardiomyopathies. High-speed optical microscopy now produces large video datasets that outpace manual analysis tools like SOHA, motivating automated, scalable methods. This work aims to develop and validate a deep learning platform to segment Drosophila heart walls from standard high-resolution optical recordings, compute comprehensive beat-level cardiac parameters, and apply machine and deep learning to predict age-related phenotypes. The study also extends the approach to a disease model by assessing cardiac dysfunction from cardiac-specific knockdown of oxoglutarate dehydrogenase (OGDH), linked to dilated cardiomyopathy, thereby evaluating translational potential beyond aging.
Literature Review
Prior cardiac analysis in small-animal models has leveraged OCM/OCT imaging with automated segmentation. Dong et al. reported robust 3D convolutional segmentation of Drosophila heart OCM with 92% IoU enabling EDD, ESD, heart area, and heart rate measurement. Lee et al. performed automated heartbeat counting on OCT with segmentation and PCA-based morphology reconstruction. Klassen et al. demonstrated in vivo fluorescence imaging of Drosophila hearts with conventional image processing to compute chamber diameter, fractional shortening, systolic interval, cardiac output, and wall velocity. However, automated methods for standard high-resolution optical microscopy recordings are scarce due to complex visual morphology. Deep architectures like FCNs, SegNets, and UNets have driven medical image segmentation across organs and diseases, with Ouyang et al. showing beat-to-beat echocardiographic EF prediction in humans. The present work addresses the gap by applying an attention-UNet to standard optical microscopy of Drosophila hearts with full cardiac parameter quantification and downstream age classification.
Methodology
Study design included development of a deep learning segmentation pipeline and two age-classification pipelines (statistics-based logistic regression and video-based CNN), plus application to an OGDH knockdown DCM model. Drosophila stocks and rearing: Wild-type Canton-S were raised under controlled conditions (25°C, 50% humidity, 12-h light-dark). For DCM, cardiac-specific Ogdh knockdown used Hand-Gal4 crossed to UAS-Ogdh-RNAi lines; age-matched Hand/+ served as controls. High-speed cardiac recordings: Semi-intact heart preparations in artificial hemolymph were imaged on an Olympus BX43F microscope with a 10x water-immersion objective and Hamamatsu Flash 4 camera at 200 fps, acquiring 30-s bright-field videos (400×300 px). SOHA was used for canonical analysis and validation. Dataset curation: 54 annotated videos (47 WT, 7 genetic variants) were used for training with 85/15 train/validation split; each video contributed 500 frames from a 6000-frame sequence. Annotations (CVAT) captured heart-wall masks; ambiguous regions were excluded. Testing consisted of 177 videos (n=46 1-week males, 43 1-week females, 44 5-week males, 44 5-week females). Segmentation model: A modified attention-UNet with rectangular kernels and encoder–decoder filters [8,16,32,64,128] was implemented in PyTorch. Dice loss, Adam optimizer, batch size 16; lowest validation-loss epoch selected. Temporal context was incorporated by forming 3-frame 3D samples at indices (t-4, t, t+4). Class imbalance between diastole and systole was reduced by sampling 75 frames per measured diameter class. Data augmentation and balancing yielded 114,750 training and 19,350 validation images. Training spanned 30 epochs (~30 GPU hours, Tesla P100). Inference and parameter extraction: Each frame f was combined with frames t-4 and t+4 into a 3-channel input. Sigmoid outputs were thresholded; users selected an ROI and confidence threshold. Average heart diameter per frame was computed by vertical slice distances across the segmented walls. DI and SI were identified from time series; diastolic diameter (DD) is the max within DI and systolic diameter (SD) the min within SI. Derived metrics included fractional shortening (FS), ejection fraction (EF), heart period (HP), heart rate (HR), arrhythmia index (AI), stroke volume, cardiac output, and peak wall velocities and latencies via numerical differentiation. Tachycardia and bradycardia events were extracted by SI>0.5 s and DI>1.0 s, respectively. Experimental validation: The same hearts analyzed by deep learning were analyzed in SOHA blindly. Group differences used t-tests/ANOVA; ML–SOHA agreement assessed by R². Age classification (statistics-based): Logistic regression (scikit-learn) used DD, SD, FS, DI, SI, HP, AI with 5-fold cross-validation; SHAP explained feature contributions. Age classification (video-based): From each video, a 96-frame clip was selected via binarized pixel-difference time series, along with inter-frame durations. A CNN with three conv blocks (two 2D conv layers + max pooling per block), flattening, concatenation with duration features, three dense layers, and sigmoid output performed binary age classification with 5-fold cross-validation on n=497 samples (1wm=118, 1wf=156, 5wm=121, 5wf=98). Compute: Inference ~103 s for 5,990 frames (~58 FPS) on Tesla P100; end-to-end per-heart analysis ~2 min.
Key Findings
- The segmentation pipeline produced high-quality heart-wall masks across the cardiac cycle and enabled per-beat parameter extraction and M-mode reconstruction.
- Aging validation (n=177 test videos):
- Spatial metrics: Diastolic diameter decreased significantly with age in males and showed no significant change in females (ML and SOHA agree). Systolic diameter showed little variance across age groups with ML–SOHA agreement; a weak significant difference in ML female aging (p=0.049).
- Contractility: Fractional shortening decreased strongly with aging in both sexes (p<0.001). Stroke volume and cardiac output decreased significantly with age.
- Temporal metrics: Heart rate decreased with age with expected significant differences; heart period, DI, and SI showed expected shifts with aging in agreement across ML and SOHA.
- Arrhythmia: Small increase in arrhythmia with aging; accurate evolution captured in females; unexpected significant difference in male aging groups.
- Agreement with SOHA (R²): DD 0.76, SD 0.69, HR 0.88, HP 0.91, DI 0.89, SI 0.63; FS low at 0.32; AI low at 0.46.
- Latencies: No significant change in time to peak contraction or time from peak contraction to peak relaxation with aging.
- Beat-level distributions: Aging increased variance and reduced mean FS; heart period distributions flattened with increased mean beat length. Significant increases in DI during bradycardia (5-week males) and SI during tachycardia (aging males). Note: small n for young female bradycardia events (n=2).
- Age prediction:
- Logistic regression on cardiac statistics achieved 79.1% accuracy and AUROC 0.87 (5-fold CV). Misclassifications were mostly young hearts labeled as old. SHAP identified FS as the top predictor, followed by DD.
- Video-based CNN achieved 83.3% mean accuracy and AUROC 0.90 (n=497; 5-fold CV). Most errors were old hearts predicted as young (22%). Clear separation of age likelihoods was observed.
- DCM model (Hand>Ogdh RNAi, 3-week females; similar trends in males):
- Significant cardiac dilation with increased DD and SD, reduced %FS versus control (Hand/+), consistent with DCM.
- Reduced HR and increased AI; longer DI, SI, and HP (Supplementary) versus controls.
- ML and SOHA showed concordant trends across parameters.
- Age-model prediction distributions for 3-week DCM vs 3-week controls were qualitatively similar, suggesting DCM did not mimic accelerated aging in model outputs.
Discussion
The study demonstrates that deep learning-based segmentation of standard high-resolution optical microscopy recordings can automatically and accurately quantify Drosophila cardiac dynamics at beat-level resolution, reducing manual effort and potential human error inherent in SOHA. The approach recapitulates known aging phenotypes—declines in contractility (FS), reductions in stroke volume and cardiac output, and changes in heart rate/period—while indicating that contraction–relaxation latency metrics do not significantly change with age. High ML–SOHA agreement for most spatial and temporal parameters supports the validity of the automated pipeline, with lower agreement for FS and arrhythmia index highlighting areas for improvement. The successful age classification from both derived cardiac statistics and raw videos indicates that morphological and rhythmic patterns in the video data encode robust aging signatures. Extending the platform to an OGDH knockdown model revealed hallmark DCM phenotypes (dilation, reduced performance, dysrhythmia), underscoring translational potential for disease assessment beyond aging. Together, the findings address the need for scalable, reproducible, and comprehensive analysis of cardiac physiology in Drosophila and pave the way for broader applications in small-animal and human cardiac modeling.
Conclusion
This work introduces an automated deep learning platform for segmenting Drosophila heart videos from standard optical microscopy and computing comprehensive cardiac parameters at beat-level resolution. The pipeline accurately reproduces established aging phenotypes, achieves high agreement with SOHA for most parameters, and enables accurate age classification using both cardiac statistics and raw video inputs. Application to an OGDH knockdown model quantified DCM-like dilations and compromised performance, demonstrating broader utility for pathological assessment. Future directions include expanding labeled datasets across genetic and environmental conditions, improving domain adaptability and model architectures (e.g., self-supervised learning), refining hands-free ROI/thresholding, incorporating uncertainty quantification, and extending age prediction to multi-class or regression across broader age ranges. The platform can accelerate cardiac assays in Drosophila and is adaptable to other small-animal models and human cardiac imaging.
Limitations
- Dependence on user-selected region of interest (ROI) and confidence threshold for segmentation; preliminary No-ROI analyses show disagreements in some spatial metrics (notably SD and derived FS).
- Limited labeled training dataset (54 videos) and few genetic contexts necessitated heavy augmentation and balancing; this likely contributed to lower agreement in FS and arrhythmia index and may limit generalizability.
- Arrhythmia index exhibited lower ML–SOHA agreement (R²=0.46); FS agreement was also modest (R²=0.32).
- Small sample sizes for certain beat-level arrhythmia subsets (e.g., young female bradycardia events n=2) limit statistical power.
- Environmental factors affecting aging were not evaluated; only a specific genetic manipulation (Ogdh knockdown) was tested for disease modeling.
- Current model generalization may benefit from domain adaptation, larger and more diverse datasets, and enhanced architectures; fully hands-free analysis without ROI/threshold tuning remains to be validated.
Related Publications
Explore these studies to deepen your understanding of the subject.