models icon indicating copy to clipboard operation
models copied to clipboard

Set default value for "min_score_thresh" to 0 in object detection visualization code.

Open mrfortynine opened this issue 9 years ago • 6 comments

I'm suggesting this for two reason:

  • With current value 0.5, usually nothing gets drawn at early stage of training. This can be confusing for new comer who just want to run some provided examples. For instance, I discovered this issue when trying to train a pet classifier using SSD config.
  • There's usually a min score threshold in post processing step. One would expect the default behavior of visualization is just draw every box that survived that post process threshold.
diff --git a/research/object_detection/eval_util.py b/research/object_detection/eval_util.py
index 6a37be7..d7bb952 100644
--- a/research/object_detection/eval_util.py
+++ b/research/object_detection/eval_util.py
@@ -60,7 +60,7 @@ def visualize_detection_results(result_dict,
                                 export_dir='',
                                 agnostic_mode=False,
                                 show_groundtruth=False,
-                                min_score_thresh=.5,
+                                min_score_thresh=.0,
                                 max_num_predictions=20):
   """Visualizes detection results and writes visualizations to image summaries.
 
diff --git a/research/object_detection/evaluator.py b/research/object_detection/evaluator.py
index 74722d0..7a6ca0c 100644
--- a/research/object_detection/evaluator.py
+++ b/research/object_detection/evaluator.py
@@ -177,7 +177,7 @@ def evaluate(create_input_dict_fn, create_model_fn, eval_config, categories,
           categories=categories,
           summary_dir=eval_dir,
           export_dir=eval_config.visualization_export_dir,
-          show_groundtruth=eval_config.visualization_export_dir)
+          show_groundtruth=true)
     return result_dict
 
   variables_to_restore = tf.global_variables()
diff --git a/research/object_detection/utils/visualization_utils.py b/research/object_detection/utils/visualization_utils.py
index 5c16f7a..a7ec6a9 100644
--- a/research/object_detection/utils/visualization_utils.py
+++ b/research/object_detection/utils/visualization_utils.py
@@ -391,7 +391,7 @@ def visualize_boxes_and_labels_on_image_array(image,
                                               keypoints=None,
                                               use_normalized_coordinates=False,
                                               max_boxes_to_draw=20,
-                                              min_score_thresh=.5,
+                                              min_score_thresh=.0,
                                               agnostic_mode=False,
                                               line_thickness=4):

mrfortynine avatar Nov 09 '17 18:11 mrfortynine

@mrfortynine Makes sense. Could you send a PR for this ?

tombstone avatar Nov 10 '17 16:11 tombstone

@mrfortynine Makes sense. Could you send a PR for this ?

@tombstone I don't seem allow to create branch in this repo. So I'm not sure how to create a PR.

mrfortynine avatar Nov 10 '17 21:11 mrfortynine

@mrfortynine please fork this repository and send a pull request from there.

tombstone avatar Nov 18 '17 07:11 tombstone

PR 2831

mrfortynine avatar Nov 18 '17 15:11 mrfortynine

@mrfortynine @tombstone Can I work on this?

Patil2099 avatar Aug 15 '19 04:08 Patil2099

Hi There, We are checking to see if you still need help on this, as this seems to be considerably old issue. Please update this issue with the latest information, code snippet to reproduce your issue and error you are seeing. If we don't hear from you in the next 7 days, this issue will be closed automatically. If you don't need help on this issue any more, please consider closing this.

tensorflowbutler avatar Jan 29 '20 23:01 tensorflowbutler