Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Build a Zero-Trust Document Pipeline with OpenCV, Presidio, and LangGraph (Beginner Guide)

说明与用途

该管道在本地处理身份证件,删除PII后再发送到LLM,使用OpenCV、Tesseract、Presidio和LangGraph。

问题

Sending raw identity documents to an LLM API exposes PII and creates a privacy risk.

结果

The pipeline processes identity documents locally, removes PII before any external API call, and provides a resilient, state‑machine based workflow.

工作流

  • Set up OS and Python environment with required libraries
  • Preprocess ID images using OpenCV (grayscale, blur, adaptive threshold)
  • Extract text from cleaned images with Tesseract
  • Redact PII from extracted text using Microsoft Presidio and spaCy NER
  • Orchestrate the steps with LangGraph as a state machine
  • Expose the pipeline via a Streamlit frontend

证据

We will use local computer vision and NLP to intercept identity documents, extract the text, and deterministically mask Personally Identifiable Information (PII) before it ever reaches an LLM.

来源

If you default to the large model (~580MB), your app will likely suffer from Out-Of-Memory (OOM) crashes when deployed on free cloud tiers.

来源

  • 记录日期: 2026-10-07T11:41:20.087Z