Skip to main content

Yet another CNN framework: From pre- to postprocessing and keeping track of the spatial origin of the data.

Project description

DeepVoxNet2

DeepVoxNet2 (DVN2) is a Python library to make it easier to implement deep learning pipelines for medical applications using convolutional neural networks (CNNs). It is lightly based on the private DeepVoxNet library. In essence, the library can be used as an add-on to Tensorflow/Keras, Pytorch or any other deep learning framework in Python. Currently, the use with Tensorflow/Keras is simplest, with readily available CNN architectures, metrics, losses and the DvnModel class to group your entire pipeline and, e.g., bypass the use of Keras' fit function, etc.

DVN2 provides:

  • Utility functions such as resampling, registration, Dicom loading, etc.
  • Objects for data organization (Mirc, Dataset, Case, Record, Modality).
  • Objects for data sampling (Sampler).
  • Objects for building pre- to postprocessing pipelines (Transformer, Creator) that keep track of the spatial origin of the data inherently and that you build just like you work in Keras.

Installation

The library can be used as a Python package that can be added to your active Python 3.9 environment via:

  • First downloading/cloning/forking a specific version of the repository to your local machine and then via:
pip install -e "/path/to/deepvoxnet2[sitk]"
  • Installing a specific version directly from GitHub via:
pip install "git+https://github.com/JeroenBertels/deepvoxnet2@deepvoxnet2-2.13.21#egg=deepvoxnet2[sitk]"
pip install "deepvoxnet2[sitk]==2.13.21"

To upgrade your installation using the first method just download another version and repeat the process or git pull another version if possible. When using the second or third method simply repeat the command but add the --upgrade flag. The [sitk] flag will install the SimpleITK and SimpleElastix software packages, but this is optional (for wider compatibility).

Additionally, of the official releases there are also Docker containers available on DockerHub. These can be ran via:

  • Docker:
docker run --rm -it --gpus="device=0" -v /path/on/local/machine/a:/path/in/container/a -v /path/on/local/machine/b:/path/in/container/b jeroenbertels/deepvoxnet2:latest
  • Singularity:
cd /path/to/pulled/images
singularity pull docker://jeroenbertels/deepvoxnet2:latest
SINGULARITYENV_CUDA_VISIBLE_DEVICES=0 singularity run -B /path/on/local/machine/a:/path/in/container/a,/path/on/local/machine/b:/path/in/container/b  --cleanenv --nv deepvoxnet2_latest.sif

Tutorials

A Jupyter Notebook-style tutorial can be found here, which guides you through some of the basic design ideas behind DeepVoxNet2.

Other real-world examples are:

  • A notebook with all experiments and code accompanying this article about the effect of $\Phi$ and $\epsilon$ when using the Dice loss in tasks with missing or empty labels.

Cite as

Bertels, J., Robben, D., Lemmens, R., & Vandermeulen, D. (2022). DeepVoxNet2: Yet another CNN framework. ArXiv, 1–15. http://arxiv.org/abs/2211.09569

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

deepvoxnet2-2.16.1.tar.gz (113.5 kB view details)

Uploaded Source

File details

Details for the file deepvoxnet2-2.16.1.tar.gz.

File metadata

  • Download URL: deepvoxnet2-2.16.1.tar.gz
  • Upload date:
  • Size: 113.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for deepvoxnet2-2.16.1.tar.gz
Algorithm Hash digest
SHA256 cd019108be879122496bb2da168714216cba04d0c3ca47edcbe59e79d4dcd69f
MD5 8970251d40a134b821b7e7b1a0ea7eaa
BLAKE2b-256 f81f3f3648a03e693baf7d4e5e0837cec956dd181b324414ee2cd639bb629bad

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