[Bug fix] Fixed ADE20k test (#359)

* [Bug fix] Fixed ADE20k test

* fixed ade cfg
This commit is contained in:
Jerry Jiarui XU 2021-01-24 02:17:59 -08:00 committed by GitHub
parent faaf29e668
commit 6879b0d43c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
17 changed files with 9 additions and 25 deletions

View File

@ -4,4 +4,3 @@ _base_ = [
]
model = dict(
decode_head=dict(num_classes=150), auxiliary_head=dict(num_classes=150))
test_cfg = dict(mode='whole')

View File

@ -4,4 +4,3 @@ _base_ = [
]
model = dict(
decode_head=dict(num_classes=150), auxiliary_head=dict(num_classes=150))
test_cfg = dict(mode='whole')

View File

@ -4,4 +4,3 @@ _base_ = [
]
model = dict(
decode_head=dict(num_classes=150), auxiliary_head=dict(num_classes=150))
test_cfg = dict(mode='whole')

View File

@ -4,4 +4,3 @@ _base_ = [
]
model = dict(
decode_head=dict(num_classes=150), auxiliary_head=dict(num_classes=150))
test_cfg = dict(mode='whole')

View File

@ -4,4 +4,3 @@ _base_ = [
]
model = dict(
decode_head=dict(num_classes=150), auxiliary_head=dict(num_classes=150))
test_cfg = dict(mode='whole')

View File

@ -4,4 +4,3 @@ _base_ = [
]
model = dict(
decode_head=dict(num_classes=150), auxiliary_head=dict(num_classes=150))
test_cfg = dict(mode='whole')

View File

@ -4,4 +4,3 @@ _base_ = [
]
model = dict(
decode_head=dict(num_classes=150), auxiliary_head=dict(num_classes=150))
test_cfg = dict(mode='whole')

View File

@ -4,4 +4,3 @@ _base_ = [
]
model = dict(
decode_head=dict(num_classes=150), auxiliary_head=dict(num_classes=150))
test_cfg = dict(mode='whole')

View File

@ -4,4 +4,3 @@ _base_ = [
]
model = dict(
decode_head=dict(num_classes=150), auxiliary_head=dict(num_classes=150))
test_cfg = dict(mode='whole')

View File

@ -4,4 +4,3 @@ _base_ = [
]
model = dict(
decode_head=dict(num_classes=150), auxiliary_head=dict(num_classes=150))
test_cfg = dict(mode='whole')

View File

@ -5,4 +5,3 @@ _base_ = [
model = dict(
decode_head=dict(mask_size=(66, 66), num_classes=150),
auxiliary_head=dict(num_classes=150))
test_cfg = dict(mode='whole')

View File

@ -5,4 +5,3 @@ _base_ = [
model = dict(
decode_head=dict(mask_size=(66, 66), num_classes=150),
auxiliary_head=dict(num_classes=150))
test_cfg = dict(mode='whole')

View File

@ -4,4 +4,3 @@ _base_ = [
]
model = dict(
decode_head=dict(num_classes=150), auxiliary_head=dict(num_classes=150))
test_cfg = dict(mode='whole')

View File

@ -4,4 +4,3 @@ _base_ = [
]
model = dict(
decode_head=dict(num_classes=150), auxiliary_head=dict(num_classes=150))
test_cfg = dict(mode='whole')

View File

@ -4,4 +4,3 @@ _base_ = [
]
model = dict(
decode_head=dict(num_classes=150), auxiliary_head=dict(num_classes=150))
test_cfg = dict(mode='whole')

View File

@ -4,4 +4,3 @@ _base_ = [
]
model = dict(
decode_head=dict(num_classes=150), auxiliary_head=dict(num_classes=150))
test_cfg = dict(mode='whole')

View File

@ -34,15 +34,15 @@ def intersect_and_union(pred_label,
if isinstance(label, str):
label = mmcv.imread(label, flag='unchanged', backend='pillow')
# modify if custom classes
if label_map is not None:
for old_id, new_id in label_map.items():
label[label == old_id] = new_id
if reduce_zero_label:
# avoid using underflow conversion
label[label == 0] = 255
label = label - 1
label[label == 254] = 255
# modify if custom classes
if label_map is not None:
for old_id, new_id in label_map.items():
label[label == old_id] = new_id
if reduce_zero_label:
# avoid using underflow conversion
label[label == 0] = 255
label = label - 1
label[label == 254] = 255
mask = (label != ignore_index)
pred_label = pred_label[mask]