Engineer Details Six Weeks Spent Training and Testing Signature Redaction Models for Closed-Loop Document Anonymization
A developer working on automated document sanitization spent six weeks attempting to reliably locate and redact handwritten signatures inside PDFs that must leave a closed network. The goal was to remove surnames, telephone numbers, addresses and signatures while preserving document usability, all on a single air-gapped workstation equipped with one consumer GPU.
Documents arrive in two forms. Text-layer PDFs allow direct removal of recognized words. Scanned pages require the system to detect text via Tesseract, then draw black rectangles over the corresponding image regions. Four parallel detection methods—dictionary lookup, regular expressions, natasha NER and an ink gate—successfully handled printed names but found zero signatures because signatures contain no machine-readable text.
Initial experiments with a color-saturation gate worked on blue-ink signatures yet failed completely on black-ink signatures and on any grayscale scan. An alternative heuristic that painted any dark region ignored by OCR erased entire table columns when text was printed in small fonts, violating the rule that only recognized text may be redacted.
Three off-the-shelf object detectors were benchmarked on 1,254 pages. YOLOS produced excessive false positives on engineering drawings and was discarded. A seal detector returned high-confidence false positives on documents containing no seals. A custom YOLO11s model trained on 600 synthetically augmented signature images plus 40 real pages reached 88 % coverage on isolated strokes but dropped sharply when adjacent signatures merged into large blobs.
Two rotation-related bugs repeatedly caused missed redactions. PDF /Rotate attributes produced coordinate mismatches between detection and drawing layers. Pages scanned sideways defeated Tesseract’s orientation detection when run with --psm 0, leaving the entire page unprocessed until OSD was re-enabled for low-confidence cases.
After switching the vision model from proactive detection to post-redaction verification, expensive GPU calls fell from roughly 50 pages per batch to 18. On the final corpus of 492 pages only 3.7 % of documents required the vision stage, all of them empty forms with vertical table headers.
Image-preprocessing tests showed that the classical OpenCV pipeline (deskew, illumination normalization, denoising, 2× upscaling) raised OCR to 92/103 pages while RealESRGAN reduced the same metric to 76/103 and increased runtime dramatically. Preprocessing is therefore applied only when the first-pass score falls below 70.
Comparison of twelve OCR engines on a two-page test document revealed that PaddleOCR detection combined with Tesseract recognition produced 16 correctly grouped name cells in 3.7 seconds. Full replacement by any single vision-language model either missed names entirely or required 12–20 seconds per page.
Redaction implementation errors were discovered only after the author added a verification step that extracts text from beneath every black rectangle. Using PyMuPDF draw_rect left recoverable text; switching to apply_redactions eliminated all leaks across 3,029 redactions in production files. White rectangles drawn for stamps and signatures occasionally overwrote already-redacted black areas, reopening rows of names—an issue caught only by the same under-rectangle text check.
The final pipeline therefore combines rule-based text removal, a lightweight YOLO signature detector, selective classical preprocessing, Tesseract augmented by PaddleOCR cell detection, and mandatory post-redaction text verification, achieving reliable signature removal inside the required closed environment.
Related articles
pg_anon Open-Source Tool Receives Major Updates for PostgreSQL Data Masking and Partial Database Operations
Tantor Labs has released version 1.11.0 of pg_anon, an open-source utility designed to mask personal data in PostgreSQL databases while preserving structure and relationships. The update introduces packaging as a standard Python package, support for partial dumps and restores using whitelist and blacklist dictionaries, and improved handling of complex schema elements such as partitioned tables, generated columns, and custom types. Performance improvements include switching the dump engine to asyncio, single-query metadata collection, and on-the-fly gzip compression to reduce memory usage on large databases. New CLI options allow clean or drop operations on target databases, privilege ignoring, and passthrough of pg_dump and pg_restore flags. A REST API was added to enable integration into CI/CD pipelines and automated self-service systems for nightly masked database refreshes. The tool helps organizations comply with data protection requirements by creating pseudonymized copies suitable for development, testing, and contractor environments.
Pegasus Spyware Returns in Serbian Surveillance Campaign via Zero-Click iMessage Exploit
A Serbian student activist's iPhone was infected with the Pegasus spyware through a zero-click exploit in iMessage, allowing silent installation without any user interaction. The infection, confirmed by Citizen Lab in collaboration with the SHARE Foundation, showed indicators of compromise between December 2025 and January 2026. Apple later sent the target a notification warning of a mercenary spyware attack attempt. The exploit granted full access to photos, messages, files, and enabled covert microphone and camera activation. The vulnerability was addressed in the iOS 18.4.1 update released on April 16, 2025. The incident forms part of a wider surveillance wave in Serbia, with at least 14 individuals including students, activists, a parliament member, and a local political representative receiving similar Apple alerts. Additional targets were hit with Android spyware variants linked to NoviSpy.
Mozilla Adds Built-in Ad Blocker to Firefox for iOS Devices
Mozilla has integrated a native ad-blocking feature directly into its Firefox browser for iOS. The update allows iPhone and iPad users to block third-party advertisements and associated trackers before web pages load, eliminating the need for separate extensions. Apple’s App Store policies have long restricted the use of third-party content blockers on iOS compared to desktop and Android platforms. The new functionality targets intrusive elements such as pop-up windows, content-overlapping banners, and other advertising formats. By handling blocking at the browser level, Firefox for iOS improves user privacy and reduces exposure to tracking mechanisms without requiring additional software installation.
De-Clouding IoT Devices: Local Control for Midea Air Conditioners and Tuya-Based Cat Feeders
A security researcher detailed a methodical approach to eliminating vendor cloud dependency for Wi-Fi IoT devices in a smart home setup. After acquiring a cat, the author was forced to integrate several Tuya-based appliances that only worked through proprietary cloud apps. Using hardware analysis tools including UART adapters, multimeters, and soldering equipment, the devices were disassembled and their controllers identified. The Midea air conditioner controller based on TYWE3S ESP8266 was reflashed with ESPHome to enable direct Home Assistant integration. For the Tuya WBR3-powered cat feeder running on an RTL8720CF chip, OpenBeken firmware was installed after extracting the original firmware with ltchiptool. Detailed UART communication analysis between the Wi-Fi module and MCU allowed full recreation of scheduling and control functions locally via MQTT.