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秒

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

相关推荐
2601_9677607816 小时前
扫描件 OCR 转 Word 总乱码?2026 国内免费实测
ocr·word
楚识科技17 小时前
增值税发票识别 API 落地指南:并发限流、字段校验与数电 PDF 解析
ocr
HAHAXX82 天前
RPA 架构设计详解:大模型集成下,如何融合 NLP、OCR 处理非结构化数据
自然语言处理·ocr·rpa
聚美智数2 天前
二维码识别-条形码识别-智能识别二维码条形码-二维码OCR-二维码解析-二维码图片识别
ocr
楚识科技3 天前
CPU 环境 OCR 选型与加速实践:Tesseract / RapidOCR / PaddleOCR 轻量版 + ONNX Runtime 量化
ocr
聚美智数3 天前
VIN图片识别-车辆VIN识别-车辆VIN图片识别-车架号OCR-车架号OCR识别
ocr
聚美智数3 天前
图片去摩尔纹 - 屏幕翻拍波纹消除 - 图像摩尔纹消解 - 屏幕干涉纹修复 API 接口介绍
经验分享·ocr
楚识科技3 天前
RPA+OCR 落地实战:从截屏识别到自动入账的完整链路与选型清单
ocr·rpa
楚识科技3 天前
OCR 推理选 CPU 还是 GPU?一份可落地的算力评估与实测方案
ocr
2601_963906783 天前
离线截图 OCR 识别:支持表格与 PDF 解析
pdf·ocr·软件需求