Nougat:科学文档的OCR 使用记录

https://github.com/facebookresearch/nougat

python环境需要在3.8以上

安装:pip install nougat-ocr

模型默认下载地址:/home/****/.cache/torch/hub/nougat-0.1.0-small

环境安装好之后默认使用cpu

UserWarning: CUDA initialization: The NVIDIA driver on your system is too old (found version 11080). Please update your GPU driver by downloading and installing a new version from the URL: http://www.nvidia.com/Download/index.aspx Alternatively, go to: https://pytorch.org to install a PyTorch version that has been compiled with your version of the CUDA driver. (Triggered internally at ../c10/cuda/CUDAFunctions.cpp:108.)

return torch._C._cuda_getDeviceCount() > 0

WARNING:root:No GPU found. Conversion on CPU is very slow.

如果需要使用GPU,则需要重新安装和自己cuda版本对应的torch等,我这边是cuda11.8

conda install pytorch torchvision torchaudio pytorch-cuda=11.8 -c pytorch -c nvidia

环境配置好之后即可进行PDF识别

在output目录下会生成.mmd格式的文件

vscode中使用如下插件可以查看mmd格式中的内容,文字可直接复制

3090GPU上

显存占用17368 / 24576M 显存占用17G,16页的PDF 耗时30秒

自己随便写的文字可能识别不了,图片中的文字无法识别

相关推荐
六个核桃Lu1 天前
图像处理与OCR识别的实践经验(2)
图像处理·人工智能·python·opencv·ocr
virtaitech1 天前
OrionX GPU算力池助力AI OCR场景应用
人工智能·ai·ocr·gpu算力·ai算力资源池化
AI浩2 天前
OCR 通用端到端模型GOT
ocr
暴龙加瓦2 天前
使用阿里OCR身份证识别
ocr
绘绘~5 天前
PDF扫描版文字识别OCR
pdf·开源·github·ocr
翔云API7 天前
简单好用的OCR API
大数据·开发语言·node.js·ocr·php
undo_try8 天前
OCR经典神经网络(一)文本识别算法CRNN算法原理及其在icdar15数据集上的应用
神经网络·算法·ocr
AskHarries8 天前
Spring Boot集成Tess4J实现OCR
java·spring boot·后端·ocr
翔云API10 天前
Node.js发票识别接口助力企业实现发票的精准高效管理
开发语言·node.js·自动化·ocr·php
洛阳泰山11 天前
Chainlit结合百度飞浆的ocr识别和nlp自然语言处理做图片文字信息提取
百度·自然语言处理·ocr·paddlepaddle·chainlit