Skip to main content

Medical Deep Learning Utilities

UnitTest Docker Docker Stable Build Package PyPI pre-commit.ci status

This repository contains utilities for training and evaluating deep learning models in medical image analysis that are not specific to certain tasks.

So far it consists of 2 major parts: An abstract Dataset API built on top of torch.utils.data.Dataset and torchio.data.Subject as well as general transforms for this kind of data.

To use the dataset classes, you basically only need to implement the parse_subjects method to return a list of samples and everything else will work automatically. You will automatically get image statistics such as median spacing or median shape. For label statistics, you either need to subclass the AbstractDiscreteLabelDataset or implement the get_single_label_stats and aggregate_label_stats methods.

All transforms work on torchio.data.Subjects and can be passed to the datasets as optional parameters. You can also pass "default" as a parameter to use the default transforms.

Pull requests for other common utilities are highly welcomed.

Installation

This project can be installed either from PyPI or by cloning the repository from GitHub.

For an install of published packages, use the command

    pip install medical-dl-utils

To install from the (cloned) repository, use the command

    pip install PATH/TO/medical-dl-utils

You can also add -e to the command to make an editable install in case you want to modify the code.

You can also install the package directly from GitHub by running

    pip install git+https://github.com/justusschock/medical-dl-utils.git

Docker Images

We provide a docker image for easy usage of the package and as a base image for other projects.

The file for this image can be found at dockers/Dockerfile. We provide both, a CPU-only and a CUDA-enabled image based on the NVIDIA NGC PyTorch image. These images can be found on DockerHub.

Metadata

Release files for medical-dl-utils 0.1.6

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

Source distribution (sdist)

Source distribution for medical-dl-utils 0.1.6
File Size Uploaded Provenance Actions
medical_dl_utils-0.1.6.tar.gz 30.9 kB Without provenance Details for medical_dl_utils-0.1.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for medical-dl-utils 0.1.6
File Interpreter ABI Platform Actions
medical_dl_utils-0.1.6-py2.py3-none-any.whl Python 3, Python 2 none any Details for medical_dl_utils-0.1.6-py2.py3-none-any.whl

Total release size: 66.3 kB

Release files / medical_dl_utils-0.1.6.tar.gz

Download URL medical_dl_utils-0.1.6.tar.gz
Size 30.9 kB
Tags Source
SHA-256 checksum
How to use checksums
8baaac2c30473caaaf85c4b0db8ed39e01c09dadacf30ab24bb938bae988df6e
BLAKE2b-256 checksum
How to use checksums
73c9d243a55376e20801f676ba2f480ac81ed8691a3a688c8352aa58789912c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / medical_dl_utils-0.1.6-py2.py3-none-any.whl

Download URL medical_dl_utils-0.1.6-py2.py3-none-any.whl
Size 35.4 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
fa0cb75f98194d0c6e412957620b1d4527c88a75a7d1c93b7d4945fc096522a5
BLAKE2b-256 checksum
How to use checksums
3efa3d7673381015ab1a9c4c038d3ddcb484f1f1540b02f8596b7b3697ddbe7e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Security for medical-dl-utils 0.1.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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