Giter VIP home page Giter VIP logo

sd-mae's Introduction

LTRP illustration

Pretrained models

arch params download
ViT-S/16 21M NCT-CRC' model NCT-CRC' logs PCam's model PCam's logs

Training

Please install PyTorch and download the NCT-CRC-HE and PatchCamelyon dataset. This codebase has been developed based on MAE. More information about requirements can be found at it.

Single-node training on PatchCamelyon dataset

Run SD-MAE with ViT-small classing model on a single node with 4 GPUs for 100 epochs with the following command. We provide training logs for this run to help reproducibility.

python -m torch.distributed.launch --nproc_per_node=4  SD-MAE/run_mae_pretraining.py  \
    --data_path yourpath/pCam \
    --batch_size 256 \
    --model ltrp_base_and_vs \
    --mask_ratio 0.6 \
    --epochs 100 \
    --dino_head_dim 4096 \
    --dino_bottleneck_dim 256 \
    --dino_hidden_dim 2048 \
    --warmup_epochs 5 \ 
    --lr 0.0006

Single-node finetuning on PatchCamelyon dataset

python -m torch.distributed.launch --nproc_per_node=4  SD-MAE/run_class_finetuning.py \
    --model vit_small_patch16_224 \
    --finetune yourpath/checkpoint-100.pth \
    --data_path  yourpath/pCam \
    --batch_size 256 \
    --opt adamw \
    --opt_betas 0.9 0.999 \
    --weight_decay 0.05 \
    --epochs 100 \
    --nb_classes 2
    --data_set 'pCam' \
    --lr 0.001

sd-mae's People

Contributors

irslu avatar

Stargazers

 avatar Hao Lin avatar Li Shijie avatar

Watchers

 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.