Mock Layout Detector
The mock-layout-detector extractor emits deterministic layout metadata for images.
It is intended for tests and documentation examples that demonstrate layout-aware OCR
pipelines.
This extractor does not perform real layout detection. It simply returns
predefined regions based on the layout_type configuration.
Usage
biblicus extract build \
--corpus my-corpus \
--stage "mock-layout-detector:layout_type=two-column" \
--stage "ocr-tesseract:use_layout_metadata=true"
Configuration
layout_type: One ofsingle-column,two-column, orcomplex.
Output Metadata
Example metadata for two-column:
{
"layout_detector": "mock-layout-detector",
"layout_type": "two-column",
"regions": [
{"id": 1, "type": "header", "bbox": [50, 50, 700, 100], "order": 1},
{"id": 2, "type": "text", "bbox": [50, 120, 350, 800], "order": 2},
{"id": 3, "type": "text", "bbox": [380, 120, 350, 800], "order": 3}
],
"num_regions": 3
}