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
4c764049
Unverified
Commit
4c764049
authored
Sep 21, 2021
by
srihari-humbarwadi
Browse files
removed config param `evaluate_panoptic_quality`
parent
910ccf1a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
6 deletions
+5
-6
official/vision/beta/projects/panoptic_maskrcnn/configs/panoptic_maskrcnn.py
...a/projects/panoptic_maskrcnn/configs/panoptic_maskrcnn.py
+0
-1
official/vision/beta/projects/panoptic_maskrcnn/tasks/panoptic_maskrcnn.py
...eta/projects/panoptic_maskrcnn/tasks/panoptic_maskrcnn.py
+5
-5
No files found.
official/vision/beta/projects/panoptic_maskrcnn/configs/panoptic_maskrcnn.py
View file @
4c764049
...
...
@@ -141,7 +141,6 @@ class PanopticMaskRCNNTask(maskrcnn.MaskRCNNTask):
# 'all': Initialize all modules
init_checkpoint_modules
:
Optional
[
List
[
str
]]
=
dataclasses
.
field
(
default_factory
=
list
)
evaluate_panoptic_quality
:
bool
=
True
panoptic_quality_evaluator
:
PanopticQualityEvaluator
=
PanopticQualityEvaluator
()
# pylint: disable=line-too-long
@
exp_factory
.
register_config_factory
(
'panoptic_maskrcnn_resnetfpn_coco'
)
...
...
official/vision/beta/projects/panoptic_maskrcnn/tasks/panoptic_maskrcnn.py
View file @
4c764049
...
...
@@ -246,7 +246,7 @@ class PanopticMaskRCNNTask(maskrcnn.MaskRCNNTask):
rescale_predictions
=
rescale_predictions
,
dtype
=
tf
.
float32
)
if
self
.
task_config
.
evalu
ate_panoptic_
quality
:
if
self
.
task_config
.
model
.
gener
ate_panoptic_
masks
:
assert
(
self
.
task_config
.
validation_data
.
parser
.
include_panoptic_masks
,
'`include_panoptic_masks` should be set to True when computing '
...
...
@@ -376,7 +376,7 @@ class PanopticMaskRCNNTask(maskrcnn.MaskRCNNTask):
segmentation_labels
,
outputs
[
'segmentation_outputs'
])
})
if
self
.
task_config
.
evalu
ate_panoptic_
quality
:
if
self
.
task_config
.
model
.
gener
ate_panoptic_
masks
:
pq_metric_labels
=
{
'category_mask'
:
labels
[
'groundtruths'
][
'gt_panoptic_category_mask'
],
...
...
@@ -393,7 +393,7 @@ class PanopticMaskRCNNTask(maskrcnn.MaskRCNNTask):
self
.
coco_metric
.
reset_states
()
self
.
segmentation_perclass_iou_metric
.
reset_states
()
state
=
[
self
.
coco_metric
,
self
.
segmentation_perclass_iou_metric
]
if
self
.
task_config
.
evalu
ate_panoptic_
quality
:
if
self
.
task_config
.
model
.
gener
ate_panoptic_
masks
:
state
+=
[
self
.
panoptic_quality_metric
]
self
.
coco_metric
.
update_state
(
...
...
@@ -403,7 +403,7 @@ class PanopticMaskRCNNTask(maskrcnn.MaskRCNNTask):
step_outputs
[
self
.
segmentation_perclass_iou_metric
.
name
][
0
],
step_outputs
[
self
.
segmentation_perclass_iou_metric
.
name
][
1
])
if
self
.
task_config
.
evalu
ate_panoptic_
quality
:
if
self
.
task_config
.
model
.
gener
ate_panoptic_
masks
:
self
.
panoptic_quality_metric
.
update_state
(
step_outputs
[
self
.
panoptic_quality_metric
.
name
][
0
],
step_outputs
[
self
.
panoptic_quality_metric
.
name
][
1
])
...
...
@@ -424,7 +424,7 @@ class PanopticMaskRCNNTask(maskrcnn.MaskRCNNTask):
# Computes mean IoU
result
.
update
({
'segmentation_mean_iou'
:
tf
.
reduce_mean
(
ious
).
numpy
()})
if
self
.
task_config
.
evalu
ate_panoptic_
quality
:
if
self
.
task_config
.
model
.
gener
ate_panoptic_
masks
:
for
k
,
value
in
self
.
panoptic_quality_metric
.
result
().
items
():
result
[
'panoptic_quality/'
+
k
]
=
value
...
...
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