Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cli fix - rotation_info type cast error #1188

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion easyocr/cli.py
Original file line number Diff line number Diff line change
@@ -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.")
Expand Down Expand Up @@ -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.",
)
Expand Down