Skip to main content

Automatic segmentation of epilepsy neurosurgery resection cavity.

Project description

RESSEG

Automatic segmentation of postoperative brain resection cavities from magnetic resonance images (MRI) using a convolutional neural network (CNN) trained with PyTorch 1.7.1.

Installation

It's recommended to use conda and install your desired PyTorch version before installing resseg. A 6-GB GPU is large enough to segment an image in the MNI space.

conda create -n resseg python=3.8 ipython -y && conda activate resseg  # recommended
pip install resseg

Usage

BITE

Example using an image from the Brain Images of Tumors for Evaluation database (BITE).

BITE=`resseg-download bite`
resseg $BITE -o bite_seg.nii.gz

Resection cavity segmented on an image from BITE

EPISURG

Example using an image from the EPISURG dataset. Segmentation works best when images are in the MNI space, so resseg includes a tool for this purpose (requires ANTsPy).

pip install antspyx
EPISURG=`resseg-download episurg`
resseg-mni $EPISURG -t episurg_to_mni.tfm
resseg $EPISURG -o episurg_seg.nii.gz -t episurg_to_mni.tfm

Resection cavity segmented on an image from EPISURG

Credit

If you use this library for your research, please cite our MICCAI 2020 paper:

F. Pérez-García, R. Rodionov, A. Alim-Marvasti, R. Sparks, J. S. Duncan and S. Ourselin. Simulation of Brain Resection for Cavity Segmentation Using Self-Supervised and Semi-Supervised Learning.

[Preprint on arXiv]

And the EPISURG dataset, which was used to train the model:

Pérez-García, Fernando; Rodionov, Roman; Alim-Marvasti, Ali; Sparks, Rachel; Duncan, John; Ourselin, Sebastien (2020): EPISURG: a dataset of postoperative magnetic resonance images (MRI) for quantitative analysis of resection neurosurgery for refractory epilepsy. University College London. Dataset. https://doi.org/10.5522/04/9996158.v1

See also

  • resector was used to simulate brain resections during training
  • TorchIO was also used extensively. Both resseg and resector require this library.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

resseg-0.3.4.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

resseg-0.3.4-py2.py3-none-any.whl (10.1 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file resseg-0.3.4.tar.gz.

File metadata

  • Download URL: resseg-0.3.4.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.7.1

File hashes

Hashes for resseg-0.3.4.tar.gz
Algorithm Hash digest
SHA256 ac54d11ebc276c85a99e0673979adf02ed5752fd545f4881ca404ccfc21a23db
MD5 697faa63e1c45e75d96595be3c63a017
BLAKE2b-256 850e3472a80e238584335408893eb68d3698dc88f48dae1b93abae80228b6c6a

See more details on using hashes here.

File details

Details for the file resseg-0.3.4-py2.py3-none-any.whl.

File metadata

  • Download URL: resseg-0.3.4-py2.py3-none-any.whl
  • Upload date:
  • Size: 10.1 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.7.1

File hashes

Hashes for resseg-0.3.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 f6a4af14c40f2b7b4cb711e0eb4b558ddcd722a66a86b0951f312dd162752ade
MD5 5321af0a8b6db92273b254e0a0926852
BLAKE2b-256 779e4662adab3fd19bbaffa0bb155fbc333721b5feca5e4929a04df6f0ede62d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page