Update predict_det.py

This commit is contained in:
Double_V 2021-06-24 17:48:36 +08:00 committed by GitHub
parent ea60a03487
commit 4c52e3857d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 16 additions and 15 deletions

View File

@ -101,21 +101,22 @@ 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:
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):
"""