mirror of
https://github.com/modelscope/modelscope.git
synced 2026-02-24 20:19:51 +01:00
fix potential double definition issue
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user