zephyrus
zephyrus

Reputation: 1266

Save same image pair over epochs with tf.summary.image for semantic segmentation

When training a deep network for semantic segmentation we can get a qualitative understanding of network performance by looking at the triad of image/ground truth/prediction. During training, I would like to be able to view this set in tensorboard but keep the same triad throughout training.

If one naively uses tf.summary.image for each of input/ground truth/prediction tensorflow changes the saved image/ground truth/prediction set with each epoch.

I.e. right now I have

 #image example save
        tf.summary.image("input", test_x, max_outputs=3)
        tf.summary.image("ground_truth", test_t, max_outputs=3)
        tf.summary.image("prediction_output",output, max_outputs=3)

which does save 3 images from each epoch, but because they change with each epoch its hard to keep track of progress.

This would be useful just to get a crude qualitative understanding of what the network is learning in the process of training.

Upvotes: 0

Views: 564

Answers (1)

y.selivonchyk
y.selivonchyk

Reputation: 9900

Just a quick hack. I would suggest narrowing down the set of images you forward to the summary:

#image example save
        tf.summary.image("input", test_x[:3], max_outputs=3)
        tf.summary.image("ground_truth", test_t[:3], max_outputs=3)
        tf.summary.image("prediction_output",output[:3], max_outputs=3)

Upvotes: 0

Related Questions