Is there no tf.image.non_max_suppression_with_scores in tensorflow 1.14 ?
No description provided.
replace tf.image.non_max_suppression_with_scores with tf.image.non_max_suppression for lower tf version.
After I replace, I encouter the following problem, infer_efficientdet.py is one part of inference.py
File "infer_efficientdet.py", line 606, in
the function det_post_process is called in the function build() of ServingInference.py may be the reason
top_detection_idx = tf.image.non_max_suppression(
boxes,
scores,
max_boxes_to_draw,
iou_threshold=iou_threshold,
score_threshold=min_score_thresh)
scores = tf.gather(scores, top_detection_idx)
Thank you!!! And there is not tf.repeat in version 1.14. which function do you use for tf.repeat in version 1.14.
detections = tf.stack([ tf.cast(tf.repeat(image_id, tf.size(top_detection_idx)), tf.float32), boxes[:, 0] * image_scale, boxes[:, 1] * image_scale, height * image_scale, width * image_scale, scores, tf.cast(tf.gather(classes, top_detection_idx) + 1, tf.float32) ], axis=1) return detections
Thank you!!! And there is not tf.repeat in version 1.14. which function do you use for tf.repeat in version 1.14.
detections = tf.stack([ tf.cast(tf.repeat(image_id, tf.size(top_detection_idx)), tf.float32), boxes[:, 0] * image_scale, boxes[:, 1] * image_scale, height * image_scale, width * image_scale, scores, tf.cast(tf.gather(classes, top_detection_idx) + 1, tf.float32) ], axis=1) return detections
I only use tf1.15+
Thank you!!!!!!!!!!!!
Thank you!!! And there is not tf.repeat in version 1.14. which function do you use for tf.repeat in version 1.14.
detections = tf.stack([ tf.cast(tf.repeat(image_id, tf.size(top_detection_idx)), tf.float32), boxes[:, 0] * image_scale, boxes[:, 1] * image_scale, height * image_scale, width * image_scale, scores, tf.cast(tf.gather(classes, top_detection_idx) + 1, tf.float32) ], axis=1) return detections
tf.tile(image_id, [tf.size(top_detection_idx)])
With the help of you, I have solved the problem. Thank you!!!!
@Jupanlee
Hello,
TypeError tensor objects are only iterable when eager execution is enabled. To iterate over this tensorf use tf.map_fn, do you have the problem when you replace tf.image.non_max_suppression_with_score with tf.image.non_max_suppression?
I use tf-cpu1.14.0