I'm using TensorFlow model repo for object detection. For evaluation, I'm using Tensorboard which displays mAP and the result - predicted bounding box for detected object. I would like to display the ground truth bounding box along with the predicted one. How can I accomplish this?
2 Answers
3
votes
it seems like you seek to display the ground truth bounding box next to the predicted box for object detection in TensorBoard. I'm assuming you are using the image dashboard. Here is one idea.
You can pass the bytes of the original image into a py_func, which lets you wrap a python function and use it as a TensorFlow op.
Within the py_func
, you can render boxes on top of the image say using matplotlib
(using patches.Rectangle
):
matplotlib: how to draw a rectangle on image
And then, you can pass those bytes into an image summary op. This GitHub project offers an example: https://github.com/vahidk/EffectiveTensorflow/blob/master/README.md#prototyping-kernels-and-advanced-visualization-with-python-ops
1
votes