GithubHelp home page GithubHelp logo

felixkrones / benchmarktransferlearning_f Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mr-hosseinzadehtaher/benchmarktransferlearning

0.0 0.0 0.0 35.26 MB

Forked PyTorch Implementation and Pre-trained Models for Benchmarking Transfer Learning for Medical Image Analysis

License: Other

Python 80.04% Jupyter Notebook 19.38% Shell 0.58%

benchmarktransferlearning_f's Introduction

Extended: A Systematic Benchmarking Analysis of Transfer Learning for Medical Image Analysis

Extended work

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

Getting started

  • 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)

Getting the additional data

  • 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 "$_"
  • 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 the images/ folder will be
  • ChestXpert
    1. Download data from CheXpert dataset
      • Either by directly downloading the zip file
      • Or by using AzCopy:
        • Install AzCopy sudo bash -c "cd /usr/local/bin; curl -L https://aka.ms/downloadazcopy-v10-linux | tar --strip-components=1 --exclude=*.txt -xzvf -; chmod +x azcopy"
        • Get Link
        • Download: azcopy copy "LINK" "." --recursive=true
    2. Create/Copy split file into this folder
    3. Unzip all files
      • cd chexpertchestxrays-u20210408 && unzip CheXpert-v1.0.zip
  • Padchest
  • VinDr-CXR
    • Download data from VinDr-CXR
      1. Only get the test data: wget -r -N -c -np --user felixkrones --ask-password https://physionet.org/files/vindr-cxr/1.0.0/test/
      2. Get the annotations: wget -r -N -c -np --user felixkrones --ask-password https://physionet.org/files/vindr-cxr/1.0.0/annotations/
      3. Unzip
  • OCT
    1. Download the (dataset)[https://data.mendeley.com/datasets/rscbjbr9sj/3]

Running code in parallel

Run from terminal torchrun --nproc_per_node=NUM_GPUS_YOU_HAVE ...

Running code in background using tmux

  1. SSH connect
  2. tmux
  3. Detach: tmux detach or Ctrl+b then d
  4. List sessions: tmux list-sessions
  5. Resume: tmux attach -t session_number

License

Released under the ASU GitHub Project License.

benchmarktransferlearning_f's People

Contributors

felixkrones avatar mr-hosseinzadehtaher avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.