De-Identification of Medical Imaging Data: A Comprehensive Tool for Ensuring Patient Privacy
Project description
De-Identification of Medical Imaging Data: A Comprehensive Tool for Ensuring Patient Privacy
[!IMPORTANT]
The package is now available on PyPI:pip install mede
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).
This tool combines multiple anonymization steps, including metadata deidentification, defacing and skull-stripping while being faster than current state-of-the-art deidentification tools.
Getting started
You can install the anonymization tool directly via pip or 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 Linux-based (including Mac) amd64 and arm64 platforms.
For the installation and execution of the docker image, you must have Docker installed on your system.
-
Pull the docker image
docker pull morrempe/mede:[tag] (either arm64 or amd64) -
Run the docker container with attached volume. Your data will be mounted in the
datafolder:docker run --rm -it -v [Path/to/your/data]:/data morrempe/mede:[tag] -
Run the script with the corresponding cli parameter, e.g.:
mede-deidentify [your flags]
Usage
De-Identification CLI
usage: mede-deidentify [-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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mede-0.0.5.tar.gz.
File metadata
- Download URL: mede-0.0.5.tar.gz
- Upload date:
- Size: 44.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
26d2f90d2ccbd514929856c83cf28f59aaed264684c651efb21c1ab022d15c51
|
|
| MD5 |
478272ad376a3821f946c39b16cb0de5
|
|
| BLAKE2b-256 |
e2fa892c147b7dd5153637850d01d74c222030a1973a1b3074e8e69464c29add
|
File details
Details for the file mede-0.0.5-py3-none-any.whl.
File metadata
- Download URL: mede-0.0.5-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cd982e2d1d645fc8c5dc6d3abe04e589b5ea5870bf1e8a0f8423bb8d92724f0b
|
|
| MD5 |
b160c6e255eb994dd44a7fb16fe578b7
|
|
| BLAKE2b-256 |
13ff2e2d0c72ed573cc3ee493bf44bb71f8b3f71407b2d3ac7ac9f0310697c94
|