Skip to content

Commit

Permalink
Increasing the default number of detections and boxes to draw from 20…
Browse files Browse the repository at this point in the history
… to 1200 for dense scores
  • Loading branch information
apacha committed Apr 23, 2018
1 parent d921f9b commit 737c8cc
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion research/object_detection/eval_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def visualize_detection_results(result_dict,
show_groundtruth=False,
groundtruth_box_visualization_color='black',
min_score_thresh=.5,
max_num_predictions=20,
max_num_predictions=1200,
skip_scores=False,
skip_labels=False,
keep_image_id_for_visualization_export=False):
Expand Down
2 changes: 1 addition & 1 deletion research/object_detection/model_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ def tpu_scaffold():
if not use_tpu and use_original_images:
detection_and_groundtruth = (
vis_utils.draw_side_by_side_evaluation_image(
eval_dict, category_index, max_boxes_to_draw=20,
eval_dict, category_index, max_boxes_to_draw=1200,
min_score_thresh=0.2))
img_summary = tf.summary.image('Detections_Left_Groundtruth_Right',
detection_and_groundtruth)
Expand Down
2 changes: 1 addition & 1 deletion research/object_detection/protos/eval.proto
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ message EvalConfig {
optional float min_score_threshold = 13 [default=0.5];

// Maximum number of detections to visualize
optional int32 max_num_boxes_to_visualize = 14 [default=20];
optional int32 max_num_boxes_to_visualize = 14 [default=1200];

// When drawing a single detection, each label is by default visualized as
// <label name> : <label score>. One can skip the name or/and score using the
Expand Down
6 changes: 3 additions & 3 deletions research/object_detection/utils/visualization_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ def draw_bounding_boxes_on_image_tensors(images,
category_index,
instance_masks=None,
keypoints=None,
max_boxes_to_draw=20,
max_boxes_to_draw=1200,
min_score_thresh=0.2):
"""Draws bounding boxes, masks, and keypoints on batch of image tensors.
Expand Down Expand Up @@ -381,7 +381,7 @@ def draw_boxes(image_and_detections):

def draw_side_by_side_evaluation_image(eval_dict,
category_index,
max_boxes_to_draw=20,
max_boxes_to_draw=1200,
min_score_thresh=0.2):
"""Creates a side-by-side image with detections and groundtruth.
Expand Down Expand Up @@ -535,7 +535,7 @@ def visualize_boxes_and_labels_on_image_array(
instance_boundaries=None,
keypoints=None,
use_normalized_coordinates=False,
max_boxes_to_draw=20,
max_boxes_to_draw=1200,
min_score_thresh=.5,
agnostic_mode=False,
line_thickness=4,
Expand Down

0 comments on commit 737c8cc

Please sign in to comment.