Skip to content

Install and run

Requirements

  • Docker Desktop or Docker Engine with Compose
  • CPU: 8 GiB RAM recommended
  • About 4 GB free disk space and internet access for the first image download

These are practical starting points; production needs depend on workload.

Easiest start with Docker

Clone the meddeid repository and run:

git clone https://github.com/stighellemans/meddeid.git
cd meddeid
./scripts/start-local.sh

The script generates a private API key, pulls the published CPU image with the pinned model, starts it only on your computer, and waits until it is ready. Open http://127.0.0.1:8000/ui, paste the API key from the generated .env file, then paste a note. No Python or API command is required. Technical API documentation remains available at http://127.0.0.1:8000/docs.

Stop the service with ./scripts/stop-local.sh.

Python option

Install the released Python API, CLI, batch runner, and optional HTTP service:

python -m pip install 'meddeid[server]'
meddeid deidentify note.txt

MedDeID downloads and caches stighellemans/meddeid-dutch-synth on first use, chooses a local device, and processes the note locally.

See local inference for current deployment boundaries.

Use the Python API

from meddeid import Deidentifier

deidentifier = Deidentifier.from_pretrained(
    "stighellemans/meddeid-dutch-synth"
)
result = deidentifier("Patiënt Alex Voorbeeld kwam op controle.")

print(result.deid_text)
print(result.spans)
deidentifier.close()

Process a batch of notes

meddeid batch documents.jsonl --output predictions.jsonl

The batch command keeps the document order and saves the information needed to identify how the results were produced.

Check the model version

meddeid model-info

Save the exact model version shown by this command when the result must be reproducible.

Air-gapped environments

Download a fixed copy of the model outside the secure environment, validate it, transfer it according to local policy, and pass the local directory with --model. See local inference.

Next steps