Visualization tool for osti-segment segmentation responses. Renders annotated page analysis PNGs from segmentation JSON output.
pip install -e ".[dev]"Requires Python 3.12+.
python -m osti_render response.json --output-dir viz/ --types pagepython -m osti_render --url http://localhost:8010 --pdf session.pdf -o viz/| Type | Description | Requires --parse |
|---|---|---|
page |
Full page segmentation with drill regions, text/diagram bboxes, and extracted text panel | No |
parse_page |
Full page with OSTI JSON path annotations — header mapped to metadata, text lines mapped to DrillBlock fields | Yes |
The --parse flag takes a path to a parsed OSTI SessionPlan JSON file (output from osti-parse).
Render both types at once:
python -m osti_render response.json --parse session_plan.json -o viz/ -t page,parse_pageOpen architecture.html in a browser to explore the C4 architecture diagrams (System Context, Container, Component).
python -m pytest tests/ -v