MinerU magic-pdf安装步骤

PP-DocLayoutV3 文档版面分析模型v1.0

PP-DocLayoutV3 是飞桨(PaddlePaddle)开源的先进文档版面分析模型。该模型能够精准识别文档中的正文、标题、表格、图片、页眉页脚等十余类版面区域,并输出像素级坐标定位。针对中文文档优化设计,支持论文、合同、书籍、报纸等复杂版式的高精度分析。作为OCR前置引擎,可有效划分文字区域与图表区域,提升后续文字识别准确率;同时支持版面还原与结构化输出,广泛应用于档案数字化、智能文档处理

安装anaconda之后,创建虚拟环境

conda create -n MinerU python=3.10
conda activate MinerU
pip install -U magic-pdf==1.2.2 --user --extra-index-url https://wheels.myhloli.com 
pip install Pillow -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install paddlepaddle -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install opencv-python  -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install ultralytics  -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install doclayout_yolo  -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install pycocotools  -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install detectron2 --extra-index-url https://myhloli.github.io/wheels/
pip install timm  -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install unimernet  -i https://pypi.tuna.tsinghua.edu.cn/
pip install paddleocr  -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install rapid_table  -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install struct_eqtable  -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install openai  -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install rapidocr_onnxruntime  -i https://pypi.tuna.tsinghua.edu.cn/simple

然后需要安装支撑的AI模型

wget https://github.com/opendatalab/MinerU/raw/master/scripts/download_models_hf.py -O download_models_hf.py
python download_models_hf.py

之后便能运用cpu使用命令转换了。

如果要用GPU则需要修改magic-pdf.json,且安装PaddlePaddle的GPU版本。

命令格式:magic-pdf -p "pdf所在路径" -o "输出到哪个文件夹" -m auto

您可能感兴趣的与本文相关的镜像

PP-DocLayoutV3 文档版面分析模型v1.0

PP-DocLayoutV3 文档版面分析模型v1.0

PaddlePaddle
OCR
PDF

PP-DocLayoutV3 是飞桨(PaddlePaddle)开源的先进文档版面分析模型。该模型能够精准识别文档中的正文、标题、表格、图片、页眉页脚等十余类版面区域,并输出像素级坐标定位。针对中文文档优化设计,支持论文、合同、书籍、报纸等复杂版式的高精度分析。作为OCR前置引擎,可有效划分文字区域与图表区域,提升后续文字识别准确率;同时支持版面还原与结构化输出,广泛应用于档案数字化、智能文档处理

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值