Swin Tiny (swin_tiny_patch4_window7_224) for 15-class multi-label
classification on NIH ChestX-ray14.
Model
Architecture: swin_tiny_patch4_window7_224
Classes: 15
Input: 224 × 224 RGB
Activation: sigmoid
Training loss: class-weighted BCEWithLogitsLoss
Optimizer: AdamW
Best-model criterion: validation Macro AUROC
Preprocessing
The inference preprocessing matches the validation/test transform in
the training notebook:
RGB conversion
Resize to 256 × 256
Center crop to 224 × 224
ToTensor
ImageNet normalization
Mean: [0.485, 0.456, 0.406]
Std: [0.229, 0.224, 0.225]
Classes
The exact 15-class output order is stored in labels.json.
Thresholds
thresholds.json contains thresholds optimized independently on the
validation set using F1. The test set was not used to choose thresholds.
Final Test Metrics
Macro AUROC: 0.8250
Micro AUROC: 0.8950
Macro Average Precision: 0.3031
Micro Average Precision: 0.4681
Macro Precision: 0.3122
Macro Recall: 0.4105
Macro F1: 0.3520
Micro Precision: 0.4698
Micro Recall: 0.6034
Micro F1: 0.5283
Samples F1: 0.5732
Hamming Loss: 0.0904
Validation Results
Macro AUROC: 0.8280
Micro AUROC: 0.8956
Interpretation
This is a multi-label classification problem with substantial class
imbalance.
Macro F1 is lower than Micro F1 because Macro F1 gives equal importance
to every disease class, including rare classes for which the model has
fewer positive training examples.
For this reason, AUROC, Average Precision, Macro F1, Micro F1, Recall,
and per-class metrics should be considered together rather than using a
single conventional accuracy percentage.
This is a research/educational model and is not a medical diagnostic
device. Predictions should not replace assessment by a qualified
healthcare professional.