I'm using the tensorflow object detection API and I would like to know if in all the python scripts there is one that would return which labels are present in the image. Like returning a Json or something like this ?
I'm using the tensorflow object detection API and I would like to know if in all the python scripts there is one that would return which labels are present in the image. Like returning a Json or something like this ?
There's no python script that directly generates JSON, but there is a Jupyter notebook that demonstrates how to do inference:
Alternatively if you want to use a pre-existing script, this Jupyter notebook shows how to use a script that generates TFRecord files: https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/oid_inference_and_evaluation.md
Which can then be processed using code in the tf_example_decoder.py as a reference:
https://github.com/tensorflow/models/blob/master/research/object_detection/data_decoders/tf_example_decoder.py
https://lijiancheng0614.github.io/2017/08/22/2017_08_22_TensorFlow-Object-Detection-API/
This is what you are looking for. The last code snippet.