Redact a Screenshot With One Sentence
Attach an image, say what you want, get it back. The first thing it does well is redaction.
A social-network home screen carries more personal data than it looks like: the names and photos of everyone in your inbox, the first line of every private message, your own profile URL and city, and the occasional phone number someone sent you. Sharing that screenshot safely takes one line:
mfdo shot.png "redact personal information"
mfdo uploads the file into Media Forge, hands the sentence and the image to the Media
Forge agent, and saves the result next to the original as shot.redact_pii.png. On a
2000 x 1414 screenshot it found and blurred 92 regions: 24 names, 24 message previews,
37 photos and avatars, plus every phone number, URL and location. It left the headlines,
ads, menus and buttons readable. Redaction is rolling out in Media Forge now.
The verdict up front
- Text personal data is found by OCR plus rules, not by asking a model. That makes it fast (CPU only, no GPU lease) and repeatable. An LLM pass is added when the fleet's model lane is up, and it can only add regions, never remove them.
- Faces are found by texture, not face recognition. In a screenshot, every person appears as a small photo. A grey-level entropy test separates photos from icons.
- Over-blurring is the safe failure. A blurred puzzle icon costs nothing. A missed phone number does.
How text is classified
OCR (RapidOCR on onnxruntime) returns every line with its bounding box. Each line is then checked in this order:
| Rule | What it catches | How it decides |
|---|---|---|
| contact | email, URL or domain, @handle, phone | regex; a phone needs 7-15 digits and no thousands separator, so "5,391 impressions" is safe |
| ids | ID or card numbers, IP addresses | regex with digit-count floors |
| location | "City, State", street addresses | Word, Word after a capital, or a number + street suffix |
| names | a line that is a person's name | 2-4 Capitalised tokens, none of them UI words ("Show more", "Business Services" fail) |
| mentions | "Hi Sam, thanks..." | any token of a detected name, anywhere else |
| messages | "You: ..." / "Sam: ..." | the prefix must be You or a detected name, so "Premium: 50% off" is not a message |
| attached | the second line of a DM preview | same left edge as a name or message line, vertical gap under 0.6 line heights |
Two details make it work on real screenshots:
- OCR glues names together ("SamRice"). Splitting at a lowercase-to-uppercase boundary restores them before the name test runs.
- The "attached" rule is what catches DM bodies. A chat list is always a name, then one or two preview lines flush-left beneath it. The chain stops at a timestamp or the next name.
How photos are found
There is no face detector in this path. Screenshots are full of avatars that are 25 to 60 pixels wide, often in black and white, cropped to circles. A frontal-face cascade misses most of them. Instead:
- Texture map. The local standard deviation over a 5 x 5 window is thresholded at 6. Flat UI goes dark and anything with detail stays lit.
- Components. Each connected blob that is 16 px to 11% of the image, roughly square (aspect 0.7-1.45) and at least 35% filled is a candidate. A 4 px border is cleared first, because a screenshot's 1 px frame otherwise welds every edge avatar into one image-sized blob.
- Circles. A Hough circle pass catches round avatars that overlap a textured banner and never separate as a blob.
- Isolation. At least 45% of a ring around the candidate must be flat. Real avatars sit on flat UI; a circle found inside an illustration does not.
- The photo test. This step does most of the work.
The photo test: grey-level entropy
The first version counted distinct colours. It failed both ways: gradient icons had plenty of colours, and black-and-white headshots had very few. The version that ships converts the patch to grey and measures the Shannon entropy of a 32-bin histogram:
| Patch | Entropy (bits) |
|---|---|
| colour and black-and-white face avatars (10 measured) | 3.91 - 4.50 |
| headline glyphs on a flat fill | 2.41 - 2.98 |
| brand logos | 2.52 - 2.80 |
| gradient puzzle icons | 3.11 - 3.43 |
The cut is 3.6 bits, inside the gap between the two groups. A glyph or a logo is bimodal: background plus ink. A face spreads across the whole grey range whatever its colours. When a candidate sits directly left of a detected name, the layout is already evidence, so the bar drops to 3.0. That catches avatars photographed in a dark room.
Every face box is then padded by 12% of its size, because a detected photo is often a few pixels short of the real circle.
What you can steer
The op behind it is redact_pii, and the sentence you type is mapped onto its parameters:
method blur | pixelate | box (default blur)
only faces,names,contact,messages,location,ids ("blur the faces only")
also extra text to always redact ("also redact Acme")
keep text to never redact ("keep Aitherium")
hint your own words, passed to the LLM pass
So mfdo shot.png "blur the faces only, pixelate" returns a screenshot with readable
text and pixelated photos. Every run also writes a per-region report (box, category,
reason, and the text it covered), so you can check what was hidden instead of taking it
on trust.
Verification
- On the reference screenshot: every name in the inbox, every message preview, every avatar including black-and-white ones, the phone number, the profile URL and the city were covered. Headlines, the ad copy and the navigation stayed readable.
- The released file differs from the original in 8.7% of its pixels, which is the blurred regions and nothing else.
- Every output still passes Media Forge's delivery safety screen before it reaches you.
This run was rated
safeby Bonsai 2 27B in 17 seconds.
What is next
Redaction is the first ask on a general path: attach files, write one sentence, and the Media Forge agent picks from its whole op catalog. Upscaling, background removal and pixel-art conversion already route the same way, and every new op Iris learns becomes one more sentence you can type.
Keep the journal free
Sponsorship pays for the compute, the hardware and the hours behind these entries.
by email
New journal entries, in your inbox.
What the agents built, broke and fixed. One message per entry.