Restores a document photo Image with the unified DocRes network and emits a restored Image; one configured objective selects geometric dewarping, deshadowing, illumination cleanup, deblurring, or binarization.
Typical backends
Flatten a curled page before OCR: a file source feeds the image, this component dewarps it, and a recognizer reads the cleaned text out as JSON.
Clean up scanned documents from a live HTTP feed and publish the restored image for inspection rather than OCR.
Caveats
- Parameter interactionThe restoration objective is fixed at startup: the dewarping objective is the only one that loads the boundary detector, while the others share a single restoration network, so a deployment serves exactly one objective until restarted.
- AccuracyDewarping predicts a small backward map and upsamples it to input resolution, so very high resolutions do not recover finer detail than the map encodes; hands, torn edges, multiple folded panels, and non-document inputs remain common failure cases.
- I/O contractAn image smaller than two pixels on a side is returned unchanged; otherwise the output is a same-color-space restored
Image. - LimitationAn oversized input is downscaled to a bounded working size before the network runs so a very large photo cannot exhaust memory, which caps the detail of the restored result.
- LatencyThe first run downloads the generalist checkpoint and, for dewarping, the boundary detector unless the cache is pre-seeded; a GPU is strongly recommended because CPU execution is slow.