object-detection-api

How to solve “AttributeError: module 'google.protobuf.descriptor' has no attribute '_internal_create_key”?

自闭症网瘾萝莉.ら 提交于 2020-07-18 09:19:45
问题 I encountered it while executing from object_detection.utils import label_map_util in jupyter notebook. It is actually the tensorflow object detection tutorial notebook(it comes with the tensorflow object detection api) The complete error log: AttributeError Traceback (most recent call last) <ipython-input-7-7035655b948a> in <module> 1 from object_detection.utils import ops as utils_ops ----> 2 from object_detection.utils import label_map_util 3 from object_detection.utils import

How to print the detected classes after performing object detection on an image?

怎甘沉沦 提交于 2020-06-29 08:21:28
问题 I am following the object_detection_tutorial.ipynb tutorial. Here is the code ( I only put parts which are needed, the rest of the code is the same as the notebook): my_results = [] # I added this, a list to hold the detected classes PATH_TO_LABELS = 'D:\\TensorFlow\\models\\research\\object_detection\\data\\oid_v4_label_map.pbtxt' category_index = label_map_util.create_category_index_from_labelmap(PATH_TO_LABELS, use_display_name=True) PATH_TO_TEST_IMAGES_DIR = pathlib.Path('C:\\Users\

Tuning first_stage_anchor_generator in faster rcnn model

懵懂的女人 提交于 2020-06-24 07:42:11
问题 I am trying to detect some very small object (~25x25 pixels) from large image (~ 2040, 1536 pixels) using faster rcnn model from object_detect_api from here https://github.com/tensorflow/models/tree/master/research/object_detection I am very confused about the following configuration parameters(I have read the proto file and also tried modify them and test): first_stage_anchor_generator { grid_anchor_generator { scales: [0.25, 0.5, 1.0, 2.0] aspect_ratios: [0.5, 1.0, 2.0] height_stride: 16

How to find the Input and Output Nodes of a Frozen Model

半腔热情 提交于 2020-06-09 17:04:50
问题 I want to use tensorflow's optimize_for_inference.py script on a frozen Model from the model zoo: the ssd_mobilenet_v1_coco . How do i find/determine the names of the input and output name of the model? Here is a link to the graph generated by tensorboard This question might help: Given a tensor flow model graph, how to find the input node and output node names (for me it did not) 回答1: We've now added some documentation on this process, covered here: https://www.tensorflow.org/mobile/prepare

How to find the Input and Output Nodes of a Frozen Model

北战南征 提交于 2020-06-09 17:02:25
问题 I want to use tensorflow's optimize_for_inference.py script on a frozen Model from the model zoo: the ssd_mobilenet_v1_coco . How do i find/determine the names of the input and output name of the model? Here is a link to the graph generated by tensorboard This question might help: Given a tensor flow model graph, how to find the input node and output node names (for me it did not) 回答1: We've now added some documentation on this process, covered here: https://www.tensorflow.org/mobile/prepare

How to convert tflite_graph.pb to detect.tflite properly

∥☆過路亽.° 提交于 2020-06-01 05:17:07
问题 I am using tensorflow object-detection api for training a custom model using ssdlite_mobilenet_v2_coco_2018_05_09 from tensorflow model zoo. I successfully trained the model and test it out using a script provided in this tutorial. Here is the problem, I need a detect.tflite to use it in my target machine (an embedded system). But when I actually make a tflite out of my model, it outputs almost nothing and when it does, its a wrong detection . To make the .tflite file, I first used export

Crop and Select Only the Detected Region from an Image in Python

孤者浪人 提交于 2020-05-13 19:16:57
问题 I have used Tensorflow Object Detection API to detect hands from images. By using the provided sample code (object_detection_tutorial.ipynb) I have been able to draw bounding boxes on images. Is there any way to select only the detected region (which is inside a bounding box) and get it as an image? For example, Sample Input Image Tensorflow Output What I Want Object detection API sample code can be found here. https://github.com/tensorflow/models/blob/master/research/object_detection/object