License: MIT — see LICENSE.
Official code for 2D / 2.5D / 3D CNN pipelines on COVID-19 CT volumes and slices: pretraining and fine-tuning when 3D labels are scarce.
| Journal | Electronics (MDPI) |
| Article | MDPI landing page |
| DOI | 10.3390/electronics14132571 |
| Direct PDF | |
| Article license | Open access CC BY 4.0 (see journal page for legal text) |
| Code license | MIT (LICENSE) |
| Authors | Arnav Garg, Aksh Garg, Dominique Duncan (corresponding) |
Citation:
@Article{electronics14132571,
AUTHOR = {Garg, Arnav and Garg, Aksh and Duncan, Dominique},
TITLE = {2.5 CNN: Leveraging 2D CNNs to Pretrain 3D Models in Low-Data Regimes for COVID-19 Diagnosis},
JOURNAL = {Electronics},
VOLUME = {14},
YEAR = {2025},
NUMBER = {13},
ARTICLE-NUMBER = {2571},
URL = {https://www.mdpi.com/2079-9292/14/13/2571},
ISSN = {2079-9292},
DOI = {10.3390/electronics14132571}
}Plain: Garg, A.; Garg, A.; Duncan, D. 2.5 CNN: Leveraging 2D CNNs to Pretrain 3D Models in Low-Data Regimes for COVID-19 Diagnosis. Electronics 2025, 14 (13), 2571. https://doi.org/10.3390/electronics14132571
End-to-end training and evaluation for classifying CT scans with 2D slice and 3D volume models, data augmentation, class imbalance handling, and optional GPU job scheduling via multiplexer/.
- Architectures: 2D CNNs, 3D CNNs, hybrid / 2.5D-style use of 2D pretraining for 3D (see paper).
- Data: Custom datasets, transforms, weighted sampling for imbalanced medical labels.
- Training: YAML configs under
Configs/; Weights & Biases support; checkpoints and resume. - Ops:
multiplexer/for batch GPU scheduling and experiment queues. - Evaluation: Multi-class and binary setups, confusion matrices, prediction logging, visualization scripts.
Requirements: PyTorch, MONAI (medical imaging), Weights & Biases, NumPy, Pillow, PyYAML (pin versions to your CUDA / platform).
git clone https://github.com/arnavgarg233/2.5CNN.git
cd 2.5CNN
# create env (conda or venv), then install PyTorch (CUDA/MPS/CPU), MONAI, wandb, PyYAML, Pillow, NumPypython src/launch.py --config Configs/config.yamlOverride hyperparameters:
python src/launch.py --config Configs/custom.yaml --batch_size 32 --learning_rate 0.001GPU scheduling (optional):
cd multiplexer
python scheduler.pyExpected layout (.npy per sample: 2D slice or 3D volume):
data/
├── train/
│ ├── class_0/
│ ├── class_1/
│ └── ...
└── val/
├── class_0/
├── class_1/
└── ...
Class labels: 5 severity levels (0–4), normal through critical.
2.5CNN/
├── Configs/ # YAML training configs
├── Data/ # Datasets, transforms, weighted sampling
├── Models/ # 2D / 3D / hybrid model code and notebooks
├── Scripts/ # Visualization, storage, 2D vs 3D comparisons
├── Utils/ # Helpers, timing, system checks
├── multiplexer/ # GPU scheduler and job configs
├── src/ # launch.py, evaluate.py, core training entrypoints
├── LICENSE
└── README.md
MIT License — see LICENSE. Copyright (c) 2025 Arnav Garg, Aksh Garg, Dominique Duncan.
Arnav Garg · arnavgarg888@gmail.com
For questions about the published article, contact the corresponding author listed on the MDPI page.