当前位置:网站首页>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')
边栏推荐
- el-table滚动条设置
- LCA three postures (multiplication, tarjan+ joint search set, tree chain dissection)
- 参数解析器HandlerMethodArgumentResolver分析与实战
- Solve the problem that when the background image is set to be 100% full, when the horizontal scroll bar appears in the zoom browser, the part of the background image beyond the scroll bar is not full
- Hcip day 12
- typing‘ has no attribute ‘_SpecialForm‘
- Unityvr -- robot arm scene 4- gifts and Christmas tree
- Redis Command Reference Manual - key
- SQL statement exercise
- jupyter更改主界面并且导入数据集
猜你喜欢

用 QuestPDF操作生成PDF更快更高效!

Embedded development: tips and tricks -- seven tips for designing powerful boot loader

【RTOS训练营】关于上课和答疑

【RTOS训练营】上节回顾、空闲任务、定时器任务、执行顺序、调度策略和晚课提问
![[laser principle and application-4]: internal structure and working principle of laser](/img/42/963c151c15c6b633ec0cf633355fb5.jpg)
[laser principle and application-4]: internal structure and working principle of laser

The difference and application of in and exists in SQL statement

Redis Command Reference Manual - key

Practical exercise | find customers who buy more than n products within a given time range

AI knows everything: build and deploy sign language recognition system from 0

Hcip day 13
随机推荐
How to use if in sql service
Regular expression
Leetcode notes 350. Intersection of two arrays II
【RTOS训练营】晚课学员问题
Shardingsphere data slicing
Hcip day 11
Redis Command Reference Manual - key
HCIA comprehensive experiment
【RTOS训练营】GPIO知识和预习安排 + 晚课提问
[RTOS training camp] review of the previous section, idle tasks, timer tasks, execution sequence, scheduling strategy and evening class questions
YOLOV3
Compile openfoam solver with cmake
pip install --upgrade can‘t find Rust compiler
C # from entry to mastery (III)
pip install --upgrade can‘t find Rust compiler
[IJCAI 2022] parameter efficient large model sparse training method, which greatly reduces the resources required for sparse training
SQL statement exercise
[install software after computer reset] software that can search all files of the computer, the best screenshot software in the world, free music player, JDK installation, MySQL installation, installa
JMeter/IDEA中引用jar包json-path.jar的坎坷之路
Force deduction record: Sword finger offer (2) -- jz13-22