Technical Deep Dives5 min read

Redacting Text in a Photo Without Reading It

A text detector can find the signs, screens and badges in a photo without ever turning a pixel into a letter. How that works, what we saw when we ran one on our test images, and why a solid box is the only treatment that actually removes text.

By · Part of the Image processing and on-device AI topic cluster

A photo can carry more than you meant to share. A house number over a shoulder, a name badge, a delivery label on the hall table, an email address in the corner of a screenshot. Covering that text by hand is tedious, and the piece you forget is the piece that matters.

Auto Redact does the finding for you. The part worth explaining is how it can find text without reading it.

Detection and recognition are two different models

Reading text in an image is normally two steps. A detector marks the regions that contain text. A recogniser then looks inside each region and turns the pixels into characters. OCR tools run both.

Redaction only needs the first. To cover a street sign you need to know where the sign is, not what it says. So Auto Redact ships the detector alone: the PP-OCRv3 text detector, a 2.3 MB model published by OpenCV under the Apache 2.0 licence. It outputs a map of how likely each pixel is to be part of a line of text. That map becomes boxes, and the boxes are the only output there is.

Because no recogniser is downloaded or run, there is no step at which your text becomes characters. Nothing could be logged or sent even by mistake, because nothing is ever produced to log.

What we saw on our test images

Before building the page we ran the detector on nine images from our own test set, photo-style street, shop and desk scenes plus a screenshot, a contact card and a label, and looked at every box it drew.

  • What it got right. Every line on a dashboard screenshot, a contact card and a faint shipping label. The painted sign on a shop front. A bus destination board and the bus's number plate. And nothing at all in a landscape with no text in it.
  • What it boxed that was not text. A row of distant trees on a hillside, with high confidence. To a detector trained to find dark strokes in a row, a line of trees can look like a word.
  • What it missed. A pile of crumpled receipts produced no boxes: the print was a few pixels tall on creased paper. On a photographed invoice it found the main lines but missed several small, faint marks at the top of the page.

That is why the tool shows every box before it changes anything. You switch off the trees, and you read across the result for anything that was missed.

Which cover actually removes the text

Three treatments are offered and they are not equal.

  • Solid box replaces the pixels. Nothing of the lettering is left in the file.
  • Blur mixes each box's pixels together. Here the amount is set by the height of the letters in each box, because a blur that suits a caption leaves a shop sign readable.
  • Pixelate replaces each box with blocks about as tall as its letters.

Blur and pixelation both keep an average of what was there, and published techniques have recovered pixelated text from screenshots. They stop a casual reader. They are not removal. For a name, an address or an account number, use the solid box, which is why it is the default.

The limits that remain

The boxes are upright rectangles, so on a page photographed at an angle they cover some of the page around each line. That errs toward covering too much, which is the right way round for this job.

And text is only one way a photo identifies someone. Faces, licence plates, reflections and the photo's own metadata can do the same. Privacy Blur now has faces, plates and this text detector in one review, with boxes you can draw yourself, and the Metadata Remover strips location data from the file.

Applies to NSS Background Remover v2.6.2, the release that was current when this article was published.

Was this article helpful?

Your answer is saved in this browser only. This control makes no network request and does not send the answer to an NSS feedback endpoint.

Found this useful?