From f4d31c53f30c279a7b5c5ac5419d90615270e4ec Mon Sep 17 00:00:00 2001 From: HaoyangLI <417493727@qq.com> Date: Wed, 21 Jun 2023 10:16:16 +0800 Subject: [PATCH] small fix --- tools/infer/text/predict_cls.py | 2 +- tools/infer/text/predict_system.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/infer/text/predict_cls.py b/tools/infer/text/predict_cls.py index d070b8afc..eb982d19e 100644 --- a/tools/infer/text/predict_cls.py +++ b/tools/infer/text/predict_cls.py @@ -263,4 +263,4 @@ def save_cls_res(cls_res_all, img_paths, include_score=False, save_path="./cls_r save_cls_res(cls_res_all, img_paths, include_score=True, save_path=save_fp) # print('All cls res: ', cls_res_all) print("Done! Text direction classification results saved in ", save_dir) - print("Time cost: ", t, "FPS: ", len(img_paths) / t) + print("CLS time: ", t, "FPS: ", len(img_paths) / t) diff --git a/tools/infer/text/predict_system.py b/tools/infer/text/predict_system.py index 80b90029b..4479b89cf 100644 --- a/tools/infer/text/predict_system.py +++ b/tools/infer/text/predict_system.py @@ -97,6 +97,7 @@ def __call__(self, img_or_path: Union[str, np.ndarray], do_visualize=True): cls_start = time() _, crops = self.direction_classify(crops) time_profile["cls"] = time() - cls_start + _logger.info(f"\nCls time: {time_profile['cls']}") # recognize cropped images rs = time()