From fb464a3135c2407dad529d624db33b52816f902f Mon Sep 17 00:00:00 2001 From: Yingda Chen Date: Wed, 27 Nov 2024 22:43:06 +0800 Subject: [PATCH] fix potential double definition issue --- .../pipelines/cv/ocr_detection_pipeline.py | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/modelscope/pipelines/cv/ocr_detection_pipeline.py b/modelscope/pipelines/cv/ocr_detection_pipeline.py index 95d55d5d..93420a28 100644 --- a/modelscope/pipelines/cv/ocr_detection_pipeline.py +++ b/modelscope/pipelines/cv/ocr_detection_pipeline.py @@ -200,24 +200,6 @@ class OCRDetectionPipeline(Pipeline): return result else: # for model seglink++ - import tensorflow as tf - - if tf.__version__ >= '2.0': - tf = tf.compat.v1 - - tf.compat.v1.disable_eager_execution() - - tf.app.flags.DEFINE_float( - 'node_threshold', - TF_NODE_THRESHOLD, - 'Confidence threshold for nodes', - already_declared_error=False) - tf.app.flags.DEFINE_float( - 'link_threshold', - TF_LINK_THRESHOLD, - 'Confidence threshold for links', - already_declared_error=False) - img = LoadImage.convert_to_ndarray(input) h, w, c = img.shape