Latest in AI
Use Recapture to build document datasets without leaking test pages
Turn labeled pages into synthetic scans and photos while preserving annotations. Keep source pages together, inspect label geometry and budget rendering memory.
A document model can look reliable on clean PDFs and fall apart on a phone photo of the same page. Adding blur is one response. Building a dataset that preserves useful labels and measures genuinely new documents is the harder part.
Nutrient's Recapture addresses the rendering step. The useful workflow is to start with labeled pages, generate plausible capture conditions and keep every variant of a source page in the same dataset split.
Know what the tool produces
The November 18 launch post introduces two routes: synthetic flatbed scans and photos generated from a deformed 3D page. Existing layout annotations move with the page, so each rendered image retains corresponding labels. Scan mode adds printer and scanner effects without requiring a GPU.
This is augmentation, not a substitute for knowing what appears on the original page. If the source annotation calls a table a paragraph, producing fifty realistic photographs will not fix that mistake.
For an invoice-layout model, begin with a few representative invoices whose boxes you have checked. Include dense line items, small totals and unusual margins. Those are better starting points than hundreds of nearly identical pages selected only because they are easy to process.
Keep the input path local when you can
The launch workflow accepts a page image and a matching JSON label file. Labels can come from existing datasets or annotation tools. Nutrient Parse is an optional way to generate them, not a requirement. The post's API example uploads pages to that service.
Use existing local labels when they are available. For confidential invoices, do not treat a convenient example script as permission to send documents elsewhere. Choose the labeling route before you automate a folder of files.
Check the coordinate system too. A box drawn against one image resolution should not be attached unchanged to a differently sized rendering. Inspect a few overlays before multiplying a small preparation error across the entire dataset.
Match rendering resources to the job
The project README specifies Python 3.12 and testing on macOS and Linux; Windows is untested. Photo rendering needs OpenGL, with EGL on a Linux server. It estimates about 1.6GB of memory per photo worker. Texture downloads are about 105MB.
Start with one worker and a small batch. Increase concurrency after checking memory use, rather than setting worker count equal to every available CPU core. A rendering pipeline can spend more time recovering from memory pressure than it saves through parallelism.
Keep the first configuration simple enough to explain. For invoices arriving through a scanner, aggressive desk lighting and deep paper folds may be irrelevant. Match the capture conditions your application actually receives before adding variety for its own sake.
Preview labels, not just attractive images
Recapture's workflow moves from configuration to preview, rendering and export. The README describes output geometry including visible quadrilaterals, projected source corners, visibility and truncation. It supports COCO and YOLO-OBB export.
Review the overlay around small text, page edges and folds. Ask whether an obscured region is still a sensible training example for your task. A dramatic image can be visually convincing while teaching the wrong lesson if the target expects information that is no longer readable.
For the invoice example, distinguish layout detection from extracting the final payable amount. A valid box around the totals region does not establish that the amount remains legible. Keep separate checks for geometry and transcription quality rather than calling the entire sample correct because one passes.
Split by source before trusting the score
The exporter groups all variants of a source page into one split. The launch post notes that a 10% validation and 10% test allocation needs at least ten pages; smaller inputs receive a warning and only a training split.
That protects against an obvious leak: training on a clean-looking invoice and testing on a blurred copy of the same invoice. But page grouping is only the first boundary.
If several pages belong to the same document, or many invoices share a near-identical template, consider grouping at the document or template level before running separate jobs. This is an additional evaluation-design choice, not a guarantee supplied by page-level splitting. The right boundary depends on whether you expect new scans of familiar forms or genuinely unfamiliar layouts.
Preserve enough information to reproduce failures
The README says each output includes its sampled configuration and tool version. Matching configuration, seed and version reproduce the same images.
Save those artifacts with the source labels and export settings. When a model fails on a folded totals box, you should be able to recover that exact example rather than generate another vaguely similar fold.
Finally, keep a real-world holdout set. Synthetic data can help expose weaknesses and expand training variety, but improvement on synthetic scans alone does not prove improvement on customer photographs. Compare both before changing the model that handles incoming documents.
I'm Paras. I work at the intersection of AI, engineering and distribution.
I help AI teams explain developer tools and data workflows through practical technical writing.