A complete presentation of the current notebook: data preparation, ResNet50 architecture, training behavior, class balancing, competition scoring, validation results and final test submission.
The notebook uses a 5-fold stratified split, with fold 0 held out for validation. The training set is rebalanced by undersampling No Finding to 3,000 examples and oversampling rare disease classes to at least 200 examples. Training uses weighted cross-entropy and a weighted random sampler.
These are the actual values printed by the 20-epoch notebook run.
| Metric | Best / Final | Epoch |
|---|---|---|
| Best validation competition score | -6.2469 | 19 |
| Best validation accuracy | 15.56% | 19 |
| Final train accuracy | 81.02% | 20 |
| Final validation accuracy | 15.22% | 20 |
| Minimum validation loss | 3.4061 | 6 |
The notebook compares the original class counts with the resampled training distribution. No Finding is deliberately reduced from 34,079 to 3,000; rare classes are raised to at least 200.
Competition score per class from the best saved model. The scoring function is TP − FP − 5×FN, normalized by the number of actual examples in each class.
Resize to 224×224 → Random Horizontal Flip (p=0.5) → Random Rotation (15°) → ColorJitter (brightness=0.3, contrast=0.3) → Tensor → ImageNet normalization.
Resize to 224×224 → Tensor → ImageNet normalization. The notebook also defines three TTA transforms: baseline, horizontal flip and 1.1× resize + center crop.
The notebook tested No Finding confidence thresholds from 0.50 to 0.98 in increments of 0.02. In this run the best reported threshold was 0.50, with score -6.3904, which was worse than the default argmax score of -6.2469. Therefore the default argmax remained preferable.
The final submission contains 17,015 rows and 21 columns: one id column plus the 20 class columns. Each row is validated to contain exactly one positive class.
| Field | Value |
|---|---|
| Test images | 17,015 |
| Submission columns | 21 |
| Class columns | 20 |
| Row validation | Exactly one class = 1 |
| Best validation score | -6.2469 |