I want to use PaddleOCR for my text detection and recognition task. But I couldn't find enough documentation about why they have used the arguments use_angle_cls
and cls
. The following code illustrates the text image inference in PaddleOCR.
from paddleocr import PaddleOCR
ocr = PaddleOCR(use_angle_cls=True, lang='en')
img_path = './imgs_en/img_12.jpg'
result = ocr.ocr(img_path, cls=True)
In line 2 they used use_angle_cls=True
argument while initializing the OCR engine and cls=True
argument in line 4 while detection and recognition. So what is the meaning behind these arguments? Thank you!
From the python file docs (https://github.com/PaddlePaddle/PaddleOCR/blob/release/2.6/paddleocr.py#L505, thanks to the comment from 219CID):
So it appears setting it to true allows you to recognize upside down text, and that even with cls being false it can recognize sideways text.