Box data error while running eval.py
Traceback (most recent call last): File "/content/drive/My Drive/CourseTask/Модельки/models-master/research/object_detection/eval.py", line 142, in
tf.app.run() File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/platform/app.py", line 40, in run _run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef) File "/usr/local/lib/python3.6/dist-packages/absl/app.py", line 299, in run _run_main(main, args) File "/usr/local/lib/python3.6/dist-packages/absl/app.py", line 250, in _run_main sys.exit(main(argv)) File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/util/deprecation.py", line 324, in new_func return func(*args, *kwargs) File "/content/drive/My Drive/CourseTask/Модельки/models-master/research/object_detection/eval.py", line 138, in main graph_hook_fn=graph_rewriter_fn) File "/content/drive/My Drive/CourseTask/Модельки/models-master/research/object_detection/legacy/evaluator.py", line 296, in evaluate eval_export_path=eval_config.export_path) File "/content/drive/My Drive/CourseTask/Модельки/models-master/research/object_detection/eval_util.py", line 519, in repeated_checkpoint_run process_metrics_fn=process_metrics_fn) File "/content/drive/My Drive/CourseTask/Модельки/models-master/research/object_detection/eval_util.py", line 365, in _run_checkpoint_once image_id=image_id, detections_dict=result_dict) File "/content/drive/My Drive/CourseTask/Модельки/models-master/research/object_detection/utils/object_detection_evaluation.py", line 367, in add_single_detected_image_info detected_masks=detection_masks) File "/content/drive/My Drive/CourseTask/Модельки/models-master/research/object_detection/utils/object_detection_evaluation.py", line 1133, in add_single_detected_image_info groundtruth_masks=groundtruth_masks)) File "/content/drive/My Drive/CourseTask/Модельки/models-master/research/object_detection/utils/per_image_evaluation.py", line 123, in compute_object_detection_metrics groundtruth_masks=groundtruth_masks) File "/content/drive/My Drive/CourseTask/Модельки/models-master/research/object_detection/utils/per_image_evaluation.py", line 316, in _compute_tp_fp groundtruth_masks=gt_masks_at_ith_class) File "/content/drive/My Drive/CourseTask/Модельки/models-master/research/object_detection/utils/per_image_evaluation.py", line 489, in _compute_tp_fp_for_single_class groundtruth_is_group_of_list=groundtruth_is_group_of_list) File "/content/drive/My Drive/CourseTask/Модельки/models-master/research/object_detection/utils/per_image_evaluation.py", line 396, in _get_overlaps_and_scores_box_mode groundtruth_boxes[~groundtruth_is_group_of_list]) File "/content/drive/My Drive/CourseTask/Модельки/models-master/research/object_detection/utils/np_box_list.py", line 54, in init raise ValueError('Invalid box data. data must be a numpy array of ' ValueError: Invalid box data. data must be a numpy array of N[y_min, x_min, y_max, x_max]
I am genetaring tfrecord from csv file by using extraneous code ( google says it is the only way to do this), here is part with correct order of coordinates:
for index, row in group.object.iterrows():
ymins.append(row['ymin'] / width)
xmins.append(row['xmin'] / width)
ymaxs.append(row['ymax'] / height)
xmaxs.append(row['xmax'] / height)
classes_text.append(row['class'].encode('utf8'))
classes.append(class_text_to_int(row['class']))
tf_example = tf.train.Example(features=tf.train.Features(feature={
'image/height': dataset_util.int64_feature(height),
'image/width': dataset_util.int64_feature(width),
'image/filename': dataset_util.bytes_feature(filename),
'image/source_id': dataset_util.bytes_feature(filename),
'image/encoded': dataset_util.bytes_feature(encoded_jpg),
'image/format': dataset_util.bytes_feature(image_format),
'image/object/bbox/ymin': dataset_util.float_list_feature(ymins),
'image/object/bbox/xmin': dataset_util.float_list_feature(xmins),
'image/object/bbox/ymax': dataset_util.float_list_feature(ymaxs),
'image/object/bbox/xmax': dataset_util.float_list_feature(xmaxs),
'image/object/class/text': dataset_util.bytes_list_feature(classes_text),
'image/object/class/label': dataset_util.int64_list_feature(classes)
`
Thank you for your post. We noticed you have not filled out the following field in the issue template. Could you update them if they are relevant in your case, or leave them as N/A? Thanks. What is the top-level directory of the model you are using Have I written custom code OS Platform and Distribution TensorFlow installed from TensorFlow version Bazel version CUDA/cuDNN version GPU model and memory Exact command to reproduce
Thanks for your reply.
I am using Google Colab for training and evaluating my model, all the errors are being occured in Colab. GPU is NVIDIA Tesla K80 (Google Cloud GPU) I don't use Bazel or CUDA/CuDNN, TF verison - 1.14.0, Model is ssd_mobilenet_v2_coco.
Here are commands which I use:
!python '/content/drive/My Drive/CourseTask/Модельки/models-master/research/object_detection/train.py' --logtostderr --train_dir='/content/drive/My Drive/CourseTask/Модельки/models-master/research/object_detection/training/' --pipeline_config_path='/content/drive/My Drive/CourseTask/Модельки/models-master/research/object_detection/ssd_mobilenet_v1_coco.config'
!python '/content/drive/My Drive/CourseTask/Модельки/models-master/research/object_detection/eval.py' --logtostderr --checkpoint_dir='/content/drive/My Drive/CourseTask/Модельки/models-master/research/object_detection/training/' --pipeline_config_path='/content/drive/My Drive/CourseTask/Модельки/models-master/research/object_detection/ssd_mobilenet_v1_coco.config' --eval_dir='/content/drive/My Drive/CourseTask/Модельки/models-master/research/object_detection/eval'
I didn't understand a question about custom code, I am actually using TF Object detection API.