Keras-retinanet: Is it possible to implement a Keras Metric for Mean IoU?

Created on 19 Sep 2018  路  4Comments  路  Source: fizyr/keras-retinanet

I'm using this implementation in a competition with single class localization. Their metric is mean IoU. I wonder if it's possible to implement it as a Keras Metric. With the training model, is it possible? Or would I need to use the same scheme used in the Evaluate?

Most helpful comment

check my custom metrics, it also includes mean IOU for multi class segmentation

https://github.com/JeniaNovellusDx/KerasExtras/blob/master/keras_functions.py

All 4 comments

The interface of Keras' metrics is quite limited, it accepts a y_true and a y_pred. The output of keras-retinanet consists of multiple outputs (boxes and classification values). As far as I know there is no way in Keras to define a metric based on multiple outputs.

Understood. I'm trying to implement a callback like the Evaluate in my project.

Adding a callback that prints some evaluation should be possible, but a "Keras metric" isn't possible.

I'll close this since the original question seems answered.

check my custom metrics, it also includes mean IOU for multi class segmentation

https://github.com/JeniaNovellusDx/KerasExtras/blob/master/keras_functions.py

Was this page helpful?
0 / 5 - 0 ratings