EliHei2 / segger_dev

a cutting-edge cell segmentation model specifically designed for single-molecule resolved spatial omics datasets. It addresses the challenge of accurately segmenting individual cells in complex imaging datasets, leveraging a unique approach based on graph neural networks (GNNs).
https://elihei2.github.io/segger_dev/
MIT License
38 stars 3 forks source link

🍳 Welcome to segger!

pre-commit.ci status

segger is a cutting-edge tool for cell segmentation in single-molecule spatial omics datasets. By leveraging graph neural networks (GNNs) and heterogeneous graphs, segger offers unmatched accuracy and scalability.

How segger Works

Segger Model


Quick Links


Why segger?

Challenges in Segmentation

Spatial omics segmentation faces issues like:

segger tackles these with a graph-based approach, achieving superior segmentation accuracy.


Installation Options

Important: PyTorch Geometric Dependencies

Segger relies heavily on PyTorch Geometric for its graph-based operations. One must install its dependencies (such as torch-sparse and torch-scatter) based on their system’s specifications, especially the CUDA and PyTorch versions.

Please follow the official PyTorch Geometric Installation Guide to install the correct versions of torch-sparse, torch-scatter, and other relevant libraries.

Below is a quick guide for installing PyTorch Geometric dependencies for torch 2.4.0:

For CUDA 11.x:

pip install pyg_lib torch_scatter torch_sparse torch_cluster torch_spline_conv -f https://data.pyg.org/whl/torch-2.4.0+cu121.html

For CUDA 12.x:

pip install pyg_lib torch_scatter torch_sparse torch_cluster torch_spline_conv -f https://data.pyg.org/whl/torch-2.4.0+cu118.html

Afterwards choose the installation method that best suits your needs.

Micromamba Installation

To set up Segger with micromamba and install the required dependencies, use the following commands:

micromamba create -n segger-rapids --channel-priority 1 \
    -c rapidsai -c conda-forge -c nvidia -c pytorch -c pyg \
    rapids=24.08 python=3.* 'cuda-version>=11.4,<=11.8' jupyterlab \
    'pytorch=*=*cuda*' 'pyg=*=*cu118' pyg-lib pytorch-sparse
micromamba install -n segger-rapids --channel-priority 1 --file mamba_environment.yml
micromamba run -n segger-rapids pip install --no-deps ./

GitHub Installation

For a straightforward local installation from GitHub, clone the repository and install the package using pip:

git clone https://github.com/EliHei2/segger_dev.git
cd segger_dev
pip install -e "."

Pip Installation (RAPIDS and CUDA 11)

For installations requiring RAPIDS and CUDA 11 support, run:

pip install -e ".[rapids11]"

Pip Installation (RAPIDS and CUDA 12)

For installations requiring RAPIDS and CUDA 12 support, run:

pip install -e ".[rapids12]"

Docker Installation

Segger provides an easy-to-use Docker container for those who prefer a containerized environment. To pull the latest Docker image:

docker pull danielunyi42/segger_dev:latest

The Docker image comes with all dependencies packaged, including RAPIDS. It currently supports only CUDA 12.2, and we will soon release a version that supports CUDA 11.8.

Singularity Installation

For users who prefer Singularity, you can pull the Docker image as follows:

singularity pull docker://danielunyi42/segger_dev:latest

Powered by


Contributions

segger is open-source and welcomes contributions. Join us in advancing spatial omics segmentation!