introduce
-
License plate recognition is to recognize the text information on the license plate, which is a subtask of optical character recognition (OCR).
-
License plate recognition technology has been widely used in traffic facilities such as parking lots, toll stations, etc., providing efficient and convenient vehicle authentication services
-
OCR is generally divided into two steps
- Detect text position in image
- Identify the text information in it
-
The general process of license plate recognition is as follows:
Show results
[{'license': '苏B92912', 'bbox': [[131.0, 251.0], [368.0, 253.0], [367.0, 338.0], [131.0, 336.0]]}]
[{'license': '苏DS0000', 'bbox': [[260.0, 100.0], [546.0, 104.0], [544.0, 200.0], [259.0, 196.0]]}]
[{'license': '豫U88888', 'bbox': [[198.0, 185.0], [357.0, 186.0], [357.0, 243.0], [198.0, 242.0]]}]
online trial
- You can use the AIStudio project [using PaddleHub combined with PaddleOCR to realize license plate recognition] for online trial
quick use
- Ps. PaddleHub quick calls are temporarily unavailable and will be supported soon
# 安装依赖包
$ pip install paddleocr==2.0.2 paddlehub==2.0.4
# 导入 PaddleHub
import paddlehub as hub
# 本地加载模型
model = hub.Module(directory='Vehicle_License_Plate_Recognition')
# 设置待预测图像路径
img_path = [path to img]
# 模型预测
result = model.ocr(img_path)
# 打印结果
print(result)