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.20.5.tar.gz (131.7 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: deepvoxnet2-2.20.5.tar.gz
  • Upload date:
  • Size: 131.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for deepvoxnet2-2.20.5.tar.gz
Algorithm Hash digest
SHA256 89184ab546bbfc18b1eb651603ec289dc46fdedd3ec763d1533b7aec33961d21
MD5 1430bbee419c91e4937d48c5efcd2246
BLAKE2b-256 3e3950ab4dcadad32773646dab530d7aecef9ba8c413db07b8c1b8d4b3105cfe

See more details on using hashes here.

Supported by

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