Skip to content

Commit 614338f

Browse files
authored
Merge pull request tensorflow#2282 from mees/fixEvalIOU#2239
fixes Perspective Transformer IOU evaluation
2 parents 32105a3 + 4fb2e0c commit 614338f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ptn/metrics.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ def add_volume_iou_metrics(inputs, outputs):
9999
names_to_updates = dict()
100100
labels = tf.greater_equal(inputs['voxels'], 0.5)
101101
predictions = tf.greater_equal(outputs['voxels_1'], 0.5)
102-
labels = 2 - tf.to_int32(labels)
103-
predictions = 3 - tf.to_int32(predictions) * 2
102+
labels = (2 - tf.to_int32(labels)) - 1
103+
predictions = (3 - tf.to_int32(predictions) * 2) - 1
104104
tmp_values, tmp_updates = tf.metrics.mean_iou(
105105
labels=labels,
106106
predictions=predictions,

0 commit comments

Comments
 (0)