"vscode:/vscode.git/clone" did not exist on "e718810e61461273ecf3b79c109440e50e38d98c"
Commit 3cde342f authored by A. Unique TensorFlower's avatar A. Unique TensorFlower Committed by TF Object Detection Team
Browse files

Fix the negative box size that could potentially trigger error.

PiperOrigin-RevId: 329957156
parent 575684c0
......@@ -311,6 +311,7 @@ def prediction_tensors_to_boxes(detection_scores, y_indices, x_indices,
height_width = tf.gather(height_width_flat, peak_spatial_indices,
batch_dims=1)
height_width = tf.maximum(height_width, 0)
offsets = tf.gather(offsets_flat, peak_spatial_indices, batch_dims=1)
heights, widths = tf.unstack(height_width, axis=2)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment