tensorflow / models

Models and examples built with TensorFlow
Other
76.95k stars 45.79k forks source link

Coco detection metrics in object detection tf v.2.2.0 #8856

Open tazu786 opened 4 years ago

tazu786 commented 4 years ago

Prerequisites

Please answer the following question for yourself before submitting an issue.

1. The entire URL of the file you are using

https://github.com/tensorflow/models/blob/master/research/object_detection/colab_tutorials/eager_few_shot_od_training_tf2_colab.ipynb

2. Describe the feature you request

I request the implementation of the coco_detection_metrics in the above colab.

3. Additional context

The new colab for few-shot-training you provide is a great improvement on how to easily use the OD api. Having the coco metrics other than only the loss would be great.

4. Are you willing to contribute it? (Yes or No)

No

pn12 commented 4 years ago

Add below in your code to include coco evaluation metrics -

from object_detection.protos import eval_pb2 eval_config = eval_pb2.EvalConfig() eval_config.metrics_set.extend(['coco_detection_metrics'])

for the precision , recall and iou at different thresholds

I have referred this doc - https://github.com/tensorflow/models/blob/da23acba8ecb8c0e7c9a83cdb9f10092895c9dcc/research/object_detection/g3doc/evaluation_protocols.md for the same.

tazu786 commented 4 years ago

thank you @pn12! I kind of have the same issue using model_main_tf2.py with the config file. How can I apply those lines in that case too?