Skip to content

Commit 5753f41

Browse files
谢昕辰MengzhangLI
andauthored
[Feature] Support dark dataset test (open-mmlab#815)
* rewrite init function * support dark_zurich test * reset image size * add night * add train_pipeline * init function parameters * remove base dataset config * remove fcn config * update doc * add datasets to README * update doc * fix table of PSPNet config * fix table of PSPNet config * change 'model' tp 'evaluation checkpoint' * fix typos in README_zh-CN Co-authored-by: MengzhangLI <[email protected]>
1 parent aa438f5 commit 5753f41

17 files changed

+260
-4
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,19 @@ Supported methods:
9494
- [x] [SETR (CVPR'2021)](configs/setr)
9595
- [x] [SegFormer (ArXiv'2021)](configs/segformer)
9696

97+
Supported datasets:
98+
99+
- [x] [Cityscapes](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/dataset_prepare.md#cityscapes)
100+
- [x] [PASCAL VOC](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/dataset_prepare.md#pascal-voc)
101+
- [x] [ADE20K](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/dataset_prepare.md#ade20k)
102+
- [x] [Pascal Context](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/dataset_prepare.md#pascal-context)
103+
- [x] [CHASE_DB1](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/dataset_prepare.md#chase-db1)
104+
- [x] [DRIVE](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/dataset_prepare.md#drive)
105+
- [x] [HRF](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/dataset_prepare.md#hrf)
106+
- [x] [STARE](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/dataset_prepare.md#stare)
107+
- [x] [Dark Zurich](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/dataset_prepare.md#dark-zurich)
108+
- [x] [Nighttime Driving](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/dataset_prepare.md#nighttime-driving)
109+
97110
## Installation
98111

99112
Please refer to [get_started.md](docs/get_started.md#installation) for installation and [dataset_prepare.md](docs/dataset_prepare.md#prepare-datasets) for dataset preparation.

README_zh-CN.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,22 @@ MMSegmentation 是一个基于 PyTorch 的语义分割开源工具箱。它是 O
9393
- [x] [SETR (CVPR'2021)](configs/setr)
9494
- [x] [SegFormer (ArXiv'2021)](configs/segformer)
9595

96+
已支持的数据集:
97+
98+
- [x] [Cityscapes](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/dataset_prepare.md#cityscapes)
99+
- [x] [PASCAL VOC](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/dataset_prepare.md#pascal-voc)
100+
- [x] [ADE20K](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/dataset_prepare.md#ade20k)
101+
- [x] [Pascal Context](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/dataset_prepare.md#pascal-context)
102+
- [x] [CHASE_DB1](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/dataset_prepare.md#chase-db1)
103+
- [x] [DRIVE](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/dataset_prepare.md#drive)
104+
- [x] [HRF](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/dataset_prepare.md#hrf)
105+
- [x] [STARE](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/dataset_prepare.md#stare)
106+
- [x] [Dark Zurich](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/dataset_prepare.md#dark-zurich)
107+
- [x] [Nighttime Driving](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/dataset_prepare.md#nighttime-driving)
108+
96109
## 安装
97110

98-
请参考[快速入门文档](docs_zh-CN/get_started.md#installation)进行安装和数据集准备
111+
请参考[快速入门文档](docs_zh-CN/get_started.md#installation)进行安装,参考[数据集准备](docs_zh-CN/dataset_prepare.md)处理数据
99112

100113
## 快速入门
101114

configs/pspnet/README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,19 @@
6767
| ------ | -------- | --------- | ------: | -------- | -------------- | ----: | ------------: | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
6868
| 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) &#124; [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) |
6969
| 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) &#124; [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) |
70+
71+
### Dark Zurich and Nighttime Driving
72+
73+
We support evaluation results on these two datasets using models above trained on Cityscapes training set.
74+
75+
|Method|Backbone |Training Dataset |Test Dataset |mIoU |config| evaluation checkpoint|
76+
|------ |------ |------ |----- |-----|-----|-----|
77+
|PSPNet|R-50-D8 |Cityscapes Training set |Dark Zurich |10.91|[config](https://github.com/open-mmlab/mmsegmentation/blob/master/configs/pspnet/pspnet_r50-d8_512x1024_40k_dark.py)|[model](https://download.openmmlab.com/mmsegmentation/v0.5/pspnet/pspnet_r50-d8_512x1024_40k_cityscapes/pspnet_r50-d8_512x1024_40k_cityscapes_20200605_003338-2966598c.pth) &#124; [log](https://download.openmmlab.com/mmsegmentation/v0.5/pspnet/pspnet_r50-d8_512x1024_40k_cityscapes/pspnet_r50-d8_512x1024_40k_cityscapes_20200605_003338.log.json) |
78+
|PSPNet|R-50-D8 |Cityscapes Training set |Nighttime Driving|23.02|[config](https://github.com/open-mmlab/mmsegmentation/blob/master/configs/pspnet/pspnet_r50-d8_512x1024_40k_night_driving.py)| [model](https://download.openmmlab.com/mmsegmentation/v0.5/pspnet/pspnet_r50-d8_512x1024_40k_cityscapes/pspnet_r50-d8_512x1024_40k_cityscapes_20200605_003338-2966598c.pth) &#124; [log](https://download.openmmlab.com/mmsegmentation/v0.5/pspnet/pspnet_r50-d8_512x1024_40k_cityscapes/pspnet_r50-d8_512x1024_40k_cityscapes_20200605_003338.log.json) |
79+
|PSPNet|R-50-D8 |Cityscapes Training set |Cityscapes Validation set|77.85 | [config](https://github.com/open-mmlab/mmsegmentation/blob/master/configs/pspnet/pspnet_r50-d8_512x1024_40k_cityscapes.py) | [model](https://download.openmmlab.com/mmsegmentation/v0.5/pspnet/pspnet_r50-d8_512x1024_40k_cityscapes/pspnet_r50-d8_512x1024_40k_cityscapes_20200605_003338-2966598c.pth) &#124; [log](https://download.openmmlab.com/mmsegmentation/v0.5/pspnet/pspnet_r50-d8_512x1024_40k_cityscapes/pspnet_r50-d8_512x1024_40k_cityscapes_20200605_003338.log.json) |
80+
|PSPNet|R-101-D8 |Cityscapes Training set |Dark Zurich |10.16|[config](https://github.com/open-mmlab/mmsegmentation/blob/master/configs/pspnet/pspnet_r101-d8_512x1024_40k_dark.py)| [model](https://download.openmmlab.com/mmsegmentation/v0.5/pspnet/pspnet_r101-d8_512x1024_40k_cityscapes/pspnet_r101-d8_512x1024_40k_cityscapes_20200604_232751-467e7cf4.pth) &#124; [log](https://download.openmmlab.com/mmsegmentation/v0.5/pspnet/pspnet_r101-d8_512x1024_40k_cityscapes/pspnet_r101-d8_512x1024_40k_cityscapes_20200604_232751.log.json) |
81+
|PSPNet|R-101-D8 |Cityscapes Training set |Nighttime Driving|20.25|[config](https://github.com/open-mmlab/mmsegmentation/blob/master/configs/pspnet/pspnet_r101-d8_512x1024_40k_night_driving.py)| [model](https://download.openmmlab.com/mmsegmentation/v0.5/pspnet/pspnet_r101-d8_512x1024_40k_cityscapes/pspnet_r101-d8_512x1024_40k_cityscapes_20200604_232751-467e7cf4.pth) &#124; [log](https://download.openmmlab.com/mmsegmentation/v0.5/pspnet/pspnet_r101-d8_512x1024_40k_cityscapes/pspnet_r101-d8_512x1024_40k_cityscapes_20200604_232751.log.json) |
82+
|PSPNet|R-101-D8 |Cityscapes Training set |Cityscapes Validation set|78.34|[config](https://github.com/open-mmlab/mmsegmentation/blob/master/configs/pspnet/pspnet_r101-d8_512x1024_40k_cityscapes.py) | [model](https://download.openmmlab.com/mmsegmentation/v0.5/pspnet/pspnet_r101-d8_512x1024_40k_cityscapes/pspnet_r101-d8_512x1024_40k_cityscapes_20200604_232751-467e7cf4.pth) &#124; [log](https://download.openmmlab.com/mmsegmentation/v0.5/pspnet/pspnet_r101-d8_512x1024_40k_cityscapes/pspnet_r101-d8_512x1024_40k_cityscapes_20200604_232751.log.json) |
83+
|PSPNet|R-101b-D8|Cityscapes Training set |Dark Zurich |15.54|[config](https://github.com/open-mmlab/mmsegmentation/blob/master/configs/pspnet/pspnet_r101b-d8_512x1024_80k_dark.py)| [model](https://download.openmmlab.com/mmsegmentation/v0.5/pspnet/pspnet_r101b-d8_512x1024_80k_cityscapes/pspnet_r101b-d8_512x1024_80k_cityscapes_20201226_170012-3a4d38ab.pth) &#124; [log](https://download.openmmlab.com/mmsegmentation/v0.5/pspnet/pspnet_r101b-d8_512x1024_80k_cityscapes/pspnet_r101b-d8_512x1024_80k_cityscapes-20201226_170012.log.json) |
84+
|PSPNet|R-101b-D8|Cityscapes Training set |Nighttime Driving|22.25|[config](https://github.com/open-mmlab/mmsegmentation/blob/master/configs/pspnet/pspnet_r101b-d8_512x1024_80k_night_driving.py)| [model](https://download.openmmlab.com/mmsegmentation/v0.5/pspnet/pspnet_r101b-d8_512x1024_80k_cityscapes/pspnet_r101b-d8_512x1024_80k_cityscapes_20201226_170012-3a4d38ab.pth) &#124; [log](https://download.openmmlab.com/mmsegmentation/v0.5/pspnet/pspnet_r101b-d8_512x1024_80k_cityscapes/pspnet_r101b-d8_512x1024_80k_cityscapes-20201226_170012.log.json) |
85+
|PSPNet|R-101b-D8|Cityscapes Training set |Cityscapes Validation set|79.69|[config](https://github.com/open-mmlab/mmsegmentation/blob/master/configs/pspnet/pspnet_r101b-d8_512x1024_80k_cityscapes.py) | [model](https://download.openmmlab.com/mmsegmentation/v0.5/pspnet/pspnet_r101b-d8_512x1024_80k_cityscapes/pspnet_r101b-d8_512x1024_80k_cityscapes_20201226_170012-3a4d38ab.pth) &#124; [log](https://download.openmmlab.com/mmsegmentation/v0.5/pspnet/pspnet_r101b-d8_512x1024_80k_cityscapes/pspnet_r101b-d8_512x1024_80k_cityscapes-20201226_170012.log.json) |

configs/pspnet/pspnet.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Collections:
66
- Pascal VOC 2012 + Aug
77
- Pascal Context
88
- Pascal Context 59
9+
- Dark Zurich and Nighttime Driving
910
Name: pspnet
1011
Models:
1112
- Config: configs/pspnet/pspnet_r50-d8_512x1024_40k_cityscapes.py
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
_base_ = './pspnet_r50-d8_512x1024_40k_dark.py'
2+
model = dict(pretrained='open-mmlab://resnet101_v1c', backbone=dict(depth=101))
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
_base_ = './pspnet_r50-d8_512x1024_40k_night_driving.py'
2+
model = dict(pretrained='open-mmlab://resnet101_v1c', backbone=dict(depth=101))
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
_base_ = './pspnet_r50-d8_512x1024_80k_dark.py'
2+
model = dict(
3+
pretrained='torchvision://resnet101',
4+
backbone=dict(type='ResNet', depth=101))
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
_base_ = './pspnet_r50-d8_512x1024_80k_night_driving.py'
2+
model = dict(
3+
pretrained='torchvision://resnet101',
4+
backbone=dict(type='ResNet', depth=101))
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
_base_ = [
2+
'../_base_/models/pspnet_r50-d8.py', '../_base_/datasets/cityscapes.py',
3+
'../_base_/default_runtime.py', '../_base_/schedules/schedule_40k.py'
4+
]
5+
img_norm_cfg = dict(
6+
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
7+
test_pipeline = [
8+
dict(type='LoadImageFromFile'),
9+
dict(
10+
type='MultiScaleFlipAug',
11+
img_scale=(1920, 1080),
12+
# img_ratios=[0.5, 0.75, 1.0, 1.25, 1.5, 1.75],
13+
flip=False,
14+
transforms=[
15+
dict(type='Resize', keep_ratio=True),
16+
dict(type='RandomFlip'),
17+
dict(type='Normalize', **img_norm_cfg),
18+
dict(type='ImageToTensor', keys=['img']),
19+
dict(type='Collect', keys=['img']),
20+
])
21+
]
22+
23+
data = dict(
24+
test=dict(
25+
type='DarkZurichDataset',
26+
data_root='data/dark_zurich/',
27+
img_dir='rgb_anon/val/night/GOPR0356',
28+
ann_dir='gt/val/night/GOPR0356',
29+
pipeline=test_pipeline))
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
_base_ = [
2+
'../_base_/models/pspnet_r50-d8.py', '../_base_/datasets/cityscapes.py',
3+
'../_base_/default_runtime.py', '../_base_/schedules/schedule_40k.py'
4+
]
5+
6+
img_norm_cfg = dict(
7+
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
8+
test_pipeline = [
9+
dict(type='LoadImageFromFile'),
10+
dict(
11+
type='MultiScaleFlipAug',
12+
img_scale=(1920, 1080),
13+
# img_ratios=[0.5, 0.75, 1.0, 1.25, 1.5, 1.75],
14+
flip=False,
15+
transforms=[
16+
dict(type='Resize', keep_ratio=True),
17+
dict(type='RandomFlip'),
18+
dict(type='Normalize', **img_norm_cfg),
19+
dict(type='ImageToTensor', keys=['img']),
20+
dict(type='Collect', keys=['img']),
21+
])
22+
]
23+
data = dict(
24+
test=dict(
25+
type='NightDrivingDataset',
26+
data_root='data/NighttimeDrivingTest/',
27+
img_dir='leftImg8bit/test/night',
28+
ann_dir='gtCoarse_daytime_trainvaltest/test/night',
29+
pipeline=test_pipeline))

0 commit comments

Comments
 (0)