Jump to content

To be honest, Pyhon is really awesome in data processing. Especially today with big data, we are inseparable from all kinds of data. This article introduces the use of Baidu OCR for text recognition.

Experimental Environment

Python (3.9.12) Kali Linux Baidu OCR

Apply for Baidu OCR

Visit Baidu Smart Cloud and activate API

Website: https://cloud.baidu.com/campaign/OCR202203/index.html namwgyh40u23795.png

You can log in with your Baidu account. The advantage of using Baidu login is that you can directly migrate Baidu's real-name authentication, so you don't need to wait a few more days for manual review.

You can choose to try it for free, or buy it for 10,000 times for 1 yuan. I think there is no difference, it is all enough.

When you receive the free credit, you must check the interface type, otherwise it will be blank.

Create a new application and get token

Click Create App in the Console-Text Recognition-Overview yh5ash2lby53796.png

Select an individual for the application, and fill in the application name and overview at will 5wcgkuaoqhf3798.png

After the creation is completed, enter the application list and you can see the API Key and Secret Key, and write it down.z2j3art30mi3799.png

Text Recognition

According to the official example, a simple column of Python was written. References are as follows:

from aip import AipOcr

APP_ID='

0 Comments

Recommended Comments

There are no comments to display.

Guest
Add a comment...