Giter VIP home page Giter VIP logo

csf_cell_classification's Introduction

Cell and Object Classification in CSF

Accompanies our paper:

Leonille Schweizer, Philipp Seegerer et al. "Analysing Cerebrospinal Fluid with Explainable Deep Learning: from Diagnostics to Insights", accepted for publication in Neuropathology and Applied Neurobiology.

Data

The data are available at Zenodo.

How To

The pipeline is built on Sacred, Snakemake and PyTorch.

First, create a local_config.py to set up Sacred:

log_dir_root = "/path/to/runs"

def setup_logger(ex):
    # Configuration of Sacred experiment logger
    
   
def add_observers(ex):
    # You need at least the FS observer because it creates the output dir where eg. model files and predictions are saved.
    ex.observers.append(
        sacred.observers.FileStorageObserver(log_dir_root)
    )

    # Add Mongo/Slack or other Sacred observers to the experiment
    # E.g.
    ex.observers.append(
        sacred.observers.MongoObserver()
    )

Snakemake Workflow

  1. Create an experiment configuration in YAML format, e.g. yourconfig.yml ( like dummy_experiment_config.yml), that contains the:
    • experiment_name: name of the experiment in format <name>_v<version:02d>
    • classes: list of classes that are included (long name, e.g. "aktivierter Lymphozyt")
    • num_classes: number of class groups during training, i.e. output neurons
    • common_config: dictionary of config updates common for all runs in this experiment.
    • config_updates: dictionary of config updates for the individual runs, mapping "<run_id>" -> <config_update>.
  2. Call the snakemake workflow with snakemake all --cores all --configfile yourconfig.yml. This will automatically detect which stages of the workflow have to be executed. Add your custom cluster configuration according to the snakemake docs. E.g., if --default-resources gpus=0 --cluster "qsub -l cuda={resources.gpus} -binding linear:4 -cwd -V -q all.q" is provided, distributes it to different qsub jobs (in parallel, if possible) . The stages are connected like (example for two experiment runs):

Snakemake Workflow

This will train the model and create a classification report in /path/to/runs/<sacred_run_id>/

csf_cell_classification's People

Contributors

pseegerer avatar

Watchers

 avatar

Forkers

timmimim

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.