GithubHelp home page GithubHelp logo

montefiore-institute / multitask-dipath Goto Github PK

View Code? Open in Web Editor NEW

This project forked from waliens/multitask-dipath

0.0 1.0 0.0 23 KB

Implementation of PyTorch-based multi-task pre-trained models

License: MIT License

Dockerfile 0.12% Python 99.88%

multitask-dipath's Introduction

mtdp

Library containing implementation related to the research paper "Multi-task pre-training of deep neural networks for digital pathology" (Mormont et al.).

It can be used to load our pre-trained models or to build a multi-task classification architecture.

Loading our pre-trained weights.

For an example, check the file examples/feature_extract.py.

The library provides a build_model function to build a model and initialize it with our pre-trained weights. To load our weights, the parameter pretrained should be set to mtdp.

from mtdp import build_model

model = build_model(arch="densenet121", pretrained="mtdp")

Alternatively, pretrained can be set to imagenet to load ImageNet pre-trained weights from PyTorch.

We currently provide pre-trained weights for the following architectures:

  • densenet121
  • resnet50

See an example script performing feature extraction using one of our model in the examples folder (file feature_extract.py).

Raw model files

If you want to bypass the library and download the raw PyTorch model files, you can access them at the following URLs:

Building a multi-task architecture

For an example, see the examples/multi_task_train.py file.

Several steps for building the architecture:

  1. define a DatasetFolder/ImageFolder for each of your individual dataset,
  2. instantiate a MultiImageFolders object with all your dataset objects,
  3. instantiate a MultiHead PyTorch module by passing it the MultiImageFolders from step 2. The module will use the information of the tasks in order to build the multi-task architecture.

multitask-dipath's People

Contributors

waliens avatar

Watchers

James Cloos 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.