object-detection-api

Tensorflow Object Detection API `indices[3] = 3 is not in [0, 3)` error

跟風遠走 提交于 2020-01-03 05:24:07
问题 I am working on retraining TF Object Detection API's mobilenet(v1)-SSD, and having trouble with the error that I'm getting at the training step. INFO:tensorflow:Starting Session. INFO:tensorflow:Saving checkpoint to path xxxx/model.ckpt INFO:tensorflow:Starting Queues. INFO:tensorflow:Error reported to Coordinator: <class 'tensorflow.python.framework.errors_impl.InvalidArgumentError'>, indices[3] = 3 is not in [0, 3) [[Node: cond_2/RandomCropImage/PruneCompleteleyOutsideWindow/Gather/Gather_1

Get the bounding box coordinates in the TensorFlow object detection API tutorial

跟風遠走 提交于 2019-12-31 13:15:22
问题 I am new to both python and Tensorflow. I am trying to run the object_detection_tutorial file from the Tensorflow Object Detection API, but I cannot find where I can get the coordinates of the bounding boxes when objects are detected. Relevant code: # The following processing is only for single image detection_boxes = tf.squeeze(tensor_dict['detection_boxes'], [0]) detection_masks = tf.squeeze(tensor_dict['detection_masks'], [0]) ... The place where I assume bounding boxes are drawn is like

Output score , class and id Extraction using TensorFlow object detection

ε祈祈猫儿з 提交于 2019-12-31 06:59:45
问题 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

Return coordinates that passes threshold value for bounding boxes Google's Object Detection API

陌路散爱 提交于 2019-12-31 03:55:25
问题 Does anyone know how to get bounding box coordinates which only passes threshold value? I found this answer (here's a link), so I tried using it and done the following: vis_util.visualize_boxes_and_labels_on_image_array( image, np.squeeze(boxes), np.squeeze(classes).astype(np.int32), np.squeeze(scores), category_index, use_normalized_coordinates=True, line_thickness=1, min_score_thresh=0.80) for i,b in enumerate(boxes[0]): ymin = boxes[0][i][0]*height xmin = boxes[0][i][1]*width ymax = boxes

What is difference frozen_inference_graph.pb and saved_model.pb?

一曲冷凌霜 提交于 2019-12-30 00:34:09
问题 I have a trained model (Faster R-CNN) which I exported using export_inference_graph.py to use for inference. I'm trying to understand the difference between the created frozen_inference_graph.pb and saved_model.pb and also model.ckpt* files. I've also seen .pbtxt representations. I tried reading through this but couldn't really find the answers: https://www.tensorflow.org/extend/tool_developers/ What do each of these files contain? Which ones can be converted to which other ones? What is the

Mobilenet SSD Input Image Size

血红的双手。 提交于 2019-12-23 10:10:22
问题 I would like to train a Mobilenet SSD Model on a custom dataset. I have looked into the workflow of retraining a model and noticed the image_resizer{} block in the config file: https://github.com/tensorflow/models/blob/d6d0868209833e014074d6cb4f32558e7acf2a6d/research/object_detection/samples/configs/ssd_mobilenet_v1_pets.config#L43 Does the aspect ratio here have to be 1:1 like 300x300 or can I specify a custom ratio? All my dataset images are 960x256 - so could I just input this size for

Data Augmentation in Tensorflow Object Detection API

我只是一个虾纸丫 提交于 2019-12-22 14:48:20
问题 In config file, we are given the default Augmentation option as shown below. data_augmentation_options { random_horizontal_flip { } } But I wondered how it works with the bounding box(ground truth box) values given with the training images. so I looked at preprocessor.py, random_horizontal_flip() takes 'boxes=None' parameter. Since no argument is given in the config file, I assume this flip does not account bounding box when it does the random horizontal flip. My question is what arguments do

Data Augmentation in Tensorflow Object Detection API

主宰稳场 提交于 2019-12-22 14:47:31
问题 In config file, we are given the default Augmentation option as shown below. data_augmentation_options { random_horizontal_flip { } } But I wondered how it works with the bounding box(ground truth box) values given with the training images. so I looked at preprocessor.py, random_horizontal_flip() takes 'boxes=None' parameter. Since no argument is given in the config file, I assume this flip does not account bounding box when it does the random horizontal flip. My question is what arguments do

Data Augmentation in Tensorflow Object Detection API

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-22 14:47:23
问题 In config file, we are given the default Augmentation option as shown below. data_augmentation_options { random_horizontal_flip { } } But I wondered how it works with the bounding box(ground truth box) values given with the training images. so I looked at preprocessor.py, random_horizontal_flip() takes 'boxes=None' parameter. Since no argument is given in the config file, I assume this flip does not account bounding box when it does the random horizontal flip. My question is what arguments do

How to train and evaluate simultaneously in Object Detection API ?

风格不统一 提交于 2019-12-22 08:09:10
问题 I want to have train/evaluate the ssd_mobile_v1_coco on my own dataset at the same time in Object Detection API . However, when I simply try to do so, I am faced with GPU memory being nearly full and thus the evaluation script fails to start. Here are the commands I use for training and then evaluation: Training script is called in one terminal pane like this : python3 train.py \ --logtostderr \ --train_dir=training_ssd_mobile_caltech \ --pipeline_config_path=ssd_mobilenet_v1_coco_2017_11_17