-
Notifications
You must be signed in to change notification settings - Fork 429
Error on evaluate.py (Tensorflow 1.3) #107
Comments
it seems there are also some issues with |
I suffer from the same Error. I found this is because of the 255 label. |
You mean you solved it? |
@VanitarNordic no, I just downgrade tensorflow to version 1.2.1. It is due to this commit 6ac3efd42902d48d45d59128926110e6d5121a08 It add assert : assert_less(label, num_class) I think that it will ok after reverting this commit. |
tensorflow 1.3 is not yet supported. stay tuned. |
Looks like an explicit assertion has been added in TF1.3 when computing mIoU that checks whether ground truth labels are less than the number of classes. pred = tf.reshape(pred, [-1,])
gt = tf.reshape(label_batch, [-1,])
indices = tf.squeeze(tf.where(tf.less_equal(raw_gt, args.num_classes - 1)), 1) ## ignore all labels >= num_classes
gt = tf.cast(tf.gather(gt, indices), tf.int32)
pred = tf.gather(pred, indices)
mIoU, update_op = tf.contrib.metrics.streaming_mean_iou(pred, gt, num_classes=args.num_classes) |
Thanks for the info @DrSleep ! I had the same problem and I've used your tip and everything works fine in evaluate.py. These are the changes I've made in evaluate.py: I've replaced lines 97 and 98:
for:
I hope this comment will be useful! |
The year is 2018 and yet that problem exist even in the latest deeplab version in tensorflow/models. Thanks to @amlarraz I managed to overcome this issue. |
For evaluate_msc.py I replaced
with
|
i am us TF1.8 ,thx for the answer ,there has some problem about the code: indices=tf.squeeze..... before this code should be add a code :num_classes = args.num_classes ,and it will work. |
Failed to test when I use it in https://github.com/warmspringwinds/tf-image-segmentation/blob/master/tf_image_segmentation/recipes/pascal_voc/FCNs/fcn_32s_test_pascal.ipynb. |
That is my comment in https://github.com/warmspringwinds/tf-image-segmentation/issues/33 |
Has anyone figured out how to fix this error on regular Deeplab, inside the eval.py file, not just for tensorflow-deeplab-resnet project? Thanks. |
I'm also having the same problem in eval.py when trying to train using own dataset with pretrained pascal VOC |
Hi,
I can train the model flawlessly, but I get the following errors when I run
evaluate.py . I use Tensorflow 1.3
:The text was updated successfully, but these errors were encountered: