Default use paddle ocr to false to not break jupyter notebook example

Add paddleocr to requirements
This commit is contained in:
Billy Cao
2024-10-29 10:58:55 +08:00
parent be04aff52f
commit fa9c69fa57
2 changed files with 3 additions and 1 deletions

View File

@@ -14,3 +14,5 @@ dill
accelerate
timm
einops==0.8.0
paddlepaddle
paddleocr

View File

@@ -380,7 +380,7 @@ def get_xywh_yolo(input):
def check_ocr_box(image_path, display_img = True, output_bb_format='xywh', goal_filtering=None, easyocr_args=None, use_paddleocr=True):
def check_ocr_box(image_path, display_img = True, output_bb_format='xywh', goal_filtering=None, easyocr_args=None, use_paddleocr=False):
if use_paddleocr:
result = paddle_ocr.ocr(image_path, cls=False)[0]
coord = [item[0] for item in result]