Giter Club home page Giter Club logo

3dcellseg's Introduction

3DCellSeg

A light and robust tool to do 3D cell instance segmentation for cell membrane images. It is useful when the cells clump together.

Official implementation of A novel deep learning-based 3D cell segmentation framework for future image-based disease detection. (However, we think the title should be 3DCellSeg - a robust deep learning-based 3D cell instance segmentation pipeline. We could not understand why the corresponding author J changed the title. It was so wired. Anyway, the work itself is what it is.)

Dependencies

  • Check the required python packages in requirements.txt.

Datasets and data pre-processing

3DCellSeg was trained and tested on four datasets: HMS (private), ATAS, LRP, Ovules.

For HMS dataset, please send email to the authors to get data access.

  • Put the data filefolder under a given path (e.g., \data\CellSeg_dataset in my case)

  • The data structure should be like:

For HMS

\data\CellSeg_dataset\HMS
    \raw
        \100.mha
        ...
    \segmentation
        \100.mha
        ...

For ATAS

\data\CellSeg_dataset\ATAS
    \plant1
        \processed_tiffs
            \0hrs_plant1_trim-acylYFP.tif
            ...
        \segmentation_tiffs
            \0hrs_plant1_trim-acylYFP_hmin_2_asf_1_s_2.00_clean_3.tif
            ...
        ...
    ...

For LRP

\data\CellSeg_dataset\LateralRootPrimordia
    \train
        \Movie1_t00003_crop_gt.h5
        ...
    \test
        \Movie1_t00006_crop_gt.h5
        ...
    ...

For Ovules

\data\CellSeg_dataset\Ovules
    \train
        \N_404_ds2x.h5
        ...
    \test
        \N_294_final_crop_ds2.h5
        ...
    ...
  • Run prepare_datasets.py (which calls py files in folder prepare_dataset) to pre-process the dataset. (Here to download the samples of pre-processed files (passwd: cellseg).)

  • You may use prepare_datasets.py to pre-crop the 3D images if you find the training is slow.

  • [IMPORTANT] prepare_datasets.py generates a python dict (stored in dataset_info) for each processed dataset. The dict contains file paths to each train and test files. All dataloading operations during training and testing depend on the dict. You should create your own dict. See dict samples in dataset_info.

Train and test

Run train_HMS.py and train_ATAS.py to train the model on the corresponding dataset. They were implemented by PyTorch. You can easily adjust the hyperparameters.

Run notebook test_HMS.ipynb, test_ATAS.ipynb, test_LRP.ipynb, and test_Ovules.ipynb to test the model. The notebooks show details of every step.

Run notebook test_Ovules_cal_acc.ipynb, Ovules_test _cal_multi_img_acc.ipynb, test_LRP_cal_acc.ipynb, and LRP_test _cal_multi_img_acc.ipynb to calculate accuracy on Ovules and LRP datasets. (Note that the checkpoints are not the ones used in paper because I could not find the original ones.)

Pretrained models

See folder output.

If you have more questions about the code

Please contact [email protected].

3dcellseg's People

Contributors

antonotnawang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

3dcellseg's Issues

dependencies

Hi
Thanks for making this repo available.
Could you list dependencies as a requirements.txt or environment.yml file so its easy to configure and work with 3DCellSeg,?

Cheers
Pradeep

pre-trained models

Hi,
Does a model trained on a specific dataset will work on another, can you supply pre-trained models?
Thanks

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.