Giter Site home page Giter Site logo

graph-transformer-with-self-supervised-pre-training-in-digital-histopathology's Introduction

Graph Transformer with Self-Supervised Pre-training in Digital Histopathology Documentation

  1. Patch Tiling

How to run:

  • python patch_tiler.py

Note:

  • check arg parser for the configurations
  1. Clustering (optional)

How to run:

  • python preprocessing/clustering.py

Note:

  • number of clusters is equal to batch size (32)
  1. Training Patch Feature Extractor

How to run:

  • python feature_extractor/feature_extract.py

Notes:

  • check config.yaml for configuration
  • change either want to use SimCLR, SimSiam or MoCoV3 in feature_extract.py (simply comment/uncomment it)
  • if want to use Pytorch Lightning, run feature_extract_lightning.py instead (only MoCoV3 is ready)
  • model path: ../../graph_transformer/runs/(simclr or mocov3)/runs/(name of SSL model)
  1. Build Graph

How to run:

  • python feature_extractor/build_graphs.py

Notes:

  • check arg parser for configuration
  • choose between loading SimCLR, SimSiam, and MoCoV3 model in build_graphs.py (simply comment/uncomment it)
  • graph path: ../../graph_transformer/build_graphs/(simclr, mocov3, or simsiam)/(name of graph)
  1. Training Graph Transformer

How to run:

  • cd ..
  • python main.py (check arg parser at option.py)

Notes:

  • graph path: ../graph_transformer/build_graphs/(simclr, mocov3, or simsiam)/(name of graph)/(simclr_files or simsiam_files)
  • when testing: train=False, test=True, val_set=(test data), resume=(graph VIT model path)
  • result path: ../graph_transformer/results_with_graph/(simclr, mocov3, or simsiam)/(name of result folder)
  1. Training without graph (VIT)

How to run:

  • change load model in main.py to "from models.OnlyVisionTransformer import Classifier"
  • python main.py (check arg parser at option.py)

Note:

  • result path: ../graph_transformer/results_without_graph/(simclr, mocov3, or simsiam)/(name of result folder)

graph-transformer-with-self-supervised-pre-training-in-digital-histopathology's People

Contributors

bryanwong17 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.