Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
ResNet50_tensorflow
Commits
e46021a7
Commit
e46021a7
authored
Mar 20, 2018
by
Zhichao Lu
Committed by
pkulzc
Apr 02, 2018
Browse files
Apply fix for image summary in eval metrics, so that eval on train works appropriately.
PiperOrigin-RevId: 189815553
parent
7007d9e3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
research/object_detection/model.py
research/object_detection/model.py
+4
-2
No files found.
research/object_detection/model.py
View file @
e46021a7
...
@@ -362,6 +362,7 @@ def create_model_fn(detection_model_fn, configs, hparams, use_tpu=False):
...
@@ -362,6 +362,7 @@ def create_model_fn(detection_model_fn, configs, hparams, use_tpu=False):
else
:
else
:
category_index
=
label_map_util
.
create_category_index_from_labelmap
(
category_index
=
label_map_util
.
create_category_index_from_labelmap
(
eval_input_config
.
label_map_path
)
eval_input_config
.
label_map_path
)
img_summary
=
None
if
not
use_tpu
and
use_original_images
:
if
not
use_tpu
and
use_original_images
:
detection_and_groundtruth
=
(
detection_and_groundtruth
=
(
vis_utils
.
draw_side_by_side_evaluation_image
(
vis_utils
.
draw_side_by_side_evaluation_image
(
...
@@ -378,8 +379,9 @@ def create_model_fn(detection_model_fn, configs, hparams, use_tpu=False):
...
@@ -378,8 +379,9 @@ def create_model_fn(detection_model_fn, configs, hparams, use_tpu=False):
eval_metric_ops
=
eval_util
.
get_eval_metric_ops_for_evaluators
(
eval_metric_ops
=
eval_util
.
get_eval_metric_ops_for_evaluators
(
eval_metrics
,
category_index
.
values
(),
eval_dict
,
eval_metrics
,
category_index
.
values
(),
eval_dict
,
include_metrics_per_category
=
False
)
include_metrics_per_category
=
False
)
eval_metric_ops
[
'Detections_Left_Groundtruth_Right'
]
=
(
if
img_summary
is
not
None
:
img_summary
,
tf
.
no_op
())
eval_metric_ops
[
'Detections_Left_Groundtruth_Right'
]
=
(
img_summary
,
tf
.
no_op
())
if
use_tpu
:
if
use_tpu
:
return
tf
.
contrib
.
tpu
.
TPUEstimatorSpec
(
return
tf
.
contrib
.
tpu
.
TPUEstimatorSpec
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment