首页 > 解决方案 > 如何使用 tensorFlow 2 Object Detection API 绘制ground truth bbox?

问题描述

我正在尝试使用文档可视化基本事实 bbox,如下所示:

viz_utils.visualize_boxes_and_labels_on_image_array(
          image_np_with_detections,
          detections['detection_boxes'],
          detections['detection_classes'],
          detections['detection_scores'],
          category_index,
          use_normalized_coordinates=True,
          groundtruth_box_visualization_color='black',
          max_boxes_to_draw=200,
          min_score_thresh=.10,
          agnostic_mode=False)

但是,看起来groundtruth_box_visualization_color='black'不起作用,因为在推断出测试样本后它没有显示基本事实 bbox,知道如何解决这个问题吗?

我在 pipeline.config 文件中添加了以下内容:

eval_config: {
  metrics_set: "coco_detection_metrics"
  use_moving_averages: false
  visualization_export_dir: "/home/ambigus9/models/research/images/eval"
  visualize_groundtruth_boxes: true
  batch_size: 1;
}

标签: tensorflow

解决方案


推荐阅读