Dataset & training setup
The CV documents 988 chest X-rays split 620/368 train/validation. I built train.py around EfficientNetV2B0A efficient convolutional architecture from Google—strong transfer-learning backbone for medical imaging with moderate compute, not a from-scratch CNN—data volume does not support training millions of weights cold.
Focal lossA loss function that down-weights easy examples and focuses learning on hard misclassified cases—useful for class imbalance plus class balancingOversampling or reweighting so the minority class influences gradients proportionally addressed pneumonia vs. normal skew. Two-phase fine-tuningFreeze backbone layers first, then unfreeze top blocks for a lower learning rate pass stabilized transfer from ImageNet-like features to radiograph texture.