Giter VIP home page Giter VIP logo

medicaldataaugmentationtool-celltracking's Introduction

Instance Segmentation and Tracking with Cosine Embeddings and Recurrent Hourglass Networks

Usage

This example shows how to train networks of the papers Instance Segmentation and Tracking with Cosine Embeddings and Recurrent Hourglass Networks and Segmenting and Tracking Cell Instances with Cosine Embeddings and Recurrent Hourglass Networks.

You need to have the MedicalDataAugmentationTool framework downloaded and in you PYTHONPATH for the scripts to work. If you have problems/questions/suggestions about the code, write me a mail!

Dataset preprocessing

Download the datasets from the celltracking challenge and extract them. In order to be able to load them with this framework, they need to be preprocessed. Open main_preprocess.py and change the variable dataset_base_folder to the folder, where you extracted the files from the challenge. Run main_preprocess.py. It should create .mha files of the input images and the groundtruth. This program also makes sure, that the IDs from the segmentation and tracking files are consistent throughout the videos.

Train models

Run cell_segmentation/main.py for a non-recurrent version (untested) and cell_tracking/main.py for the recurrent version of the network. The MIA version that allows tiled processing is under cell_tracking_MIA2019/main.py. This version also performs instance segmentation during testing.

The MIA version shows how to use a dedicated process for faster preprocessing (by reducing the python GIL). For this, run the script cell_tracking_MIA2019/server_dataset_loop.py and set self.use_pyro_dataset = True in cell_tracking_MIA2019/main.py. You can also run this process on a remote server. You would need to adapt the base_folder and server address for that.

Perform instance segmentation

The code for performing instance segmentation is under cell_tracking_clustering_MICCAI2018 and cell_tracking_clustering_MIA2019. The individual results can be generated running the *.sh files. The code under this folder is the same that we used to generate the results of the celltracking challenge that we submitted for MICCAI 2018. This folder also contains the trained model files (/cell_tracking_clustering_MICCAI2018/models/). Further details for running this code can be found under celltracking challenge website). We additionally created a file that performs instance segmentation with HDBSCAN for the non-recurrent version of the network. Look at the file cell_segmentation/clustering.py for more details. Note that the example cell_segmentation/main.py was not tested by us and is only used as an example for datasets without video information. You will need to adapt the parameters in order to make it work reasonably.

Train and test other datasets

In order to train and test on other datasets, modify the dataset.py file in the subfolder cell_tracking or cell_segmentation. See the example files and documentation for the specific file formats. Set the parameter save_debug_images = True in order to see, if the network input images are reasonable.

Citation

If you use this code for your research, please cite our MICCAI paper or MIA paper:

@article{Payer2019b,
  title   = {Segmenting and Tracking Cell Instances with Cosine Embeddings and Recurrent Hourglass Networks},
  author  = {Payer, Christian and {\v{S}}tern, Darko and Feiner, Marlies and Bischof, Horst and Urschler, Martin},
  journal = {Medical Image Analysis},
  volume  = {57},
  year    = {2019},
  month   = {oct},
  pages   = {106--119},
  doi     = {10.1016/j.media.2019.06.015},
}
@inproceedings{Payer2018,
  title     = {Instance Segmentation and Tracking with Cosine Embeddings and Recurrent Hourglass Networks},
  author    = {Payer, Christian and {\v{S}}tern, Darko and Neff, Thomas and Bischof, Horst and Urschler, Martin},
  booktitle = {Medical Image Computing and Computer-Assisted Intervention - {MICCAI} 2018},
  doi       = {10.1007/978-3-030-00934-2_1},
  pages     = {3--11},
  year      = {2018},
}

medicaldataaugmentationtool-celltracking's People

Contributors

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