Skip to content

Latest commit

 

History

History
107 lines (90 loc) · 6.96 KB

File metadata and controls

107 lines (90 loc) · 6.96 KB

📚 Table of Contents (Classifiers Section)

⚙️ Training Algorithms

We support a wide range of algorithms for bias mitigation and robust training.
Click here to view the implementation.


🧠 Model Architectures & Pretraining

Supported image model architectures are implemented here.

ResNet-50 Variants

ViT-B Variants


🧪 Training scripts for different classifiers

Training scripts for different datasets are available in the repo:

🏥 Training ResNet50 using ERM (resnet_sup_in1k) as classifier for NIH-CXR

We train the ERM variant for NIH-CXR as follows:

python ./src/codebase/train_classifier_CXR.py --img-size 224 --arch ResNet50 --lr 1e-5

🏥 Training EfficientNet-B5 (EN-B5) using ERM as classifier for RSNA-Mammo

We train the ERM variant for RSNA-Mammo as follows:

python ./src/codebase/train_classifier_Mammo.py \
  --data-dir '/restricted/projectnb/batmanlab/shared/Data/RSNA_Breast_Imaging/Dataset/' \
  --img-dir 'RSNA_Cancer_Detection/train_images_png' \
  --csv-file 'RSNA_Cancer_Detection/rsna_w_upmc_concepts_breast_clip.csv' --start-fold 0 --n_folds 1 \
  --dataset 'RSNA' --arch 'tf_efficientnet_b5_ns-detect' --epochs 9 --batch-size 6 --num-workers 0 \
  --print-freq 10000 --log-freq 500 --running-interactive 'n' \
  --lr 5.0e-5 --weighted-BCE 'y' --balanced-dataloader 'n' \
  --tensorboard-path="/restricted/projectnb/batmanlab/shawn24/PhD/Ladder/out/RSNA/fold0" \
  --checkpoints="/restricted/projectnb/batmanlab/shawn24/PhD/Ladder/out/RSNA/fold0" \
  --output_path="/restricted/projectnb/batmanlab/shawn24/PhD/Ladder/out/RSNA/fold0" \
  --label "cancer"

🏥 Training EfficientNet-B5 (EN-B5) as classifier for VinDr-Mammo

We train the ERM variant for VinDr-Mammo as follows:

python ./src/codebase/train_classifier_Mammo.py \
  --data-dir '/restricted/projectnb/batmanlab/shared/Data/RSNA_Breast_Imaging/Dataset' \
  --img-dir 'External/Vindr/vindr-mammo-a-large-scale-benchmark-dataset-for-computer-aided-detection-and-diagnosis-in-full-field-digital-mammography-1.0.0/images_png' \
  --csv-file 'External/Vindr/vindr-mammo-a-large-scale-benchmark-dataset-for-computer-aided-detection-and-diagnosis-in-full-field-digital-mammography-1.0.0/vindr_detection_v1_folds_abnormal.csv' \
  --dataset 'ViNDr' --arch 'tf_efficientnet_b5_ns-detect' --epochs 20 --batch-size 8 --num-workers 0 \
  --print-freq 10000 --log-freq 500 --running-interactive 'n' \
  --lr 5.0e-5 --weighted-BCE 'y' --balanced-dataloader 'n'  --n_folds 1  --label "abnormal" \
  --tensorboard-path="/restricted/projectnb/batmanlab/shawn24/PhD/Ladder/out/ViNDr/fold0" \
  --checkpoints="/restricted/projectnb/batmanlab/shawn24/PhD/Ladder/out/ViNDr/fold0" \
  --output_path="/restricted/projectnb/batmanlab/shawn24/PhD/Ladder/out/ViNDr/fold0"