Download inference/src/ax_doclayout/__init__.py from AutomatosX/AXDocLayout-M-v1.2-CUDA-TF32: direct link, hf CLI and curl.
- Browser
- Download file 2.22 kB
-
https://huggingface.co/AutomatosX/AXDocLayout-M-v1.2-CUDA-TF32/resolve/main/inference/src/ax_doclayout/__init__.py
- Command line
-
hf download hf://AutomatosX/AXDocLayout-M-v1.2-CUDA-TF32/inference/src/ax_doclayout/__init__.py
-
curl -L -o __init__.py https://huggingface.co/AutomatosX/AXDocLayout-M-v1.2-CUDA-TF32/resolve/main/inference/src/ax_doclayout/__init__.py
2.22 kB
| # Copyright 2026 AutomatosX | |
| # SPDX-License-Identifier: AGPL-3.0-only | |
| # Modified 2026-10-17 for v1.2; prior component notices are in NOTICE. | |
| """AX DocLayout: page-raster document structure detection. | |
| The AXDocLayout-M v1.2 model contract is a layout detector: an RGB page | |
| raster in, versioned JSON boxes out. The public API verifies the pinned | |
| immutable Hub bundle before inference. ``LocalOnnxBundle`` is an | |
| unqualified local runner pinned to the staged ONNX digest; it is not Hub load. | |
| """ | |
| from __future__ import annotations | |
| from ax_doclayout.artifact import SOURCE_CHECKPOINT_SHA256, STAGED_ONNX_SHA256 | |
| from ax_doclayout.contract import ( | |
| COORDINATE_SPACE, | |
| DETECTION_SCHEMA_VERSION, | |
| PREPROCESS_ID, | |
| TAXONOMY_ID, | |
| BoundingBox, | |
| Element, | |
| InvalidPageStructureError, | |
| ModelIdentity, | |
| PageImage, | |
| PageStructure, | |
| ) | |
| from ax_doclayout.errors import ( | |
| ArtifactUnavailableError, | |
| AXDocLayoutError, | |
| BackendUnavailableError, | |
| InferenceError, | |
| InvalidPageImageError, | |
| InvalidRevisionError, | |
| ) | |
| from ax_doclayout.local_onnx import QUALIFICATION, LocalOnnxBundle, LocalOnnxResult | |
| from ax_doclayout.model import AXDocLayout | |
| from ax_doclayout.postprocess import ( | |
| DEFAULT_SCORE_THRESHOLD, | |
| elements_from_letterbox_detections, | |
| page_structure_from_elements, | |
| ) | |
| from ax_doclayout.preprocess import ( | |
| Letterbox, | |
| inverse_letterbox_box, | |
| letterbox_page, | |
| letterbox_rgb, | |
| ) | |
| __version__ = "1.2.0.post2" | |
| __all__ = [ | |
| "COORDINATE_SPACE", | |
| "DEFAULT_SCORE_THRESHOLD", | |
| "DETECTION_SCHEMA_VERSION", | |
| "PREPROCESS_ID", | |
| "QUALIFICATION", | |
| "SOURCE_CHECKPOINT_SHA256", | |
| "STAGED_ONNX_SHA256", | |
| "TAXONOMY_ID", | |
| "AXDocLayout", | |
| "AXDocLayoutError", | |
| "ArtifactUnavailableError", | |
| "BackendUnavailableError", | |
| "BoundingBox", | |
| "Element", | |
| "InferenceError", | |
| "InvalidPageImageError", | |
| "InvalidPageStructureError", | |
| "InvalidRevisionError", | |
| "Letterbox", | |
| "LocalOnnxBundle", | |
| "LocalOnnxResult", | |
| "ModelIdentity", | |
| "PageImage", | |
| "PageStructure", | |
| "__version__", | |
| "elements_from_letterbox_detections", | |
| "inverse_letterbox_box", | |
| "letterbox_page", | |
| "letterbox_rgb", | |
| "page_structure_from_elements", | |
| ] | |