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秒

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

相关推荐
楚识科技1 天前
档案 OCR 双形态落地:高拍仪端侧 SDK 与私有化内网服务端工程拆解
网络·人工智能·ocr
开开心心就好2 天前
游戏安装报错缺环境?运行库整合包补上
java·mysql·游戏·pdf·ocr·音视频·lua
开开心心就好2 天前
重复图片查找工具,拖入文件夹就开搜
java·mysql·pdf·ocr·vim·音视频·emacs
梅雅达编程笔记2 天前
扫描件解析出来是空的:RAG 智能问答 PDF 解析完整教程
ocr·智能问答·毕设·pdf解析·paddleocr·pdfplumber·rag
楚识科技2 天前
移动端 OCR SDK 集成拆解:Android/iOS 离线识别与结构化回填
android·ios·ocr
你看我名字3 天前
大模型 API 聚合平台怎么做 RAG:Search、Reader、OCR完整链路
ocr
楚识科技4 天前
物流运单 OCR 工程拆解:非标版式、手写运单与字段结构化
大数据·ocr
OpenCSG10 天前
百度开源 Unlimited OCR 2:面向百页长文档的连续解析深度拆解
人工智能·开源·ocr·opencsg
撸码猿12 天前
数据采集场景的语序点选验证码:90.2% 整词准确率的本地 OCR 实践
python·ocr
牧羊人.33313 天前
OCR 文本检测之PaddleOCR基础使用
计算机视觉·视觉检测·ocr·paddleocr·文本检测