--- id: presidio-image-redactor version: "0.0.60" license: MIT license_treatment: permissive maintenance: active --- # presidio-image-redactor — Presidio image redactor package License: permissive · Maintenance: active · Downloads: 168.3K/mo ## What it is and what it does Presidio Image Redactor is a Python module that finds and masks PII text embedded in images and DICOM medical files. It combines OCR via pytesseract with named-entity recognition via spacy and presidio-analyzer to locate sensitive text, then covers those regions with a solid color or pattern of your choice. The package handles both standard image formats and DICOM medical imaging files. For DICOM, it redacts only pixel-level burn-in text and does not modify metadata; the documentation explicitly recommends using a separate tool for metadata scrubbing. It supports batch processing from directories and can optionally return bounding boxes of redacted regions. The module runs as a Python library or as a Docker service with an HTTP API. Use it for: - Anonymize photographs or scanned documents before sharing them in research or compliance workflows. - Remove patient names and medical record numbers from DICOM images before publishing or archiving. - Batch-redact burn-in text from medical imaging studies to prepare datasets for machine learning training. - Build a privacy-preserving image pipeline in a web service using the HTTP API or Docker deployment. - Detect and mask PII in user-uploaded images to enforce data minimization policies. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Detects and redacts personally identifiable information (PII) text in images and DICOM medical files using OCR and named-entity recognition. Yes, if you need to redact PII text from images or DICOM files. The package is actively maintained, has no known vulnerabilities, uses a permissive MIT license, and integrates with standard image libraries. The main gotcha is the Tesseract OCR system dependency—plan for that installation before deploying. Not suitable if you need metadata-level DICOM anonymization without a separate tool. ## Install pip install presidio-image-redactor uv add presidio-image-redactor poetry add presidio-image-redactor ## Installing presidio-image-redactor Before you install: Low friction install with a pure-Python wheel. Active maintenance (last commit 2026-08-11) and no known vulnerabilities. Requires Tesseract OCR as a system dependency; documentation specifies v5.2.0 for best results. License in practice: MIT license permits commercial and private use with minimal restrictions—suitable for most production deployments. Quickstart: pip install presidio-image-redactor python -m spacy download en_core_web_lg from presidio_image_redactor import ImageRedactorEngine from pillow import Image image = Image.open("image.png") engine = ImageRedactorEngine() redacted = engine.redact(image, (255, 192, 203)) redacted.save("redacted.png") Tesseract OCR must be installed on your system (not via pip). Documentation recommends v5.2.0. The spacy model en_core_web_lg must be downloaded after package installation. Verify before relying: - Actual redaction accuracy and false-positive rates for different image types and quality levels. - Performance characteristics (processing time per image, memory usage) at scale. - Whether DICOM metadata scrubbing is handled by this package or requires a separate tool as the docs suggest. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 168.3K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags redact pii from images, ocr text detection and removal, dicom image anonymization, burn-in text redaction, image privacy masking, medical image de-identification, pii detection in photos, pii-redaction, ocr, dicom [View on SkillFed](https://skillfed.io/packages/presidio-image-redactor) · [View on PyPI](https://pypi.org/project/presidio-image-redactor/)