tensorflow / tensorflow/models

deeplab/eval.py got nan iou

Open
#7,894 4 comments 0 reactions 3 assignees View on GitHub

@aquariusjay is already working on this.

Since Jun 19, 2020.

models:research type:bug
Dominant language
Python
Stars
77.7k
Forks
44.8k
PR merge metrics
No merged PRs in 30d

Description

https://github.com/tensorflow/models/blob/494cf0b3bbf5b4288face03be974364f25a2370c/research/deeplab/eval.py#L181

When calculate iou, we should pass the fn_op instead of fn to the calculation, or the iou would get nan.

iou = tf.where(tf.greater(tp + fn, 0.0),
tp_op / (tp + fn_op + fp),
tf.constant(np.NaN))

=>>>>
iou = tf.where(tf.greater(tp_op + fn_op, 0.0),
tp_op / (tp_op + fn_op + fp_op),
tf.constant(np.NaN))

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.