Swift package · v0.1.0
KLOCRPipeline
Run OCR stages with explicit geometry and model boundaries.
A staged OCR pipeline for image preprocessing, Vision text recognition, reading-order reconstruction, and optional PaddleOCR Core ML inference.
Functions
- Explicit preprocessing and recognition stages
- Vision and optional PaddleOCR paths
- Reading-order reconstruction through KLReadingOrder
- Testable model and runtime boundaries
Not included
It runs OCR stages and returns structured observations. Image acquisition, user-facing editing, model distribution, and persistence remain with the integrating application.
Install with SwiftPM
.package(url: "https://github.com/KoenLee1023/KLOCRPipeline.git", from: "0.1.0")Usage
let result = try await pipeline.recognize(image)
let ordered = readingOrder.reconstruct(candidates: result.candidates)API documentation
Open the complete API documentation.KLOCRPipelineRuns configured OCR stages and returns recognized candidates with source geometry.
KLOCRVisionProvides the Apple Vision recognition stage for supported image inputs.
PPOCRInferenceSessionOwns the boundary between validated tensors and a Core ML OCR model.
Demo apps
Pipeline Playground
Run staged recognition and inspect candidates and reading order.
Vision Text Lab
Compare Vision output with post-processing and layout reconstruction.