mirror of
https://github.com/open-mmlab/mmsegmentation.git
synced 2025-06-03 22:03:48 +08:00
* added cgnet * added testing for cgnet * git test * add cgnet * fix __init__ * rename FGlo with GlobalContextExtractor * add readme.md and rename bn with norm * delete cg_head * fix a language mistake * rename cgnet_m3n21.py to cgnet.py * modify README.md * modify list to tuple * add fcn_head test * add assert to fcn_head * blank * fix fcn_head assert bug * add * add cgnet to README.md and model_zoo.md * modify cgnet README.md Co-authored-by: KID <wps_@mail.nankai.edu.cn>
36 lines
1.1 KiB
Python
36 lines
1.1 KiB
Python
# model settings
|
|
norm_cfg = dict(type='SyncBN', eps=1e-03, requires_grad=True)
|
|
model = dict(
|
|
type='EncoderDecoder',
|
|
backbone=dict(
|
|
type='CGNet',
|
|
norm_cfg=norm_cfg,
|
|
in_channels=3,
|
|
num_channels=(32, 64, 128),
|
|
num_blocks=(3, 21),
|
|
dilations=(2, 4),
|
|
reductions=(8, 16)),
|
|
decode_head=dict(
|
|
type='FCNHead',
|
|
in_channels=256,
|
|
in_index=2,
|
|
channels=256,
|
|
num_convs=0,
|
|
concat_input=False,
|
|
dropout_ratio=0,
|
|
num_classes=19,
|
|
norm_cfg=norm_cfg,
|
|
loss_decode=dict(
|
|
type='CrossEntropyLoss',
|
|
use_sigmoid=False,
|
|
loss_weight=1.0,
|
|
class_weight=[
|
|
2.5959933, 6.7415504, 3.5354059, 9.8663225, 9.690899, 9.369352,
|
|
10.289121, 9.953208, 4.3097677, 9.490387, 7.674431, 9.396905,
|
|
10.347791, 6.3927646, 10.226669, 10.241062, 10.280587,
|
|
10.396974, 10.055647
|
|
])))
|
|
# model training and testing settings
|
|
train_cfg = dict(sampler=None)
|
|
test_cfg = dict(mode='whole')
|