Skip to content

pBFSLab/SUGAR

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SUGAR: Spherical Ultrafast Graph Attention Framework for Cortical Surface Registration

SUGAR Official Repository

Introduction

Related datasets

SALD dataset

ADRC dataset

HCP dataset

MSC dataset

CoRR-HNU dataset

UKB dataset

Implemented based on the following PyTorch libraries

PyTorch3D A library for deep learning with 3D data

PyTorch Scatter PyTorch Extension Library of Optimized Scatter Operations

PyG Graph Neural Network Library for PyTorch

State-of-the-art models for comparison

FreeSurfer

Spherical Demons

MSM Pair

MSM Strain

S3Reg

Usage

Test on a sample dataset

Download an example data from GoogleDrive or Baidu NetDisk, the surface and morphometrics for registration are preprocessed using FreeSurfer recon-all.

Test on new datatsets

If new datasets are welling to be used, please make sure you have all the pre-request files.

Docker

run docker container is highly recommended, as you only need to pull docker.

Pull image

sudo docker pull ninganme/sugar:latest

Registration

sudo docker run -it --rm --gpus all \
-v test_dataset_path:/data \
-v output_path:/out sugar \
--fsd /usr/local/freesurfer \
--sd /data \
--out /out \
--sid sub01 \
--hemi lh \
--device cuda

Installation

download model Google Drive or Baidu NetDisk.

Note: please have FreeSurfer properly installed, as the registration atlas is from FreeSurfer (FreeSurfer/subjects/fsaverage)

install libraries

# install pytorch
pip install torch==1.12.1+cu113 torchvision==0.13.1+cu113 torchaudio==0.12.1 --extra-index-url https://download.pytorch.org/whl/cu113 

# install pytorch3d
pip install fvcore==0.1.5.post20221221
pip3 install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/py38_cu113_pyt1121/download.html 

# install torch_geometric
pip install --no-index pyg_lib torch_scatter torch_sparse torch_cluster torch_spline_conv -f https://data.pyg.org/whl/torch-1.12.1+cu113.html
pip install torch_geometric==2.2.0

# install nibabel 
pip install nibabel==3.2.2

run SUGAR

cd SUGAR

python3 predict.py \ 
--sd test_dataset_path \
--out output_path \
--fsd freesurfer_path \
--sid sub01 \
--model-path model_path \
--hemi lh \
--device cuda

Training

Training Code

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages