当前位置:网站首页>Fundamentals of deep learning [4] build easyocr and carry out simple character recognition from 0
Fundamentals of deep learning [4] build easyocr and carry out simple character recognition from 0
2022-06-11 02:30:00 【Polar chain AI cloud】
Deep learning foundation 【4】
from 0 Begin to build EasyOCR
And simple character recognition
So-called OCR, Its full name is “Optical Character Recognition”, Optical character recognition . simply , It is to analyze, recognize and process the image files of text data , To obtain the text and layout information .
- Language environment :Python3.7
- compiler :jupyter notebook
- Deep learning environment :pytorch 1.6
- Deep learning platform : Polar chain AI cloud
- The graphics card (GPU):NVIDIA RTX 2080Ti

Catalog
01 Instance creation
02 preparation
03 Data preprocessing
04 Build the model
05 compile
06 Training models
07 Model to evaluate

01 Instance creation
1. Open polar chain AI Cloud platform
https://cloud.videojj.com/?source=vx

2. Click calculate power lease

3. Choose the right graphics card
Here we use NVIDIA RTX 2080Ti For example

4. Deep learning framework construction
Frame selection pytorch, edition 1.6
python edition 3.7

5. The connection instance
After creation , Click on jupyterlab Connect

6. Open the terminal

02 Environment building
In the terminal , Enter the following command to use pip install EasyOCR Stable version
pip install easyocrFor more information, please slide left and right

Get into GitHub Address
Download the target file
When the download is complete , Uploaded to the root In the folder , Enter the following command to unzip
pip install unzip # install unzipunzip EasyOCR-master
Use... At the command prompt cd Command to enter the destination folder address , In the use of Python setup.py install Command to pre install
cd EasyOCR-masterpython setup.py install
03 Usage method

Perform character recognition on the picture
import easyocrreader = easyocr.Reader(['ch_sim','en']) # You only need to run it once to load the model into memoryresult = reader.readtext('chinese.jpg')
The output will be in list format , Each item represents a bounding box , Text and confidence .

notes 1:[‘ch_sim’,‘en’] Is a list of languages you want to read . You can pass several languages at once , But not all languages can be used together . English is compatible with every language . Languages that share common characters are usually compatible with each other .
notes 2: You can also change OpenCV Image object (numpy Array ) Or image files are passed as bytes , instead of filepath chinese.jpg. The URL of the original image is also acceptable .
notes 3: That's ok reader = easyocr.Reader([‘ch_sim’,‘en’]) Used to load the model into memory . It will take some time , But you only need to run it once .
Can also be detail Set to 0, To simplify output .
reader.readtext('chinese.jpg', detail = 0)

边栏推荐
- Do tween record
- Nodejs send mail
- CRS-5017
- Is it appropriate for a 27 - year-old girl to change her career from zero to software testing?
- Core principle and code explanation of epoll reactor model
- 年金保险理财产品可以复利吗?利率是多少?
- 1031. 两个非重叠子数组的最大和
- 金属有机骨架材料Fe-MIL-53,Mg-MOF-74,Ti-KUMOF-1,Fe-MIL-100,Fe-MIL-101)负载异氟醚/甲氨蝶呤/阿霉素(DOX)/紫杉醇/布洛芬/喜树碱
- Defense measures for common vulnerabilities
- 技术分享| 快对讲,全球对讲
猜你喜欢

Modify release opening animation

SQL | 计算总和

Epoll principle and Application & ET mode and lt mode

InfoQ geek media's 15th anniversary solicitation | in depth analysis of container runtime Technology

Nodejs send mail

What can the enterprise exhibition hall design bring to the enterprise?

SQL | 返回顾客名称和相关订单号以及每个订单的总价

The annual salary of testers in large factories ranges from 300000 to 8K a month. Roast complained that the salary was too low, but he was ridiculed by netizens?

Multilevel mesoporous organometallic framework material zif-8 loaded with lactic acid oxidase (LOD) / ferric oxide (Fe304) / doxorubicin / insulin /cas9 protein / metronidazole / emodin methyl ether
![[3.delphi common components] 6 scroll bar](/img/55/891e56de4500a9128ac89e3c5b1721.jpg)
[3.delphi common components] 6 scroll bar
随机推荐
Find - (half find / half find)
SQL | 返回顾客名称和相关订单号以及每个订单的总价
Principle of everything for fast search
Metal organic framework MOF Al (Diba), MOF Zr (Diba), MOF Fe (Diba) loaded with curcumin / carboxybenzylpenicillin /mtx methotrexate / paclitaxel ptx/ DOX / cisplatin cddp/cpt camptothecin and other d
Secret
In the past 10 years, from zero foundation testing to test architect, he has made himself successful
Setting access to win10 shared folder without verification
查看Redis内数据,除了命令行和客户端,你还有第三种选择
Jetpack compose scaffold and topappbar (top navigation)
金属有机骨架材料Fe-MIL-53,Mg-MOF-74,Ti-KUMOF-1,Fe-MIL-100,Fe-MIL-101)负载异氟醚/甲氨蝶呤/阿霉素(DOX)/紫杉醇/布洛芬/喜树碱
koa2学习笔记
aspects to consider for a recommendation letter
Knowledge competition of safety production month -- how much do you know about new safety law
Why is the trend chart of precious metal silver strong?
Analysis of common ADB commands
Unity3d model skin changing technology
Jetpack Compose Scaffold和TopAppBar(顶部导航)
贵金属白银和现货白银之间是什么关系
1031. 两个非重叠子数组的最大和
1031. maximum sum of two non overlapping subarrays