This is our extension of the (Benchmark repository)[https://github.com/MR-HosseinzadehTaher/BenchmarkTransferLearning] by Hosseinzadeh et al., as we used it in our Paper. Please cite both if you find it helpful. We thank the original authors! It mainly extends the original repository in the following five ways:
- Extended dataset support
- Extended model support and combined repository with (Transformer extension)[https://github.com/jlianglab/BenchmarkTransformers]
- Extended parameterisation
- Extended device support
- Our parameter settings
- Updated requirements.txt file
- New evaluation pipeline:
pipeline_eval.ipynb
- You can just use the repository as decribed in the original README below
- For Moco-v3 pre-training, use Moco-v3 extension
- You need to use deit-converted checkpoints (use convert_to_deit.py for that)
- For resnet, further prepare the resnet moco checkpoints first using
prep_moco.py
(provide the paths in the file)
- General tips
- Unzip files
unzip images.zip
find . -name '*.tar.gz' -exec tar -xf '{}' \;
- Deleting files
find . -name '*.tar.gz' -exec rm '{}' \;
rm images/batch_download_zips.py
- Think about where to save files and create folders
mkdir data/raw/name && cd "$_"
- Unzip files
- NIH ChestXray 14:
- Download data from box
- Download the
images/
folder (there is a nice Python script provided) - Download the metadata file
Data_Entry_2017_v2020.csv
into the same folder where theimages/
folder will be
- ChestXpert
- Download data from CheXpert dataset
- Create/Copy split file into this folder
- Either create own file
- Or use file from Glocker et al.
- Unzip all files
cd chexpertchestxrays-u20210408 && unzip CheXpert-v1.0.zip
- Padchest
- Download the data from Padchest
- Not all, maybe only the 0.zip file. This gives you 1861 manually labelled, frontal view images
- Download the metadata file
- Download the 0.zip folder from (https://b2drop.bsc.es/index.php/s/BIMCV-PadChest-FULL)
- VinDr-CXR
- Download data from VinDr-CXR
- Only get the test data:
wget -r -N -c -np --user felixkrones --ask-password https://physionet.org/files/vindr-cxr/1.0.0/test/
- Get the annotations:
wget -r -N -c -np --user felixkrones --ask-password https://physionet.org/files/vindr-cxr/1.0.0/annotations/
- Unzip
- Only get the test data:
- Download data from VinDr-CXR
- OCT
- Download the (dataset)[https://data.mendeley.com/datasets/rscbjbr9sj/3]
Run from terminal torchrun --nproc_per_node=NUM_GPUS_YOU_HAVE ...
- SSH connect
tmux
- Detach:
tmux detach
orCtrl+b then d
- List sessions:
tmux list-sessions
- Resume:
tmux attach -t session_number
Released under the ASU GitHub Project License.