# UVDoc

> Neural grid-based document unwarping

Source: https://talira.ai/catalog/uvdoc-43d3d2qf
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: AI model
- Categories: [ai / computer vision / document unwarping](https://talira.ai/categories/ai/computer-vision/document-unwarping), [languages / python](https://talira.ai/categories/languages/python)
- Licence: MIT[^1]
- Pricing: Free and open source[^1]
- Pricing notes: Free and open source (MIT), weights included.
- Free tier: yes[^1]
- Self-hostable: yes[^2]
- Backed by: [Interactive Geometry Lab](https://talira.ai/orgs/interactive-geometry-lab.md)
- Creator: Floor Verhoeven, Tanguy Magne and Olga Sorkine-Hornung (Interactive Geometry Lab, ETH Zurich)
- Funding: funded by grants[^3]

UVDoc is a deep learning model that flattens casual photos of bent, curled and wrinkled paper documents. A fully convolutional network predicts the document's 3D grid mesh together with a 2D unwarping grid, and the photo is resampled along that grid to restore a flat page. It comes from a SIGGRAPH Asia 2023 paper by Floor Verhoeven, Tanguy Magne and Olga Sorkine-Hornung at ETH Zurich's Interactive Geometry Lab, which also published the pseudo-photorealistic UVDoc training dataset and a benchmark. The repository has the pretrained model, a demo script that unwarps your own images, and the training and evaluation code; code and weights are MIT-licensed.

## Links

- Website: https://igl.ethz.ch/projects/uvdoc/
- GitHub: https://github.com/tanguymagne/UVDoc

## Problems it solves

- flatten a photo of a curled book page so the text lines run straight again
- my users photograph crumpled receipts and folded letters and I need them to look flat before OCR
- remove the bend from a phone picture of a page that wasn't lying flat
- OCR accuracy drops on photos of warped paper and I want to dewarp the page first
- open source model that corrects page curvature in a single photo without special hardware
- dewarp document images from a mobile capture app in a Python pipeline
- train my own document dewarping network on realistic data with 3D shape annotations
- benchmark document dewarping methods on DocUNet with a pretrained baseline
- geometric distortion correction for photographed paper forms, with weights I can use commercially

## Features

- pretrained model included in the repository (model/best_model.pkl)
- demo script that unwarps any image: python demo.py --img-path
- predicts a 3D grid mesh and a 2D unwarping grid in one network
- training code for the UVDoc and Doc3D datasets
- evaluation scripts for the DocUNet and UVDoc benchmarks
- UVDoc dataset with physically accurate 3D shape and unwarping annotations
- published unwarped results for both benchmarks

## Trust

Overall: 0.45 out of 1.
Signals: backing 0.75, extensibility 0.00.

- backed by Interactive Geometry Lab
- created by Floor Verhoeven, Tanguy Magne and Olga Sorkine-Hornung (Interactive Geometry Lab, ETH Zurich)
- funding: funded by grants

Warnings:

- GitHub activity not fetched yet

## Alternatives

- [docTR](https://talira.ai/catalog/doctr-5n27z5h2.md): Document Text Recognition: open source OCR powered by PyTorch

## Sources

[^1]: https://github.com/tanguymagne/UVDoc/blob/main/LICENSE (checked 20 Nov 2026)
[^2]: https://github.com/tanguymagne/UVDoc (checked 20 Nov 2026)
[^3]: https://igl.ethz.ch/projects/uvdoc/ (checked 20 Nov 2026)
