Skip to content

karsten-s-nielsen/osti-render

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

osti-render

Visualization tool for osti-segment segmentation responses. Renders annotated page analysis PNGs from segmentation JSON output.

Installation

pip install -e ".[dev]"

Requires Python 3.12+.

Usage

From a saved JSON response

python -m osti_render response.json --output-dir viz/ --types page

From the osti-segment API

python -m osti_render --url http://localhost:8010 --pdf session.pdf -o viz/

Render types

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).

Examples

Render both types at once:

python -m osti_render response.json --parse session_plan.json -o viz/ -t page,parse_page

Architecture

Open architecture.html in a browser to explore the C4 architecture diagrams (System Context, Container, Component).

Testing

python -m pytest tests/ -v

Dependencies

  • osti — Pydantic V2 schema for soccer session plans
  • Pillow — Image rendering
  • httpx — HTTP client for osti-segment API
  • pydantic — Data validation

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors