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

PR for custom training EasyOCR #1044

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
Update cv2_fix.py
  • Loading branch information
yilmazmusa08 authored Jun 16, 2023
commit ad86985493616b0c8a5a9499f9ece78ea0d4fa2a
11 changes: 9 additions & 2 deletions scripts/cv2_fix.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,15 @@
target_size = (400, 72)

# Path to the directory containing image files
dir_path = './EasyOCR-master/tests/inputs'
out_dir = './EasyOCR-master/tests/outputs'
dir_path = os.path.join("..", "tests/inputs")
out_dir = os.path.join("..", "tests/outputs")

# Create the directories if they do not exist
if not os.path.exists(dir_path):
os.makedirs(dir_path)

if not os.path.exists(out_dir):
os.makedirs(out_dir)

def rotate(
image: np.ndarray, angle: float, background: Union[int, Tuple[int, int, int]]
Expand Down