Skip to main content

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.

Metadata

Release files for resseg 0.3.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for resseg 0.3.5
File Size Uploaded
resseg-0.3.5.tar.gz 6.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for resseg 0.3.5
File Interpreter ABI Platform
resseg-0.3.5-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 16.9 kB

Release files / resseg-0.3.5.tar.gz

Download URL resseg-0.3.5.tar.gz
Size 6.8 kB
Tags Source
SHA-256 checksum
How to use checksums
8fcc553fa693090611ccac540233cb3402a25ea926c6577af846d58b0ad09e15
BLAKE2b-256 checksum
How to use checksums
afcdddc1efc516b4d080ee96acf86b9bc5deaa68fb95da17c6a63891205c7479
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / resseg-0.3.5-py2.py3-none-any.whl

Download URL resseg-0.3.5-py2.py3-none-any.whl
Size 10.1 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
1d399cfc72e155243313935cf2d505c622d6654045c0215a0fcf13e1b5de67bb
BLAKE2b-256 checksum
How to use checksums
639bfcbedd478718e75631d74c3b24ed2e444cecc5aea843188af918d6124a4d
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

0.3.7

2 release files

0.3.6

2 release files

This release

0.3.5 This release

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.2.1

1 release file

0.2.0

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page