Imported Upstream version 1.9.0
[platform/core/ml/nnfw.git] / res / TensorFlowPythonExamples / examples / non_max_suppression_with_scores_2 / __init__.py
1 import tensorflow as tf
2
3 max_output_size = tf.compat.v1.constant(6)
4 iou_threshold = tf.compat.v1.constant(0.5)
5 score_threshold = tf.compat.v1.constant(0.6)
6 soft_nms_sigma = tf.compat.v1.constant(0.5)
7
8 in_boxes_ = tf.compat.v1.placeholder(dtype=tf.float32, shape=(12, 4), name="Hole")
9 in_scores_ = tf.compat.v1.placeholder(dtype=tf.float32, shape=(12), name="Hole")
10
11 # non_max_suppression_with_scores requires TF 1.15+
12 non_max_suppression_with_scores_ = tf.compat.v1.image.non_max_suppression_with_scores(
13     in_boxes_, in_scores_, max_output_size, iou_threshold, score_threshold,
14     soft_nms_sigma)