diff --git a/AUTHORS.rst b/AUTHORS.rst index f05496db..521e7005 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -1,2 +1,4 @@ keras-rcnn was written by Allen Goodman. It’s maintained by Allen Goodman and various contributors: + +Jane Hung diff --git a/keras_rcnn/metrics.py b/keras_rcnn/metrics.py index e69de29b..9d46f524 100644 --- a/keras_rcnn/metrics.py +++ b/keras_rcnn/metrics.py @@ -0,0 +1,4 @@ +import tensorflow + +def mean_average_precision(y_true, y_pred): + return tensorflow.reduce_mean(tensorflow.metrics.sparse_average_precision_at_k(tensorflow.cast(y_true, tensorflow.int64), y_pred, 1)[0]) \ No newline at end of file