当前位置:网站首页>Mmocr usage guide
Mmocr usage guide
2022-07-26 00:58:00 【Name of algorithm】
MMOCR It is a general visual framework OpenMMLab Optical character recognizer .
Install the configuration environment
MMOCR github Home page :GitHub - open-mmlab/mmocr: OpenMMLab Text Detection, Recognition and Understanding Toolbox
pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu113/torch1.11.0/index.htmlpip install mmdet -i https://pypi.tuna.tsinghua.edu.cn/simplepip install lmdbpip install shapelypip install rapidfuzzpip install lanmspip install pyclipperpip install scikit-imagepip install imgaugVerify whether the installation of the successful code
import torch, torchvisionimport mmcvfrom mmcv.ops import get_compiling_cuda_version, get_compiler_versionimport mmdetimport mmocrfrom mmocr.utils.ocr import MMOCRmmocr = MMOCR(det=None, recog='SAR', device='cpu')print('mmocr Loading succeeded ')Text detection and text extraction
import torch, torchvisionimport mmcvfrom mmcv.ops import get_compiling_cuda_version, get_compiler_versionimport mmdetimport mmocrfrom mmocr.utils.ocr import MMOCR# mmocr = MMOCR(det=None, recog='SAR', device='cpu')# print('mmocr Loading succeeded ')if __name__ == '__main__': detector = MMOCR(det='TextSnake', recog='SAR', device='cuda') result = detector.readtext('demo/demo_densetext_det.jpg', output='output/demo_densetext_det.jpg')Chinese detection and extraction
stay mmocr Create a new folder under the home directory /data/chineseocr/labels
Enter this folder to execute
wget http://download.openmmlab.com/mmocr/textrecog/sar/dict_printed_chinese_english_digits.txtwget http://download.openmmlab.com/mmocr/data/font.TTFDownload fonts and fonts
import torch, torchvisionimport mmcvfrom mmcv.ops import get_compiling_cuda_version, get_compiler_versionimport mmdetimport mmocrfrom mmocr.utils.ocr import MMOCR# mmocr = MMOCR(det=None, recog='SAR', device='cpu')# print('mmocr Loading succeeded ')if __name__ == '__main__': detector = MMOCR(det='TextSnake', recog='SAR_CN', device='cuda') result = detector.readtext('demo/demo_densetext_det.jpg', output='output/demo_densetext_det.jpg')
边栏推荐
- 测试左移和测试右移的概念
- Download exclusively | Alibaba cloud maxcompute questions and answers to unlock SaaS mode cloud data warehouse in this electronic manual!
- Regular expression
- 【软件开发规范三】【软件版本命名规范】
- OAuth2和JWT
- Prefix XOR sum, XOR difference array
- JMeter/IDEA中引用jar包json-path.jar的坎坷之路
- typing‘ has no attribute ‘_SpecialForm‘
- [plaything determination scratch children programming] ride a small motorcycle (dynamic background + camera control operation)
- 阿明的告白
猜你喜欢

LCA three postures (multiplication, tarjan+ joint search set, tree chain dissection)
![[RTOS training camp] review of the previous section, idle tasks, timer tasks, execution sequence, scheduling strategy and evening class questions](/img/f7/3795855c72604f051586cd48e3ab21.jpg)
[RTOS training camp] review of the previous section, idle tasks, timer tasks, execution sequence, scheduling strategy and evening class questions

微波炉整流二极管 CL01-12
![[zero based BLDC series] brushless DC motor control principle based on the zero crossing detection method of back EMF](/img/1d/00165635452245a4d1b557fba17c94.png)
[zero based BLDC series] brushless DC motor control principle based on the zero crossing detection method of back EMF

ASP. Net core configuration

编程学习过程中有哪些快速提高编程技巧的方法?

User defined variables and extracted public variables of JMeter

jupyter更改主界面并且导入数据集

【RTOS训练营】作业讲解、队列和环形缓冲区、队列——传输数据、队列——同步任务和晚课提问

使用 SAP UI5 FileUploader 控件上传本地文件试读版
随机推荐
Compile openfoam solver with cmake
HCIA comprehensive experiment
Nanjie's embarrassment
P4047 [jsoi2010] tribal Division
Save unhappiness! My robot psychologist; KPI tracking of machine learning; Pytorch implementation of Yolo V7; Li Hang's new book "machine learning methods" open trial | showmeai Information Daily
用 QuestPDF操作生成PDF更快更高效!
How jupyter changes the default browser
【RTOS训练营】设备子系统、晚课学员提问
Unityvr -- robot arm scene 4- gifts and Christmas tree
How to choose social e-commerce model in the early stage? Taishan crowdfunding
Zabbix监控主机及资源告警
Open download! Alibaba Devops Practice Manual
pip install --upgrade can‘t find Rust compiler
[oops framework] interface management
【RTOS训练营】晚课学员问题
南姐的糗事
The ultra comprehensive open source WinForm UI library meets all your desktop development needs!
【MATLAB appdesigner】27_ How to debug and view variables in appdesigner? (examples + skills)
web中间件日志分析脚本3.0(shell脚本)
LCA three postures (multiplication, tarjan+ joint search set, tree chain dissection)