黑色加粗的是需要注意的点。
pip3 install torch torchvision torchaudio
git clone https://github.com/VikParuchuri/marker.git
在clone下来的marker目录下(这个一定要注意)
创建一个Python虚拟环境
macOS用source,其他系统用别的。
source ./myenv/bin/activate
后面这2步都是在,myenv环境里的。((myenv) ➜ marker git:(master))
如果不在这个环境里,会报command not found: marker_single
marker_single ./pdfs/output_galaxy_form-page.pdf
Downloading layout model...: 100%|██████████████████████████████████████████████████████████████████████████████████████████| 5/5 [01:44<00:00, 20.97s/it]
Loaded layout model s3://layout/2025_02_18 on device mps with dtype torch.float16
Downloading texify model...: 100%|██████████████████████████████████████████████████████████████████████████████████████████| 9/9 [02:20<00:00, 15.57s/it]
Loaded texify model s3://texify/2025_02_18 on device mps with dtype torch.float16
Downloading text_recognition model...: 0%|
批量转换:
marker batch --input /path/to/pdf_folder --output /path/to/output_folder --batch-size 2
地址:https://github.com/VikParuchuri/marker
参考:
https://medium.com/@sumsourabh14/this-is-how-i-convert-pdf-to-markdown-379ddb6e4405
https://post.smzdm.com/p/a2xzn3z2/
黑色加粗的是需要注意的点。
在clone下来的marker目录下(这个一定要注意)
创建一个Python虚拟环境
macOS用source,其他系统用别的。
后面这2步都是在,myenv环境里的。((myenv) ➜ marker git:(master))
如果不在这个环境里,会报command not found: marker_single
Downloading layout model...: 100%|██████████████████████████████████████████████████████████████████████████████████████████| 5/5 [01:44<00:00, 20.97s/it]
Loaded layout model s3://layout/2025_02_18 on device mps with dtype torch.float16
Downloading texify model...: 100%|██████████████████████████████████████████████████████████████████████████████████████████| 9/9 [02:20<00:00, 15.57s/it]
Loaded texify model s3://texify/2025_02_18 on device mps with dtype torch.float16
Downloading text_recognition model...: 0%|
批量转换:
地址:https://github.com/VikParuchuri/marker
参考:
https://medium.com/@sumsourabh14/this-is-how-i-convert-pdf-to-markdown-379ddb6e4405
https://post.smzdm.com/p/a2xzn3z2/