How can I extract the output scores for objects , object class ,object id detected in images , generated by the Tensorflow Model for Object Detection ?
I want to store all these details into individual variables so that later they can be stored in a database .
Using the same code as found in this link https://github.com/tensorflow/models/blob/master/research/object_detection/object_detection_tutorial.ipynb
Please Help me out with the solution to this problem .
I've Tried
print(str(output_dict['detection_classes'][0] ) , ":" , str(output_dict['detection_scores'][0]))
This works and gives the object id and score for the class with the highest probability . But I want to extract the class name too and also the scores , Ids and names for all objects present in the image
You may need some knowledge background about tensorflow object detection, short and quick solution here might be the way you expected :
Hope this helpful.
It gives you the class with the highest score because output tensors are sorted from highest score to lowest and you are asking for the highest score by indexing to the first element [0].
Look at object_detection/inference/detection_inference for inspiration.
As for class names, you can use the label map to create a category index dictionary to translate class ids to names.
Get class name, your label map should be able to help here.
Please paste your code, so we can figure out why only one box is in y