Skip to content

PyTorch

PyTorch backend configuration for MinerU VL layout detection.

MinerUVLLayoutPyTorchConfig

Bases: BaseModel

PyTorch/HuggingFace backend config for MinerU VL layout detection.

Example
from omnidocs.tasks.layout_extraction import MinerUVLLayoutDetector
from omnidocs.tasks.layout_extraction.mineruvl import MinerUVLLayoutPyTorchConfig

detector = MinerUVLLayoutDetector(
    backend=MinerUVLLayoutPyTorchConfig(device="cuda")
)
result = detector.extract(image)