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
d7f255f6
Commit
d7f255f6
authored
Mar 21, 2018
by
Zhichao Lu
Committed by
pkulzc
Apr 02, 2018
Browse files
Provide groundtruth masks and keypoints in the evaluator.
PiperOrigin-RevId: 189929413
parent
e46021a7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
research/object_detection/evaluator.py
research/object_detection/evaluator.py
+11
-1
No files found.
research/object_detection/evaluator.py
View file @
d7f255f6
...
...
@@ -94,14 +94,24 @@ def _extract_predictions_and_losses(model,
if
fields
.
InputDataFields
.
groundtruth_group_of
in
input_dict
:
groundtruth
[
fields
.
InputDataFields
.
groundtruth_group_of
]
=
(
input_dict
[
fields
.
InputDataFields
.
groundtruth_group_of
])
groundtruth_masks_list
=
None
if
fields
.
DetectionResultFields
.
detection_masks
in
detections
:
groundtruth
[
fields
.
InputDataFields
.
groundtruth_instance_masks
]
=
(
input_dict
[
fields
.
InputDataFields
.
groundtruth_instance_masks
])
groundtruth_masks_list
=
[
input_dict
[
fields
.
InputDataFields
.
groundtruth_instance_masks
]]
groundtruth_keypoints_list
=
None
if
fields
.
DetectionResultFields
.
detection_keypoints
in
detections
:
groundtruth
[
fields
.
InputDataFields
.
groundtruth_keypoints
]
=
(
input_dict
[
fields
.
InputDataFields
.
groundtruth_keypoints
])
groundtruth_keypoints_list
=
[
input_dict
[
fields
.
InputDataFields
.
groundtruth_keypoints
]]
label_id_offset
=
1
model
.
provide_groundtruth
(
[
input_dict
[
fields
.
InputDataFields
.
groundtruth_boxes
]],
[
tf
.
one_hot
(
input_dict
[
fields
.
InputDataFields
.
groundtruth_classes
]
-
label_id_offset
,
depth
=
model
.
num_classes
)])
-
label_id_offset
,
depth
=
model
.
num_classes
)],
groundtruth_masks_list
,
groundtruth_keypoints_list
)
losses_dict
.
update
(
model
.
loss
(
prediction_dict
,
true_image_shapes
))
result_dict
=
eval_util
.
result_dict_for_single_example
(
...
...
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