MD.ai

De-Identification

Redact burned-in text from pixels and de-identify DICOM tags

The De-ID panel creates a de-identified copy of a dataset. It can do two things, separately or together:

  • DICOM Pixel Redaction: blacks out regions of images, such as burned-in patient names and dates.
  • DICOM Tags Modification: removes, blanks, replaces or shifts DICOM tag values.

The original dataset is never changed. Each task creates a new dataset with the de-identified data, which you can use like any other dataset.

De-ID panel

Requirements

  • Only project admins can run De-ID.
  • De-ID is available in Regular projects, and not for video.
  • De-ID works on Upload and DICOM Push datasets only.
  • A dataset can have only one active De-ID task at a time.

Run a De-ID task

In the annotator, open the dataset you want to de-identify and open the De-ID panel from the Navigation column (or press Alt+Shift+D).

Under Create Dataset De-ID Task, turn DICOM Pixel Redaction and DICOM Tags Modification on or off. Both are on by default.

Configure pixel redaction and the tag rules.

Click Create Task.

When the task finishes, its card in the panel shows the status, duration, redacted labels, a summary and the new dataset. Click Select to open the new dataset, or View Actions to see, and download as CSV, the tag rules that were applied. A running task can be stopped with Cancel.

De-ID task details

You can also run and monitor De-ID tasks with the CLI.

Redact burned-in text

Pixel redaction covers the regions of chosen annotations with black pixels. You decide which regions to redact by annotating them, by hand or with the MD.ai De-ID model.

Original image
Original image
After pixel redaction
After pixel redaction

Images without any regions to redact keep their original pixels. Tag rules still apply to them.

The De-ID model

The mdai:pixel-deid model, available from the Model Registry, detects text on images and sorts it into three labels:

  • Markers: radiological markers, such as laterality markers, that readers may want to keep.
  • Digits: text containing numbers, such as ages, dates and IDs.
  • Text: all other text, such as names and addresses.

It works best on X-ray, CT, MR, ultrasound and mammography.

De-ID model output

Use this when you want a person to confirm what gets redacted.

  1. Add mdai:pixel-deid to the project from the Model Registry and run it on the dataset.
  2. Review the outputs, and clone the ones you agree with as annotations, one at a time or a whole task at once. Edit or delete annotations as needed, and draw boxes around anything the model missed.
  3. In the De-ID panel, with DICOM Pixel Redaction on, click Select Labels and choose the labels to redact, for example only Digits and Text.
  4. Click Create Task.
Clone model outputs as annotations

Only annotations of the selected labels are redacted.

Option 2: Redact automatically

Turn on Use Auto-Inference to run the De-ID model and redact what it detects in one step, without reviewing.

  • By default the latest mdai:pixel-deid model is used. Click Change Model to choose another De-ID model from the registry.
  • Click Select Labels to limit redaction to some labels, for example to keep Markers.
  • If earlier outputs of the model already cover the dataset, they are reused instead of running inference again. Select Run a new inference anyway to force a new run.

Option 3: Redact your own annotations

Draw annotations around the regions to redact with any label, then select that label under Select Labels. You can use this beyond text, for example to remove regions outside the area of interest.

Redaction labels must be Local labels in the active label group, with the Bounding Box, Polygon, Freeform or Mask mode.

De-identify DICOM tags

Tag modification applies a list of rules, one per tag. The default rules are based on the HIPAA Safe Harbor method, but don't implement it fully: for example, they shift dates instead of removing them. Review them against your own requirements before you rely on them.

DICOM tag rules
ActionEffect
ADDAdds the tag with the given value.
REMOVERemoves the tag.
KEEPLeaves the tag unchanged. Useful to document a decision.
BLANKReplaces the value with an empty string. Doesn't apply to US and SS value representations.
REPLACEReplaces the value with the given value. Use func:uuid to replace it with a random UUID: the same original value always gets the same UUID, across all files, so values such as PatientID stay consistent within the dataset.
JITTERShifts a date (DA) or date-time (DT) by a random number of days between -x and x, never 0, where x is the value you give (the editor suggests 10). Each date is shifted by its own random amount, so intervals between dates aren't preserved.

Rules can target a tag by keyword, or every tag whose keyword matches contains:<text> or startswith:<text>. Rules also apply to tags inside sequences.

Editing the rules:

  • Load Preset > Default loads the default rules.
  • Add Row adds a rule, and Clear removes all rules.
  • Export CSV downloads the rules, so you can reuse them. You can also download the default rules.
  • Select Remove Private DICOM Tags to also remove all private tags.

Rules can't change StudyInstanceUID, SeriesInstanceUID or SOPInstanceUID, which MD.ai uses to identify data. The de-identified dataset keeps the original UIDs.

Data that is de-identified on upload

Data uploaded to Share and Education projects is de-identified automatically during processing, so you don't need a De-ID task there. Unlike a De-ID task, this replaces UIDs and PatientID with new values, and removes all private tags and sequences. CT and MR secondary captures are rejected. Removing sequences also removes information some features rely on, such as the registration the ETDRS grid needs.

To keep secondary captures, which often contain burned-in patient information, out of a dataset entirely, turn on Ignore Secondary Capture before loading data.

On this page