Skip to content

bartclaeys/Auto-Redact-Local

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Auto-Redact-Local: AI-Powered Surgical Image Redaction

A local-only, automated workflow for "surgical" image redaction. This tool uses OCR to identify sensitive text and masks only the specific words you care about, preserving the rest of the document's context.

How it Works

  1. OCR Text Extraction: Uses Tesseract to extract text and precise bounding box coordinates from images.
  2. Surgical Matching: Matches extracted text against your custom_rules.txt (names, addresses, account numbers, etc.).
  3. Local Redaction: Uses the seemenot tool to draw high-quality redaction masks based on a generated manifest.

No cloud APIs are used—everything runs locally on your machine.

Prerequisites

  • Tesseract OCR: Required for text extraction.
    brew install tesseract
  • seemenot: The core redaction engine.
    # Follow installation at https://github.com/waldekmastykarz/seemenot

Setup

  1. Clone this repository.
  2. Create a Python virtual environment and install dependencies:
    python3 -m venv .venv
    source .venv/bin/activate
    pip install -r requirements.txt
  3. Configure your rules:
    • Copy custom_rules.example.txt to custom_rules.txt.
    • Add the names, addresses, or IDs you want to redact.
    cp custom_rules.example.txt custom_rules.txt

Usage

  1. Place images (JPG, PNG) in the input/ directory.
  2. Run the automation script:
    ./scripts/process_images.sh
  3. Check the results:
    • redacted/: Contains the masked images.
    • processed/: Original images are moved here after successful redaction.
    • logs/: Detailed processing logs.

Credits

About

Automate private image redaction locally on your Mac. No cloud APIs, 100% private.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors