Views
No views yet
A screenpipe project. The image-modality companion toscreenpipe/pii-redactor.
License: CC BY-NC 4.0 (non-commercial). For commercial use — production redaction, SaaS / API embedding, AI-agent privacy middleware, custom fine-tunes — contact louis@screenpi.pe. SeeLICENSE.
| Model | Region zero-leak | Oversmash |
|---|---|---|
| this model ⭐ local | 98.9% | 0.0% |
| Gemini 3.1 Pro | 4.2% | 9.7% |
| GPT-5.5 | 3.2% | 22.6% |
| Google Cloud DLP | 2.6% | 19.4% |
| Claude Opus 4.7 | 2.1% | 35.5% |
| Microsoft Presidio | 0.5% | 48.4% |
In-distribution caveat. The headline is measured on a held-out split matched to the model's training conditions — an upper bound, not a real-screen guarantee. It is strongest on clean, standard app UIs; unusual or low-quality screens may be missed or over-boxed.
[(bbox, label, score)], where each
detection is a region classified into one of the 12 canonical categories
shared with screenpipe/pii-redactor:private_person, private_email, private_phone, private_address,
private_url, private_company, private_repo, private_handle,
private_channel, private_id, private_date, secretsecret covers passwords, API keys, JWTs, DB connection strings,
PRIVATE-KEY block markers, etc.1# pip install onnxruntime pillow numpy
2import numpy as np, onnxruntime as ort
3from PIL import Image, ImageDraw
4
5CLASSES = ["private_person","private_email","private_phone","private_address",
6 "private_url","private_company","private_repo","private_handle",
7 "private_channel","private_id","private_date","secret"]
8SIZE, THRESH = 512, 0.30
9
10sess = ort.InferenceSession(
11 "rfdetr_v11.onnx",
12 providers=["CoreMLExecutionProvider", "CPUExecutionProvider"],
13)
14
15img = Image.open("screenshot.png").convert("RGB"); W, H = img.size
16arr = np.asarray(img.resize((SIZE, SIZE), Image.BILINEAR), np.float32) / 255.0
17arr = ((arr - [0.485, 0.456, 0.406]) / [0.229, 0.224, 0.225]).transpose(2, 0, 1)[None].astype(np.float32)
18
19boxes, logits = sess.run(None, {sess.get_inputs()[0].name: arr})
20boxes, logits = boxes[0], logits[0] # (Q,4) cxcywh normalized · (Q,13)
21probs = 1.0 / (1.0 + np.exp(-logits[:, :12])) # per-class sigmoid (NOT softmax)
22score = probs.max(1)
23
24draw = ImageDraw.Draw(img) # redact = draw opaque boxes
25for q in np.where(score >= THRESH)[0]:
26 cx, cy, bw, bh = boxes[q]
27 x1, y1 = (cx - bw / 2) * W, (cy - bh / 2) * H
28 draw.rectangle([x1, y1, x1 + bw * W, y1 + bh * H], fill=(0, 0, 0))
29img.save("screenshot_redacted.png")rfdetr_v11.onnx (512×512 input).NOTICE
for third-party component attributions.1@misc{screenpipe-pii-image-redactor-2026,
2 title = {screenpipe-pii-image-redactor: a screen-PII detector for
3 accessibility-aware agents},
4 author = {{screenpipe}},
5 year = {2026},
6 url = {https://huggingface.co/screenpipe/pii-image-redactor}
7}