Skip to main content

De-Identification of Medical Imaging Data: A Comprehensive Tool for Ensuring Patient Privacy

Reason this release was yanked:

Issue with numpy version 2.2.2

Project description

De-Identification of Medical Imaging Data: A Comprehensive Tool for Ensuring Patient Privacy

Python 3.11.2 Code style: black License Open Source Love Docker PyPI - Version

[!NOTE] We released a pip package for easy installation

Getting startedUsageCitation

This repository contains the De-Identification of Medical Imaging Data: A Comprehensive Tool for Ensuring Patient Privacy, which enables the user to anonymize a wide variety of medical imaging types, including Magnetic Resonance Imaging (MRI), Computer Tomography (CT), Ultrasound (US), Whole Slide Images (WSI) or MRI raw data (twix).

Overview

This tool combines multiple anonymization steps, including metadata deidentification, defacing and skull-stripping while being faster than current state-of-the-art deidentification tools.

Computationtimes

Getting started

You can install the anonymization tool either directly via git, by cloning this repository or via Docker.

Installation via pip

Our tool is available via pip. You can install it with the following command:

pip install mede

Additional dependencies for text removal

If you want to use the text removal feature, you also need to install Google's Tesseract OCR engine. You can find the installation instructions for your operating system here. On Ubuntu, you can install it via

sudo apt install tesseract-ocr
sudo apt install libtesseract-dev

On MacOS, you can install it via Homebrew:

brew install tesseract

Installation via Docker

Alternatively this tool is distributed via docker. You can find the docker images here. The docker image is available for amd64 and arm64 platforms.

For the installation and execution of the docker image, you must have Docker installed on your system.

  1. Pull the docker image

    docker pull morrempe/hold:[tag]   (either arm64 or amd64)
    
  2. Run the docker container with attached volume. Your data will be mounted in the data folder:

    docker run --rm -it -v [Path/to/your/data]:/data morrempe/hold:[tag]
    
  3. Run the script with the corresponding cli parameter, e.g.:

    python3 deidentify.py [your flags]
    

Usage

De-Identification CLI

usage: deidentify.py [-h] [-v | --verbose | --no-verbose] [-t | --text-removal | --no-text-removal] [-i INPUT]
                                    [-o OUTPUT] [--gpu GPU] [-s | --skull_strip | --no-skull_strip] [-de | --deface | --no-deface]
                                    [-tw | --twix | --no-twix] [-p PROCESSES]
                                    [-d {basicProfile,cleanDescOpt,cleanGraphOpt,cleanStructContOpt,rtnDevIdOpt,rtnInstIdOpt,rtnLongFullDatesOpt,rtnLongModifDatesOpt,rtnPatCharsOpt,rtnSafePrivOpt,rtnUIDsOpt} [{basicProfile,cleanDescOpt,cleanGraphOpt,cleanStructContOpt,rtnDevIdOpt,rtnInstIdOpt,rtnLongFullDatesOpt,rtnLongModifDatesOpt,rtnPatCharsOpt,rtnSafePrivOpt,rtnUIDsOpt} ...]]

options:
  -h, --help            show this help message and exit
  -v, --verbose, --no-verbose
  -t, --text-removal, --no-text-removal
  -i INPUT, --input INPUT
                        Path to the input data.
  -o OUTPUT, --output OUTPUT
                        Path to save the output data.
  --gpu GPU             GPU device number. (default 0)
  -s, --skull_strip, --no-skull_strip
  -de, --deface, --no-deface
  -tw, --twix, --no-twix
  -w, --wsi, --no-wsi
  -p PROCESSES, --processes PROCESSES
                        Number of processes to use for multiprocessing.
  -d {basicProfile,cleanDescOpt,cleanGraphOpt,cleanStructContOpt,rtnDevIdOpt,rtnInstIdOpt,rtnLongFullDatesOpt,rtnLongModifDatesOpt,rtnPatCharsOpt,rtnSafePrivOpt,rtnUIDsOpt} [{basicProfile,cleanDescOpt,cleanGraphOpt,cleanStructContOpt,rtnDevIdOpt,rtnInstIdOpt,rtnLongFullDatesOpt,rtnLongModifDatesOpt,rtnPatCharsOpt,rtnSafePrivOpt,rtnUIDsOpt} ...], --deidentification-profile {basicProfile,cleanDescOpt,cleanGraphOpt,cleanStructContOpt,rtnDevIdOpt,rtnInstIdOpt,rtnLongFullDatesOpt,rtnLongModifDatesOpt,rtnPatCharsOpt,rtnSafePrivOpt,rtnUIDsOpt} [{basicProfile,cleanDescOpt,cleanGraphOpt,cleanStructContOpt,rtnDevIdOpt,rtnInstIdOpt,rtnLongFullDatesOpt,rtnLongModifDatesOpt,rtnPatCharsOpt,rtnSafePrivOpt,rtnUIDsOpt} ...]
                        Which DICOM deidentification profile(s) to apply. (default None)

Citation

If you use our tool in your work, please cite us with the following BibTeX entry.

@article{rempe2025identification,
  title={De-identification of medical imaging data: a comprehensive tool for ensuring patient privacy},
  author={Rempe, Moritz and Heine, Lukas and Seibold, Constantin and H{\"o}rst, Fabian and Kleesiek, Jens},
  journal={European Radiology},
  pages={1--10},
  year={2025},
  publisher={Springer}
}

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

mede-0.0.1.tar.gz (43.6 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mede-0.0.1-py3-none-any.whl (41.3 MB view details)

Uploaded Python 3

File details

Details for the file mede-0.0.1.tar.gz.

File metadata

  • Download URL: mede-0.0.1.tar.gz
  • Upload date:
  • Size: 43.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.8

File hashes

Hashes for mede-0.0.1.tar.gz
Algorithm Hash digest
SHA256 16250ca3cec670b7adf1f68fe8afed73a2478951c018bbb7dbfb968fce00625e
MD5 7c777606c9f8928375fc796a2420a7b8
BLAKE2b-256 a3a41c08f8717564b1c9b255271bccf647e0dd8309ee100b6e6dfc911512f939

See more details on using hashes here.

File details

Details for the file mede-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: mede-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 41.3 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.8

File hashes

Hashes for mede-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a8c880aba40656c9065b92094389a1305e9b6f4dc41a0b831b22956bbc2d4e12
MD5 adbf19ec68b5b8e756ecd70841d0ba70
BLAKE2b-256 08e711b375f0488bec1edbb8bd5dbfdb3831af47240273e1193bfb732bf4656f

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