Skip to content

PII Identifier

A local web app that detects and redacts personally identifiable information in CSV, text and image files, so sensitive documents never have to leave the machine.

Status
In development
Role
Solo builder
Stack
Python · Presidio · spaCy · MediaPipe · OpenCV · Tesseract

27

PII categories in the redaction policy

440

synthetic documents generated

793

entity labels in the training corpus

105

hand-adjudicated detections turned into rules

100%

recall and precision on a 25-document held-out gold set (stock Presidio: 41% / 45%)

Case study

Context

Teams that handle customer data, forms or scanned documents often need to strip personal information before sharing files. Cloud redaction services add a dependency and a data-transfer step that is sometimes not acceptable.

PII Identifier runs entirely on the user's machine and handles three input types: CSV tables, free text, and images.

My contribution

  • Built the detection and redaction web app using Microsoft Presidio and spaCy for text entities, custom policy rules, Tesseract OCR for text inside images, and MediaPipe/OpenCV face detection.
  • Authored a redaction policy covering 27 categories of personal information.
  • Scaled training and evaluation data with a seeded synthetic-corpus generator: 440 documents and 793 entity labels.
  • Converted 105 hand-adjudicated detections into documented keep/redact rules.
  • Trained a custom spaCy NER model on the synthetic corpus.
  • Covered the pipeline with a pytest suite.

Process

  1. Define the policy

    What counts as PII, what is kept, what is masked.

  2. Text pipeline

    Microsoft Presidio and spaCy for text entities, extended with custom policy rules for IDs, fixed formats and context.

  3. Tables and images

    Column-aware scanning for CSV files, Tesseract OCR for text inside images, and MediaPipe face detection with an OpenCV fallback.

  4. Gold evaluation set

    Hand-labelled documents with held-out test sets, scored on what must be redacted and what must stay visible.

  5. Synthetic corpus

    A seeded generator that produces labelled documents for training a custom entity model.

  6. Adjudicate and document

    Detections reviewed by hand, and the decisions turned into documented keep/redact rules.

  7. Results

    100% recall and 100% precision on a 25-document held-out gold set, against 41% recall and 45% precision for stock Presidio on the same set. 27 categories in the policy, 105 adjudicated detections turned into rules, 793 entity labels in the training corpus.

Next project

Co-founder · shipped Python · Ren'Py

Heroes Diaries

A narrative game with 30+ decision paths, built by a 12-person team I led; I wrote the Python/Ren'Py branching logic. A government partnership and distribution deal drove 5,000+ downloads.