magicyuan876/mineru-tianshu

天枢 - 企业级 AI 一站式数据预处理平台 | PDF/Office转Markdown | 支持MCP协议AI助手集成 | Vue3+FastAPI全栈方案 | 文档解析 | 多模态信息提取

Tianshu (天枢) – Enterprise‑grade AI data‑pre‑processing platform

What it is – Tianshu is a self‑hosted service that turns unstructured files (documents, images, audio, video, and even bio‑informatics formats) into structured Markdown or JSON that can be fed directly to LLMs, RAG pipelines, or other AI workflows. It bundles a Vue 3 front‑end, a FastAPI + LitServe back‑end, GPU‑aware worker pools, authentication, audit logging, webhook callbacks, and optional MCP (Model Context Protocol) integration for tools like Claude Desktop.

Key capabilities

  • Multi‑modal ingestion – PDF, Word, Excel, PPT, images, audio, video, FASTA/GenBank, ZIP/EPUB, encrypted PDFs/Office/ZIP.
  • Automatic content extraction – OCR (MinerU, PaddleOCR‑VL), VLM‑based image captioning, speech‑to‑text (SenseVoice) with speaker and emotion detection, video key‑frame OCR, watermark removal (experimental).
  • Structured output – Markdown for human reading and a detailed JSON schema describing pages, paragraphs, tables, formulas, etc.
  • Scalable processing – LitServe‑driven GPU load‑balancing, Redis queue, SQLite WAL, automatic PDF splitting for large files, parallel sub‑task handling.
  • Enterprise features – JWT + role‑based auth, API‑Key management, audit logs, webhook notifications with HMAC signing, MCP protocol server, Docker‑compose deployment, offline‑install package.
  • Extensible format engines – Plugin system for domain‑specific parsers (e.g., bio‑informatics FASTA/GenBank) that can be added without touching core code.

Typical workflow

  1. Upload a file (drag‑and‑drop or API call).
  2. Choose an engine (standard pipeline or VLM‑enhanced).
  3. Optionally provide a password for encrypted files.
  4. The system creates a task, splits it if needed, and dispatches workers.
  5. When finished, view or download the Markdown/JSON result; webhook can push a callback to downstream services.

Installation / deployment

  • Docker (recommended) – Run bash setup.sh which interactively asks for GPU count, model source, Redis/RustFS settings, then builds and starts all containers (frontend, backend, worker, mcp, redis, rustfs).
  • Native / pipeline‑only – Use the same script with --mode pipeline|cpu|native for lightweight or CPU‑only setups.
  • Offline deployment – setup.sh --mode offline‑build creates a self‑contained image bundle; copy it to the production host and run setup.sh --mode offline‑deploy.
  • Manual – Build the Vue app (npm run build), serve it with Nginx, start the FastAPI server (python start_all.py), and launch LitServe workers (python litserve_worker.py).

Tech stack

  • Front‑end: Vue 3, TypeScript, Vite, TailwindCSS, Pinia, Vue Router.
  • Back‑end: FastAPI, LitServe (GPU scheduling), SQLite (WAL), Redis (task queue), Loguru.
  • Core AI engines: MinerU (document/OCR), PaddleOCR‑VL (multilingual OCR), SenseVoice (speech‑to‑text, diarization, emotion), YOLO11x + LaMa (watermark removal), custom format parsers (FASTA/GenBank).
  • Containerisation: Docker‑Compose, NVIDIA Container Toolkit, optional RustFS object‑storage service.

Who might use it

  • Companies building RAG or LLM‑augmented search that need to ingest large corpora of PDFs, slides, spreadsheets, or domain‑specific files.
  • Teams that require secure handling of encrypted documents and audit trails.
  • Developers wanting a self‑hosted, GPU‑accelerated preprocessing service with a ready‑made UI and API.
  • Researchers in bio‑informatics who want to turn FASTA/GenBank files into structured JSON for downstream ML pipelines.

License – Apache 2.0 (permissive, commercial‑friendly).


If you find Tianshu useful, consider starring the repository – the developers rely on community support.

Related

  • Project
  • Project
  • Project
  • Project
  • Project