GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - impossibleG/impossible-ocr: A self-hosted OCR server that turns PNG and JPEG images into structured text using local PP-OCRv5 models through HTTP, gRPC and MCP.

BranchesTags
Open more actions menu

Latest commit

 

History

3 Commits
3 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
attestations/runtime
attestations/runtime
 
 
crates
crates
 
 
docs
docs
 
 
schemas
schemas
 
 
scripts
scripts
 
 
vendor/impossible-server
vendor/impossible-server
 
 
.dockerignore
.dockerignore
 
 
.gitignore
.gitignore
 
 
Cargo.lock
Cargo.lock
 
 
Cargo.toml
Cargo.toml
 
 
LICENSE-APACHE
LICENSE-APACHE
 
 
LICENSE-MIT
LICENSE-MIT
 
 
NOTICE.md
NOTICE.md
 
 
README.md
README.md
 
 
deny.toml
deny.toml
 
 
foundation-sync.json
foundation-sync.json
 
 
rust-toolchain.toml
rust-toolchain.toml
 
 

Repository files navigation

Impossible G — OCR

Impossible OCR

Impossible OCR is a local-first OCR server. Version 0.1 is deliberately scoped to synchronous OCR of static PNG or JPEG raster images with the curated PP-OCRv5 mobile detector and English mobile recognizer bundle. HTTP, unary gRPC, and MCP all use the same bounded pipeline.

The server starts on loopback by default. Liveness is available immediately, while readiness stays false and OCR requests return a stable unavailable error unless the optional ONNX backend is enabled, its exact local bundle is installed, its integrity-bound native runtime is admitted, and every session passes warm-up. This fail-closed behavior is intentional.

An eye scanning visual material into structured information

Workspace

  • impossible-ocr-domain: validated raster input, options, errors, geometry, and canonical results.
  • impossible-ocr-protocol: transport-neutral HTTP, gRPC, and MCP boundary contracts.
  • impossible-ocr-pipeline: backend lifecycle and synchronous pipeline traits.
  • impossible-ocr-onnx: explicit model lifecycle, bounded graph admission, and optional CPU ONNX Runtime adapter.
  • impossible-ocr-server: CLI plus bounded HTTP control plane and transport extension modules.
  • vendor/impossible-server: provisional reviewed source snapshot of the neutral server foundation.

Documentation

  • Product contract
  • Model admission boundary
  • Native ONNX Runtime packaging
  • Deferred work and cross-project lessons

The backlog records possible follow-up work only. It does not block the current v0.1 scope and does not commit the project to dates or features.

Development

cargo fmt --all -- --check
cargo check --locked --workspace --all-targets
cargo clippy --locked --workspace --all-targets -- -D warnings
cargo test --locked --workspace
cargo doc --locked --workspace --no-deps
pwsh ./scripts/verify-dependency-policy.ps1
pwsh ./scripts/verify-model-contracts.ps1
pwsh ./scripts/install-onnxruntime.tests.ps1
pwsh ./scripts/runtime-qualification-attestation.tests.ps1
pwsh ./scripts/verify-runtime-qualification-attestation.ps1
pwsh ./scripts/privacy-scan.tests.ps1
pwsh ./scripts/privacy-scan.ps1
pwsh ./scripts/verify-foundation-snapshot.ps1
cargo deny check advisories bans licenses sources

Local ONNX backend

The default build contains no native ONNX Runtime dependency and remains an unavailable server shell. Build with --features onnx-runtime to enable the CPU adapter. Startup remains strictly offline: it never scans the machine, searches PATH, or downloads a model or runtime. The model bundle must already exist in an explicit model store, and the native library must be supplied with its exact byte length and lowercase SHA-256.

An operator can populate the store from the four already-downloaded, pinned PaddlePaddle files. The command performs no network access and emits only a fixed JSON status object:

cargo run --locked -p impossible-ocr-server --bin import-model-bundle -- \
  --model-store <absolute-model-store> \
  --detector-graph <detector-inference.onnx> \
  --detector-config <detector-inference.yml> \
  --recognizer-graph <recognizer-inference.onnx> \
  --recognizer-config <recognizer-inference.yml>
cargo run --locked -p impossible-ocr-server --features onnx-runtime \
  --bin impossible-ocr-server -- \
  --model-store /opt/impossible-ocr/models \
  --runtime-directory /opt/impossible-ocr/runtime \
  --runtime-library libonnxruntime.so.1.28.0 \
  --runtime-library-bytes <exact-native-library-size> \
  --runtime-library-sha256 <exact-native-library-sha256> \
  --runtime-lanes 1 --runtime-intra-threads 1 --runtime-inter-threads 1

Only the curated paddlex-ocr-3.7-max960 profile is accepted. Runtime API 28 is compiled in. The official Windows x64 and Linux x64 ONNX Runtime 1.28.0 archives and their extracted redistribution files are packaging-qualified and allowlisted. Windows inference qualification is bound to the checked-in privacy-safe attestation produced by a fresh real run. Linux archive inspection does not execute Linux binaries, so Linux is packaging-qualified but inference-unqualified until the same harness passes natively on Linux. No weights or native runtime binaries are committed here.

The Windows attestation contains only pinned public identities and fixed boolean probe outcomes. It contains no paths, machine specifications, timings, tensors, or recognized text. Any relevant code, model contract, or Windows runtime-record change invalidates it in CI.

Licensed under either Apache-2.0 or MIT, at your option.

About

A self-hosted OCR server that turns PNG and JPEG images into structured text using local PP-OCRv5 models through HTTP, gRPC and MCP.

impossibleg.org

Topics

computer-visiondocument-processinggrpclocal-aimcpocrocr-serveronnx-runtimepaddleocrrustself-hosted

Resources

Readme

Code of conduct

Code of conduct

Contributing

Contributing

Security policy

Security policy
Activity
Custom properties

Stars

3 stars

Watchers

2 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.