8000 GitHub - kaitj/NHP-BrainExtraction
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

kaitj/NHP-BrainExtraction

 
 

Repository files navigation

DeepBet - U-Net Brain extraction tool for nonhuman primates

Date: April 12th, 2021


Description

This repo includes the brain extraction tool (DeepBet v1.0) for skull-stripping the nonhuman primate images. We also include brain masks of 136 macaque monkeys (20 sites) from PRIME-DE. The tool is constructed using a convolutional network - UNet model, initially trained on a human sample and updated with macaque data.

In this repo, we also include the outputs from other tools (AFNI, FSL, FreeSurfer, ANTS) - a glance of the performance for different pipelines

Reference: Wang et al., U-net model for brain extraction: Trained on humans for transfer to non-human primates, 2021, NeuroImage

Docker Image

Pull

The docker image has been uploaded onto DockerHub, download it by using the following command

docker pull sandywangrest/deepbet:1.0

Helper

For the usage of this image, run

docker run sandywangrest/deepbet

Storage Requirement

~5GB hard disk space for whole docker image, including pytorch (~4GB), nibabel, scipy (~188MB), 12 U-Net models (356MB) and our code (44KB)

U-Net model


Local installation

python3, numpy, pytorch, nibabel, scipy

Run brain mask prediction

python3 /path_to_the_code/muSkullStrip.py -in /path_to_the_data/input_t1.nii.gz -model /path_to_the_model/selected_model.model -out /path_to_the_output_directory

Output: *_pre_mask.nii.gz

Custimize the model for your own dataset

python3 /path_to_the_code/trainSs_UNet.py -trt1w /directory_of_the_training_images -trmsk /directory_of_the_training_image_masks -out /output_directory -vt1w /directory_of_the_validation_images -vmsk /directory_of_the_validation_image_masks -init /initial_model_to_start_with

Note: Our macaque model was a transfer-learning model using a human dataset as the 'initial model' (-init option). You can use the model we provided to custimize the model for your own dataset (even across species).

The trained models can be used in prediction (muSkullStrip.py -model) or model-updating (trainSs_Unet.py -init)