|
|
1 周之前 | |
|---|---|---|
| .. | ||
| README.md | 1 周之前 | |
| batch_merge_results.py | 1 周之前 | |
| batch_process_pdf.py | 1 周之前 | |
| pdf_list.txt | 1 周之前 | |
| processor_configs.yaml | 1 周之前 | |
位置: ocr_platform/ocr_tools/ocr_batch/
处理器配置文件: processor_configs.yaml
# 1. 使用 DotsOCR(自动切换到 py312 环境)
python batch_process_pdf.py -p dotsocr_vllm -f pdf_list.txt
# 2. 使用 MinerU(自动切换到 mineru2 环境)
python batch_process_pdf.py -p mineru_vllm -f pdf_list.txt
# 3. 使用 PaddleOCR(自动切换到 paddle_env)
python batch_process_pdf.py -p paddleocr_vl_single_process -f pdf_list.txt
# 4. 模拟运行查看完整命令
python batch_process_pdf.py -p dotsocr_vllm -f pdf_list.txt --dry-run -v
# 5. 覆盖虚拟环境
python batch_process_pdf.py -p dotsocr_vllm -f pdf_list.txt \
--venv "conda activate custom_env"
# 6. 手动指定脚本和虚拟环境
python batch_process_pdf.py \
-s /path/to/script.py \
--venv "conda activate myenv" \
-f pdf_list.txt
# 7. 指定文件
python batch_process_pdf.py -p mineru_vllm -l 施博深.pdf
python batch_process_pdf.py -p paddleocr_vl_single_process -l 施博深.pdf
python batch_process_pdf.py -p dotsocr_vllm -l 施博深.pdf
python batch_process_pdf.py -p ppstructurev3_single_client -l 施博深.pdf
conda activate py312 && python /path/to/dotsocr_vllm_multthreads.py \
--input /path/to/file.pdf \
--output_dir /path/to/output \
--ip=10.192.72.11 --port=8101 --dpi=200
conda activate mineru2 && python /path/to/mineru2_vllm_multthreads.py \
--input /path/to/file.pdf \
--output_dir /path/to/output \
--server_url=http://10.192.72.11:8121
source /path/to/paddle_env/bin/activate && python /path/to/ocr_platform/ocr_tools/paddle_vl_tool/main.py \
--input /path/to/file.pdf \
--output_dir /path/to/output \
--pipeline=/path/to/config.yaml
source /path/to/paddle_env/bin/activate && python /path/to/ocr_platform/ocr_tools/ppstructure_tool/main.py \
--input /path/to/file.pdf \
--output_dir /path/to/output \
--pipeline=/path/to/config.yaml
source /path/to/paddle_env/bin/activate && python /path/to/ocr_platform/ocr_tools/ppstructure_tool/api_client.py \
--input /path/to/file.pdf \
--output_dir /path/to/output \
--api_url=http://10.192.72.11:8111/layout-parsing