AI Decision System
Replayable, offline-verifiable records for AI-assisted go/no-go decisions: experiment promotions, typed model answers and human-approved actions.
다중 페이지 PDF·PPTX·스캔 문서용 자체 호스팅 ONNX OCR 엔진, AI 에이전트를 위한 기본 MCP 서버 포함
Self-hosted ONNX OCR engine for multi-page PDFs, PPTX, and scanned documents, with a native MCP server for AI agents.
개발 도구HTML · PythonGitHub @Ibrahim-Salman19온라인운영자 미확인
써 보셨어요? 한 번만 눌러 주세요. 로그인은 필요 없어요.
아직 감지된 업데이트가 없습니다. GitHub 릴리스가 나오면 여기에 보입니다.
개인 계정의 공개 저장소 소유자는 GitHub로 로그인해 운영자를 확인하고 소개를 직접 관리할 수 있습니다. 관리자 승인은 필요하지 않습니다.
로그인한 뒤 확인 파일을 만들어 이 저장소의 기본 브랜치에 30분 안에 커밋해 주세요. 다른 브랜치나 포크의 파일은 인정하지 않습니다. 파일을 올린 뒤 아래에서 확인하면 관리자 승인 없이 관리할 수 있습니다. 자격을 유지하려면 파일을 남겨 두세요.
로그인이 필요하면 로그인 화면으로 이동합니다. 로그인 후 이곳으로 돌아와 원하는 확인 버튼을 다시 눌러 주세요.
프로젝트 폴더에서 /nomorevibe verify를 실행하면 소유권을 확인하고 소개를 직접 관리할 수 있습니다.
1분 만에 확인하기Self-hosted OCR pipeline for PDFs, PPTX, and images with a native MCP server: 18% lower CER and 7.7x lower CPU latency vs. EasyOCR on a 14-page benchmark (ADR-documented). CLI + Streamlit UI + FastAPI, 677 automated tests.
저장소 README에서 가져옴
README 전체를 불러오는 중입니다. 아래는 저장된 발췌입니다.
🚀 B.L.A.S.T. OCR Engine: Enterprise ONNX Document Intelligence
Blueprint. Link. Architect. Stylize. Trigger.
The ultra-high-throughput, memory-bounded OCR and document intelligence engine for PDFs, PowerPoints (PPTX), and scanned images.
⚡ Quick Answer: What is B.L.A.S.T. OCR?README 전문 보기 ↗Blueprint. Link. Architect. Stylize. Trigger.
The ultra-high-throughput, memory-bounded OCR and document intelligence engine for PDFs, PowerPoints (PPTX), and scanned images.
B.L.A.S.T. OCR is a self-hosted, offline document intelligence and optical character recognition (OCR) engine for Python. Powered by ONNX Runtime execution (RapidOCR/PP-OCRv4, with multi-provider fallback across CUDA → DirectML → CPU), it converts multi-page PDFs, scanned images, and PPTX decks into structured Markdown, dual-layer searchable sandwich PDFs, styled DOCX, EPUB 3.0, and structured JSON. In an in-repo bake-off against EasyOCR on the same 14-page gold corpus (docs/adr/0005-phase3-engine-bakeoff.md), its default RapidOCR engine cut mean character error rate by 18% (0.2338 → 0.1916 CER) and per-page CPU latency by 7.7x (117.8s → 15.3s), while a 1,000-page streaming stress test measured a memory growth slope of 0.0002 MB/page (eval/results/stress_report.json) — all reproducible from the committed eval harness, not vendor-reported numbers.
CUDA → DirectML → CPU), replacing an EasyOCR baseline at 7.7x lower per-page CPU latency (docs/adr/0005).eval/teds_evaluator.py).eval/results/stress_report.json).llms.txt, llms-full.txt, LangChain, and LlamaIndex connectors.high/default/low), automated zombie reaper, DLQ quarantine, and exponential retry backoff.This is B.L.A.S.T.'s own internal engine bake-off — every number below comes from a committed JSON result file and can be re-run with python -m eval.run. It is not a claim about how competing standalone tools perform; it compares the OCR backends B.L.A.S.T. has actually shipped and measured on the same corpus.
| Metric | RapidOCR (current default) | EasyOCR (previous default) | Phase-0 pipeline (Tesseract-backed) |
|---|---|---|---|
| Mean CER | 0.1916 | 0.2338 | 0.4992 |
| Mean WER | 0.4739 | 0.4968 | 0.7288 |
| Reading Order τ | 0.9758 | 0.9641 | n/a |
| Avg. CPU latency/page | ~15.3s | ~117.8s | n/a |
| Source | eval/results/rapidocr_candidate.json, ADR 0005 | ADR 0005 | ADR 0003 |
Separately, a 1,000-page streaming stress test measured a memory growth slope of 0.0002 MB/page against a 0.005 MB/page fail threshold (zero-leak gate passed) — see eval/results/stress_report.json and eval/stress_test.py.
GPU throughput, table-extraction TEDS score, and multi-engine (Docling/Marker/Surya/Textract) head-to-head numbers are not yet benchmarked in this repo and are intentionally omitted here rather than estimated. For third-party-reported context on those tools (with sources), see docs/COMPETITIVE_LANDSCAPE.md.
| Feature | B.L.A.S.T. OCR | Tesseract | EasyOCR | Docling | Marker | AWS Textract |
|---|---|---|---|---|---|---|
| Dual-layer searchable PDF | Yes (PyMuPDF) | No | No | No | No | Extra cost |
| LaTeX math parser | Yes (built-in) | No | No | Partial | Yes | No |
| Native MCP server | Yes (built-in) | No | No | No | No | No |
| LangChain / LlamaIndex loaders | Yes (built-in) | No | No | Yes (LangChain) | No | Yes (AWS SDK) |
| Runs fully offline | Yes | Yes | Yes | Yes | Yes | No (cloud API) |
License and independent-benchmark citations for Docling, Marker, MinerU, and AWS Textract are tracked in docs/COMPETITIVE_LANDSCAPE.md rather than restated here, since they weren't run against B.L.A.S.T.'s own corpus.
# Clone the repository
git clone https://github.com/Ibrahim-Salman19/OCR.git
cd OCR
# Install core runtime dependencies
pip install -r requirements.txt
# Optional: Durable Redis queue, S3 uploader, OpenTelemetry metrics
pip install -r requirements-production.txt
from blast_ocr.pipeline import BlastPipeline
# Initialize pipeline (config_overrides accepts any JobConfig field)
pipeline = BlastPipeline(config_overrides={"ocr_engine": "rapidocr", "secure_mode": True})
# Process PDF document to Markdown and Searchable PDF
result = pipeline.process_job(
source_path="document.pdf",
formats=["markdown", "docx", "pdf"]
)
print(result["text"])
Add B.L.A.S.T. OCR to your AI agent configuration (Cursor, Claude Desktop, Antigravity, OpenDevin, Windsurf):
{
"mcpServers": {
"blast-ocr": {
"command": "python3",
"args": ["-m", "blast_ocr.mcp_server"]
}
}
}
# LangChain Document Loader
from blast_ocr.integrations import BlastOCRDocumentLoader
loader = BlastOCRDocumentLoader("quarterly_report.pdf", extract_tables=True)
documents = loader.load()
# LlamaIndex Reader
from blast_ocr.integrations import BlastOCRReader
docs = BlastOCRReader().load_data("whitepaper.pdf")
# Launch server with Swagger UI & Prometheus metrics
python run.py --serve --port 8000
# Access Swagger UI: http://localhost:8000/docs
# Access OpenAPI Spec: http://localhost:8000/openapi.json
# Access LLMs.txt: http://localhost:8000/llms.txt
python run_gui.py
# or
streamlit run blast_ocr/ui/web_app.py
# High-speed document processing with dual-layer PDF export
python run.py document.pdf --formats md,docx,pdf --out results/
# Scanned book processing with spine curvature dewarping
python run.py thick_book.pdf --dewarp --engine ensemble --out book_results/
B.L.A.S.T.'s default engine (RapidOCR, ONNX Runtime with CUDA → DirectML → CPU fallback) replaced an EasyOCR/PyTorch baseline after a documented bake-off on the project's 14-page gold corpus, cutting average CPU per-page latency from ~117.8s to ~15.3s (a 7.7x improvement) while also reducing mean CER by 18% — see ADR 0005 for the full methodology and raw results.
B.L.A.S.T. implements a bounded sliding-window streaming architecture (PageStreamGenerator) that caps concurrent in-memory page buffers and recycles intermediate image tensors. A 1,000-page streaming stress test measured a growth slope of 0.0002 MB/page against a 0.005 MB/page fail threshold — see eval/results/stress_report.json.
B.L.A.S.T. uses a morphological table detection and cell reconstruction engine (TableExtractor) that analyzes horizontal and vertical grid lines, merges spanning cells, and preserves hierarchical header structures into clean Markdown and HTML tables, scored against a built-in Tree-Edit-Distance (TEDS) evaluator (eval/teds_evaluator.py). Mathematical expressions are recognized into LaTeX KaTeX format ($...$ and $$...$$).
B.L.A.S.T. includes a native Model Context Protocol (MCP) server. Run python -m blast_ocr.mcp_server or configure mcp.json to expose blast_ocr_process, blast_ocr_extract_tables, blast_ocr_extract_formulas, and blast_ocr_semantic_chunk tools with zero configuration.
B.L.A.S.T. utilizes PyMuPDF to synthesize dual-layer searchable PDFs where the original scanned image is preserved on the visual layer while an invisible, selectable text layer is placed beneath it with exact word-level coordinate bounding box alignment.
Unlike Vision-Language Models (VLMs) that generate text autoregressively and can hallucinate numbers, dates, and clauses, B.L.A.S.T. uses deterministic neural text detection and CTC character classification combined with morphological layout analysis. Text is recognized strictly from detected pixel coordinates, guaranteeing 0% generative hallucination in legal, financial, and compliance workflows.
Yes. B.L.A.S.T. executes completely locally with zero external network calls, zero third-party telemetry, and zero cloud API dependencies. All ONNX weights and dependencies are hosted on-premise, making it fully compliant with HIPAA, GDPR, and air-gapped defense environments.
When secure_mode=True is enabled, B.L.A.S.T. runs an automated 8-class forensic redaction engine that masks Social Security Numbers (SSNs), credit card numbers, email addresses, phone numbers, API keys, JWT tokens, IPv4/IPv6 addresses, and IBANs across all generated exports before disk persistence.
B.L.A.S.T. has 914 automated tests covering the OCR pipeline, security boundary, queue/storage backends, browser UI, and export formats. The 844 non-browser tests pass cleanly (842 passed, 2 skipped) and gate every push at 80%+ coverage. The 70 Playwright browser tests also run in CI now, in their own job: 910 passed, 2 skipped, 2 failed as a group. Both failures are order-dependent rather than broken assertions (see docs/adr/0014-ci-cd-gates-that-can-actually-fail.md), which is exactly why that job reports on every run but doesn't yet block merges. These numbers are re-verified as of 2026-09-07 by actually executing every test, not carried forward from an older run (CI had previously gone a full week without running any tests at all; see docs/marketing/13_TECHNICAL_SEO_AUDIT.md, Finding TECH-06):
# Run full test suite with coverage
python3 -m pytest tests/ --cov=blast_ocr --cov-report=term-missing
The test harness guarantees:
docs/adr/0014).E722/F401/F811/F841; see pyproject.toml).# nosec, not just re-labeled) and verified zero-leak gate certification.Engineered by Ibrahim Salman (@Ibrahim-Salman19), Full-Stack Software Engineer & AI Systems Architect (Alumnus of University of Engineering and Technology, Taxila). Specializes in high-throughput OCR systems, RAG architectures, ONNX neural inference, and resilient distributed pipelines.
"Make it work. Prove it works. Make it survive production."
We welcome contributions! Please review CONTRIBUTING.md for code style and PR guidelines.
Distributed under the MIT License. Free for commercial and private use.