Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets
  • Docs
  • Enterprise
  • Pricing
    • Website
      • Tasks
      • HuggingChat
      • Collections
      • Languages
      • Organizations
    • Community
      • Blog
      • Posts
      • Daily Papers
      • Hardware
      • Learn
      • Discord
      • Forum
      • GitHub
    • Solutions
      • Team & Enterprise
      • Hugging Face PRO
      • Enterprise Support
      • Inference Providers
      • Inference Endpoints
      • Storage Buckets

  • Log In
  • Sign Up

openbmb
/
MiniCPM-OCR-1.0

Image-Text-to-Text
MiniCPM-OCR
Safetensors
English
Chinese
minicpm_ocr
ocr
document-parsing
multimodal
vision-language
table-recognition
formula-recognition
conversational
Eval Results
Model card Files Files and versions
xet
Community
16

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
MiniCPM-OCR-1.0
2.62 GB
Ctrl+K
Ctrl+K
  • 9 contributors
History: 37 commits
changdazhou's picture
changdazhou
Add Real5-OmniDocBench evaluation results for MiniCPM-OCR-1.0
37246b9 verified 10 days ago
  • .eval_results
    Add Real5-OmniDocBench evaluation results for MiniCPM-OCR-1.0 10 days ago
  • .gitattributes
    2.21 kB
    docs: sync with latest GitHub (OpenBMB links, examples, KIE, seal/chart prompts) 16 days ago
  • README.md
    15.5 kB
    Add CLI document parsing example alongside Python API 10 days ago
  • chat_template.jinja
    7.34 kB
    Update chat_template.jinja (#1) 21 days ago
  • config.json
    2.28 kB
    Update config.json 16 days ago
  • generation_config.json
    133 Bytes
    Update generation_config.json 16 days ago
  • model.safetensors
    2.6 GB
    xet
    update model weights 20 days ago
  • preprocessor_config.json
    340 Bytes
    init 22 days ago
  • processor_config.json
    46 Bytes
    init 22 days ago
  • tokenizer.json
    20 MB
    xet
    init 22 days ago
  • tokenizer_config.json
    1.46 kB
    Update tokenizer_config.json (#4) 21 days ago