mirror of
https://github.com/open-mmlab/mmsegmentation.git
synced 2025-06-03 22:03:48 +08:00
Add support for Pascal Context 59 classes (#459)
* Add support for Pascal Context 59 classes (#459) * Create PascalContextDataset59 class in mmseg/datasets/pascal_context.py; * Set reduce_zero_label=True for train_pipeline and PascalContextDataset59; * Add some configs for Pascal-Context 59 classes training and testing; * Try to solve the problem about "fence(IoU)=nan grass(IoU)=0"; * Continue(1): Try to solve the problem about "fence(IoU)=nan grass(IoU)=0"; * ignore files and folders named tempxxx; * Continue(2): Try to solve the problem about "fence(IoU)=nan grass(IoU)=0"; * Modify the calculation of IoU; * Modify the CLASSES order of PascalContextDataset; * Add "fcn", "deeplabv3", "deeplabv3+", "pspnet" config file for model training based on PascalContextDataset59; Add some ignore items in ".gitignore"; * fix the bug "test_cfg specified in both outer field and model field " of pspnet config file; * * Clean unnecessary codes; * Add weighs link, config link, log link and evaluation results about PascalContextDataset59 in README.md * Add command line argument: "-p | --port", this arg can change the transmit port when you transmit data to distributed machine. * * Remove rebundant config files; * Remove "-p|--port" command argument; Co-authored-by: Jiarui XU <xvjiarui0826@gmail.com>
This commit is contained in:
parent
1483720cc0
commit
83d312e87a
60
configs/_base_/datasets/pascal_context_59.py
Normal file
60
configs/_base_/datasets/pascal_context_59.py
Normal file
@ -0,0 +1,60 @@
|
||||
# dataset settings
|
||||
dataset_type = 'PascalContextDataset59'
|
||||
data_root = 'data/VOCdevkit/VOC2010/'
|
||||
img_norm_cfg = dict(
|
||||
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
|
||||
|
||||
img_scale = (520, 520)
|
||||
crop_size = (480, 480)
|
||||
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='LoadAnnotations', reduce_zero_label=True),
|
||||
dict(type='Resize', img_scale=img_scale, ratio_range=(0.5, 2.0)),
|
||||
dict(type='RandomCrop', crop_size=crop_size, cat_max_ratio=0.75),
|
||||
dict(type='RandomFlip', prob=0.5),
|
||||
dict(type='PhotoMetricDistortion'),
|
||||
dict(type='Normalize', **img_norm_cfg),
|
||||
dict(type='Pad', size=crop_size, pad_val=0, seg_pad_val=255),
|
||||
dict(type='DefaultFormatBundle'),
|
||||
dict(type='Collect', keys=['img', 'gt_semantic_seg']),
|
||||
]
|
||||
test_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(
|
||||
type='MultiScaleFlipAug',
|
||||
img_scale=img_scale,
|
||||
# img_ratios=[0.5, 0.75, 1.0, 1.25, 1.5, 1.75],
|
||||
flip=False,
|
||||
transforms=[
|
||||
dict(type='Resize', keep_ratio=True),
|
||||
dict(type='RandomFlip'),
|
||||
dict(type='Normalize', **img_norm_cfg),
|
||||
dict(type='ImageToTensor', keys=['img']),
|
||||
dict(type='Collect', keys=['img']),
|
||||
])
|
||||
]
|
||||
data = dict(
|
||||
samples_per_gpu=4,
|
||||
workers_per_gpu=4,
|
||||
train=dict(
|
||||
type=dataset_type,
|
||||
data_root=data_root,
|
||||
img_dir='JPEGImages',
|
||||
ann_dir='SegmentationClassContext',
|
||||
split='ImageSets/SegmentationContext/train.txt',
|
||||
pipeline=train_pipeline),
|
||||
val=dict(
|
||||
type=dataset_type,
|
||||
data_root=data_root,
|
||||
img_dir='JPEGImages',
|
||||
ann_dir='SegmentationClassContext',
|
||||
split='ImageSets/SegmentationContext/val.txt',
|
||||
pipeline=test_pipeline),
|
||||
test=dict(
|
||||
type=dataset_type,
|
||||
data_root=data_root,
|
||||
img_dir='JPEGImages',
|
||||
ann_dir='SegmentationClassContext',
|
||||
split='ImageSets/SegmentationContext/val.txt',
|
||||
pipeline=test_pipeline))
|
@ -64,3 +64,10 @@ Note: `D-8` here corresponding to the output stride 8 setting for DeepLab series
|
||||
| --------- | -------- | --------- | ------: | -------- | -------------- | ----: | ------------: | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| DeepLabV3 | R-101-D8 | 480x480 | 40000 | 9.2 | 7.09 | 46.55 | 47.81 | [config](https://github.com/open-mmlab/mmsegmentation/blob/master/configs/deeplabv3/deeplabv3_r101-d8_480x480_40k_pascal_context.py) | [model](https://download.openmmlab.com/mmsegmentation/v0.5/deeplabv3/deeplabv3_r101-d8_480x480_40k_pascal_context/deeplabv3_r101-d8_480x480_40k_pascal_context_20200911_204118-1aa27336.pth) | [log](https://download.openmmlab.com/mmsegmentation/v0.5/deeplabv3/deeplabv3_r101-d8_480x480_40k_pascal_context/deeplabv3_r101-d8_480x480_40k_pascal_context-20200911_204118.log.json) |
|
||||
| DeepLabV3 | R-101-D8 | 480x480 | 80000 | - | - | 46.42 | 47.53 | [config](https://github.com/open-mmlab/mmsegmentation/blob/master/configs/deeplabv3/deeplabv3_r101-d8_480x480_80k_pascal_context.py) | [model](https://download.openmmlab.com/mmsegmentation/v0.5/deeplabv3/deeplabv3_r101-d8_480x480_80k_pascal_context/deeplabv3_r101-d8_480x480_80k_pascal_context_20200911_170155-2a21fff3.pth) | [log](https://download.openmmlab.com/mmsegmentation/v0.5/deeplabv3/deeplabv3_r101-d8_480x480_80k_pascal_context/deeplabv3_r101-d8_480x480_80k_pascal_context-20200911_170155.log.json) |
|
||||
|
||||
### Pascal Context 59
|
||||
|
||||
| Method | Backbone | Crop Size | Lr schd | Mem (GB) | Inf time (fps) | mIoU | mIoU(ms+flip) | config | download |
|
||||
| --------- | -------- | --------- | ------: | -------- | -------------- | ----: | ------------: | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| DeepLabV3 | R-101-D8 | 480x480 | 40000 | - | - | 52.61 | 54.28 | [config](https://github.com/open-mmlab/mmsegmentation/blob/master/configs/deeplabv3/deeplabv3_r101-d8_480x480_40k_pascal_context_59.py) | [model](https://download.openmmlab.com/mmsegmentation/v0.5/deeplabv3/deeplabv3_r101-d8_480x480_40k_pascal_context_59/deeplabv3_r101-d8_480x480_40k_pascal_context_59_20210416_110332-cb08ea46.pth) | [log](https://download.openmmlab.com/mmsegmentation/v0.5/deeplabv3/deeplabv3_r101-d8_480x480_40k_pascal_context_59/deeplabv3_r101-d8_480x480_40k_pascal_context_59-20210416_110332.log.json) |
|
||||
| DeepLabV3 | R-101-D8 | 480x480 | 80000 | - | - | 52.46 | 54.09 | [config](https://github.com/open-mmlab/mmsegmentation/blob/master/configs/deeplabv3/deeplabv3_r101-d8_480x480_80k_pascal_context_59.py) | [model](https://download.openmmlab.com/mmsegmentation/v0.5/deeplabv3/deeplabv3_r101-d8_480x480_80k_pascal_context_59/deeplabv3_r101-d8_480x480_80k_pascal_context_59_20210416_113002-26303993.pth) | [log](https://download.openmmlab.com/mmsegmentation/v0.5/deeplabv3/deeplabv3_r101-d8_480x480_80k_pascal_context_59/deeplabv3_r101-d8_480x480_80k_pascal_context_59-20210416_113002.log.json) |
|
||||
|
@ -0,0 +1,2 @@
|
||||
_base_ = './deeplabv3_r50-d8_480x480_40k_pascal_context_59.py'
|
||||
model = dict(pretrained='open-mmlab://resnet101_v1c', backbone=dict(depth=101))
|
@ -0,0 +1,2 @@
|
||||
_base_ = './deeplabv3_r50-d8_480x480_80k_pascal_context_59.py'
|
||||
model = dict(pretrained='open-mmlab://resnet101_v1c', backbone=dict(depth=101))
|
@ -0,0 +1,10 @@
|
||||
_base_ = [
|
||||
'../_base_/models/deeplabv3_r50-d8.py',
|
||||
'../_base_/datasets/pascal_context_59.py', '../_base_/default_runtime.py',
|
||||
'../_base_/schedules/schedule_40k.py'
|
||||
]
|
||||
model = dict(
|
||||
decode_head=dict(num_classes=59),
|
||||
auxiliary_head=dict(num_classes=59),
|
||||
test_cfg=dict(mode='slide', crop_size=(480, 480), stride=(320, 320)))
|
||||
optimizer = dict(type='SGD', lr=0.004, momentum=0.9, weight_decay=0.0001)
|
@ -0,0 +1,10 @@
|
||||
_base_ = [
|
||||
'../_base_/models/deeplabv3_r50-d8.py',
|
||||
'../_base_/datasets/pascal_context_59.py', '../_base_/default_runtime.py',
|
||||
'../_base_/schedules/schedule_80k.py'
|
||||
]
|
||||
model = dict(
|
||||
decode_head=dict(num_classes=59),
|
||||
auxiliary_head=dict(num_classes=59),
|
||||
test_cfg=dict(mode='slide', crop_size=(480, 480), stride=(320, 320)))
|
||||
optimizer = dict(type='SGD', lr=0.004, momentum=0.9, weight_decay=0.0001)
|
@ -66,3 +66,10 @@ Note:
|
||||
| ---------- | -------- | --------- | ------: | -------- | -------------- | ----: | ------------: | -------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| DeepLabV3+ | R-101-D8 | 480x480 | 40000 | - | 9.09 | 47.30 | 48.47 | [config](https://github.com/open-mmlab/mmsegmentation/blob/master/configs/deeplabv3plus/deeplabv3plus_r101-d8_480x480_40k_pascal_context.py) | [model](https://download.openmmlab.com/mmsegmentation/v0.5/deeplabv3plus/deeplabv3plus_r101-d8_480x480_40k_pascal_context/deeplabv3plus_r101-d8_480x480_40k_pascal_context_20200911_165459-d3c8a29e.pth) | [log](https://download.openmmlab.com/mmsegmentation/v0.5/deeplabv3plus/deeplabv3plus_r101-d8_480x480_40k_pascal_context/deeplabv3plus_r101-d8_480x480_40k_pascal_context-20200911_165459.log.json) |
|
||||
| DeepLabV3+ | R-101-D8 | 480x480 | 80000 | - | - | 47.23 | 48.26 | [config](https://github.com/open-mmlab/mmsegmentation/blob/master/configs/deeplabv3plus/deeplabv3plus_r101-d8_480x480_80k_pascal_context.py) | [model](https://download.openmmlab.com/mmsegmentation/v0.5/deeplabv3plus/deeplabv3plus_r101-d8_480x480_80k_pascal_context/deeplabv3plus_r101-d8_480x480_80k_pascal_context_20200911_155322-145d3ee8.pth) | [log](https://download.openmmlab.com/mmsegmentation/v0.5/deeplabv3plus/deeplabv3plus_r101-d8_480x480_80k_pascal_context/deeplabv3plus_r101-d8_480x480_80k_pascal_context-20200911_155322.log.json) |
|
||||
|
||||
#### Pascal Context 59
|
||||
|
||||
| Method | Backbone | Crop Size | Lr schd | Mem (GB) | Inf time (fps) | mIoU | mIoU(ms+flip) | config | download |
|
||||
| ---------- | -------- | --------- | ------: | -------- | -------------- | ----: | ------------: | -------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| DeepLabV3+ | R-101-D8 | 480x480 | 40000 | - | - | 52.86 | 54.54 | [config](https://github.com/open-mmlab/mmsegmentation/blob/master/configs/deeplabv3plus/deeplabv3plus_r101-d8_480x480_40k_pascal_context_59.py) | [model](https://download.openmmlab.com/mmsegmentation/v0.5/deeplabv3plus/deeplabv3plus_r101-d8_480x480_40k_pascal_context_59/deeplabv3plus_r101-d8_480x480_40k_pascal_context_59_20210416_111233-ed937f15.pth) | [log](https://download.openmmlab.com/mmsegmentation/v0.5/deeplabv3plus/deeplabv3plus_r101-d8_480x480_40k_pascal_context_59/deeplabv3plus_r101-d8_480x480_40k_pascal_context_59-20210416_111233.log.json) |
|
||||
| DeepLabV3+ | R-101-D8 | 480x480 | 80000 | - | - | 53.2 | 54.67 | [config](https://github.com/open-mmlab/mmsegmentation/blob/master/configs/deeplabv3plus/deeplabv3plus_r101-d8_480x480_80k_pascal_context_59.py) | [model](https://download.openmmlab.com/mmsegmentation/v0.5/deeplabv3plus/deeplabv3plus_r101-d8_480x480_80k_pascal_context_59/deeplabv3plus_r101-d8_480x480_80k_pascal_context_59_20210416_111127-7ca0331d.pth) | [log](https://download.openmmlab.com/mmsegmentation/v0.5/deeplabv3plus/deeplabv3plus_r101-d8_480x480_80k_pascal_context_59/deeplabv3plus_r101-d8_480x480_80k_pascal_context_59-20210416_111127.log.json) |
|
||||
|
@ -0,0 +1,2 @@
|
||||
_base_ = './deeplabv3plus_r50-d8_480x480_40k_pascal_context_59.py'
|
||||
model = dict(pretrained='open-mmlab://resnet101_v1c', backbone=dict(depth=101))
|
@ -0,0 +1,2 @@
|
||||
_base_ = './deeplabv3plus_r50-d8_480x480_80k_pascal_context_59.py'
|
||||
model = dict(pretrained='open-mmlab://resnet101_v1c', backbone=dict(depth=101))
|
@ -0,0 +1,10 @@
|
||||
_base_ = [
|
||||
'../_base_/models/deeplabv3plus_r50-d8.py',
|
||||
'../_base_/datasets/pascal_context_59.py', '../_base_/default_runtime.py',
|
||||
'../_base_/schedules/schedule_40k.py'
|
||||
]
|
||||
model = dict(
|
||||
decode_head=dict(num_classes=59),
|
||||
auxiliary_head=dict(num_classes=59),
|
||||
test_cfg=dict(mode='slide', crop_size=(480, 480), stride=(320, 320)))
|
||||
optimizer = dict(type='SGD', lr=0.004, momentum=0.9, weight_decay=0.0001)
|
@ -0,0 +1,10 @@
|
||||
_base_ = [
|
||||
'../_base_/models/deeplabv3plus_r50-d8.py',
|
||||
'../_base_/datasets/pascal_context_59.py', '../_base_/default_runtime.py',
|
||||
'../_base_/schedules/schedule_80k.py'
|
||||
]
|
||||
model = dict(
|
||||
decode_head=dict(num_classes=59),
|
||||
auxiliary_head=dict(num_classes=59),
|
||||
test_cfg=dict(mode='slide', crop_size=(480, 480), stride=(320, 320)))
|
||||
optimizer = dict(type='SGD', lr=0.004, momentum=0.9, weight_decay=0.0001)
|
@ -76,3 +76,10 @@
|
||||
| ------ | -------- | --------- | ------: | -------- | -------------- | ----: | ------------: | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| FCN | R-101-D8 | 480x480 | 40000 | - | 9.93 | 44.14 | 45.67 | [config](https://github.com/open-mmlab/mmsegmentation/blob/master/configs/fcn/fcn_r101-d8_480x480_40k_pascal_context.py) | [model](https://download.openmmlab.com/mmsegmentation/v0.5/fcn/fcn_r101-d8_480x480_40k_pascal_context/fcn_r101-d8_480x480_40k_pascal_context_20200911_212515-9b565a6d.pth) | [log](https://download.openmmlab.com/mmsegmentation/v0.5/fcn/fcn_r101-d8_480x480_40k_pascal_context/fcn_r101-d8_480x480_40k_pascal_context-20200911_212515.log.json) |
|
||||
| FCN | R-101-D8 | 480x480 | 80000 | - | - | 44.47 | 45.74 | [config](https://github.com/open-mmlab/mmsegmentation/blob/master/configs/fcn/fcn_r101-d8_480x480_80k_pascal_context.py) | [model](https://download.openmmlab.com/mmsegmentation/v0.5/fcn/fcn_r101-d8_480x480_80k_pascal_context/fcn_r101-d8_480x480_80k_pascal_context_20200915_032644-a3828480.pth) | [log](https://download.openmmlab.com/mmsegmentation/v0.5/fcn/fcn_r101-d8_480x480_80k_pascal_context/fcn_r101-d8_480x480_80k_pascal_context-20200915_032644.log.json) |
|
||||
|
||||
### Pascal Context 59
|
||||
|
||||
| Method | Backbone | Crop Size | Lr schd | Mem (GB) | Inf time (fps) | mIoU | mIoU(ms+flip) | config | download |
|
||||
| ------ | -------- | --------- | ------: | -------- | -------------- | ----: | ------------: | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| FCN | R-101-D8 | 480x480 | 40000 | - | - | 48.42 | 50.4 | [config](https://github.com/open-mmlab/mmsegmentation/blob/master/configs/fcn/fcn_r101-d8_480x480_40k_pascal_context_59.py) | [model](https://download.openmmlab.com/mmsegmentation/v0.5/fcn/fcn_r101-d8_480x480_40k_pascal_context_59/fcn_r101-d8_480x480_40k_pascal_context_59_20210415_230724-8cf83682.pth) | [log](https://download.openmmlab.com/mmsegmentation/v0.5/fcn/fcn_r101-d8_480x480_40k_pascal_context_59/fcn_r101-d8_480x480_40k_pascal_context_59-20210415_230724.log.json) |
|
||||
| FCN | R-101-D8 | 480x480 | 80000 | - | - | 49.35 | 51.38 | [config](https://github.com/open-mmlab/mmsegmentation/blob/master/configs/fcn/fcn_r101-d8_480x480_80k_pascal_context_59.py) | [model](https://download.openmmlab.com/mmsegmentation/v0.5/fcn/fcn_r101-d8_480x480_80k_pascal_context_59/fcn_r101-d8_480x480_80k_pascal_context_59_20210416_110804-9a6f2c94.pth) | [log](https://download.openmmlab.com/mmsegmentation/v0.5/fcn/fcn_r101-d8_480x480_80k_pascal_context_59/fcn_r101-d8_480x480_80k_pascal_context_59-20210416_110804.log.json) |
|
||||
|
2
configs/fcn/fcn_r101-d8_480x480_40k_pascal_context_59.py
Normal file
2
configs/fcn/fcn_r101-d8_480x480_40k_pascal_context_59.py
Normal file
@ -0,0 +1,2 @@
|
||||
_base_ = './fcn_r50-d8_480x480_40k_pascal_context_59.py'
|
||||
model = dict(pretrained='open-mmlab://resnet101_v1c', backbone=dict(depth=101))
|
2
configs/fcn/fcn_r101-d8_480x480_80k_pascal_context_59.py
Normal file
2
configs/fcn/fcn_r101-d8_480x480_80k_pascal_context_59.py
Normal file
@ -0,0 +1,2 @@
|
||||
_base_ = './fcn_r50-d8_480x480_80k_pascal_context_59.py'
|
||||
model = dict(pretrained='open-mmlab://resnet101_v1c', backbone=dict(depth=101))
|
10
configs/fcn/fcn_r50-d8_480x480_40k_pascal_context_59.py
Normal file
10
configs/fcn/fcn_r50-d8_480x480_40k_pascal_context_59.py
Normal file
@ -0,0 +1,10 @@
|
||||
_base_ = [
|
||||
'../_base_/models/fcn_r50-d8.py',
|
||||
'../_base_/datasets/pascal_context_59.py', '../_base_/default_runtime.py',
|
||||
'../_base_/schedules/schedule_40k.py'
|
||||
]
|
||||
model = dict(
|
||||
decode_head=dict(num_classes=59),
|
||||
auxiliary_head=dict(num_classes=59),
|
||||
test_cfg=dict(mode='slide', crop_size=(480, 480), stride=(320, 320)))
|
||||
optimizer = dict(type='SGD', lr=0.004, momentum=0.9, weight_decay=0.0001)
|
10
configs/fcn/fcn_r50-d8_480x480_80k_pascal_context_59.py
Normal file
10
configs/fcn/fcn_r50-d8_480x480_80k_pascal_context_59.py
Normal file
@ -0,0 +1,10 @@
|
||||
_base_ = [
|
||||
'../_base_/models/fcn_r50-d8.py',
|
||||
'../_base_/datasets/pascal_context_59.py', '../_base_/default_runtime.py',
|
||||
'../_base_/schedules/schedule_80k.py'
|
||||
]
|
||||
model = dict(
|
||||
decode_head=dict(num_classes=59),
|
||||
auxiliary_head=dict(num_classes=59),
|
||||
test_cfg=dict(mode='slide', crop_size=(480, 480), stride=(320, 320)))
|
||||
optimizer = dict(type='SGD', lr=0.004, momentum=0.9, weight_decay=0.0001)
|
@ -57,3 +57,10 @@
|
||||
| ------ | ------------ | --------- | ------: | -------- | -------------- | ----: | ------------: | ----------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| FCN | HRNetV2p-W48 | 480x480 | 40000 | 6.1 | 8.86 | 45.14 | 47.42 | [config](https://github.com/open-mmlab/mmsegmentation/blob/master/configs/hrnet/fcn_hr48_480x480_40k_pascal_context.py) | [model](https://download.openmmlab.com/mmsegmentation/v0.5/hrnet/fcn_hr48_480x480_40k_pascal_context/fcn_hr48_480x480_40k_pascal_context_20200911_164852-667d00b0.pth) | [log](https://download.openmmlab.com/mmsegmentation/v0.5/hrnet/fcn_hr48_480x480_40k_pascal_context/fcn_hr48_480x480_40k_pascal_context-20200911_164852.log.json) |
|
||||
| FCN | HRNetV2p-W48 | 480x480 | 80000 | - | - | 45.84 | 47.84 | [config](https://github.com/open-mmlab/mmsegmentation/blob/master/configs/hrnet/fcn_hr48_480x480_80k_pascal_context.py) | [model](https://download.openmmlab.com/mmsegmentation/v0.5/hrnet/fcn_hr48_480x480_80k_pascal_context/fcn_hr48_480x480_80k_pascal_context_20200911_155322-847a6711.pth) | [log](https://download.openmmlab.com/mmsegmentation/v0.5/hrnet/fcn_hr48_480x480_80k_pascal_context/fcn_hr48_480x480_80k_pascal_context-20200911_155322.log.json) |
|
||||
|
||||
### Pascal Context 59
|
||||
|
||||
| Method | Backbone | Crop Size | Lr schd | Mem (GB) | Inf time (fps) | mIoU | mIoU(ms+flip) | config | download |
|
||||
| ------ | ------------ | --------- | ------: | -------- | -------------- | ----: | ------------: | ----------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| FCN | HRNetV2p-W48 | 480x480 | 40000 | - | - | 50.33 | 52.83 | [config](https://github.com/open-mmlab/mmsegmentation/blob/master/configs/hrnet/fcn_hr48_480x480_40k_pascal_context_59.py) | [model](https://download.openmmlab.com/mmsegmentation/v0.5/hrnet/fcn_hr48_480x480_40k_pascal_context_59/fcn_hr48_480x480_40k_pascal_context_59_20210410_122738-b808b8b2.pth) | [log](https://download.openmmlab.com/mmsegmentation/v0.5/hrnet/fcn_hr48_480x480_40k_pascal_context_59/fcn_hr48_480x480_40k_pascal_context_59-20210410_122738.log.json) |
|
||||
| FCN | HRNetV2p-W48 | 480x480 | 80000 | - | - | 51.12 | 53.56 | [config](https://github.com/open-mmlab/mmsegmentation/blob/master/configs/hrnet/fcn_hr48_480x480_80k_pascal_context_59.py) | [model](https://download.openmmlab.com/mmsegmentation/v0.5/hrnet/fcn_hr48_480x480_80k_pascal_context_59/fcn_hr48_480x480_80k_pascal_context_59_20210411_003240-3ae7081e.pth) | [log](https://download.openmmlab.com/mmsegmentation/v0.5/hrnet/fcn_hr48_480x480_80k_pascal_context_59/fcn_hr48_480x480_80k_pascal_context_59-20210411_003240.log.json) |
|
||||
|
8
configs/hrnet/fcn_hr18_480x480_40k_pascal_context_59.py
Normal file
8
configs/hrnet/fcn_hr18_480x480_40k_pascal_context_59.py
Normal file
@ -0,0 +1,8 @@
|
||||
_base_ = [
|
||||
'../_base_/models/fcn_hr18.py', '../_base_/datasets/pascal_context_59.py',
|
||||
'../_base_/default_runtime.py', '../_base_/schedules/schedule_40k.py'
|
||||
]
|
||||
model = dict(
|
||||
decode_head=dict(num_classes=59),
|
||||
test_cfg=dict(mode='slide', crop_size=(480, 480), stride=(320, 320)))
|
||||
optimizer = dict(type='SGD', lr=0.004, momentum=0.9, weight_decay=0.0001)
|
8
configs/hrnet/fcn_hr18_480x480_80k_pascal_context_59.py
Normal file
8
configs/hrnet/fcn_hr18_480x480_80k_pascal_context_59.py
Normal file
@ -0,0 +1,8 @@
|
||||
_base_ = [
|
||||
'../_base_/models/fcn_hr18.py', '../_base_/datasets/pascal_context_59.py',
|
||||
'../_base_/default_runtime.py', '../_base_/schedules/schedule_80k.py'
|
||||
]
|
||||
model = dict(
|
||||
decode_head=dict(num_classes=59),
|
||||
test_cfg=dict(mode='slide', crop_size=(480, 480), stride=(320, 320)))
|
||||
optimizer = dict(type='SGD', lr=0.004, momentum=0.9, weight_decay=0.0001)
|
9
configs/hrnet/fcn_hr18s_480x480_40k_pascal_context_59.py
Normal file
9
configs/hrnet/fcn_hr18s_480x480_40k_pascal_context_59.py
Normal file
@ -0,0 +1,9 @@
|
||||
_base_ = './fcn_hr18_480x480_40k_pascal_context_59.py'
|
||||
model = dict(
|
||||
pretrained='open-mmlab://msra/hrnetv2_w18_small',
|
||||
backbone=dict(
|
||||
extra=dict(
|
||||
stage1=dict(num_blocks=(2, )),
|
||||
stage2=dict(num_blocks=(2, 2)),
|
||||
stage3=dict(num_modules=3, num_blocks=(2, 2, 2)),
|
||||
stage4=dict(num_modules=2, num_blocks=(2, 2, 2, 2)))))
|
9
configs/hrnet/fcn_hr18s_480x480_80k_pascal_context_59.py
Normal file
9
configs/hrnet/fcn_hr18s_480x480_80k_pascal_context_59.py
Normal file
@ -0,0 +1,9 @@
|
||||
_base_ = './fcn_hr18_480x480_80k_pascal_context_59.py'
|
||||
model = dict(
|
||||
pretrained='open-mmlab://msra/hrnetv2_w18_small',
|
||||
backbone=dict(
|
||||
extra=dict(
|
||||
stage1=dict(num_blocks=(2, )),
|
||||
stage2=dict(num_blocks=(2, 2)),
|
||||
stage3=dict(num_modules=3, num_blocks=(2, 2, 2)),
|
||||
stage4=dict(num_modules=2, num_blocks=(2, 2, 2, 2)))))
|
10
configs/hrnet/fcn_hr48_480x480_40k_pascal_context_59.py
Normal file
10
configs/hrnet/fcn_hr48_480x480_40k_pascal_context_59.py
Normal file
@ -0,0 +1,10 @@
|
||||
_base_ = './fcn_hr18_480x480_40k_pascal_context_59.py'
|
||||
model = dict(
|
||||
pretrained='open-mmlab://msra/hrnetv2_w48',
|
||||
backbone=dict(
|
||||
extra=dict(
|
||||
stage2=dict(num_channels=(48, 96)),
|
||||
stage3=dict(num_channels=(48, 96, 192)),
|
||||
stage4=dict(num_channels=(48, 96, 192, 384)))),
|
||||
decode_head=dict(
|
||||
in_channels=[48, 96, 192, 384], channels=sum([48, 96, 192, 384])))
|
10
configs/hrnet/fcn_hr48_480x480_80k_pascal_context_59.py
Normal file
10
configs/hrnet/fcn_hr48_480x480_80k_pascal_context_59.py
Normal file
@ -0,0 +1,10 @@
|
||||
_base_ = './fcn_hr18_480x480_80k_pascal_context_59.py'
|
||||
model = dict(
|
||||
pretrained='open-mmlab://msra/hrnetv2_w48',
|
||||
backbone=dict(
|
||||
extra=dict(
|
||||
stage2=dict(num_channels=(48, 96)),
|
||||
stage3=dict(num_channels=(48, 96, 192)),
|
||||
stage4=dict(num_channels=(48, 96, 192, 384)))),
|
||||
decode_head=dict(
|
||||
in_channels=[48, 96, 192, 384], channels=sum([48, 96, 192, 384])))
|
@ -60,3 +60,10 @@
|
||||
| ------ | -------- | --------- | ------: | -------- | -------------- | ----: | ------------: | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| PSPNet | R-101-D8 | 480x480 | 40000 | 8.8 | 9.68 | 46.60 | 47.78 | [config](https://github.com/open-mmlab/mmsegmentation/blob/master/configs/pspnet/pspnet_r101-d8_480x480_40k_pascal_context.py) | [model](https://download.openmmlab.com/mmsegmentation/v0.5/pspnet/pspnet_r101-d8_480x480_40k_pascal_context/pspnet_r101-d8_480x480_40k_pascal_context_20200911_211210-bf0f5d7c.pth) | [log](https://download.openmmlab.com/mmsegmentation/v0.5/pspnet/pspnet_r101-d8_480x480_40k_pascal_context/pspnet_r101-d8_480x480_40k_pascal_context-20200911_211210.log.json) |
|
||||
| PSPNet | R-101-D8 | 480x480 | 80000 | - | - | 46.03 | 47.15 | [config](https://github.com/open-mmlab/mmsegmentation/blob/master/configs/pspnet/pspnet_r101-d8_480x480_80k_pascal_context.py) | [model](https://download.openmmlab.com/mmsegmentation/v0.5/pspnet/pspnet_r101-d8_480x480_80k_pascal_context/pspnet_r101-d8_480x480_80k_pascal_context_20200911_190530-c86d6233.pth) | [log](https://download.openmmlab.com/mmsegmentation/v0.5/pspnet/pspnet_r101-d8_480x480_80k_pascal_context/pspnet_r101-d8_480x480_80k_pascal_context-20200911_190530.log.json) |
|
||||
|
||||
### Pascal Context 59
|
||||
|
||||
| Method | Backbone | Crop Size | Lr schd | Mem (GB) | Inf time (fps) | mIoU | mIoU(ms+flip) | config | download |
|
||||
| ------ | -------- | --------- | ------: | -------- | -------------- | ----: | ------------: | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| PSPNet | R-101-D8 | 480x480 | 40000 | - | - | 52.02 | 53.54 | [config](https://github.com/open-mmlab/mmsegmentation/blob/master/configs/pspnet/pspnet_r101-d8_480x480_40k_pascal_context_59.py) | [model](https://download.openmmlab.com/mmsegmentation/v0.5/pspnet/pspnet_r101-d8_480x480_40k_pascal_context_59/pspnet_r101-d8_480x480_40k_pascal_context_59_20210416_114524-86d44cd4.pth) | [log](https://download.openmmlab.com/mmsegmentation/v0.5/pspnet/pspnet_r101-d8_480x480_40k_pascal_context_59/pspnet_r101-d8_480x480_40k_pascal_context_59-20210416_114524.log.json) |
|
||||
| PSPNet | R-101-D8 | 480x480 | 80000 | - | - | 52.47 | 53.99 | [config](https://github.com/open-mmlab/mmsegmentation/blob/master/configs/pspnet/pspnet_r101-d8_480x480_80k_pascal_context_59.py) | [model](https://download.openmmlab.com/mmsegmentation/v0.5/pspnet/pspnet_r101-d8_480x480_80k_pascal_context_59/pspnet_r101-d8_480x480_80k_pascal_context_59_20210416_114418-fa6caaa2.pth) | [log](https://download.openmmlab.com/mmsegmentation/v0.5/pspnet/pspnet_r101-d8_480x480_80k_pascal_context_59/pspnet_r101-d8_480x480_80k_pascal_context_59-20210416_114418.log.json) |
|
||||
|
@ -0,0 +1,2 @@
|
||||
_base_ = './pspnet_r50-d8_480x480_40k_pascal_context_59.py'
|
||||
model = dict(pretrained='open-mmlab://resnet101_v1c', backbone=dict(depth=101))
|
@ -0,0 +1,2 @@
|
||||
_base_ = './pspnet_r50-d8_480x480_80k_pascal_context_59.py'
|
||||
model = dict(pretrained='open-mmlab://resnet101_v1c', backbone=dict(depth=101))
|
@ -4,6 +4,7 @@ _base_ = [
|
||||
'../_base_/schedules/schedule_40k.py'
|
||||
]
|
||||
model = dict(
|
||||
decode_head=dict(num_classes=60), auxiliary_head=dict(num_classes=60))
|
||||
test_cfg = dict(mode='slide', crop_size=(480, 480), stride=(320, 320))
|
||||
decode_head=dict(num_classes=60),
|
||||
auxiliary_head=dict(num_classes=60),
|
||||
test_cfg=dict(mode='slide', crop_size=(480, 480), stride=(320, 320)))
|
||||
optimizer = dict(type='SGD', lr=0.004, momentum=0.9, weight_decay=0.0001)
|
||||
|
@ -0,0 +1,10 @@
|
||||
_base_ = [
|
||||
'../_base_/models/pspnet_r50-d8.py',
|
||||
'../_base_/datasets/pascal_context_59.py', '../_base_/default_runtime.py',
|
||||
'../_base_/schedules/schedule_40k.py'
|
||||
]
|
||||
model = dict(
|
||||
decode_head=dict(num_classes=59),
|
||||
auxiliary_head=dict(num_classes=59),
|
||||
test_cfg=dict(mode='slide', crop_size=(480, 480), stride=(320, 320)))
|
||||
optimizer = dict(type='SGD', lr=0.004, momentum=0.9, weight_decay=0.0001)
|
@ -4,6 +4,7 @@ _base_ = [
|
||||
'../_base_/schedules/schedule_80k.py'
|
||||
]
|
||||
model = dict(
|
||||
decode_head=dict(num_classes=60), auxiliary_head=dict(num_classes=60))
|
||||
test_cfg = dict(mode='slide', crop_size=(480, 480), stride=(320, 320))
|
||||
decode_head=dict(num_classes=60),
|
||||
auxiliary_head=dict(num_classes=60),
|
||||
test_cfg=dict(mode='slide', crop_size=(480, 480), stride=(320, 320)))
|
||||
optimizer = dict(type='SGD', lr=0.004, momentum=0.9, weight_decay=0.0001)
|
||||
|
@ -0,0 +1,10 @@
|
||||
_base_ = [
|
||||
'../_base_/models/pspnet_r50-d8.py',
|
||||
'../_base_/datasets/pascal_context_59.py', '../_base_/default_runtime.py',
|
||||
'../_base_/schedules/schedule_80k.py'
|
||||
]
|
||||
model = dict(
|
||||
decode_head=dict(num_classes=59),
|
||||
auxiliary_head=dict(num_classes=59),
|
||||
test_cfg=dict(mode='slide', crop_size=(480, 480), stride=(320, 320)))
|
||||
optimizer = dict(type='SGD', lr=0.004, momentum=0.9, weight_decay=0.0001)
|
@ -1095,6 +1095,13 @@
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": []
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ from .custom import CustomDataset
|
||||
from .dataset_wrappers import ConcatDataset, RepeatDataset
|
||||
from .drive import DRIVEDataset
|
||||
from .hrf import HRFDataset
|
||||
from .pascal_context import PascalContextDataset
|
||||
from .pascal_context import PascalContextDataset, PascalContextDataset59
|
||||
from .stare import STAREDataset
|
||||
from .voc import PascalVOCDataset
|
||||
|
||||
@ -14,5 +14,6 @@ __all__ = [
|
||||
'CustomDataset', 'build_dataloader', 'ConcatDataset', 'RepeatDataset',
|
||||
'DATASETS', 'build_dataset', 'PIPELINES', 'CityscapesDataset',
|
||||
'PascalVOCDataset', 'ADE20KDataset', 'PascalContextDataset',
|
||||
'ChaseDB1Dataset', 'DRIVEDataset', 'HRFDataset', 'STAREDataset'
|
||||
'PascalContextDataset59', 'ChaseDB1Dataset', 'DRIVEDataset', 'HRFDataset',
|
||||
'STAREDataset'
|
||||
]
|
||||
|
@ -17,15 +17,15 @@ class PascalContextDataset(CustomDataset):
|
||||
split (str): Split txt file for PascalContext.
|
||||
"""
|
||||
|
||||
CLASSES = ('background', 'aeroplane', 'bicycle', 'bird', 'boat', 'bottle',
|
||||
'bus', 'car', 'cat', 'chair', 'cow', 'table', 'dog', 'horse',
|
||||
'motorbike', 'person', 'pottedplant', 'sheep', 'sofa', 'train',
|
||||
'tvmonitor', 'bag', 'bed', 'bench', 'book', 'building',
|
||||
'cabinet', 'ceiling', 'cloth', 'computer', 'cup', 'door',
|
||||
'fence', 'floor', 'flower', 'food', 'grass', 'ground',
|
||||
'keyboard', 'light', 'mountain', 'mouse', 'curtain', 'platform',
|
||||
'sign', 'plate', 'road', 'rock', 'shelves', 'sidewalk', 'sky',
|
||||
'snow', 'bedclothes', 'track', 'tree', 'truck', 'wall', 'water',
|
||||
CLASSES = ('background', 'aeroplane', 'bag', 'bed', 'bedclothes', 'bench',
|
||||
'bicycle', 'bird', 'boat', 'book', 'bottle', 'building', 'bus',
|
||||
'cabinet', 'car', 'cat', 'ceiling', 'chair', 'cloth',
|
||||
'computer', 'cow', 'cup', 'curtain', 'dog', 'door', 'fence',
|
||||
'floor', 'flower', 'food', 'grass', 'ground', 'horse',
|
||||
'keyboard', 'light', 'motorbike', 'mountain', 'mouse', 'person',
|
||||
'plate', 'platform', 'pottedplant', 'road', 'rock', 'sheep',
|
||||
'shelves', 'sidewalk', 'sign', 'sky', 'snow', 'sofa', 'table',
|
||||
'track', 'train', 'tree', 'truck', 'tvmonitor', 'wall', 'water',
|
||||
'window', 'wood')
|
||||
|
||||
PALETTE = [[120, 120, 120], [180, 120, 120], [6, 230, 230], [80, 50, 50],
|
||||
@ -52,3 +52,52 @@ class PascalContextDataset(CustomDataset):
|
||||
reduce_zero_label=False,
|
||||
**kwargs)
|
||||
assert osp.exists(self.img_dir) and self.split is not None
|
||||
|
||||
|
||||
@DATASETS.register_module()
|
||||
class PascalContextDataset59(CustomDataset):
|
||||
"""PascalContext dataset.
|
||||
|
||||
In segmentation map annotation for PascalContext, 0 stands for background,
|
||||
which is included in 60 categories. ``reduce_zero_label`` is fixed to
|
||||
False. The ``img_suffix`` is fixed to '.jpg' and ``seg_map_suffix`` is
|
||||
fixed to '.png'.
|
||||
|
||||
Args:
|
||||
split (str): Split txt file for PascalContext.
|
||||
"""
|
||||
|
||||
CLASSES = ('aeroplane', 'bag', 'bed', 'bedclothes', 'bench', 'bicycle',
|
||||
'bird', 'boat', 'book', 'bottle', 'building', 'bus', 'cabinet',
|
||||
'car', 'cat', 'ceiling', 'chair', 'cloth', 'computer', 'cow',
|
||||
'cup', 'curtain', 'dog', 'door', 'fence', 'floor', 'flower',
|
||||
'food', 'grass', 'ground', 'horse', 'keyboard', 'light',
|
||||
'motorbike', 'mountain', 'mouse', 'person', 'plate', 'platform',
|
||||
'pottedplant', 'road', 'rock', 'sheep', 'shelves', 'sidewalk',
|
||||
'sign', 'sky', 'snow', 'sofa', 'table', 'track', 'train',
|
||||
'tree', 'truck', 'tvmonitor', 'wall', 'water', 'window', 'wood')
|
||||
|
||||
PALETTE = [[180, 120, 120], [6, 230, 230], [80, 50, 50], [4, 200, 3],
|
||||
[120, 120, 80], [140, 140, 140], [204, 5, 255], [230, 230, 230],
|
||||
[4, 250, 7], [224, 5, 255], [235, 255, 7], [150, 5, 61],
|
||||
[120, 120, 70], [8, 255, 51], [255, 6, 82], [143, 255, 140],
|
||||
[204, 255, 4], [255, 51, 7], [204, 70, 3], [0, 102, 200],
|
||||
[61, 230, 250], [255, 6, 51], [11, 102, 255], [255, 7, 71],
|
||||
[255, 9, 224], [9, 7, 230], [220, 220, 220], [255, 9, 92],
|
||||
[112, 9, 255], [8, 255, 214], [7, 255, 224], [255, 184, 6],
|
||||
[10, 255, 71], [255, 41, 10], [7, 255, 255], [224, 255, 8],
|
||||
[102, 8, 255], [255, 61, 6], [255, 194, 7], [255, 122, 8],
|
||||
[0, 255, 20], [255, 8, 41], [255, 5, 153], [6, 51, 255],
|
||||
[235, 12, 255], [160, 150, 20], [0, 163, 255], [140, 140, 140],
|
||||
[250, 10, 15], [20, 255, 0], [31, 255, 0], [255, 31, 0],
|
||||
[255, 224, 0], [153, 255, 0], [0, 0, 255], [255, 71, 0],
|
||||
[0, 235, 255], [0, 173, 255], [31, 0, 255]]
|
||||
|
||||
def __init__(self, split, **kwargs):
|
||||
super(PascalContextDataset59, self).__init__(
|
||||
img_suffix='.jpg',
|
||||
seg_map_suffix='.png',
|
||||
split=split,
|
||||
reduce_zero_label=True,
|
||||
**kwargs)
|
||||
assert osp.exists(self.img_dir) and self.split is not None
|
||||
|
Loading…
x
Reference in New Issue
Block a user