Rectifies a curved or perspective-distorted document Image with the DocScanner-L pipeline: a salient-region segmenter masks the page, an iterative rectifier predicts a backward map, and the warped Image is emitted for downstream OCR.
Typical backends
Flatten a phone-captured page before OCR: a file source feeds the image, this component rectifies it, and a recognizer reads the cleaned text out as JSON.
Rectify documents from a live HTTP feed and publish the flattened image for visual inspection instead of OCR.
Caveats
- AccuracyThe model predicts a small backward map at a fixed working resolution and upsamples it, so feeding very high resolutions does not recover finer text detail; 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 rectified
Image. - LatencyEach frame runs a salient-region segmentation pass followed by a twelve-step recurrent rectification flow, so a GPU is strongly recommended; CPU execution is impractically slow for live use.
- LimitationThis is a dewarping-only restorer with no deshadow, deblur, or binarize modes; pair it with a dedicated cleanup stage if illumination correction is also required.