From 3e8013871e5aa5001e305b0db5b2cb161cca908a Mon Sep 17 00:00:00 2001 From: Pawel Rojek Date: Fri, 15 Dec 2023 15:22:55 +0100 Subject: [PATCH] cli fix - rotation_info type cast error --- easyocr/cli.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/easyocr/cli.py b/easyocr/cli.py index e8520b8b1..9e87f7735 100644 --- a/easyocr/cli.py +++ b/easyocr/cli.py @@ -1,6 +1,8 @@ import argparse import easyocr +def list_of_ints(arg): + return list(map(int, arg.split(','))) def parse_args(): parser = argparse.ArgumentParser(description="Process EasyOCR.") @@ -125,7 +127,7 @@ def parse_args(): ) parser.add_argument( "--rotation_info", - type=list, + type=list_of_ints, default=None, help="Allow EasyOCR to rotate each text box and return the one with the best confident score. Eligible values are 90, 180 and 270. For example, try [90, 180 ,270] for all possible text orientations.", )