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秒

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

相关推荐
Predestination王瀞潞12 小时前
1.3.1 AI->Tesseract OCR Engine标准(HP、Google):Tesseract OCR Engine
人工智能·ocr
OpenCSG18 小时前
百度千帆开源 Qianfan-OCR:端到端文档智能模型的架构革命
百度·架构·ocr
feasibility.2 天前
让OpenCode/OpenClaw的AI/Agent准确识别图表文字:PaddleOCR-VL-1.5 封装为全局 OCR skills
人工智能·aigc·ocr·ai编程
AI人工智能+2 天前
融合计算机视觉与自然语言处理的道路运输经营许可证识别技术,实现从图像预处理、关键信息定位、字符识别到语义结构化输出的端到端闭环
计算机视觉·自然语言处理·ocr·道路运输经营许可证识别
兮℡檬,3 天前
文档ocr
ocr
开开心心就好4 天前
绿色版PDF多功能工具,支持编辑转换
人工智能·windows·pdf·ocr·excel·语音识别·harmonyos
余俊晖4 天前
多模态文档解析最新开源进展:2B参数FireRed-OCR模型方法、数据
人工智能·自然语言处理·ocr·多模态
余俊晖4 天前
多模态大模型文档解析开源新进展:Qianfan-OCR模型架构、数据引擎、训练方法
架构·ocr
ai_coder_ai5 天前
如何使用ocr来实现自动化脚本?
ocr·autojs·自动化脚本·冰狐智能辅助·easyclick
虚幻如影5 天前
Tesseract-OCR 引擎安装
python·ocr