Skip to content

WangLabTHU/CellTracker

Repository files navigation

CellTracker: An Automated Toolbox for Single-Cell Segmentation and Tracking in Microscopy Images

The code for the official implementation of CellTracker. You can find the Tutorial in doc folder.

This codebase provides:

  • A GUI for cell image normalization
  • A GUI for cell image segmentation
  • A GUI for cell image tracking
  • A GUI for manual correction
  • A GUI for cell property profiling and intensity quantification
  • A GUI for training data annotation
  • A GUI for deep CNN model training
  • A Python API for deep CNN model training

Contents

  1. Introduction
  2. Environment Setup
  3. Bibtex

Introduction

CellTracker is a highly integrated graphical user interface software, for automated cell segmentation and tracking of time-lapse microscopy images. It covers essential steps in image analysis including project management, image pre-processing, cell segmentation, cell tracking, manually correction, and statistical analysis such as the quantification of cell size and fluorescence intensity, etc. Furthermore, CellTracker provides an annotation tool and supports model training from scratch, thus proposing a flexible and scalable solution for customized dataset analysis.


Environment Setup

Env Requirements:

  • MAC OS, Linux or Windows.
  • Python 3.5+.
  • PyTorch 1.4 or higher.
  • CUDA 9.2 or higher if you need train deep learning model with gpu.

Steps of using CellTracker:

  1. Install Python ref to Download Python

  2. Install CellTracker in virtualenv to keep your environment clean:

    on macOS/Linux
    pip install virtualenv  
    # or 
    pip install -i https://pypi.tuna.tsinghua.edu.cn/simple virtualenv 
    
    virtualenv --python=python3 CellTrackerEnv
    cd CellTrackerEnv
    source ./bin/activate
    

    Optional: After use, shutdown virtual environment with

    deactivate
    
    on Windows (open cmd with administrator's permission)
    pip install virtualenv  
    # or 
    pip install -i https://pypi.tuna.tsinghua.edu.cn/simple virtualenv 
    virtualenv --python=python3 CellTrackerEnv 
    cd CellTrackerEnv
    .\Scripts\activate.bat
    

    Optional: Shutdown virtual environment with

    .\Scripts\deactivate.bat
    
  3. Install Git, this step is optional if you does not install CellTracker by git clone. Clone the source codes with git.

    git clone https://github.com/WangLabTHU/CellTracker.git
    

    To boost download speeds, you could clone CellTracker from the source in the mainland of China.

    git clone https://gitee.com/ecart18/cell-tracker.git
    
  4. or, download the source codes and extract files and put it in the virtual environment directory you defined.

  5. after 2/3, the directory of CellTracker should have the following structure:

    CellTrackerEnv
        cell-tracker
            |-------main.py
            |
            |-------cell_tracker
                    |...
                    |...
            |-------datasets
                    |...
            |-------log
            |-------output
            |-------training_demo1
            |-------training_demo2
            |...
        |...
    
  6. After the extraction, download all dependencies with the following commend.

    cd cell-tracker
    pip install -r requirements.txt
    

    To boost download speeds, you could setup pip mirror such as

    pip install -i https://pypi.tuna.tsinghua.edu.cn/simple -r requirements.txt  
    # or
    pip install -i https://mirrors.aliyun.com/pypi/simple  -r requirements.txt
    

    It is recommended to use the official website to install pytorch.

    # CPU version
    pip install torch==1.4.0+cpu torchvision==0.5.0+cpu -f https://download.pytorch.org/whl/torch_stable.html
    # GPU version
    pip install torch==1.4.0 torchvision==0.5.0 -f https://download.pytorch.org/whl/torch_stable.html
    
  7. Run CelTracker with python and enjoy it.

    python main.py
    

Steps of re-training deep learning model:

CellTracker provides two methods to re-train deep CNN networks for your customized datasets.

Warning: Linux is strongly recommended for training deep learning model. Re-training with the Python API in a Linux terminal can avoid some unexpected environment dependency errors.

  1. re-training with User Interface.

  2. re-training with Python API in terminal. CellTracker provides two demo datasets and codes to help you get familiar with this feature, such as:

    cd training_demo1  
    # or cd training_demo2
    python retraining.py
    

Pretrained models download:

CellTracker provides two pretrained models for dataset of training_demo1 and training_demo2 respectively. Download them from the following link.

Bibtex

Please consider citing our paper in your publications if the project helps your research. BibTeX reference is as follows.

@article{,
  title={CellTracker: An Automated Toolbox for Single-Cell Segmentation and Tracking in Microscopy Images},
  author={Hu, Tao and Xu, Shixiong, Zhang, Xuegong and Wang, Xiaowo},
  journal={},
  year={2020}
}

License

For academic use, this project is licensed under the GNU Lesser General Public License v3.0 - see the LICENSE file for details. For commercial use, please contact the authors.

About

CellTracker: An Automated Toolbox for Single-Cell Segmentation and Tracking in Microscopy Images

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •