Merge branch 'autolog' of https://github.com/LDOUBLEV/PaddleOCR into autolog
This commit is contained in:
commit
729ff65f68
|
@ -32,7 +32,6 @@ from ppocr.data import create_operators, transform
|
|||
from ppocr.postprocess import build_post_process
|
||||
|
||||
logger = get_logger()
|
||||
import auto_log
|
||||
|
||||
|
||||
class TextDetector(object):
|
||||
|
@ -99,21 +98,23 @@ class TextDetector(object):
|
|||
self.predictor, self.input_tensor, self.output_tensors, self.config = utility.create_predictor(
|
||||
args, 'det', logger)
|
||||
|
||||
pid = os.getpid()
|
||||
self.autolog = auto_log.AutoLogger(
|
||||
model_name="det",
|
||||
model_precision="fp32",
|
||||
batch_size=1,
|
||||
data_shape="dynamic",
|
||||
save_path="./output/auto_log.lpg",
|
||||
inference_config=self.config,
|
||||
pids=pid,
|
||||
process_name=None,
|
||||
gpu_ids=0,
|
||||
time_keys=[
|
||||
'preprocess_time', 'inference_time', 'postprocess_time'
|
||||
],
|
||||
warmup=10)
|
||||
if args.benchmark:
|
||||
import auto_log
|
||||
pid = os.getpid()
|
||||
self.autolog = auto_log.AutoLogger(
|
||||
model_name="det",
|
||||
model_precision=args.precision,
|
||||
batch_size=1,
|
||||
data_shape="dynamic",
|
||||
save_path="./output/auto_log.lpg",
|
||||
inference_config=self.config,
|
||||
pids=pid,
|
||||
process_name=None,
|
||||
gpu_ids=0,
|
||||
time_keys=[
|
||||
'preprocess_time', 'inference_time', 'postprocess_time'
|
||||
],
|
||||
warmup=10)
|
||||
|
||||
def order_points_clockwise(self, pts):
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue