Set default value for "min_score_thresh" to 0 in object detection visualization code.
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 Makes sense. Could you send a PR for this ?
@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 please fork this repository and send a pull request from there.
@mrfortynine @tombstone Can I work on this?
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.