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秒

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

相关推荐
动能小子ohhh10 小时前
DocForge平台的设计与开发--文件上传接口的实现
开发语言·人工智能·python·langchain·ocr·fastapi
jiajia_lisa18 小时前
供应链对账场景|高效核对往来票据,解决对账难题
ocr
AI人工智能+20 小时前
药品注册证识别技术利用深度学习和多模态融合架构,实现药品注册证信息的自动化精准提取
深度学习·语言模型·自然语言处理·ocr·药品注册证识别
2501_9071368220 小时前
翻译+OCR工具 STranslate
ocr·软件需求
2401_8362358621 小时前
从“扫卡“到“懂卡“:OCR银行卡识别产品的发展趋势与技术难点
人工智能·科技·深度学习·ocr·生活
我有2只猫2 天前
LabelStudio二次开发
人工智能·python·django·ocr
余俊晖2 天前
多模态文档解析后处理开源模型:MinerU-Popo方案思路提升RAG性能
人工智能·ocr·多模态
超人也会哭️呀2 天前
视觉模型中的坐标漂移
人工智能·ai·llm·ocr·vlm·视觉模型·dots.ocr
开开心心就好3 天前
无弹窗不更新的PC本地播放工具
运维·科技·macos·docker·计算机外设·ocr·powerpoint
MageGojo3 天前
OCR 火车票识别 API 服务介绍与使用考量
ocr·接口·api·数据提取·火车票识别