spinenet.SpineNet

class spinenet.SpineNet(device: bool = 'cuda:0', verbose: bool = True, scan_type: str = 'lumbar')
__init__(device: bool = 'cuda:0', verbose: bool = True, scan_type: str = 'lumbar') None

Initialize instance of spinenet for (1) detecting and labelling vertebrae (2) Performing radiological grading for common spinal degenerative changes in T2 sagittal lumbar scans.

Parameters
  • device (str, optional) – The pytorch-style device to use for the model. The default is “cuda:0”. If you not using CUDA-enabled machine, you can use “cpu” (although this will slow performance).

  • verbose (bool, optional) – Whether to print out information regarding the pipeline. The default is True.

  • scan_type (str, optional) – The type of scan to use. The default is “lumbar”. Can also be “whole”

Methods

__init__([device, verbose, scan_type])

Initialize instance of spinenet for (1) detecting and labelling vertebrae (2) Performing radiological grading for common spinal degenerative changes in T2 sagittal lumbar scans.

detect_vb(volume, pixel_spacing[, debug, ...])

Use SpineNet to detect and label vertebral bodies in a volume.

get_ivds_from_vert_dicts(vert_dicts, scan_volume)

Use detected vertebrae from SpineNet's detect_vb function to generate volumes surrounding each IVD.

grade_ivds(ivd_dicts)

Grade all intervertebral discs extracted from a volume.