#925 by GitHub stars

xiaomi-research/Xiaomi-OCR-0

Xiaomi-OCR-0

History

Review weekly changes to SKILL.md before updating. Dates mark the weeks in which we observed each version; checks apply to the recorded commits.

View weekly changes

SKILL.md

Week of Nov 2, 2026 · +0 / −0 lines

Before Not checked yet → After Network or broad shell

67ac29a85150 → b1a9bb4c0706

Diff text is unavailable under the recorded licenses. Line counts and the GitHub link remain available.

Compare on GitHub

Week of Oct 26, 2026 · Line counts unavailable

Before Not checked yet → After Not checked yet

First observation → 67ac29a85150

No earlier version was observed for comparison.

Compare on GitHub

skills/xiaomi-ocr/SKILL.md

Week of Nov 2, 2026 · +0 / −0 lines

Before Not checked yet → After Network or broad shell

67ac29a85150 → b1a9bb4c0706

Diff text is unavailable under the recorded licenses. Line counts and the GitHub link remain available.

Compare on GitHub

Week of Oct 26, 2026 · Line counts unavailable

Before Not checked yet → After Not checked yet

First observation → 67ac29a85150

No earlier version was observed for comparison.

Compare on GitHub

View on GitHubAdd to my skills

Verified commit b1a9bb4c07060c453785e9151715ccda6b96f0b1

963GitHub stars
587stars in 7 days
2skills in this repository
6commits in 30 days

Heat

8.0
  • Star growth, last 7 daysAhead of 100% of tracked repositories
  • Star growth, last 24 hoursAhead of 99% of tracked repositories
  • Rank movement, last 7 daysNot available
  • Commits, last 30 daysAhead of 71% of tracked repositories
  • Accounts asking about it through MCP, last 7 daysNot available
  • Hot votes this weekAhead of 0% of tracked repositories

Heat never changes the order by stars, and sponsorship never touches it. How heat works

Stars over time

Oct 25, 2026Nov 7, 2026963

30-day change not yet available: not enough history.

Individual skills in this repository

How it works

xiaomi-ocr-setup

When your agent uses it

Install and configure the Xiaomi-OCR-0 Skill and local MCP service for document OCR, KIE, and VQA.

What it loads into context

Frontmatter

36 tokens

Always available to the agent

SKILL.md

840 tokens

When the skill is activated

Reference documents

21,638 tokens

Loaded on request

Token counts are estimates. Scripts run separately; they are not counted as reference context.

The playbook

  1. Install this Skill into the current agent

Scripts executed separately

  • demo/server.py
  • demo/static/app.js
  • demo/static/i18n.js
  • demo/static/katex/katex.min.js
  • evaluation_pipeline/__init__.py
  • evaluation_pipeline/cropping.py
  • evaluation_pipeline/e2e_img2md.py
  • evaluation_pipeline/layout_detect_paddlex.py
  • evaluation_pipeline/twostage_img2md.py
  • postprocess/__init__.py
  • postprocess/assemble_markdown.py
  • postprocess/document.py
  • postprocess/markdown_merge.py
  • postprocess/otsl.py
  • postprocess/region.py
  • postprocess/repetition_guard.py

Files

  • .gitignoreasset281 bytes
  • INSTALL.mddoc7,563 bytes
  • LICENSEasset11,349 bytes
  • OLLAMA.mddoc4,332 bytes
  • README.mddoc15,332 bytes
  • README_zh.mddoc13,473 bytes
  • SKILL.mdcore3,821 bytes
  • SKILL.mdcore3,821 bytes
  • SKILL.mdcore3,821 bytes
  • SKILL.mdcore3,821 bytes
  • THIRD_PARTY_NOTICES.mddoc773 bytes
  • demo/README.mddoc4,520 bytes
  • demo/samples/sample_document.pngasset103,311 bytes
  • demo/samples/sample_kie.pngasset48,028 bytes
  • demo/samples/sample_vqa.pngasset43,328 bytes
  • demo/samples/showcase/showcase_calligraphy.jpgasset169,004 bytes
  • demo/samples/showcase/showcase_calligraphy.pngasset191,662 bytes
  • demo/samples/showcase/showcase_dense.pngasset596,294 bytes
  • demo/samples/showcase/showcase_formula.pngasset614,828 bytes
  • demo/samples/showcase/showcase_handwriting.pngasset576,680 bytes
  • demo/samples/showcase/showcase_invoice.pngasset355,436 bytes
  • demo/samples/showcase/showcase_whiteboard.pngasset262,501 bytes
  • demo/server.pyruns50,182 bytes
  • demo/static/app.jsruns49,318 bytes
  • demo/static/favicon.icoasset4,286 bytes
  • demo/static/favicon.pngasset299 bytes
  • demo/static/i18n.jsruns11,678 bytes
  • demo/static/img/xiaomi-logo.svgasset1,852 bytes
  • demo/static/index.htmlasset10,472 bytes
  • demo/static/katex/LICENSEasset1,107 bytes
  • demo/static/katex/fonts/KaTeX_AMS-Regular.ttfasset63,632 bytes
  • demo/static/katex/fonts/KaTeX_AMS-Regular.woffasset33,516 bytes
  • demo/static/katex/fonts/KaTeX_AMS-Regular.woff2asset28,076 bytes
  • demo/static/katex/fonts/KaTeX_Caligraphic-Bold.ttfasset12,368 bytes
  • demo/static/katex/fonts/KaTeX_Caligraphic-Bold.woffasset7,716 bytes
  • demo/static/katex/fonts/KaTeX_Caligraphic-Bold.woff2asset6,912 bytes
  • demo/static/katex/fonts/KaTeX_Caligraphic-Regular.ttfasset12,344 bytes
  • demo/static/katex/fonts/KaTeX_Caligraphic-Regular.woffasset7,656 bytes
  • demo/static/katex/fonts/KaTeX_Caligraphic-Regular.woff2asset6,908 bytes
  • demo/static/katex/fonts/KaTeX_Fraktur-Bold.ttfasset19,584 bytes
  • demo/static/katex/fonts/KaTeX_Fraktur-Bold.woffasset13,296 bytes
  • demo/static/katex/fonts/KaTeX_Fraktur-Bold.woff2asset11,348 bytes
  • demo/static/katex/fonts/KaTeX_Fraktur-Regular.ttfasset19,572 bytes
  • demo/static/katex/fonts/KaTeX_Fraktur-Regular.woffasset13,208 bytes
  • demo/static/katex/fonts/KaTeX_Fraktur-Regular.woff2asset11,316 bytes
  • demo/static/katex/fonts/KaTeX_Main-Bold.ttfasset51,336 bytes
  • demo/static/katex/fonts/KaTeX_Main-Bold.woffasset29,912 bytes
  • demo/static/katex/fonts/KaTeX_Main-Bold.woff2asset25,324 bytes
  • demo/static/katex/fonts/KaTeX_Main-BoldItalic.ttfasset32,968 bytes
  • demo/static/katex/fonts/KaTeX_Main-BoldItalic.woffasset19,412 bytes
  • demo/static/katex/fonts/KaTeX_Main-BoldItalic.woff2asset16,780 bytes
  • demo/static/katex/fonts/KaTeX_Main-Italic.ttfasset33,580 bytes
  • demo/static/katex/fonts/KaTeX_Main-Italic.woffasset19,676 bytes
  • demo/static/katex/fonts/KaTeX_Main-Italic.woff2asset16,988 bytes
  • demo/static/katex/fonts/KaTeX_Main-Regular.ttfasset53,580 bytes
  • demo/static/katex/fonts/KaTeX_Main-Regular.woffasset30,772 bytes
  • demo/static/katex/fonts/KaTeX_Main-Regular.woff2asset26,272 bytes
  • demo/static/katex/fonts/KaTeX_Math-BoldItalic.ttfasset31,196 bytes
  • demo/static/katex/fonts/KaTeX_Math-BoldItalic.woffasset18,668 bytes
  • demo/static/katex/fonts/KaTeX_Math-BoldItalic.woff2asset16,400 bytes
  • demo/static/katex/fonts/KaTeX_Math-Italic.ttfasset31,308 bytes
  • demo/static/katex/fonts/KaTeX_Math-Italic.woffasset18,748 bytes
  • demo/static/katex/fonts/KaTeX_Math-Italic.woff2asset16,440 bytes
  • demo/static/katex/fonts/KaTeX_SansSerif-Bold.ttfasset24,504 bytes
  • demo/static/katex/fonts/KaTeX_SansSerif-Bold.woffasset14,408 bytes
  • demo/static/katex/fonts/KaTeX_SansSerif-Bold.woff2asset12,216 bytes
  • demo/static/katex/fonts/KaTeX_SansSerif-Italic.ttfasset22,364 bytes
  • demo/static/katex/fonts/KaTeX_SansSerif-Italic.woffasset14,112 bytes
  • demo/static/katex/fonts/KaTeX_SansSerif-Italic.woff2asset12,028 bytes
  • demo/static/katex/fonts/KaTeX_SansSerif-Regular.ttfasset19,436 bytes
  • demo/static/katex/fonts/KaTeX_SansSerif-Regular.woffasset12,316 bytes
  • demo/static/katex/fonts/KaTeX_SansSerif-Regular.woff2asset10,344 bytes
  • demo/static/katex/fonts/KaTeX_Script-Regular.ttfasset16,648 bytes
  • demo/static/katex/fonts/KaTeX_Script-Regular.woffasset10,588 bytes
  • demo/static/katex/fonts/KaTeX_Script-Regular.woff2asset9,644 bytes
  • demo/static/katex/fonts/KaTeX_Size1-Regular.ttfasset12,228 bytes
  • demo/static/katex/fonts/KaTeX_Size1-Regular.woffasset6,496 bytes
  • demo/static/katex/fonts/KaTeX_Size1-Regular.woff2asset5,468 bytes
  • demo/static/katex/fonts/KaTeX_Size2-Regular.ttfasset11,508 bytes
  • demo/static/katex/fonts/KaTeX_Size2-Regular.woffasset6,188 bytes
  • demo/static/katex/fonts/KaTeX_Size2-Regular.woff2asset5,208 bytes
  • demo/static/katex/fonts/KaTeX_Size3-Regular.ttfasset7,588 bytes
  • demo/static/katex/fonts/KaTeX_Size3-Regular.woffasset4,420 bytes
  • demo/static/katex/fonts/KaTeX_Size3-Regular.woff2asset3,624 bytes
  • demo/static/katex/fonts/KaTeX_Size4-Regular.ttfasset10,364 bytes
  • demo/static/katex/fonts/KaTeX_Size4-Regular.woffasset5,980 bytes
  • demo/static/katex/fonts/KaTeX_Size4-Regular.woff2asset4,928 bytes
  • demo/static/katex/fonts/KaTeX_Typewriter-Regular.ttfasset27,556 bytes
  • demo/static/katex/fonts/KaTeX_Typewriter-Regular.woffasset16,028 bytes
  • demo/static/katex/fonts/KaTeX_Typewriter-Regular.woff2asset13,568 bytes
  • demo/static/katex/katex.min.cssasset23,335 bytes
  • demo/static/katex/katex.min.jsruns275,414 bytes
  • demo/static/showcase.jsonasset605 bytes
  • demo/static/style.cssasset17,943 bytes
  • evaluation_pipeline/README.mddoc8,614 bytes
  • evaluation_pipeline/README_zh.mddoc8,063 bytes
  • evaluation_pipeline/__init__.pyruns0 bytes
  • evaluation_pipeline/configs/end2end.yamlasset1,153 bytes
  • evaluation_pipeline/cropping.pyruns2,453 bytes
  • evaluation_pipeline/e2e_img2md.pyruns29,344 bytes
  • evaluation_pipeline/layout_detect_paddlex.pyruns14,761 bytes
  • evaluation_pipeline/twostage_img2md.pyruns46,122 bytes
  • example_pics/dense-equations.gifasset2,452,638 bytes
  • example_pics/dense-equations.jpgasset401,147 bytes
  • example_pics/dense-equations.mddoc4,606 bytes
  • example_pics/handwrite-formula.gifasset807,861 bytes
  • example_pics/handwrite-formula.jpgasset247,100 bytes
  • example_pics/handwrite-formula.mddoc2,152 bytes
  • example_pics/qianziwen.jpegasset295,671 bytes
  • example_pics/qianziwen.mddoc83 bytes
  • example_pics/receipt.jpgasset99,714 bytes
  • example_pics/receipt.mddoc530 bytes
  • examples/mcp-config.jsonasset372 bytes
  • postprocess/README.mddoc1,726 bytes
  • postprocess/__init__.pyruns0 bytes
  • postprocess/assemble_markdown.pyruns28,533 bytes
  • postprocess/document.pyruns3,666 bytes
  • postprocess/markdown_merge.pyruns54,539 bytes
  • postprocess/otsl.pyruns8,094 bytes
  • postprocess/region.pyruns14,352 bytes
  • postprocess/repetition_guard.pyruns4,514 bytes
  • requirements-paddlex.txtdoc386 bytes
  • requirements.txtdoc59 bytes
Read SKILL.md

# Xiaomi-OCR-0 Skill

The only user-facing installation prompt is:

```text
Read and execute https://raw.githubusercontent.com/SeerRay-Lab/Xiaomi-OCR-0/main/SKILL.md
```

## Install this Skill into the current agent

If this file was read from the Xiaomi-OCR-0 repository and the user asked to install it,
install only the `xiaomi-ocr` Skill globally for the current agent:

```bash
View the complete source on GitHub

Skills included

  • xiaomi-ocr-setup
  • xiaomi-ocr

Repository facts

License
Apache-2.0
Created
Sep 28, 2026
Last pushed
Oct 29, 2026
Forks
58
Open issues
4
Project activity
Active

Rank over the last 12 weeks

Now #925 · best #925

  1. #999 on Nov 3
  2. #962 on Nov 4
  3. #935 on Nov 5
  4. #928 on Nov 6
  5. #925 since Nov 7

Before you install

Network or broad shell

Automated signals, not a guarantee

Checked Nov 4, 2026

Not fully analyzed: some files were too long, unreadable or missing. This never lowers the level.

Show 11 notes
  • SKILL.md:1 Analysis incomplete: Referenced executable target unavailable; not analyzed
  • SKILL.md:1 Analysis incomplete: Referenced executable target unavailable; not analyzed
  • SKILL.md:1 Analysis incomplete: Referenced executable target unavailable; not analyzed
  • demo/static/katex/katex.min.css:1 Analysis incomplete: physical or joined line exceeds character limit
  • demo/static/katex/katex.min.js:1 [Credential-related source omitted]
  • demo/static/style.css:5 Analysis incomplete: physical or joined line exceeds character limit
  • demo/static/style.css:6 Analysis incomplete: physical or joined line exceeds character limit
  • demo/static/style.css:7 Analysis incomplete: physical or joined line exceeds character limit
  • demo/static/style.css:8 Analysis incomplete: physical or joined line exceeds character limit
  • skills/xiaomi-ocr/SKILL.md:1 Analysis incomplete: Referenced executable target unavailable; not analyzed
  • skills/xiaomi-ocr/SKILL.md:1 Analysis incomplete: Referenced executable target unavailable; not analyzed
Show all 277 signals by file

INSTALL.md

  • Network accessline 29
    - [SGLang Qwen3.5 deployment guide](https://github.com/sgl-project/sglang/blob/main/docs_new/cookbook/autoregressive/Qwen/Qwen3.5.mdx)
  • Network accessline 30
    - [vLLM Qwen3.5 implementation](https://docs.vllm.ai/en/latest/api/vllm/model_executor/models/qwen3_5/)
  • Network accessline 31
    - [vLLM supported models](https://docs.vllm.ai/en/latest/models/supported_models/)
  • Network accessline 53
    Install [Ollama](https://ollama.com/download) and keep its local service running
  • Network accessline 62
    Use `http://127.0.0.1:11434/v1` as the MCP inference URL and
  • Network accessline 73
    XIAOMI_OCR_LOCAL_URL=http://127.0.0.1:8000/v1 \
  • Network accessline 81
    XIAOMI_OCR_LOCAL_URL=http://127.0.0.1:11434/v1 \
  • Network accessline 92
    own MCP configuration, then restart the agent. If the local model runs on another port, set `XIAOMI_OCR_LOCAL_URL` before running the installer, for example `http://127.0.0.1:8001/v1`.
  • Network accessline 94
    `http://127.0.0.1:8001/v1`.
  • Network accessline 103
    For manual installation, use the official [PaddlePaddle installation guide](https://paddlepaddle.github.io/PaddleX/latest/en/installation/paddlepaddle_install.html)
  • Network accessline 104
    [PaddlePaddle installation guide](https://paddlepaddle.github.io/PaddleX/latest/en/installation/paddlepaddle_install.html)
  • Network accessline 105
    and [PaddleX installation guide](https://paddlepaddle.github.io/PaddleX/latest/en/installation/installation.html).

LICENSE

  • Network accessline 1
    Apache License                            Version 2.0, January 2004                         http://www.apache.org/licenses/
  • Network accessline 3
    http://www.apache.org/licenses/
  • Network accessline 195
    http://www.apache.org/licenses/LICENSE-2.0

OLLAMA.md

  • Network accessline 41
    export XIAOMI_OCR_BACKEND=ollama export XIAOMI_OCR_MODEL=longwayxu/xiaomi-ocr-0:bf16 export XIAOMI_OCR_LOCAL_URL=http://127.0.0.1:11434/v1
  • Network accessline 41
    export XIAOMI_OCR_BACKEND=ollama export XIAOMI_OCR_MODEL=longwayxu/xiaomi-ocr-0:bf16 export XIAOMI_OCR_LOCAL_URL=http://127.0.0.1:11434/v1
  • Network accessline 42
    export XIAOMI_OCR_MODEL=longwayxu/xiaomi-ocr-0:bf16 export XIAOMI_OCR_LOCAL_URL=http://127.0.0.1:11434/v1 python demo/server.py --port 8787
  • Network accessline 42
    export XIAOMI_OCR_MODEL=longwayxu/xiaomi-ocr-0:bf16 export XIAOMI_OCR_LOCAL_URL=http://127.0.0.1:11434/v1 python demo/server.py --port 8787
  • Network accessline 43
    export XIAOMI_OCR_LOCAL_URL=http://127.0.0.1:11434/v1
  • Network accessline 43
    export XIAOMI_OCR_LOCAL_URL=http://127.0.0.1:11434/v1
  • Network accessline 59
    XIAOMI_OCR_BACKEND=ollama \ XIAOMI_OCR_LOCAL_URL=http://127.0.0.1:11434/v1 \
  • Network accessline 59
    XIAOMI_OCR_BACKEND=ollama \ XIAOMI_OCR_LOCAL_URL=http://127.0.0.1:11434/v1 \
  • Network accessline 60
    XIAOMI_OCR_LOCAL_URL=http://127.0.0.1:11434/v1 \
  • Network accessline 60
    XIAOMI_OCR_LOCAL_URL=http://127.0.0.1:11434/v1 \

README.md

  • Network accessline 5
    <p><b>English</b> · <a href="README_zh.md">简体中文</a></p> <p>   <a href="https://huggingface.co/SeerRay-Lab/Xiaomi-OCR-0"><img src="https://img.shields.io/badge/Hugging%20Face-Model-FFD21E?logo=huggingface&amp;logoColor=FFD21E" alt="Hugging F
  • Network accessline 6
    <p>   <a href="https://huggingface.co/SeerRay-Lab/Xiaomi-OCR-0"><img src="https://img.shields.io/badge/Hugging%20Face-Model-FFD21E?logo=huggingface&amp;logoColor=FFD21E" alt="Hugging Face Model"></a>   <a href="https://arxiv.org/abs/2609.36
  • Network accessline 7
    <a href="https://huggingface.co/SeerRay-Lab/Xiaomi-OCR-0"><img src="https://img.shields.io/badge/Hugging%20Face-Model-FFD21E?logo=huggingface&amp;logoColor=FFD21E" alt="Hugging Face Model"></a>
  • Network accessline 8
    <a href="https://arxiv.org/abs/2609.36136"><img src="https://img.shields.io/badge/arXiv-2609.36136-b31b1b.svg" alt="arXiv:2609.36136"></a>
  • Network accessline 9
    <a href="https://huggingface.co/spaces/SeerRay-Lab/Xiaomi-OCR-0"><img src="https://img.shields.io/badge/Project-Page-FF6900?logo=huggingface&amp;logoColor=FFD21E" alt="Project Page"></a>
  • Network accessline 10
    <a href="https://github.com/SeerRay-Lab/Xiaomi-OCR-0"><img src="https://img.shields.io/badge/GitHub-SeerRay--Lab%2FXiaomi--OCR--0-181717?logo=github" alt="GitHub"></a>
  • Network accessline 11
    <a href="https://ollama.com/longwayxu/xiaomi-ocr-0:bf16"><img src="https://img.shields.io/badge/Ollama-BF16%20%28experimental%29-000000?logo=ollama&amp;logoColor=white" alt="Ollama BF16 (experimental)"></a>
  • Network accessline 12
    <a href="https://www.modelscope.cn/models/SeerRay-Lab/Xiaomi-OCR-0"><img src="https://img.shields.io/badge/ModelScope-Model-624AFF?logo=ModelScope&amp;logoColor=white" alt="ModelScope Model"></a>
  • Network accessline 32
    - **2026-10-08:** Thanks to the community for supporting Xiaomi-OCR-0 and sharing new formats: [prithivMLmods’ GGUF](https://huggingface.co/prithivMLmods/Xiaomi-OCR-0-GGUF), [xzl01’s GGUF](https://github.com/xzl01/Xiaomi-OCR-0-GGUF), and [B
  • Network accessline 52
    | [`evaluation_pipeline/`](evaluation_pipeline/) | Reproducible e2e / two-stage inference and evaluation | | [`postprocess/`](postprocess/) | Shared table conversion, formula/text assembly and repetition handling | | [Hugging Face model](ht
  • Network accessline 53
    | [`postprocess/`](postprocess/) | Shared table conversion, formula/text assembly and repetition handling | | [Hugging Face model](https://huggingface.co/SeerRay-Lab/Xiaomi-OCR-0) | Model card, examples, and benchmark assets | | [ModelScope
  • Network accessline 54
    | [Hugging Face model](https://huggingface.co/SeerRay-Lab/Xiaomi-OCR-0) | Model card, examples, and benchmark assets |
  • Network accessline 55
    | [ModelScope model](https://www.modelscope.cn/models/SeerRay-Lab/Xiaomi-OCR-0) | Model card, examples, and benchmark assets |
  • Network accessline 56
    | [Hugging Face Space](https://huggingface.co/spaces/SeerRay-Lab/Xiaomi-OCR-0/tree/main) | Space assets and project-page source |
  • Network accessline 73
    Read and execute https://raw.githubusercontent.com/SeerRay-Lab/Xiaomi-OCR-0/main/SKILL.md
  • Network accessline 90
    git clone https://github.com/SeerRay-Lab/Xiaomi-OCR-0.git
  • Network accessline 96
    You can run the browser demo without installing the Agent Skill or MCP server. The demo sends requests to a local SGLang or vLLM inference server at `http://127.0.0.1:8000/v1`.
  • Network accessline 102
    - [SGLang installation guide](https://docs.sglang.ai/get_started/install.html) · [supported models](https://docs.sglang.io/docs/supported-models/multimodal_language_models.md)
  • Network accessline 103
    - [vLLM GPU installation guide](https://docs.vllm.ai/en/latest/getting_started/installation/gpu/) · [Qwen3.5 model support](https://docs.vllm.ai/en/latest/api/vllm/model_executor/models/qwen3_5/)
  • Network accessline 138
    Open <http://127.0.0.1:8787>. The interface supports English and Chinese; switch in the header or open <http://127.0.0.1:8787/?lang=en> for English. The same browser page supports whole-page/region document parsing, KIE, VQA, and PDF parsin
  • Network accessline 142
    The [community BF16 GGUF package](https://ollama.com/longwayxu/xiaomi-ocr-0:bf16) includes the text model and vision projector (about 1.8 GB). Install [Ollama](https://ollama.com/download) and keep its local service running, then pull the m
  • Network accessline 156
    export XIAOMI_OCR_BACKEND=ollama export XIAOMI_OCR_MODEL=longwayxu/xiaomi-ocr-0:bf16 export XIAOMI_OCR_LOCAL_URL=http://127.0.0.1:11434/v1
  • Network accessline 157
    export XIAOMI_OCR_MODEL=longwayxu/xiaomi-ocr-0:bf16 export XIAOMI_OCR_LOCAL_URL=http://127.0.0.1:11434/v1 python demo/server.py --port 8787
  • Network accessline 158
    export XIAOMI_OCR_LOCAL_URL=http://127.0.0.1:11434/v1
  • Network accessline 162
    Open <http://127.0.0.1:8787>. Whole-page OCR, PDF parsing, KIE and VQA share the existing pipeline. Region mode additionally requires the layout dependencies described below. See [Ollama setup and validation notes](OLLAMA.md) for direct MCP
  • Network accessline 168
    Region mode additionally needs PaddlePaddle, PaddleX and PP-DocLayoutV3. In the Python environment that runs the Demo or MCP server, follow the official [PaddlePaddle installation guide](https://paddlepaddle.github.io/PaddleX/latest/en/inst
  • Network accessline 169
    environment that runs the Demo or MCP server, follow the official [PaddlePaddle installation guide](https://paddlepaddle.github.io/PaddleX/latest/en/installation/paddlepaddle_install.html) to select a compatible CPU/GPU build, then the
  • Network accessline 170
    [PaddlePaddle installation guide](https://paddlepaddle.github.io/PaddleX/latest/en/installation/paddlepaddle_install.html)
  • Network accessline 171
    to select a compatible CPU/GPU build, then the [PaddleX installation guide](https://paddlepaddle.github.io/PaddleX/latest/en/installation/installation.html). From the repository root, install the layout dependencies:
  • Network accessline 172
    [PaddleX installation guide](https://paddlepaddle.github.io/PaddleX/latest/en/installation/installation.html).
  • Network accessline 188
    [prithivMLmods/Xiaomi-OCR-0-GGUF](https://huggingface.co/prithivMLmods/Xiaomi-OCR-0-GGUF) provides `BF16`, `Q3_K_L`, `Q3_K_M`, `Q4_K_M`, `Q4_K_S`, `Q5_K_M`, `Q5_K_S` and `Q6_K` weights. Image inference also requires the repository's `Xiaomi
  • Network accessline 190
    [xzl01/Xiaomi-OCR-0-GGUF](https://github.com/xzl01/Xiaomi-OCR-0-GGUF) also provides Q4_K_M and Q8_0 llama.cpp weights with an F16 vision projector. See the repository for its conversion scripts and measured results.
  • Network accessline 194
    [ByronLeeee/Xiaomi-OCR-0-Ninfer](https://huggingface.co/ByronLeeee/Xiaomi-OCR-0-Ninfer) provides a BF16 NInfer package with language and vision weights, tokenizer, and image-processing configuration. See its model page for the build guide a
  • Network accessline 198
    ![Parameter efficiency on OmniDocBench v1.6](https://huggingface.co/SeerRay-Lab/Xiaomi-OCR-0/resolve/main/assets/omni-parameters.png)
  • Network accessline 200
    ![Parameter efficiency on OCR-oriented VQA](https://huggingface.co/SeerRay-Lab/Xiaomi-OCR-0/resolve/main/assets/vqa-parameters.png)
  • Network accessline 202
    ![Parameter efficiency on Real5-OmniDocBench](https://huggingface.co/SeerRay-Lab/Xiaomi-OCR-0/resolve/main/assets/real5-parameters.png)
  • Network accessline 204
    ![Parameter efficiency on Wild-OmniDocBench](https://huggingface.co/SeerRay-Lab/Xiaomi-OCR-0/resolve/main/assets/wild-parameters.png)
  • Network accessline 248
    archivePrefix={arXiv},       primaryClass={cs.CV},       url={https://arxiv.org/abs/2609.36136},
  • Network accessline 249
    primaryClass={cs.CV},       url={https://arxiv.org/abs/2609.36136}, }
  • Network accessline 250
    url={https://arxiv.org/abs/2609.36136},

README_zh.md

  • Network accessline 5
    <p><a href="README.md">English</a> · <b>简体中文</b></p> <p>   <a href="https://huggingface.co/SeerRay-Lab/Xiaomi-OCR-0"><img src="https://img.shields.io/badge/Hugging%20Face-Model-FFD21E?logo=huggingface&amp;logoColor=FFD21E" alt="Hugging Face
  • Network accessline 6
    <p>   <a href="https://huggingface.co/SeerRay-Lab/Xiaomi-OCR-0"><img src="https://img.shields.io/badge/Hugging%20Face-Model-FFD21E?logo=huggingface&amp;logoColor=FFD21E" alt="Hugging Face Model"></a>   <a href="https://arxiv.org/abs/2609.36
  • Network accessline 7
    <a href="https://huggingface.co/SeerRay-Lab/Xiaomi-OCR-0"><img src="https://img.shields.io/badge/Hugging%20Face-Model-FFD21E?logo=huggingface&amp;logoColor=FFD21E" alt="Hugging Face Model"></a>
  • Network accessline 8
    <a href="https://arxiv.org/abs/2609.36136"><img src="https://img.shields.io/badge/arXiv-2609.36136-b31b1b.svg" alt="arXiv:2609.36136"></a>
  • Network accessline 9
    <a href="https://huggingface.co/spaces/SeerRay-Lab/Xiaomi-OCR-0"><img src="https://img.shields.io/badge/Project-Page-FF6900?logo=huggingface&amp;logoColor=FFD21E" alt="Project Page"></a>
  • Network accessline 10
    <a href="https://github.com/SeerRay-Lab/Xiaomi-OCR-0"><img src="https://img.shields.io/badge/GitHub-SeerRay--Lab%2FXiaomi--OCR--0-181717?logo=github" alt="GitHub"></a>
  • Network accessline 11
    <a href="https://ollama.com/longwayxu/xiaomi-ocr-0:bf16"><img src="https://img.shields.io/badge/Ollama-BF16%20%28experimental%29-000000?logo=ollama&amp;logoColor=white" alt="Ollama BF16 (experimental)"></a>
  • Network accessline 12
    <a href="https://www.modelscope.cn/models/SeerRay-Lab/Xiaomi-OCR-0"><img src="https://img.shields.io/badge/ModelScope-Model-624AFF?logo=ModelScope&amp;logoColor=white" alt="ModelScope Model"></a>
  • Network accessline 29
    - **2026-10-08:** 感谢社区对 Xiaomi-OCR-0 的支持与贡献:[prithivMLmods 的 GGUF 版本](https://huggingface.co/prithivMLmods/Xiaomi-OCR-0-GGUF)、[xzl01 的 GGUF 版本](https://github.com/xzl01/Xiaomi-OCR-0-GGUF),以及 [ByronLeeee 的 BF16 NInfer 转换版](https://huggingfac
  • Network accessline 49
    | [`evaluation_pipeline/`](evaluation_pipeline/) | 整页 / 两阶段推理与评测复现 | | [`postprocess/`](postprocess/) | 表格转换、公式/文本组装与重复内容处理 | | [Hugging Face model](https://huggingface.co/SeerRay-Lab/Xiaomi-OCR-0) | huggingface模型卡片、示例和基准图表
  • Network accessline 50
    | [`postprocess/`](postprocess/) | 表格转换、公式/文本组装与重复内容处理 | | [Hugging Face model](https://huggingface.co/SeerRay-Lab/Xiaomi-OCR-0) | huggingface模型卡片、示例和基准图表 | [Model Scope model](https://www.modelscope.cn/models/SeerRay-Lab/Xiaomi-OCR-0) | mo
  • Network accessline 51
    | [Hugging Face model](https://huggingface.co/SeerRay-Lab/Xiaomi-OCR-0) | huggingface模型卡片、示例和基准图表
  • Network accessline 52
    | [Model Scope model](https://www.modelscope.cn/models/SeerRay-Lab/Xiaomi-OCR-0) | modelscope模型卡片、示例和基准图表|
  • Network accessline 53
    | [Hugging Face Space](https://huggingface.co/spaces/SeerRay-Lab/Xiaomi-OCR-0/tree/main) | Space 资源和项目页源码 |
  • Network accessline 70
    Read and execute https://raw.githubusercontent.com/SeerRay-Lab/Xiaomi-OCR-0/main/SKILL.md
  • Network accessline 84
    git clone https://github.com/SeerRay-Lab/Xiaomi-OCR-0.git
  • Network accessline 90
    不安装 Agent Skill 或 MCP 服务也能运行网页 Demo。Demo 会向本机的 SGLang 或 vLLM 服务 `http://127.0.0.1:8000/v1` 发送请求。
  • Network accessline 96
    - [SGLang 安装指南](https://docs.sglang.ai/get_started/install.html) · [支持的模型](https://docs.sglang.io/docs/supported-models/multimodal_language_models.md)
  • Network accessline 97
    - [vLLM GPU 安装指南](https://docs.vllm.ai/en/latest/getting_started/installation/gpu/) · [Qwen3.5 模型支持](https://docs.vllm.ai/en/latest/api/vllm/model_executor/models/qwen3_5/)
  • Network accessline 132
    打开 <http://127.0.0.1:8787>。界面支持中英文切换,右上角可选择语言;英文直达链接为 <http://127.0.0.1:8787/?lang=en>。同一网页支持整页/区域文档解析、KIE、VQA 和 PDF 解析。上述 `requirements.txt` 已包含图像、PDF 和公共后处理所需依赖。区域模式可选依赖 PaddlePaddle/PaddleX 与 PP-DocLayoutV3 权重。依赖说明见 [demo/README.md](demo
  • Network accessline 136
    [社区 BF16 GGUF 包](https://ollama.com/longwayxu/xiaomi-ocr-0:bf16)包含语言模型和视觉投影器,约 1.8 GB。安装 [Ollama](https://ollama.com/download) 并保持本地服务运行,然后拉取模型:
  • Network accessline 150
    export XIAOMI_OCR_BACKEND=ollama export XIAOMI_OCR_MODEL=longwayxu/xiaomi-ocr-0:bf16 export XIAOMI_OCR_LOCAL_URL=http://127.0.0.1:11434/v1
  • Network accessline 151
    export XIAOMI_OCR_MODEL=longwayxu/xiaomi-ocr-0:bf16 export XIAOMI_OCR_LOCAL_URL=http://127.0.0.1:11434/v1 python demo/server.py --port 8787
  • Network accessline 152
    export XIAOMI_OCR_LOCAL_URL=http://127.0.0.1:11434/v1
  • Network accessline 156
    打开 <http://127.0.0.1:8787>。整页 OCR、PDF 解析、KIE 和 VQA 复用现有流程;区域模式还需安装下文的版面分析依赖。直接安装 MCP 和转换细节见 [Ollama 配置与验证说明](OLLAMA.md)。
  • Network accessline 160
    区域识别额外需要 PaddlePaddle、PaddleX 和 PP-DocLayoutV3。请在运行 Demo 或 MCP 服务的 Python 环境中,先按 [PaddlePaddle 官方安装教程](https://paddlepaddle.github.io/PaddleX/latest/installation/paddlepaddle_install.html)选择适合操作系统、Python 和 CPU/GPU 的版本,再参考 [PaddleX 官方安装教程](h
  • Network accessline 170
    感谢社区对xiaomi-ocr-0的支持, [prithivMLmods/Xiaomi-OCR-0-GGUF](https://huggingface.co/prithivMLmods/Xiaomi-OCR-0-GGUF) 和 [xzl01/Xiaomi-OCR-0-GGUF](https://github.com/xzl01/Xiaomi-OCR-0-GGUF) 提供了GGUF量化权重, [ByronLeeee/Xiaomi-OCR-0-Ninfer](https://hu
  • Network accessline 175
    ![OmniDocBench v1.6 参数效率](https://huggingface.co/SeerRay-Lab/Xiaomi-OCR-0/resolve/main/assets/omni-parameters.png)
  • Network accessline 177
    ![OCR 导向 VQA 参数效率](https://huggingface.co/SeerRay-Lab/Xiaomi-OCR-0/resolve/main/assets/vqa-parameters.png)
  • Network accessline 179
    ![Real5-OmniDocBench 参数效率](https://huggingface.co/SeerRay-Lab/Xiaomi-OCR-0/resolve/main/assets/real5-parameters.png)
  • Network accessline 181
    ![Wild-OmniDocBench 参数效率](https://huggingface.co/SeerRay-Lab/Xiaomi-OCR-0/resolve/main/assets/wild-parameters.png)
  • Network accessline 224
    archivePrefix={arXiv},       primaryClass={cs.CV},       url={https://arxiv.org/abs/2609.36136},
  • Network accessline 225
    primaryClass={cs.CV},       url={https://arxiv.org/abs/2609.36136}, }
  • Network accessline 226
    url={https://arxiv.org/abs/2609.36136},

SKILL.md

  • Network accessline 11
    Read and execute https://raw.githubusercontent.com/SeerRay-Lab/Xiaomi-OCR-0/main/SKILL.md
  • Network accessline 30
    The runtime imports shared `evaluation_pipeline/` and `postprocess/` modules from the full repository. Reuse a complete checkout or clone `https://github.com/SeerRay-Lab/Xiaomi-OCR-0.git`
  • Network accessline 31
    Reuse a complete checkout or clone `https://github.com/SeerRay-Lab/Xiaomi-OCR-0.git`

THIRD_PARTY_NOTICES.md

  • Network accessline 12
    - License: MIT; the complete upstream license is included in   [demo/static/katex/LICENSE](demo/static/katex/LICENSE). - Source: <https://github.com/KaTeX/KaTeX/tree/v0.16.11>.
  • Network accessline 13
    [demo/static/katex/LICENSE](demo/static/katex/LICENSE). - Source: <https://github.com/KaTeX/KaTeX/tree/v0.16.11>. - Distribution: <https://registry.npmjs.org/katex/-/katex-0.16.11.tgz>.
  • Network accessline 14
    - Source: <https://github.com/KaTeX/KaTeX/tree/v0.16.11>.
  • Network accessline 15
    - Distribution: <https://registry.npmjs.org/katex/-/katex-0.16.11.tgz>.

demo/README.md

  • Network accessline 16
    Open <http://127.0.0.1:8787>. Set `XIAOMI_OCR_LOCAL_URL` if the inference server uses another local port. The demo only accepts loopback inference URLs.
  • Network accessline 41
    - [PaddlePaddle installation guide](https://paddlepaddle.github.io/PaddleX/latest/en/installation/paddlepaddle_install.html)
  • Network accessline 42
    - [PaddleX installation guide](https://paddlepaddle.github.io/PaddleX/latest/en/installation/installation.html)
  • Network accessline 43
    - [PP-DocLayoutV3 model card and weights](https://huggingface.co/PaddlePaddle/PP-DocLayoutV3)
  • Network accessline 49
    If your inference runtime uses a custom served model name, set `XIAOMI_OCR_MODEL` to the exact ID returned by its `/v1/models` endpoint. `XIAOMI_OCR_LOCAL_URL` defaults to `http://127.0.0.1:8000/v1`. Both variables must be set in the termin
  • Network accessline 50
    to the exact ID returned by its `/v1/models` endpoint. `XIAOMI_OCR_LOCAL_URL` defaults to `http://127.0.0.1:8000/v1`. Both variables must be set in the terminal that launches the demo. The connection indicator checks the configured model vi
  • Network accessline 51
    defaults to `http://127.0.0.1:8000/v1`. Both variables must be set in the terminal

demo/server.py

  • Executable scriptline 1
    #!/usr/bin/env python3
  • Possible obfuscationline 62
    normalized = mcp_pipeline()._image_png(base64.b64decode(image_b64, validate=True))
  • Network accessline 85
    [Credential-related source omitted]
  • Access to secretsline 85
    [Credential-related source omitted]
  • Network accessline 86
    [Credential-related source omitted]
  • Access to secretsline 86
    [Credential-related source omitted]
  • Access to secretsline 87
    [Credential-related source omitted]
  • Network accessline 152
    base = base.removesuffix("/chat/completions").rstrip("/")     url = base + ("/models" if base.endswith("/v1") else "/v1/models")     with urllib.request.urlopen(url, timeout=3) as response:
  • Network accessline 153
    url = base + ("/models" if base.endswith("/v1") else "/v1/models")     with urllib.request.urlopen(url, timeout=3) as response:         models = json.load(response).get("data", [])
  • Network accessline 154
    with urllib.request.urlopen(url, timeout=3) as response:
  • Possible obfuscationline 168
    raw = base64.b64decode(image_b64)
  • Network accessline 438
    "Accept": "application/json",     }     req = urllib.request.Request(url, data=data, headers=headers, method="POST")
  • Network accessline 439
    }     req = urllib.request.Request(url, data=data, headers=headers, method="POST")     t0 = time.perf_counter()
  • Network accessline 440
    req = urllib.request.Request(url, data=data, headers=headers, method="POST")
  • Network accessline 441
    t0 = time.perf_counter()     try:         with urllib.request.urlopen(req, timeout=180) as resp:
  • Network accessline 442
    try:         with urllib.request.urlopen(req, timeout=180) as resp:             raw = resp.read()
  • Network accessline 443
    with urllib.request.urlopen(req, timeout=180) as resp:
  • Network accessline 989
    t0 = time.perf_counter()         try:             upstream_req = urllib.request.Request(
  • Network accessline 990
    try:             upstream_req = urllib.request.Request(                 url, data=json.dumps(payload).encode("utf-8"),
  • Network accessline 991
    upstream_req = urllib.request.Request(
  • Network accessline 993
    headers=headers, method="POST",             )             upstream = urllib.request.urlopen(upstream_req, timeout=300)
  • Network accessline 994
    )             upstream = urllib.request.urlopen(upstream_req, timeout=300)         except urllib.error.HTTPError as e:
  • Network accessline 995
    upstream = urllib.request.urlopen(upstream_req, timeout=300)
  • Possible obfuscationline 1096
    png_bytes = base64.b64decode(normalize_image_b64(image_b64))
  • Possible obfuscationline 1140
    png_bytes = base64.b64decode(normalize_image_b64(image_b64))
  • Possible obfuscationline 1255
    data = base64.b64decode(b64, validate=True)
  • Access to secretsline 1284
    [Credential-related source omitted]
  • Network accessline 1297
    BOOK_TMP.mkdir(parents=True, exist_ok=True)     httpd = ThreadingHTTPServer((args.host, args.port), Handler)     url = f"http://{args.host}:{args.port}/"
  • Network accessline 1298
    httpd = ThreadingHTTPServer((args.host, args.port), Handler)     url = f"http://{args.host}:{args.port}/"     print(f"Xiaomi-OCR-0 Demo  →  {url}")
  • Network accessline 1299
    url = f"http://{args.host}:{args.port}/"

demo/static/app.js

  • Executable scriptline 1
    Executable file
  • Network accessline 934
    let res;   try {     res = await fetch("/api/ocr/stream", {
  • Network accessline 935
    try {     res = await fetch("/api/ocr/stream", {       method: "POST",
  • Network accessline 936
    res = await fetch("/api/ocr/stream", {
  • Network accessline 1008
    const timer = setTimeout(() => ac.abort(), 120000);   try {     const res = await fetch("/api/parse/regions", {
  • Network accessline 1009
    try {     const res = await fetch("/api/parse/regions", {       method: "POST",
  • Network accessline 1010
    const res = await fetch("/api/parse/regions", {
  • Network accessline 1035
    const item = itemById(state.activeId);   if (!item || !item.image) throw new Error("无可用图像");   const res = await fetch(item.image);
  • Network accessline 1036
    if (!item || !item.image) throw new Error("无可用图像");   const res = await fetch(item.image);   if (!res.ok) throw new Error("图像加载失败");
  • Network accessline 1037
    const res = await fetch(item.image);
  • Network accessline 1048
    const c = cfg();   const pdfData = await fileToDataUrl(file);   const start = await fetch("/api/book", {
  • Network accessline 1049
    const pdfData = await fileToDataUrl(file);   const start = await fetch("/api/book", {     method: "POST", headers: { "Content-Type": "application/json" },
  • Network accessline 1050
    const start = await fetch("/api/book", {
  • Network accessline 1059
    while (true) {     await new Promise(function (resolve) { setTimeout(resolve, 800); });     const res = await fetch("/api/book/" + encodeURIComponent(started.id));
  • Network accessline 1060
    await new Promise(function (resolve) { setTimeout(resolve, 800); });     const res = await fetch("/api/book/" + encodeURIComponent(started.id));     status = await res.json();
  • Network accessline 1061
    const res = await fetch("/api/book/" + encodeURIComponent(started.id));
  • Network accessline 1073
    if (status.status !== "done" && !status.has_markdown) throw new Error(status.error || "PDF 解析未完成");   $("taskProgressFill").style.width = "100%";   const rawRes = await fetch("/api/book/" + encodeURIComponent(started.id) + "/raw");
  • Network accessline 1074
    $("taskProgressFill").style.width = "100%";   const rawRes = await fetch("/api/book/" + encodeURIComponent(started.id) + "/raw");   const raw = await rawRes.json();
  • Network accessline 1075
    const rawRes = await fetch("/api/book/" + encodeURIComponent(started.id) + "/raw");
  • Network accessline 1206
    function loadShowcase() {   return fetch("/showcase.json")
  • Network accessline 1207
    return fetch("/showcase.json")
  • Network accessline 1302
    async function checkHealth() {   try {     const res = await fetch("/api/health");
  • Network accessline 1303
    try {     const res = await fetch("/api/health");     if (!res.ok) throw new Error("服务检查失败");
  • Network accessline 1304
    const res = await fetch("/api/health");

demo/static/i18n.js

  • Executable scriptline 1
    Executable file

demo/static/img/xiaomi-logo.svg

  • Network accessline 1
    <?xml version="1.0" encoding="utf-8"?> <!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  --> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
  • Network accessline 2
    <!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  --> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg version="1.1" id="Layer_1" xmlns="http://
  • Network accessline 3
    <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
  • Network accessline 4
    <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"

demo/static/index.html

  • Network accessline 16
    <div class="top-right">       <div class="conn" role="status"><span class="dot off" id="connDot"></span><span id="statusText">检查服务…</span></div>       <a class="source-link" href="https://github.com/SeerRay-Lab/Xiaomi-OCR-0" target="_blank"
  • Network accessline 17
    <div class="conn" role="status"><span class="dot off" id="connDot"></span><span id="statusText">检查服务…</span></div>       <a class="source-link" href="https://github.com/SeerRay-Lab/Xiaomi-OCR-0" target="_blank" rel="noreferrer">GitHub ↗</a>
  • Network accessline 18
    <a class="source-link" href="https://github.com/SeerRay-Lab/Xiaomi-OCR-0" target="_blank" rel="noreferrer">GitHub ↗</a>
  • Network accessline 19
    <a class="source-link hf-link" href="https://huggingface.co/SeerRay-Lab/Xiaomi-OCR-0" target="_blank" rel="noreferrer" aria-label="Hugging Face 模型主页"><span class="hf-full">Hugging Face</span><span class="hf-short">HF</span> ↗</a>
  • Network accessline 42
    <label class="task-input" id="kieFieldsWrap" hidden><span>想提取哪些字段?<small>逗号分隔,留空提取主要信息</small></span><input id="kieFields" type="text" placeholder="例如:日期、商户、总额、税额" /></label>         <label class="task-input" id="vqaQuestionWrap" hidden><sp
  • Network accessline 43
    <label class="task-input" id="vqaQuestionWrap" hidden><span>关于这张图,你想了解什么?</span><input id="vqaQuestion" type="text" placeholder="例如:文档中的总金额是多少?" /></label>         <div class="task-note" id="regionPromptNote" hidden><span>区域模式适合印刷文档,将自动检测版面
  • Network accessline 44
    <div class="task-note" id="regionPromptNote" hidden><span>区域模式适合印刷文档,将自动检测版面并分别识别文字、表格和公式。</span> <span id="regionDependencyStatus" role="status">正在检查区域解析依赖…</span><span id="regionInstallHint" hidden> 需要安装 <a href="https://paddlepaddle.gith
  • Network accessline 63
    <section class="community" aria-labelledby="communityTitle">       <div class="community-copy"><span class="eyebrow">BUILT FOR EVERYONE</span><h2 id="communityTitle">科技不是高高在上,<br />而是服务于每一个人。</h2><p>如果它帮到了你,欢迎点亮 GitHub 的 Star 和 Hugging Face
  • Network accessline 64
    <div class="community-copy"><span class="eyebrow">BUILT FOR EVERYONE</span><h2 id="communityTitle">科技不是高高在上,<br />而是服务于每一个人。</h2><p>如果它帮到了你,欢迎点亮 GitHub 的 Star 和 Hugging Face 的 Like。<br />如果还不够好,也请留下 Issue,让我们持续改进。</p></div>       <div class
  • Network accessline 65
    <div class="community-actions"><div class="support-links"><a href="https://github.com/SeerRay-Lab/Xiaomi-OCR-0" target="_blank" rel="noreferrer"><span aria-hidden="true">☆</span> GitHub Star <span aria-hidden="true">↗</span></a><a href="htt

demo/static/katex/katex.min.js

  • Possible obfuscationline 1
    [Credential-related source omitted]
  • Executable scriptline 1
    [Credential-related source omitted]

evaluation_pipeline/README.md

  • Network accessline 12
    The evaluation environment follows the [Environment Setup and Running instructions in OmniDocBench](https://github.com/opendatalab/OmniDocBench/blob/main/README.md#environment-setup-and-running). The main components are:

evaluation_pipeline/README_zh.md

  • Network accessline 12
    评测环境参考 [OmniDocBench 的 Environment Setup and Running 说明](https://github.com/opendatalab/OmniDocBench/blob/main/README.md#environment-setup-and-running),主要组件如下:

evaluation_pipeline/__init__.py

  • Executable scriptline 1
    Executable file

evaluation_pipeline/cropping.py

  • Executable scriptline 1
    Executable file

evaluation_pipeline/e2e_img2md.py

  • Executable scriptline 1
    #!/usr/bin/env python3
  • Network accessline 173
    url = f"http://127.0.0.1:{port}/v1/models"     no_proxy = urllib.request.ProxyHandler({})
  • Network accessline 179
    return False, int(time.time() - start)         try:             req = urllib.request.Request(url, method="GET")
  • Network accessline 180
    try:             req = urllib.request.Request(url, method="GET")             with opener.open(req, timeout=5) as resp:
  • Network accessline 181
    req = urllib.request.Request(url, method="GET")
  • Access to secretsline 227
    [Credential-related source omitted]
  • Network accessline 727
    [Credential-related source omitted]
  • Network accessline 728
    [Credential-related source omitted]
  • Access to secretsline 728
    [Credential-related source omitted]

evaluation_pipeline/layout_detect_paddlex.py

  • Executable scriptline 1
    #!/usr/bin/env python3
  • Access to secretsline 165
    [Credential-related source omitted]

evaluation_pipeline/twostage_img2md.py

  • Executable scriptline 1
    #!/usr/bin/env python3
  • Network accessline 439
    def wait_for_service(port, proc, timeout=1200, interval=5):     url = f"http://127.0.0.1:{port}/v1/models"     no_proxy = urllib.request.ProxyHandler({})
  • Network accessline 440
    url = f"http://127.0.0.1:{port}/v1/models"     no_proxy = urllib.request.ProxyHandler({})     opener = urllib.request.build_opener(no_proxy)
  • Network accessline 446
    return False, int(time.time() - start)         try:             req = urllib.request.Request(url, method="GET")
  • Network accessline 447
    try:             req = urllib.request.Request(url, method="GET")             with opener.open(req, timeout=5) as resp:
  • Network accessline 448
    req = urllib.request.Request(url, method="GET")
  • Access to secretsline 479
    [Credential-related source omitted]
  • Network accessline 766
    [Credential-related source omitted]
  • Network accessline 767
    [Credential-related source omitted]
  • Network accessline 768
    [Credential-related source omitted]
  • Access to secretsline 768
    [Credential-related source omitted]

example_pics/receipt.md

  • Dangerous shell operationline 25
    Total Incl. GST@6% RM 5.90
  • Dangerous shell operationline 27
    CASH RM 5.90

examples/mcp-config.json

  • Network accessline 7
    ],       "env": {         "XIAOMI_OCR_LOCAL_URL": "http://127.0.0.1:8000/v1",
  • Network accessline 8
    "env": {         "XIAOMI_OCR_LOCAL_URL": "http://127.0.0.1:8000/v1",         "XIAOMI_OCR_MODEL": "SeerRay-Lab/Xiaomi-OCR-0"
  • Network accessline 9
    "XIAOMI_OCR_LOCAL_URL": "http://127.0.0.1:8000/v1",

postprocess/__init__.py

  • Executable scriptline 1
    Executable file

postprocess/assemble_markdown.py

  • Executable scriptline 1
    #!/usr/bin/env python3

postprocess/document.py

  • Executable scriptline 1
    Executable file

postprocess/markdown_merge.py

  • Executable scriptline 1
    #!/usr/bin/env python3

postprocess/otsl.py

  • Executable scriptline 1
    Executable file

postprocess/region.py

  • Executable scriptline 1
    Executable file

postprocess/repetition_guard.py

  • Executable scriptline 1
    #!/usr/bin/env python3

skills/xiaomi-ocr/SKILL.md

  • Network accessline 45
    | Service | `XIAOMI_OCR_BACKEND` | `XIAOMI_OCR_LOCAL_URL` (default) | `XIAOMI_OCR_MODEL` (default) | | --- | --- | --- | --- | | SGLang / vLLM | `openai` | `http://127.0.0.1:8000/v1` | `SeerRay-Lab/Xiaomi-OCR-0` |
  • Network accessline 46
    | --- | --- | --- | --- | | SGLang / vLLM | `openai` | `http://127.0.0.1:8000/v1` | `SeerRay-Lab/Xiaomi-OCR-0` | | Ollama | `ollama` | `http://127.0.0.1:11434/v1` | `longwayxu/xiaomi-ocr-0:bf16` |
  • Network accessline 47
    | SGLang / vLLM | `openai` | `http://127.0.0.1:8000/v1` | `SeerRay-Lab/Xiaomi-OCR-0` |
  • Network accessline 48
    | Ollama | `ollama` | `http://127.0.0.1:11434/v1` | `longwayxu/xiaomi-ocr-0:bf16` |
  • Network accessline 101
    Check the OS, Python version, CPU/GPU support and available GPU memory against the official    [PaddlePaddle installation guide](https://paddlepaddle.github.io/PaddleX/latest/en/installation/paddlepaddle_install.html)
  • Network accessline 102
    [PaddlePaddle installation guide](https://paddlepaddle.github.io/PaddleX/latest/en/installation/paddlepaddle_install.html)
  • Network accessline 103
    and [PaddleX installation guide](https://paddlepaddle.github.io/PaddleX/latest/en/installation/installation.html).
  • Network accessline 111
    Load PP-DocLayoutV3 locally (the first use may download its    [weights](https://huggingface.co/PaddlePaddle/PP-DocLayoutV3)), then verify one real
  • Network accessline 112
    [weights](https://huggingface.co/PaddlePaddle/PP-DocLayoutV3)), then verify one real
  • Network accessline 118
    Official runtime references: [SGLang Qwen3.5 guide](https://github.com/sgl-project/sglang/blob/main/docs_new/cookbook/autoregressive/Qwen/Qwen3.5.mdx) ·
  • Network accessline 119
    [SGLang Qwen3.5 guide](https://github.com/sgl-project/sglang/blob/main/docs_new/cookbook/autoregressive/Qwen/Qwen3.5.mdx) ·
  • Network accessline 120
    [vLLM Qwen3.5 model implementation](https://docs.vllm.ai/en/latest/api/vllm/model_executor/models/qwen3_5/) ·
  • Network accessline 121
    [vLLM supported models](https://docs.vllm.ai/en/latest/models/supported_models/).

skills/xiaomi-ocr/install.sh

  • Executable scriptline 1
    #!/usr/bin/env bash
  • Network accessline 5
    SKILL_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" LOCAL_URL="${XIAOMI_OCR_LOCAL_URL:-http://127.0.0.1:8000/v1}"
  • Network accessline 6
    LOCAL_URL="${XIAOMI_OCR_LOCAL_URL:-http://127.0.0.1:8000/v1}"
  • Network accessline 28
    if [[ "$LOCAL_URL" != http://127.0.0.1:* && "$LOCAL_URL" != http://localhost:* && "$LOCAL_URL" != http://\[::1\]:* ]]; then
  • Network accessline 52
    fi export XIAOMI_OCR_REPO="$REPO_DIR" "$PY" - "$SKILL_DIR/mcp-config.json" "$PY" "$SKILL_DIR/mcp_ocr_server.py" "$LOCAL_URL" "$MODEL" "$REPO_DIR" <<'PYCONFIG'
  • Network accessline 53
    export XIAOMI_OCR_REPO="$REPO_DIR" "$PY" - "$SKILL_DIR/mcp-config.json" "$PY" "$SKILL_DIR/mcp_ocr_server.py" "$LOCAL_URL" "$MODEL" "$REPO_DIR" <<'PYCONFIG' import json, sys
  • Network accessline 54
    "$PY" - "$SKILL_DIR/mcp-config.json" "$PY" "$SKILL_DIR/mcp_ocr_server.py" "$LOCAL_URL" "$MODEL" "$REPO_DIR" <<'PYCONFIG'

skills/xiaomi-ocr/mcp_ocr_server.py

  • Executable scriptline 1
    #!/usr/bin/env python3
  • Access to secretsline 26
    [Credential-related source omitted]
  • Network accessline 32
    [Credential-related source omitted]
  • Access to secretsline 32
    [Credential-related source omitted]
  • Access to secretsline 33
    [Credential-related source omitted]
  • Access to secretsline 34
    [Credential-related source omitted]
  • Access to secretsline 35
    [Credential-related source omitted]
  • Access to secretsline 36
    [Credential-related source omitted]
  • Network accessline 64
    parsed = urllib.parse.urlparse(base)     if parsed.scheme != "http" or parsed.hostname not in {"127.0.0.1", "localhost", "::1"}:         raise RuntimeError("XIAOMI_OCR_LOCAL_URL must point to a local http://127.0.0.1 inference server")
  • Network accessline 65
    if parsed.scheme != "http" or parsed.hostname not in {"127.0.0.1", "localhost", "::1"}:         raise RuntimeError("XIAOMI_OCR_LOCAL_URL must point to a local http://127.0.0.1 inference server")     return base
  • Network accessline 66
    raise RuntimeError("XIAOMI_OCR_LOCAL_URL must point to a local http://127.0.0.1 inference server")
  • Network accessline 70
    def _http_json(url: str, payload: dict, timeout: int = 300) -> dict:     req = urllib.request.Request(url, data=json.dumps(payload).encode(),
  • Network accessline 71
    req = urllib.request.Request(url, data=json.dumps(payload).encode(),
  • Network accessline 72
    headers={"Content-Type": "application/json"}, method="POST")     try:         with urllib.request.urlopen(req, timeout=timeout) as resp:
  • Network accessline 73
    try:         with urllib.request.urlopen(req, timeout=timeout) as resp:             return json.loads(resp.read())
  • Network accessline 74
    with urllib.request.urlopen(req, timeout=timeout) as resp:
  • Network accessline 115
    return p.read_bytes()     if url:         with urllib.request.urlopen(url, timeout=30) as response:
  • Network accessline 116
    if url:         with urllib.request.urlopen(url, timeout=30) as response:             return response.read()
  • Network accessline 117
    with urllib.request.urlopen(url, timeout=30) as response:
  • Possible obfuscationline 121
    raw = base64.b64decode(b64.split(",", 1)[-1], validate=True)
  • Access to secretsline 155
    [Credential-related source omitted]
  • Access to secretsline 156
    [Credential-related source omitted]
  • Access to secretsline 157
    [Credential-related source omitted]
  • Access to secretsline 158
    [Credential-related source omitted]

skills/xiaomi-ocr/scripts/otsl_convert.py

  • Executable scriptline 1
    #!/usr/bin/env python3

skills/xiaomi-ocr/scripts/register_codex_mcp.py

  • Executable scriptline 1
    #!/usr/bin/env python3
  • Access to secretsline 40
    [Credential-related source omitted]
  • Access to secretsline 43
    [Credential-related source omitted]
  • Network accessline 47
    [Credential-related source omitted]
  • Access to secretsline 47
    [Credential-related source omitted]
  • Network accessline 48
    [Credential-related source omitted]
  • Access to secretsline 48
    [Credential-related source omitted]
  • Network accessline 49
    if not endpoint.startswith(("http://127.0.0.1:", "http://localhost:", "http://[::1]:")):
  • Access to secretsline 55
    [Credential-related source omitted]

skills/xiaomi-ocr/scripts/selftest.py

  • Executable scriptline 1
    #!/usr/bin/env python3

How the signals fit together

Facts from a static read of the files at the pinned commit. They describe what the code does, not why.

Some files could not be read; the facts below still hold.

Signal confidence: 257 facts
  • Network access in prose of documentationINSTALL.md:29Low confidence
  • Network access in prose of documentationINSTALL.md:30Low confidence
  • Network access in prose of documentationINSTALL.md:31Low confidence
  • Network access in prose of documentationINSTALL.md:53Low confidence
  • Network access in prose of documentationINSTALL.md:62Low confidence
  • Network access in code of documentationINSTALL.md:73Low confidence
  • Network access in code of documentationINSTALL.md:81Low confidence
  • Network access in prose of documentationINSTALL.md:92Low confidence
  • Network access in prose of documentationINSTALL.md:94Low confidence
  • Network access in prose of documentationINSTALL.md:103Low confidence
  • Network access in prose of documentationINSTALL.md:104Low confidence
  • Network access in prose of documentationINSTALL.md:105Low confidence
  • Network access in code of documentationOLLAMA.md:41Low confidence
  • Network access in code of documentationOLLAMA.md:41Low confidence
  • Network access in code of documentationOLLAMA.md:42Low confidence
  • Network access in code of documentationOLLAMA.md:42Low confidence
  • Network access in code of documentationOLLAMA.md:43Low confidence
  • Network access in code of documentationOLLAMA.md:43Low confidence
  • Network access in code of documentationOLLAMA.md:59Low confidence
  • Network access in code of documentationOLLAMA.md:59Low confidence
  • Network access in code of documentationOLLAMA.md:60Low confidence
  • Network access in code of documentationOLLAMA.md:60Low confidence
  • Network access in prose of documentationREADME.md:5Low confidence
  • Network access in prose of documentationREADME.md:6Low confidence
  • Network access in prose of documentationREADME.md:7Low confidence
  • Network access in prose of documentationREADME.md:8Low confidence
  • Network access in prose of documentationREADME.md:9Low confidence
  • Network access in prose of documentationREADME.md:10Low confidence
  • Network access in prose of documentationREADME.md:11Low confidence
  • Network access in prose of documentationREADME.md:12Low confidence
  • Network access in prose of documentationREADME.md:32Low confidence
  • Network access in prose of documentationREADME.md:52Low confidence
  • Network access in prose of documentationREADME.md:53Low confidence
  • Network access in prose of documentationREADME.md:54Low confidence
  • Network access in prose of documentationREADME.md:55Low confidence
  • Network access in prose of documentationREADME.md:56Low confidence
  • Network access in code of documentationREADME.md:73Low confidence
  • Network access in code of documentationREADME.md:90Low confidence
  • Network access in prose of documentationREADME.md:96Low confidence
  • Network access in prose of documentationREADME.md:102Low confidence
  • Network access in prose of documentationREADME.md:103Low confidence
  • Network access in prose of documentationREADME.md:138Low confidence
  • Network access in prose of documentationREADME.md:142Low confidence
  • Network access in code of documentationREADME.md:156Low confidence
  • Network access in code of documentationREADME.md:157Low confidence
  • Network access in code of documentationREADME.md:158Low confidence
  • Network access in prose of documentationREADME.md:162Low confidence
  • Network access in prose of documentationREADME.md:168Low confidence
  • Network access in prose of documentationREADME.md:169Low confidence
  • Network access in prose of documentationREADME.md:170Low confidence

and 207 more

Works with

Agent compatibility, from the files in this repository
AgentStatusEvidenceInstall to
Claude CodeCompatibleStandard SKILL.md SKILL.md.claude/skills/<skill-name>/
CodexCompatibleStandard SKILL.md SKILL.md.agents/skills/<skill-name>/
CursorCompatibleStandard SKILL.md SKILL.md.cursor/skills/<skill-name>/
Gemini CLICompatibleStandard SKILL.md SKILL.md.gemini/skills/<skill-name>/
GitHub CopilotCompatibleStandard SKILL.md SKILL.md.github/skills/<skill-name>/
OpenCodeCompatibleStandard SKILL.md SKILL.md.opencode/skills/<skill-name>/
  • Native The repository ships a manifest, folder or frontmatter field for this agent.
  • Compatible A standard SKILL.md that this agent can read.
  • Unknown No evidence either way.

Derived automatically from paths, manifests and frontmatter. Not tested on each agent.

Explore alternatives and comparisons

Add this badge to your README

It updates every night and links to this page.

xiaomi-research/Xiaomi-OCR-0: #925 on hotskills, 963 stars

[![xiaomi-research/Xiaomi-OCR-0 on hotskills](https://hotskills.dev/badge/xiaomi-research-xiaomi-ocr-0.svg)](https://hotskills.dev/skill/xiaomi-research-xiaomi-ocr-0/)