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
4d6dcb00
Commit
4d6dcb00
authored
Jul 13, 2024
by
myhloli
Browse files
docs: update readme
parent
19fd0a40
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
26 deletions
+24
-26
README.md
README.md
+12
-13
README_zh-CN.md
README_zh-CN.md
+12
-13
No files found.
README.md
View file @
4d6dcb00
...
...
@@ -104,7 +104,7 @@ pip install detectron2 --extra-index-url https://myhloli.github.io/wheels/
#### 2. Downloading model weights files
For detailed references, please see below
[
how_to_download_models
](
docs/how_to_download_models_en.md
)
For detailed references, please see below
[
how_to_download_models
](
docs/how_to_download_models_en.md
)
After downloading the model weights, move the 'models' directory to a directory on a larger disk space, preferably an SSD.
...
...
@@ -151,8 +151,8 @@ magic-pdf --help
##### CUDA
You need to install the corresponding PyTorch version according to your CUDA version.
This example installs the CUDA 11.8 version.More information https://pytorch.org/get-started/locally/
```
bash
# When using the GPU solution, you need to reinstall PyTorch for the corresponding CUDA version. This example installs the CUDA 11.8 version.
pip
install
--force-reinstall
torch
==
2.3.1
torchvision
==
0.18.1
--index-url
https://download.pytorch.org/whl/cu118
```
Also, you need to modify the value of "device-mode" in the configuration file magic-pdf.json.
...
...
@@ -166,7 +166,6 @@ Also, you need to modify the value of "device-mode" in the configuration file ma
For macOS users with M-series chip devices, you can use MPS for inference acceleration.
You also need to modify the value of "device-mode" in the configuration file magic-pdf.json.
```
json
{
"device-mode"
:
"mps"
...
...
README_zh-CN.md
View file @
4d6dcb00
...
...
@@ -90,7 +90,7 @@ pip install magic-pdf
```
bash
pip
install
magic-pdf[full-cpu]
```
高精度模型依赖于detectron2,该库需要编译安装,如需自行编译,请参考https://github.com/facebookresearch/detectron2/issues/5114
高精度模型依赖于detectron2,该库需要编译安装,如需自行编译,请参考
https://github.com/facebookresearch/detectron2/issues/5114
或是直接使用我们预编译的whl包(仅限python 3.10):
```
bash
pip
install
detectron2
--extra-index-url
https://myhloli.github.io/wheels/
...
...
@@ -98,11 +98,11 @@ pip install detectron2 --extra-index-url https://myhloli.github.io/wheels/
#### 2. 下载模型权重文件
详细参考
[
如何下载模型文件
](
docs/how_to_download_models_zh_cn.md
)
详细参考
[
如何下载模型文件
](
docs/how_to_download_models_zh_cn.md
)
下载后请将models目录移动到空间较大的ssd磁盘目录
#### 3. 拷贝配置文件并进行配置
在仓库根目录可以获得
[
magic-pdf.template.json
](
magic-pdf.template.json
)
文件
在仓库根目录可以获得
[
magic-pdf.template.json
](
magic-pdf.template.json
)
文件
```
bash
cp
magic-pdf.template.json ~/magic-pdf.json
```
...
...
@@ -139,8 +139,8 @@ magic-pdf --help
###### CUDA
需要根据自己的CUDA版本安装对应的pytorch版本
以下是对应CUDA 11.8版本的安装命令,更多信息请参考 https://pytorch.org/get-started/locally/
```
bash
# 使用gpu方案时,需要重新安装对应cuda版本的pytorch,例子是安装CUDA 11.8版本的
pip
install
--force-reinstall
torch
==
2.3.1
torchvision
==
0.18.1
--index-url
https://download.pytorch.org/whl/cu118
```
...
...
@@ -153,7 +153,6 @@ pip install --force-reinstall torch==2.3.1 torchvision==0.18.1 --index-url https
###### MPS
使用macOS(M系列芯片设备)可以使用MPS进行推理加速
需要修改配置文件magic-pdf.json中"device-mode"的值
```
json
{
...
...
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