Image-Text-to-Text
MiniCPM-OCR
Safetensors
English
Chinese
minicpm_ocr
ocr
document-parsing
multimodal
vision-language
table-recognition
formula-recognition
conversational
Eval Results
Instructions to use openbmb/MiniCPM-OCR-1.0 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MiniCPM-OCR
How to use openbmb/MiniCPM-OCR-1.0 with MiniCPM-OCR:
pip install "minicpm-ocr[all]" huggingface_hub # Deploy openbmb/MiniCPM-OCR-1.0 as a recognition service before running the Python example: # https://github.com/OpenBMB/MiniCPM-OCR/blob/main/docs/vllm_deploy_en.md # vLLM: load the model above; use --port 8080, # --served-model-name minicpm-ocr and --max-model-len 40960. # Layout detection uses cuda:0; recognition runs on the deployed service.
from importlib.resources import files from pathlib import Path from minicpmvocr import load_config, pipelined_run from huggingface_hub import snapshot_download layout_model = snapshot_download("PaddlePaddle/PP-DocLayoutV3") cfg = load_config( str(files("minicpmvocr").joinpath("configs/minicpmvocr.yaml")), overrides={ "input": {"file_path": str(Path("demo.png").resolve())}, "engine": { "type": "vllm", "server_url": "http://127.0.0.1:8080", "model_name": "minicpm-ocr", "max_model_len": 40960, }, "layout": {"model_dir": layout_model, "device": "cuda:0"}, # Render PDFs in-process so this example also works without a main guard. "pipeline": {"overlap_layout": True, "render_workers": 1}, }, ) pipelined_run(cfg) - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,17 +1,19 @@
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
| 3 |
language:
|
| 4 |
-
|
| 5 |
-
|
| 6 |
pipeline_tag: image-text-to-text
|
| 7 |
tags:
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
|
|
|
|
|
|
| 15 |
---
|
| 16 |
|
| 17 |
<div align="center">
|
|
@@ -226,4 +228,4 @@ Installation, model downloads, GPU memory, input formats, and unexpected outputs
|
|
| 226 |
## License
|
| 227 |
|
| 228 |
Model weights, code, and documentation are released under the
|
| 229 |
-
[Apache License 2.0](https://github.com/OpenBMB/MiniCPM-OCR/blob/main/LICENSE).
|
|
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
| 3 |
language:
|
| 4 |
+
- en
|
| 5 |
+
- zh
|
| 6 |
pipeline_tag: image-text-to-text
|
| 7 |
tags:
|
| 8 |
+
- minicpm-ocr
|
| 9 |
+
- ocr
|
| 10 |
+
- document-parsing
|
| 11 |
+
- multimodal
|
| 12 |
+
- vision-language
|
| 13 |
+
- table-recognition
|
| 14 |
+
- formula-recognition
|
| 15 |
+
base_model:
|
| 16 |
+
- openbmb/MiniCPM-V-4.6
|
| 17 |
---
|
| 18 |
|
| 19 |
<div align="center">
|
|
|
|
| 228 |
## License
|
| 229 |
|
| 230 |
Model weights, code, and documentation are released under the
|
| 231 |
+
[Apache License 2.0](https://github.com/OpenBMB/MiniCPM-OCR/blob/main/LICENSE).
|