Detailed explanation of parameter settings when using paddleocr reasoning in machine learning notes (continuously sorting out)

I. Overview

        The overall structure of paddleocr is as huge as its ambition, so there must be many parameters of paddleocr, and the description of parameters in official documents is not very clear enough. When I first started using it, I didn’t even know what parameters could be set. what kind of impact.

        Because it is used in the project, I have explored and tried the parameters during inference (most of the parameters described below are parameters that can be set during the prediction process, and also include some parameters in the code/configuration, which may need to be modified) .

Two, paddleocr calling method

        Anyone who has used it knows that it can be run based on the command line or python script.

        command line way

paddleocr --image_dir ./imgs/11.jpg --use_angle_cls true --use_gpu false

        scripted way

from paddleocr import PaddleOCR, draw_ocr

# Paddleocr目前支持的多语言语种可以通过修改lang参数进行切换
# 例如`ch`, `en`, `fr`, `german`, `korean`, `japan`
ocr = PaddleOCR(use_angle_cls=True, lang="ch")  # need to run only once to download and load model into memory
img_path = './imgs/11.jpg'
result = ocr.ocr(img_path, cls=True)
for idx in range(len(result)):
    res = result[idx]
    for line in res:
        prin

Guess you like

Origin blog.csdn.net/bashendixie5/article/details/130330303