Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
wangsen
MinerU
Commits
ebe97809
"...resnet50_tensorflow.git" did not exist on "ab5d41800d13d33485b67e465e3e4786d8404fb0"
Unverified
Commit
ebe97809
authored
Nov 11, 2024
by
Xiaomeng Zhao
Committed by
GitHub
Nov 11, 2024
Browse files
Merge pull request #928 from icecraft/docs/using_raw_zh
parents
fe7b811b
24416f96
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
170 additions
and
147 deletions
+170
-147
next_docs/zh_cn/additional_notes/faq.rst
next_docs/zh_cn/additional_notes/faq.rst
+11
-17
next_docs/zh_cn/user_guide/install/boost_with_cuda.rst
next_docs/zh_cn/user_guide/install/boost_with_cuda.rst
+106
-105
next_docs/zh_cn/user_guide/install/download_model_weight_files.rst
.../zh_cn/user_guide/install/download_model_weight_files.rst
+45
-17
next_docs/zh_cn/user_guide/install/install.rst
next_docs/zh_cn/user_guide/install/install.rst
+8
-8
No files found.
next_docs/zh_cn/additional_notes/faq.rst
View file @
ebe97809
...
@@ -2,11 +2,9 @@
...
@@ -2,11 +2,9 @@
============
============
1.在较新版本的mac上使用命令安装pip install magic-pdf[full] zsh: no matches found: magic-pdf[full]
1.在较新版本的mac上使用命令安装pip install magic-pdf[full] zsh: no matches found: magic-pdf[full]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
在 macOS 上,默认的 shell 从 Bash 切换到了 Z shell,而 Z shell
在 macOS 上,默认的 shell 从 Bash 切换到了 Z shell,而 Z shell 对于某些类型的字符串匹配有特殊的处理逻辑,这可能导致no matches found错误。 可以通过在命令行禁用globbing特性,再尝试运行安装命令
对于某些类型的字符串匹配有特殊的处理逻辑,这可能导致no matches
found错误。 可以通过在命令行禁用globbing特性,再尝试运行安装命令
.. code:: bash
.. code:: bash
...
@@ -14,13 +12,12 @@ found错误。 可以通过在命令行禁用globbing特性,再尝试运行安
...
@@ -14,13 +12,12 @@ found错误。 可以通过在命令行禁用globbing特性,再尝试运行安
pip install magic-pdf[full]
pip install magic-pdf[full]
2.使用过程中遇到_pickle.UnpicklingError: invalid load key, ‘v’.错误
2.使用过程中遇到_pickle.UnpicklingError: invalid load key, ‘v’.错误
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
可能是由于模型文件未下载完整导致,可尝试重新下载模型文件后再试
可能是由于模型文件未下载完整导致,可尝试重新下载模型文件后再试。参考:https://github.com/opendatalab/MinerU/issues/143
参考:https://github.com/opendatalab/MinerU/issues/143
3.模型文件应该下载到哪里/models-dir的配置应该怎么填
3.模型文件应该下载到哪里/models-dir的配置应该怎么填
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
模型文件的路径输入是在”magic-pdf.json”中通过
模型文件的路径输入是在”magic-pdf.json”中通过
...
@@ -30,13 +27,11 @@ found错误。 可以通过在命令行禁用globbing特性,再尝试运行安
...
@@ -30,13 +27,11 @@ found错误。 可以通过在命令行禁用globbing特性,再尝试运行安
"models-dir": "/tmp/models"
"models-dir": "/tmp/models"
}
}
进行配置的。
进行配置的。这个路径是绝对路径而不是相对路径,绝对路径的获取可在models目录中通过命令 “pwd” 获取。
这个路径是绝对路径而不是相对路径,绝对路径的获取可在models目录中通过命令
“pwd” 获取。
参考:https://github.com/opendatalab/MinerU/issues/155#issuecomment-2230216874
参考:https://github.com/opendatalab/MinerU/issues/155#issuecomment-2230216874
4.在WSL2的Ubuntu22.04中遇到报错\ ``ImportError: libGL.so.1: cannot open shared object file: No such file or directory``
4.在WSL2的Ubuntu22.04中遇到报错\ ``ImportError: libGL.so.1: cannot open shared object file: No such file or directory``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
WSL2的Ubuntu22.04中缺少\ ``libgl``\ 库,可通过以下命令安装\ ``libgl``\ 库解决:
WSL2的Ubuntu22.04中缺少\ ``libgl``\ 库,可通过以下命令安装\ ``libgl``\ 库解决:
...
@@ -47,7 +42,7 @@ WSL2的Ubuntu22.04中缺少\ ``libgl``\ 库,可通过以下命令安装\ ``lib
...
@@ -47,7 +42,7 @@ WSL2的Ubuntu22.04中缺少\ ``libgl``\ 库,可通过以下命令安装\ ``lib
参考:https://github.com/opendatalab/MinerU/issues/388
参考:https://github.com/opendatalab/MinerU/issues/388
5.遇到报错 ``ModuleNotFoundError : Nomodulenamed 'fairscale'``
5.遇到报错 ``ModuleNotFoundError : Nomodulenamed 'fairscale'``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
需要卸载该模块并重新安装
需要卸载该模块并重新安装
...
@@ -59,7 +54,7 @@ WSL2的Ubuntu22.04中缺少\ ``libgl``\ 库,可通过以下命令安装\ ``lib
...
@@ -59,7 +54,7 @@ WSL2的Ubuntu22.04中缺少\ ``libgl``\ 库,可通过以下命令安装\ ``lib
参考:https://github.com/opendatalab/MinerU/issues/411
参考:https://github.com/opendatalab/MinerU/issues/411
6.在部分较新的设备如H100上,使用CUDA加速OCR时解析出的文字乱码。
6.在部分较新的设备如H100上,使用CUDA加速OCR时解析出的文字乱码。
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cuda11对新显卡的兼容性不好,需要升级paddle使用的cuda版本
cuda11对新显卡的兼容性不好,需要升级paddle使用的cuda版本
...
@@ -70,9 +65,8 @@ cuda11对新显卡的兼容性不好,需要升级paddle使用的cuda版本
...
@@ -70,9 +65,8 @@ cuda11对新显卡的兼容性不好,需要升级paddle使用的cuda版本
参考:https://github.com/opendatalab/MinerU/issues/558
参考:https://github.com/opendatalab/MinerU/issues/558
7.在部分Linux服务器上,程序一运行就报错 ``非法指令 (核心已转储)`` 或 ``Illegal instruction (core dumped)``
7.在部分Linux服务器上,程序一运行就报错 ``非法指令 (核心已转储)`` 或 ``Illegal instruction (core dumped)``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
可能是因为服务器CPU不支持AVX/AVX2指令集,或cpu本身支持但被运维禁用了,可以尝试联系运维解除限制或更换服务器。
可能是因为服务器CPU不支持AVX/AVX2指令集,或cpu本身支持但被运维禁用了,可以尝试联系运维解除限制或更换服务器。
参考:https://github.com/opendatalab/MinerU/issues/591 ,
参考:https://github.com/opendatalab/MinerU/issues/591 ,https://github.com/opendatalab/MinerU/issues/736
https://github.com/opendatalab/MinerU/issues/736
next_docs/zh_cn/user_guide/install/boost_with_cuda.rst
View file @
ebe97809
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
.. code-block:: sh
.. code-block:: sh
bash
docker run --rm --gpus=all nvidia/cuda:12.1.0-base-ubuntu22.04 nvidia-smi
docker run --rm --gpus=all nvidia/cuda:12.1.0-base-ubuntu22.04 nvidia-smi
.. code:: sh
.. code:: sh
...
@@ -30,18 +30,19 @@
...
@@ -30,18 +30,19 @@
Ubuntu 22.04 LTS
Ubuntu 22.04 LTS
----------------
----------------
1. 检测是否已安装nvidia驱动
---------------------------
1.检查 NVIDIA 驱动程序是否已安装
.. code:: bash
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. code:: sh
nvidia-smi
nvidia-smi
如果
您
看到类似
以
下的信息,
则表示 NVIDIA 驱动程序已安装,可以跳过第 2 步。
如果看到类似
如
下的信息,
说明已经安装了nvidia驱动,可以跳过步骤2
.. note::
.. admonition:: Important
:class: tip
``CUDA
版本``
应 >=
12.1,如
果
显示的版本号小于
12.1,请升级驱动
程序。
``CUDA
Version`` 显示的版本号
应 >=12.1,如显示的版本号小于12.1,请升级驱动
.. code:: text
.. code:: text
...
@@ -57,124 +58,125 @@ Ubuntu 22.04 LTS
...
@@ -57,124 +58,125 @@ Ubuntu 22.04 LTS
| | | N/A |
| | | N/A |
+-----------------------------------------+----------------------+----------------------+
+-----------------------------------------+----------------------+----------------------+
2. 安装驱动
-----------
2. 安装驱动程序
如没有驱动,则通过如下命令
~~~~~~~~~~~~~~~~~~~~~
如果没有安装驱动程序,请使用以下命令:
.. code:: sh
.. code::
ba
sh
sudo apt-get update
sudo apt-get update
sudo apt-get install nvidia-driver-545
sudo apt-get install nvidia-driver-545
安装专有驱动
程序并在安装后重启计算机。
安装专有驱动
,安装完成后,重启电脑
.. code:: sh
.. code::
ba
sh
reboot
reboot
3. 安装
A
naco
n
da
3. 安装
a
nacoda
~~~~~~~~~~~~~~~~~~
--------------
如果已
经
安装
了 Ana
conda,
请
跳过
此
步骤
。
如果已安装conda,
可以
跳过
本
步骤
.. code:: sh
.. code::
ba
sh
wget
https://repo.
anaconda
.com
/archive/Anaconda3-2024.06-1-Linux-x86_64.sh
wget
-U NoSuchBrowser/1.0 https://mirrors.tuna.tsinghua.edu.cn/
anaconda/archive/Anaconda3-2024.06-1-Linux-x86_64.sh
bash Anaconda3-2024.06-1-Linux-x86_64.sh
bash Anaconda3-2024.06-1-Linux-x86_64.sh
在
最后一步
中
输入
``
yes
``
,关闭终端
并
重新打开
。
最后一步输入yes,关闭终端重新打开
4. 使用
C
onda 创建环境
4. 使用
c
onda 创建环境
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
---------------------
指定
P
ython
版本为
3.10
。
需
指定
p
ython版本为3.10
.. code:: sh
.. code::
ba
sh
conda create -n MinerU python=3.10
conda create -n MinerU python=3.10
conda activate MinerU
conda activate MinerU
5. 安装应用
程序
5. 安装应用
~~~~~~~~~~~~~~~~~~~~~~~
-----------
.. code:: sh
.. code::
ba
sh
pip install -U magic-pdf[full] --extra-index-url https://wheels.myhloli.com
pip install -U magic-pdf[full] --extra-index-url https://wheels.myhloli.com
-i https://mirrors.aliyun.com/pypi/simple
.. admonition:: Important
.. admonition:: Important
:class: tip
:class: tip
❗ 安装完成后,请确保使用以下命令检查 ``
magic-pdf
`` 的版本:
下载完成后,务必通过以下命令确认
magic-pdf
的版本是否正确
.. code:: sh
.. code::
ba
sh
magic-pdf --version
magic-pdf --version
如果版本号小于
0.7.0,请
报告问题。
如果版本号小于0.7.0,请
到issue中向我们反馈
6. 下载模型
6. 下载模型
~~~~~~~~~~~~~~~~~~
-----------
参考
详细说明
:doc:`
下载模型权重文件 <
download_model_weight_files
>
`
详细
参考 :doc:`download_model_weight_files`
7. 了解配置文件的位置
7. 了解配置文件
存放
的位置
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-------------------------
完成 `6.
下载模型 <#6-
download-models
>`__ 步骤后,脚本
将
自动
在
用户目录
中生成一个 ``
magic-pdf.json
`` 文件并
配置默认模型路径。您可
以
在用户目录
中找到 ``
magic-pdf.json
``
文件。
完成
\
`6.下载模型 <#6-
下载模型
>`__
\
步骤后,脚本
会
自动
生成
用户目录
下的
magic-pdf.json
文件,并自动
配置默认模型路径。您可在
【
用户目录
】下找到
magic-pdf.json文件。
.. admonition:: Tip
.. admonition:: Tip
:class: tip
:class: tip
L
inux
用户目录
是
“/home/用户名”
。
l
inux用户目录
为
“/home/用户名”
8.
首
次运行
8.
第一
次运行
~~~~~~~~~~~~
-------------
从仓库下载
示例
文件并测试
它。
从仓库
中
下载
样本
文件
,
并测试
.. code:: sh
.. code::
ba
sh
wget https://git
hub
.com/
opendatalab
/MinerU/raw/master/demo/small_ocr.pdf
wget https://git
ee
.com/
myhloli
/MinerU/raw/master/demo/small_ocr.pdf
magic-pdf -p small_ocr.pdf -o ./output
magic-pdf -p small_ocr.pdf -o ./output
9. 测试
CUDA
加速
9. 测试CUDA加速
~~~~~~~~~~~~~~~~~~~~~~~~~
---------------
如果您的显卡至少有 **8GB** 显存,请按照以下步骤测试 CUDA 加速:
如果您的显卡显存大于等于 **8GB**
,可以进行以下流程,测试CUDA解析加速效果
1.
修改
位于
用户目录
中的 ``
magic-pdf.json
`` 配置文件中的 ``"
device-mode
"`` 值。
**
1.修改
【
用户目录
】中配置文件
magic-pdf.json
中”
device-mode
”的值**
.. code:: json
.. code:: json
{
{
"device-mode":
"cuda"
"device-mode":"cuda"
}
}
2. 使用以下命令测试 CUDA 加速:
**2.运行以下命令测试cuda加速效果**
.. code:: sh
.. code::
ba
sh
magic-pdf -p small_ocr.pdf -o ./output
magic-pdf -p small_ocr.pdf -o ./output
.. admonition:: Tip
.. admonition:: Tip
:class: tip
:class: tip
CUDA加速是否生效可以根据log中输出的各个阶段cost耗时来简单判断,通常情况下,``layout detection cost`` 和 ``mfr time`` 应提速10倍以上。
CUDA加速是否生效可以根据log中输出的各个阶段cost耗时来简单判断,通常情况下,
``layout detection cost`` 和 ``mfr time`` 应提速10倍以上。
10.
启用 OCR 的 CUDA
加速
10.
为ocr开启cuda
加速
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
---------------------
1.
下载
``
paddlepaddle-gpu
``。安装将自动启用 OCR 加速。
**
1.下载paddlepaddle-gpu
, 安装完成后会自动开启ocr加速**
.. code:: sh
.. code::
ba
sh
python -m pip install paddlepaddle-gpu==3.0.0b1 -i https://www.paddlepaddle.org.cn/packages/stable/cu118/
python -m pip install paddlepaddle-gpu==3.0.0b1 -i https://www.paddlepaddle.org.cn/packages/stable/cu118/
2. 使用以下命令测试 OCR 加速:
**2.运行以下命令测试ocr加速效果**
.. code:: sh
.. code::
ba
sh
magic-pdf -p small_ocr.pdf -o ./output
magic-pdf -p small_ocr.pdf -o ./output
...
@@ -183,74 +185,74 @@ Ubuntu 22.04 LTS
...
@@ -183,74 +185,74 @@ Ubuntu 22.04 LTS
CUDA加速是否生效可以根据log中输出的各个阶段cost耗时来简单判断,通常情况下, ``ocr cost`` 应提速10倍以上。
CUDA加速是否生效可以根据log中输出的各个阶段cost耗时来简单判断,通常情况下, ``ocr cost`` 应提速10倍以上。
.. _windows_10_or_11_section:
.. _windows_10_or_11_section:
Windows 10/11
Windows 10/11
--------------
--------------
1. 安装
CUDA 和
cuDNN
1. 安装
cuda和
cuDNN
~~~~~~~~~~~~~~~~~~~~~~~~~
------------------
所
需版本
:
CUDA 11.8 + cuDNN 8.7.0
需
要安装的
版本
CUDA 11.8 + cuDNN 8.7.0
- CUDA 11.8: https://developer.nvidia.com/cuda-11-8-0-download-archive
- CUDA 11.8 https://developer.nvidia.com/cuda-11-8-0-download-archive
- cuDNN v8.7.0(2022年11月28日发布),适用于 CUDA 11.x:
- cuDNN v8.7.0 (November 28th, 2022), for CUDA 11.x https://developer.nvidia.com/rdp/cudnn-archive
https://developer.nvidia.com/rdp/cudnn-archive
2. 安装
A
naconda
2. 安装
a
naconda
~~~~~~~~~~~~~~~~~~
---------------
如果已
经
安装
了 Ana
conda,
您
可以跳过
此
步骤
。
如果已安装conda,可以跳过
本
步骤
下载链接:https://
repo.anaconda.com
/archive/Anaconda3-2024.06-1-Windows-x86_64.exe
下载链接:https://
mirrors.tuna.tsinghua.edu.cn/anaconda
/archive/Anaconda3-2024.06-1-Windows-x86_64.exe
3. 使用
C
onda 创建环境
3. 使用
c
onda 创建环境
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
---------------------
P
ython
版本
必须是
3.10
。
需指定p
ython版本
为
3.10
.. code:: bash
.. code:: bash
conda create -n MinerU python=3.10
conda create -n MinerU python=3.10
conda activate MinerU
conda activate MinerU
4. 安装应用
程序
4. 安装应用
~~~~~~~~~~~~~~~~~~~~~~~
-----------
.. code:: bash
.. code:: bash
pip install -U magic-pdf[full] --extra-index-url https://wheels.myhloli.com
pip install -U magic-pdf[full] --extra-index-url https://wheels.myhloli.com
-i https://mirrors.aliyun.com/pypi/simple
.. admonition:: Important
.. admonition:: Important
:class: tip
:class: tip
❗️安装完成后,请验证 ``
magic-pdf
`` 的版本:
下载完成后,务必通过以下命令确认
magic-pdf
的版本是否正确
.. code:: bash
.. code:: bash
magic-pdf --version
magic-pdf --version
如果版本号小于
0.7.0,请
在问题部分报告。
如果版本号小于0.7.0,请
到issue中向我们反馈
5. 下载模型
5. 下载模型
~~~~~~~~~~~~~~~~~~
-----------
参考
详细说明
:doc:`
下载模型权重文件 <
download_model_weight_files
>
`
详细
参考 :doc:`download_model_weight_files`
6. 了解配置文件的位置
6. 了解配置文件
存放
的位置
~~~~~~~~~~~~~~~~~~~~
-------------------------
完成 `5.
下载模型 <#5-
download-models>
__
`
步骤后,脚本
将
自动
在
用户目录
中生成一个
magic-pdf.json
文件
并
配置默认模型路径。您可
以
在【用户目录】
中
找到
magic-pdf.json
文件。
完成
\
`5.下载模型 <#5-
下载模型>`
__
\
步骤后,脚本
会
自动
生成
用户目录
下的
magic-pdf.json文件
,并自动
配置默认模型路径。您可在【用户目录】
下
找到magic-pdf.json文件。
.. admonition:: Tip
.. admonition:: Tip
:class: tip
:class: tip
W
indows
用户目录
是
“C:/Users/用户名”
。
w
indows用户目录
为
“C:/Users/用户名”
7.
首
次运行
7.
第一
次运行
~~~~~~~~~~
-------------
从仓库下载
示例
文件并测试
它。
从仓库
中
下载
样本
文件
,
并测试
.. code:: powershell
.. code:: powershell
...
@@ -258,10 +260,9 @@ Python 版本必须是 3.10。
...
@@ -258,10 +260,9 @@ Python 版本必须是 3.10。
magic-pdf -p small_ocr.pdf -o ./output
magic-pdf -p small_ocr.pdf -o ./output
8. 测试CUDA加速
8. 测试CUDA加速
~~~~~~~~~~~~~~~~
---------------
如果您的显卡显存大于等于 **8GB**
如果您的显卡显存大于等于 **8GB**,可以进行以下流程,测试CUDA解析加速效果
,可以进行以下流程,测试CUDA解析加速效果
**1.覆盖安装支持cuda的torch和torchvision**
**1.覆盖安装支持cuda的torch和torchvision**
...
@@ -272,7 +273,7 @@ Python 版本必须是 3.10。
...
@@ -272,7 +273,7 @@ Python 版本必须是 3.10。
.. admonition:: Important
.. admonition:: Important
:class: tip
:class: tip
❗️
务必在命令中指定以下版本
务必在命令中指定以下版本
.. code:: bash
.. code:: bash
...
@@ -297,10 +298,10 @@ Python 版本必须是 3.10。
...
@@ -297,10 +298,10 @@ Python 版本必须是 3.10。
.. admonition:: Tip
.. admonition:: Tip
:class: tip
:class: tip
提示:
CUDA加速是否生效可以根据log中输出的各个阶段的耗时来简单判断,通常情况下,
\
``layout detection time`` 和 ``mfr time`` 应提速10倍以上。
CUDA加速是否生效可以根据log中输出的各个阶段的耗时来简单判断,通常情况下, ``layout detection time`` 和 ``mfr time`` 应提速10倍以上。
9. 为ocr开启cuda加速
9. 为ocr开启cuda加速
~~~~~~~~~~~~~~~~~~~~~~~
--------------------
**1.下载paddlepaddle-gpu, 安装完成后会自动开启ocr加速**
**1.下载paddlepaddle-gpu, 安装完成后会自动开启ocr加速**
...
@@ -317,4 +318,4 @@ Python 版本必须是 3.10。
...
@@ -317,4 +318,4 @@ Python 版本必须是 3.10。
.. admonition:: Tip
.. admonition:: Tip
:class: tip
:class: tip
提示:
CUDA加速是否生效可以根据log中输出的各个阶段cost耗时来简单判断,通常情况下,
\
``ocr time``
\
应提速10倍以上。
CUDA加速是否生效可以根据log中输出的各个阶段cost耗时来简单判断,通常情况下, ``ocr time`` 应提速10倍以上。
next_docs/zh_cn/user_guide/install/download_model_weight_files.rst
View file @
ebe97809
下载模型权重文件
下载模型权重文件
===============
===============
===
模型下载分为初始下载和更新到模型目录。请参考相应的文档以获取如何操作的指示。
模型下载分为初始下载和更新到模型目录。请参考相应的文档以获取如何操作的指示。
初始下载模型文件
首次下载模型文件
--------------
-----------------
从 Hugging Face 下载模型
模型文件可以从 Hugging Face 或 Model Scope下载,由于网络原因,国内用户访问HF可能会失败,请使用 ModelScope。
使用 Python 脚本从 Hugging Face 下载模型文件
方法一:从 Hugging Face 下载模型
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
使用python脚本 从Hugging Face下载模型文件
.. code:: bash
.. code:: bash
pip install huggingface_hub
pip install huggingface_hub
wget https://git
hub
.com/
opendatalab
/MinerU/raw/master/scripts/download_models_hf.py -O download_models_hf.py
wget https://git
ee
.com/
myhloli
/MinerU/raw/master/scripts/download_models_hf.py -O download_models_hf.py
python download_models_hf.py
python download_models_hf.py
该 Python 脚本将自动下载模型文件,并在配置文件中配置模型目录。
python脚本会自动下载模型文件并配置好配置文件中的模型目录
方法二:从 ModelScope 下载模型
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
使用python脚本 从ModelScope下载模型文件
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. code:: bash
pip install modelscope
wget https://gitee.com/myhloli/MinerU/raw/master/scripts/download_models.py -O download_models.py
python download_models.py
python脚本会自动下载模型文件并配置好配置文件中的模型目录
配置文件可以在用户目录中找到,文件名为\ ``magic-pdf.json``
.. admonition:: Tip
:class: tip
windows的用户目录为 “C:\Users\用户名”, linux用户目录为 “/home/用户名”, macOS用户目录为 “/Users/用户名”
此前下载过模型,如何更新
--------------------
配置文件可以在用户目录中找到,文件名为 ``magic-pdf.json``。
1. 通过git lfs下载过模型
^^^^^^^^^^^^^^^^^^^^^^^
如何更新先前下载的模型
.. admonition:: Important
-----------------------------------------
:class: tip
1. 通过 Git LFS 下载的模型
由于部分用户反馈通过git lfs下载模型文件遇到下载不全和模型文件损坏情况,现已不推荐使用该方式下载。
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
由于一些用户的反馈指出使用 git lfs 下载模型文件会出现不完整或导致模型文件损坏的情况,因此不再推荐使用这种方法
。
0.9.x及以后版本由于PDF-Extract-Kit 1.0更换仓库和新增layout排序模型,不能通过 ``git pull``\命令更新,需要使用python脚本一键更新
。
如果您之
前通过 git lfs 下载
了
模型文件,
您
可以
导航
到之前的下载目录
并使用
``git pull`` 命令
来
更新模型。
当magic-pdf <= 0.8.1时,如此
前通过 git lfs 下载
过
模型文件,可以
进入
到之前的下载目录
中,通过
``git pull`` 命令更新模型。
2. 通过 Hugging Face 或 ModelScope 下载
的
模型
2. 通过 Hugging Face 或 Model
Scope 下载
过
模型
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
如果您之前通过 Hugging Face 或 ModelScope 下载了模型,您可以重新运行用于初始下载的 Python 脚本。这将自动将模型目录更新到最新版本。
如此前通过 HuggingFace 或 Model Scope 下载过模型,可以重复执行此前的模型下载python脚本,将会自动将模型目录更新到最新版本。
\ No newline at end of file
\ No newline at end of file
next_docs/zh_cn/user_guide/install/install.rst
View file @
ebe97809
...
@@ -7,14 +7,13 @@
...
@@ -7,14 +7,13 @@
.. admonition:: Warning
.. admonition:: Warning
:class: tip
:class: tip
**
预
安装
须知—硬件和软
件环境支持**
**安装
前必看——软硬
件环境支持
说明
**
为了确保项目的稳定性和可靠性,在开发过程中
我们
仅对特定的
硬件和
软件环境进行
了
优化和测试。这
确保了
在推荐系统配置上部署和运行项目
的用户
能够获得最佳性能
,并且
兼容性问题
最少
。
为了确保项目的稳定性和可靠性,
我们
在开发过程中仅对特定的软
硬
件环境进行优化和测试。这
样当用户
在推荐
的
系统配置上部署和运行项目
时,
能够获得最佳
的
性能
表现和最少的
兼容性问题。
通过将资源集中在主线环境中,我们的团队可以更高效地解决潜在的错误并开发新功能。
通过集中资源和精力于主线环境,我们团队能够更高效地解决潜在的BUG,及时开发新功能。
在非主线环境中,由于硬件和软件配置的多样性以及第三方依赖项的兼容性问题,我们无法保证100%的项目可用性。因此,对于希望在非推荐环境中使用该项目的用户,我们建议首先仔细阅读文档和常见问题解答。大多数问题在常见问题解答中已经有相应的解决方案。我们也鼓励社区反馈,以帮助我们逐步扩大支持。
在非主线环境中,由于硬件、软件配置的多样性,以及第三方依赖项的兼容性问题,我们无法100%保证项目的完全可用性。因此,对于希望在非推荐环境中使用本项目的用户,我们建议先仔细阅读文档以及 :doc:`../../additional_notes/faq` ,大多数问题已经在 :doc:`../../additional_notes/faq` 中有对应的解决方案,除此之外我们鼓励社区反馈问题,以便我们能够逐步扩大支持范围。
.. raw:: html
.. raw:: html
...
@@ -82,7 +81,7 @@
...
@@ -82,7 +81,7 @@
conda create -n MinerU python=3.10
conda create -n MinerU python=3.10
conda activate MinerU
conda activate MinerU
pip install -U magic-pdf[full] --extra-index-url https://wheels.myhloli.com
pip install -U magic-pdf[full] --extra-index-url https://wheels.myhloli.com
-i https://mirrors.aliyun.com/pypi/simple
下载模型权重文件
下载模型权重文件
...
@@ -91,8 +90,9 @@
...
@@ -91,8 +90,9 @@
.. code-block:: shell
.. code-block:: shell
pip install huggingface_hub
pip install huggingface_hub
wget https://git
hub
.com/
opendatalab
/MinerU/raw/master/scripts/download_models_hf.py -O download_models_hf.py
wget https://git
ee
.com/
myhloli
/MinerU/raw/master/scripts/download_models_hf.py -O download_models_hf.py
python download_models_hf.py
python download_models_hf.py
MinerU 已安装,查看 :doc:`../quick_start` 或阅读 :doc:`boost_with_cuda` 以加速推理。
MinerU 已安装,查看 :doc:`../quick_start` 或阅读 :doc:`boost_with_cuda` 以加速推理。
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment