DocRes page mask
ONNX page segmentation model
1 min read
This model is an ONNX-converted (cross-platform model format for machine learning) part of the DocRes (MBD) architecture designed to precisely detect document boundaries in photographs. The model highlights pixels belonging to the paper sheet, enabling automatic document cropping. The weights and architecture are borrowed from the original CVPR 2024 research paper and exported with a fixed 448×448 input. This model will be useful for developers building camera-based document scanning and processing apps.
Key features
- Precise detection of page pixels in photographs for subsequent cropping.
- Exported to the ONNX format for fast execution in third-party inference environments.
- Fixed input image size of 448×448 pixels.
- Full preservation of the original accuracy of the source DocRes model (PyTorch).
What you can do
- Integrate the model into a mobile or desktop document scanning application.
- Use it in image processing pipelines (OCR) for automatic alignment and cropping of document photos.
Example
To work with the model, prepare an input image tensor of size [1, 3, 448, 448] (RGB, normalized to 0–1 with pre-applied 15×15 Gaussian blur) and run the ONNX session to obtain the page mask.
Read more
DetailsFile format: ONNX (fp32)
File size: ~201.5 MB
License: MIT
Base architecture: DocRes (MBD mask-based dewarping model, DeepLab/ResNet)










Comments