![]() |
VOOZH | about |
dotnet add package RailReader.Core.Vlm.OpenAI --version 0.34.0
NuGet\Install-Package RailReader.Core.Vlm.OpenAI -Version 0.34.0
<PackageReference Include="RailReader.Core.Vlm.OpenAI" Version="0.34.0" />
<PackageVersion Include="RailReader.Core.Vlm.OpenAI" Version="0.34.0" />Directory.Packages.props
<PackageReference Include="RailReader.Core.Vlm.OpenAI" />Project file
paket add RailReader.Core.Vlm.OpenAI --version 0.34.0
#r "nuget: RailReader.Core.Vlm.OpenAI, 0.34.0"
#:package RailReader.Core.Vlm.OpenAI@0.34.0
#addin nuget:?package=RailReader.Core.Vlm.OpenAI&version=0.34.0Install as a Cake Addin
#tool nuget:?package=RailReader.Core.Vlm.OpenAI&version=0.34.0Install as a Cake Tool
Portable libraries powering RailReader2 and intended for reuse by future companion apps (web, mobile). Distributed as a set of NuGet packages.
| Project | Purpose | External deps |
|---|---|---|
RailReader.Core |
Portable abstractions, models, controllers, rail-navigation, line detection, search, annotations, reading-order resolvers | none (system only) |
RailReader.Core.Pdfium |
Desktop PDFium implementations of the Core interfaces + filesystem-backed AppConfig / AnnotationService / ConsoleLogger / LayoutModelLocator |
PDFium native libraries |
RailReader.Core.Analysis |
ONNX-backed ILayoutAnalyzer implementations (PP-DocLayoutV3, PP-DocLayout-S, Docling Heron) |
Microsoft.ML.OnnxRuntime |
RailReader.Core.Vlm.OpenAI |
IVlmService for OpenAI-compatible chat-completions endpoints (OpenAI, Ollama, vLLM, LightOnOCR, …) |
OpenAI |
RailReader.Renderer.Skia |
SkiaSharp rasterisation + IPdfServiceFactory that desktop consumers wire into Core |
SkiaSharp, PDFtoImage |
RailReader.Core ← no native deps, no IO
├─ Core.Pdfium → Core
├─ Core.Analysis → Core
├─ Core.Vlm.OpenAI → Core
└─ Renderer.Skia → Core + Core.Pdfium
A future Lite (web/WASM) app would consume RailReader.Core only and substitute its own IPdfService / IPdfTextService / ILayoutAnalyzer / IVlmService implementations (e.g. PDF.js, ORT-Web, browser fetch).
Core defines two seams that let any layout-detection model drive RailReader:
ILayoutAnalyzer — wraps a specific ONNX model and declares its class table + input size + whether it provides reading order via LayoutModelCapabilities. Each detection is stamped with a portable BlockRole; Core never branches on the model-specific class id.IReadingOrderResolver — assigns 0..N-1 reading order to detected blocks. Three built-ins ship:
ModelOrderResolver (trusts the analyzer's order hints — default pick for models with ProvidesReadingOrder=true)XYCutPlusPlusResolver (column-aware recursive XY-cut, default for non-ordering models — handles two/three-column papers and full-width spanners correctly)TopDownReadingOrderResolver (Y-then-X baseline, retained as a debug fallback)Core.Analysis ships three analyzers today:
| Analyzer | Model | Input | Reading order | Notes |
|---|---|---|---|---|
LayoutAnalyzer |
PP-DocLayoutV3 (RT-DETR) | 800×800 letterbox | model-provided | 25 classes; the existing default for the desktop app (~50 MB) |
PPDocLayoutSLayoutAnalyzer |
PP-DocLayout-S (PicoDet/GFL) | 1920 longest-edge raster → 480×480 internal | XYCut++ | 23 classes; lightweight (~4.7 MB) — intended detector for future web (WASM/ORT-Web) and mobile builds |
HeronLayoutAnalyzer |
Docling Heron (RT-DETRv2) | 640×640 resize | XYCut++ | 17 classes; broader category space (code, forms, key-value regions) (~164 MB) |
Additional analyzers slot in as further Core.Analysis types or as separate sibling packages — the existing three are the template.
dotnet build RailReaderCore.slnx -c Release
dotnet test tests/RailReader.Core.Tests -c Release
Always use -c Release — debug builds are significantly slower on the inference paths.
Core.Analysis consumers need at least one ONNX layout-detection model on disk:
./scripts/download-model.sh # default — PP-DocLayoutV3 (~50 MB, Apache-2.0)
./scripts/download-model.sh pps # PP-DocLayout-S (~4.7 MB, Apache-2.0; lightweight)
./scripts/download-model.sh heron # Docling Heron (~164 MB, Apache-2.0)
./scripts/download-model.sh all # all three
PP-DocLayout-S is sourced from stefanj0/PP-DocLayout-S-ONNX — a paddle2onnx export of the upstream PaddlePaddle/PP-DocLayout-S checkpoint (no official ONNX exists upstream). Override the source by setting PP_S_ONNX_URL before running the script.
Files land in ./models/. The model search order on disk is defined by Core.Pdfium's LayoutModelLocator (it walks several well-known locations relative to AppContext.BaseDirectory and AppConfig.ConfigDir).
MIT — see LICENSE.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
Showing the top 1 NuGet packages that depend on RailReader.Core.Vlm.OpenAI:
| Package | Downloads |
|---|---|
|
RailReader.Export
PDF→Markdown export pipeline for RailReader. Composes the Core primitives (layout analysis, rendering, per-block VLM transcription) into a Markdown document, applying heading-level heuristics and per-block formatting policy. |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.34.0 | 50 | 6/18/2026 |
| 0.33.0 | 60 | 6/17/2026 |
| 0.32.1 | 89 | 6/16/2026 |
| 0.32.0 | 67 | 6/16/2026 |
| 0.31.0 | 117 | 6/14/2026 |
| 0.30.0 | 103 | 6/13/2026 |
| 0.29.1 | 112 | 6/13/2026 |
| 0.29.0 | 107 | 6/13/2026 |
| 0.28.0 | 109 | 6/12/2026 |
| 0.27.0 | 98 | 6/9/2026 |
| 0.26.0 | 113 | 6/8/2026 |
| 0.25.0 | 110 | 6/8/2026 |
| 0.24.0 | 111 | 6/8/2026 |
| 0.23.0 | 111 | 6/8/2026 |
| 0.22.0 | 117 | 6/7/2026 |
| 0.21.0 | 107 | 6/7/2026 |
| 0.20.0 | 93 | 6/7/2026 |
| 0.19.1 | 113 | 6/6/2026 |
| 0.19.0 | 105 | 6/6/2026 |
| 0.18.1 | 126 | 6/4/2026 |