Skip to content

MaximilianLindholz/CT-Defacer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 Defacing CT Scans Using TotalSegmentator

This repository contains the code we used in our paper on defacing CT scans using the TotalSegmentator (v2.4.0). We tested its effectiveness in removing identifiable facial features, and it does 😊!

How To:

  1. First, get a non-commercial license for the TotalSegmentator and check the documentation.
  2. Activate the license by running the command you receive in the console (with your environment activated). The command will look something like this:
totalseg_set_license -l aca_XXXXXXXXX
  1. Install the requirements.txt (we tested it with Python 3.10.15)
  2. Python totaldeface.py
python totaldeface.py --input_dir  --output_dir --totalsegmentator_licence

// If you don't add an input and output path we added an example from TCIA to showcase it and it should automatically download :)

Bulky masks, are good masks (most of the time) :)

For effective defacing, face masks should be bulky, not fine or detailed, to avoid re-identification. Sharp masks can be "refaced" if the mask can be differentiated from the normal CT background (including noise). The green mask is from the TotalSegmentator, and the red one from the CTA-DEFACE model.

Defacing Example

For tasks where preserving more of the facial anatomy is important, finer masks may be more appropriate. In this case, you must ensure that the mask is replaced with background values (including noise) that cannot be distinguished from the real background or get a broader patient consent 😉

If you use any of the code or are interested in the defacing process, please read and/or cite our paper, as well as the original TotalSegmentator paper:

📚 Citation (APA)

Lindholz, M., Ruppel, R., Schulze-Weddige, S., Baumgärtner, G. L., Schobert, I., Panten, A., ... & Penzkofer, T. (2025). Analyzing the TotalSegmentator for facial feature removal in head CT scans. *Radiography, 31*(1), 372-378.

📚 Link to paper :)

Check our paper :)


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages