Closed fingertap closed 2 years ago
This config can reproduce this error:
# icnet_r50-d8_832x832_160k_ade20k.py
_base_ = [
'../_base_/models/icnet_r50-d8.py',
'../_base_/datasets/ade20k.py',
'../_base_/default_runtime.py',
'../_base_/schedules/schedule_160k.py'
]
norm_cfg = dict(type='SyncBN', requires_grad=True)
model = dict(
type='EncoderDecoder',
decode_head=dict(
type='FCNHead',
in_channels=128,
channels=128,
num_convs=1,
in_index=2,
dropout_ratio=0,
num_classes=150,
norm_cfg=norm_cfg,
concat_input=False,
align_corners=False,
loss_decode=dict(
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0)),
auxiliary_head=[
dict(
type='FCNHead',
in_channels=128,
channels=128,
num_convs=1,
num_classes=150,
in_index=0,
norm_cfg=norm_cfg,
concat_input=False,
align_corners=False,
loss_decode=dict(
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=0.4)),
dict(
type='FCNHead',
in_channels=128,
channels=128,
num_convs=1,
num_classes=150,
in_index=1,
norm_cfg=norm_cfg,
concat_input=False,
align_corners=False,
loss_decode=dict(
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=0.4)),
]
)
All I did is changing the num_classes
of decode heads and replace cityscapes with ade20k.
This error occurs when reduce_zero_labels
is not set.
I was trying to train real-time segmenters on ADE20k. However, models such as ICNet, mobilenet_v3, fast scnn gave me
CUDA error: an illegal memory access was encountered
error. The full trace is attached below. I suspect it is a bug of mmseg, but I had troubles digging into it, as mmseg does not give me an option of using cpu to train, where I can get a better error trace. Anyway, I need help on this issue of making real-time segmenters work on ADE20k. BTW, bisenetv2 and mobilenetv2 worked fine.