Skip to content
Snippets Groups Projects
Commit f3cf96b6 authored by Jerry Jiarui XU's avatar Jerry Jiarui XU Committed by GitHub
Browse files

[Bug fix] Fixed ADE20k test (#359)

* [Bug fix] Fixed ADE20k test

* fixed ade cfg
parent 4423d327
No related branches found
No related tags found
No related merge requests found
Showing
with 9 additions and 25 deletions
......@@ -4,4 +4,3 @@ _base_ = [
]
model = dict(
decode_head=dict(num_classes=150), auxiliary_head=dict(num_classes=150))
test_cfg = dict(mode='whole')
......@@ -4,4 +4,3 @@ _base_ = [
]
model = dict(
decode_head=dict(num_classes=150), auxiliary_head=dict(num_classes=150))
test_cfg = dict(mode='whole')
......@@ -4,4 +4,3 @@ _base_ = [
]
model = dict(
decode_head=dict(num_classes=150), auxiliary_head=dict(num_classes=150))
test_cfg = dict(mode='whole')
......@@ -4,4 +4,3 @@ _base_ = [
]
model = dict(
decode_head=dict(num_classes=150), auxiliary_head=dict(num_classes=150))
test_cfg = dict(mode='whole')
......@@ -4,4 +4,3 @@ _base_ = [
]
model = dict(
decode_head=dict(num_classes=150), auxiliary_head=dict(num_classes=150))
test_cfg = dict(mode='whole')
......@@ -4,4 +4,3 @@ _base_ = [
]
model = dict(
decode_head=dict(num_classes=150), auxiliary_head=dict(num_classes=150))
test_cfg = dict(mode='whole')
......@@ -4,4 +4,3 @@ _base_ = [
]
model = dict(
decode_head=dict(num_classes=150), auxiliary_head=dict(num_classes=150))
test_cfg = dict(mode='whole')
......@@ -4,4 +4,3 @@ _base_ = [
]
model = dict(
decode_head=dict(num_classes=150), auxiliary_head=dict(num_classes=150))
test_cfg = dict(mode='whole')
......@@ -4,4 +4,3 @@ _base_ = [
]
model = dict(
decode_head=dict(num_classes=150), auxiliary_head=dict(num_classes=150))
test_cfg = dict(mode='whole')
......@@ -4,4 +4,3 @@ _base_ = [
]
model = dict(
decode_head=dict(num_classes=150), auxiliary_head=dict(num_classes=150))
test_cfg = dict(mode='whole')
......@@ -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')
......@@ -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')
......@@ -4,4 +4,3 @@ _base_ = [
]
model = dict(
decode_head=dict(num_classes=150), auxiliary_head=dict(num_classes=150))
test_cfg = dict(mode='whole')
......@@ -4,4 +4,3 @@ _base_ = [
]
model = dict(
decode_head=dict(num_classes=150), auxiliary_head=dict(num_classes=150))
test_cfg = dict(mode='whole')
......@@ -4,4 +4,3 @@ _base_ = [
]
model = dict(
decode_head=dict(num_classes=150), auxiliary_head=dict(num_classes=150))
test_cfg = dict(mode='whole')
......@@ -4,4 +4,3 @@ _base_ = [
]
model = dict(
decode_head=dict(num_classes=150), auxiliary_head=dict(num_classes=150))
test_cfg = dict(mode='whole')
......@@ -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]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment