From 2f87ed81d24bdc12812c6576b6454ee4b47c234c Mon Sep 17 00:00:00 2001 From: "shaohua.zhang" Date: Fri, 17 Jul 2020 13:48:08 +0800 Subject: [PATCH] add the missing import and format some codes add the missing import and format some codes --- ppocr/data/det/east_process.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ppocr/data/det/east_process.py b/ppocr/data/det/east_process.py index 7f0deda2..f9a07440 100755 --- a/ppocr/data/det/east_process.py +++ b/ppocr/data/det/east_process.py @@ -16,7 +16,7 @@ import math import cv2 import numpy as np import json - +import sys class EASTProcessTrain(object): def __init__(self, params): @@ -78,7 +78,7 @@ class EASTProcessTrain(object): dst_polys = [] rand_degree_ratio = np.random.rand() rand_degree_cnt = 1 - if rand_degree_ratio > 0.333 and rand_degree_ratio < 0.666: + if 0.333 < rand_degree_ratio < 0.666: rand_degree_cnt = 2 elif rand_degree_ratio > 0.666: rand_degree_cnt = 3 @@ -138,7 +138,7 @@ class EASTProcessTrain(object): continue if p_area > 0: #'poly in wrong direction' - if tag == False: + if not tag: tag = True #reversed cases should be ignore poly = poly[(0, 3, 2, 1), :] validated_polys.append(poly) -- GitLab