Deep learning-based prediction of cardiopulmonary disease in retinal images of premature infants
This repository contains the complete pipeline for predicting Bronchopulmonary Dysplasia (BPD) and Pulmonary Hypertension (PH) using deep learning feature extraction and statistical analysis.
The project focuses on two related medical conditions:
- BPD: A chronic lung disease affecting newborns, especially premature infants.
- PH: Pulmonary hypertension, which may occur as a complication of BPD.
We explore the predictive capabilities of clinical informatics, medical image features, and their combination, evaluating statistical significance.
- Train a ResNet-18 model from scratch using medical imaging data specific to BPD.
- Use the trained ResNet-18 as a feature extractor to generate high-level image features.
- Evaluate predictive performance using these features in combination with clinical data.
- Use a pretrained ImageNet ResNet-18 model as a feature extractor for PH-related medical images.
- Extract feature embeddings from images without retraining the CNN.
For both BPD and PH:
- Train a Support Vector Machine (SVM) classifier for each feature pair:
- Clinical-only features
- Image-only features
- Combined clinical + image features
- Perform the DeLong test to compare the Area Under the ROC Curve (AUC) across different feature sets.
- The test determines whether the differences in performance are statistically significant.
bpd-ph-prediction/
│
├── data/ # Dataset (not included in repo)
├── src/ # Source code for training & evaluation
│ ├── bpd_pipeline.py # BPD training & feature extraction
│ ├── ph_pipeline.py # PH feature extraction & SVM training
│ ├── statistics.py # DeLong test implementation
│
├── requirements.txt # Python dependencies
├── README.md # Project documentation
└── .gitignore # Ignored files
git clone https://github.com/yourusername/bpd-ph-prediction.git
cd bpd-ph-prediction
pip install -r requirements.txtpython src/bpd_pipeline.pypython src/ph_pipeline.pypython src/statistics.py- Python 3.8+
- PyTorch
- torchvision
- numpy
- pandas
- scikit-learn
- Pillow
- tqdm