Transforms complex documents like PDFs and Office docs into LLM-ready markdown/JSON for your Agentic workflows.
Python ai4sciencedocument-analysisdocxextract-datalayout-analysisocrparserpdfpdf-converterpdf-extractor-llmpdf-extractor-pretrainpdf-extractor-ragpdf-parserpptxpythonxlsx
refactor: update backend descriptions to include hybrid options for improved clarity
myhlolic9eb7d4ca013
diff --git a/mineru/cli/client.py b/mineru/cli/client.pyindex 381241ae..927ad117 100644--- a/mineru/cli/client.py+++ b/mineru/cli/client.py@@ -62,7 +62,7 @@ if is_mac_os_version_supported():txt: Use text extraction method.ocr: Use OCR method for image-based PDFs.Without method specified, 'auto' will be used by default.- Adapted only for the case where the backend is set to 'pipeline'.""",+ Adapted only for the case where the backend is set to 'pipeline' and 'hybrid-*'.""",default='auto',)@click.option(@@ -73,10 +73,10 @@ if is_mac_os_version_supported():help="""\bthe backend for parsing pdf:pipeline: More general.- vlm-auto-engine: High Accuracy(auto select between transformers/vllm/lmdeploy/mlx).- vlm-http-client: High Accuracy(client suitable for openai-compatible servers).- hybrid-auto-engine: Next-generation high accuracy solution(auto select between transformers/vllm/lmdeploy/mlx).- hybrid-http-client: High accuracy but requires a little local computing power(client suitable for openai-compatible servers)+ vlm-auto-engine: High accuracy via local computing power.+ vlm-http-client: High accuracy via remote computing power(client suitable for openai-compatible servers).+ hybrid-auto-engine: Next-generation high accuracy solution via local computing power.+ hybrid-http-client: High accuracy but requires a little local computing power(client suitable for openai-compatible servers).Without method specified, pipeline will be used by default.""",default='pipeline',)@@ -89,7 +89,7 @@ if is_mac_os_version_supported():help="""Input the languages in the pdf (if known) to improve OCR accuracy.Without languages specified, 'ch' will be used by default.- Adapted only for the case where the backend is set to "pipeline".+ Adapted only for the case where the backend is set to 'pipeline' and 'hybrid-*'.""",default='ch',)@@ -99,7 +99,7 @@ if is_mac_os_version_supported():'server_url',type=str,help="""- When the backend is `vlm-http-client`, you need to specify the server_url, for example:`http://127.0.0.1:30000`+ When the backend is `<vlm/hybrid>-http-client`, you need to specify the server_url, for example:`http://127.0.0.1:30000`""",default=None,)diff --git a/mineru/cli/fast_api.py b/mineru/cli/fast_api.pyindex ee919179..50ee5dcf 100644--- a/mineru/cli/fast_api.py+++ b/mineru/cli/fast_api.py@@ -105,23 +105,22 @@ async def parse_pdf(output_dir: str = Form("./output", description="Output local directory"),lang_list: List[str] = Form(["ch"],- description="""(Adapted only for pipeline backend)Input the languages in the pdf to improve OCR accuracy.+ description="""(Adapted only for pipeline and hybrid backend)Input the languages in the pdf to improve OCR accuracy.Options: ch, ch_server, ch_lite, en, korean, japan, chinese_cht, ta, te, ka, th, el, latin, arabic, east_slavic, cyrillic, devanagari."""),backend: str = Form("pipeline",description="""The backend for parsing:-- pipeline: More general-- vlm-transformers: More general, but slower-- vlm-mlx-engine: Faster than transformers (need apple silicon and macOS 13.5+)-- vlm-vllm-async-engine: Faster (vllm-engine, need vllm installed)-- vlm-lmdeploy-engine: Faster (lmdeploy-engine, need lmdeploy installed)-- vlm-http-client: Faster (client suitable for openai-compatible servers)"""+- pipeline: More general.+- vlm-auto-engine: High accuracy via local computing power.+- vlm-http-client: High accuracy via remote computing power(client suitable for openai-compatible servers).+- hybrid-auto-engine: Next-generation high accuracy solution via local computing power.+- hybrid-http-client: High accuracy via remote computing power but requires a little local computing power(client suitable for openai-compatible servers)."""),parse_method: str = Form("auto",- description="""(Adapted only for pipeline backend)The method for parsing PDF:+ description="""(Adapted only for pipeline and hybrid backend)The method for parsing PDF:- auto: Automatically determine the method based on the file type- txt: Use text extraction method- ocr: Use OCR method for image-based PDFs@@ -131,7 +130,7 @@ Options: ch, ch_server, ch_lite, en, korean, japan, chinese_cht, ta, te, ka, th,table_enable: bool = Form(True, description="Enable table parsing."),server_url: Optional[str] = Form(None,- description="(Adapted only for vlm-http-client backend)openai compatible server url, e.g., http://127.0.0.1:30000"+ description="(Adapted only for <vlm/hybrid>-http-client backend)openai compatible server url, e.g., http://127.0.0.1:30000"),return_md: bool = Form(True, description="Return markdown content in response"),return_middle_json: bool = Form(False, description="Return middle JSON in response"),