Reputation: 155
I have been using Tensorflow Object detection API on my own dataset. While training, the training losses are updated on the tensorboard. But I need the training and validation accuracy respectively (mAP). What steps need to be taken to get these values?
Upvotes: 1
Views: 1634
Reputation: 151
Since you said mAP which stands for Mean Average Precision, you need to have the metrics_set in your pipeline config file with the value "coco_detection_metrics". Your file should have something like that:
eval_config: {
metrics_set: "coco_detection_metrics"
use_moving_averages: false
}
After that, when you run the eval_continuously you should get the mAP on your validation set.
For the training set you need to set the eval_on_train_data
parameter when running the model_main_tf2.py
script.
Upvotes: 0
Reputation: 4595
If you are using the keras API, through tf.keras
, you can add evaluation functions as metrics in the model.fit
function. Checkout the official documentation for a list of all available metrics.
You might be interested be interested in tf.metrics.average_precision_at_k
. If it doesn't do exactly what you need, you can also implement a custom metric.
Upvotes: 1