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))
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
_base_ = [
2+
'../_base_/models/pspnet_r50-d8.py', '../_base_/datasets/cityscapes.py',
3+
'../_base_/default_runtime.py', '../_base_/schedules/schedule_80k.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+
24+
data = dict(
25+
test=dict(
26+
type='DarkZurichDataset',
27+
data_root='data/dark_zurich/',
28+
img_dir='rgb_anon/val/night/GOPR0356',
29+
ann_dir='gt/val/night/GOPR0356',
30+
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_80k.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))

docs/dataset_prepare.md

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,27 @@ mmsegmentation
6969
│ │ ├── annotations
7070
│ │ │ ├── training
7171
│ │ │ ├── validation
72-
72+
| ├── dark_zurich
73+
| │   ├── gps
74+
| │   │   ├── val
75+
| │   │   └── val_ref
76+
| │   ├── gt
77+
| │   │   └── val
78+
| │   ├── LICENSE.txt
79+
| │   ├── lists_file_names
80+
| │   │   ├── val_filenames.txt
81+
| │   │   └── val_ref_filenames.txt
82+
| │   ├── README.md
83+
| │   └── rgb_anon
84+
| │   | ├── val
85+
| │   | └── val_ref
86+
| ├── NighttimeDrivingTest
87+
| | ├── gtCoarse_daytime_trainvaltest
88+
| | │   └── test
89+
| | │   └── night
90+
| | └── leftImg8bit
91+
| | | └── test
92+
| | | └── night
7393
```
7494

7595
### Cityscapes
@@ -163,3 +183,11 @@ python tools/convert_datasets/stare.py /path/to/stare-images.tar /path/to/labels
163183
```
164184

165185
The script will make directory structure automatically.
186+
187+
### Dark Zurich
188+
189+
Since we only support test models on this dataset, you may only download [the validation set](https://data.vision.ee.ethz.ch/csakarid/shared/GCMA_UIoU/Dark_Zurich_val_anon.zip).
190+
191+
### Nighttime Driving
192+
193+
Since we only support test models on this dataset, you may only download [the test set](http://data.vision.ee.ethz.ch/daid/NighttimeDriving/NighttimeDrivingTest.zip).

docs_zh-CN/dataset_prepare.md

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,27 @@ mmsegmentation
6868
│ │ ├── annotations
6969
│ │ │ ├── training
7070
│ │ │ ├── validation
71-
71+
| ├── dark_zurich
72+
| │   ├── gps
73+
| │   │   ├── val
74+
| │   │   └── val_ref
75+
| │   ├── gt
76+
| │   │   └── val
77+
| │   ├── LICENSE.txt
78+
| │   ├── lists_file_names
79+
| │   │   ├── val_filenames.txt
80+
| │   │   └── val_ref_filenames.txt
81+
| │   ├── README.md
82+
| │   └── rgb_anon
83+
| │   | ├── val
84+
| │   | └── val_ref
85+
| ├── NighttimeDrivingTest
86+
| | ├── gtCoarse_daytime_trainvaltest
87+
| | │   └── test
88+
| | │   └── night
89+
| | └── leftImg8bit
90+
| | | └── test
91+
| | | └── night
7292
```
7393

7494
### Cityscapes
@@ -167,3 +187,11 @@ python tools/convert_datasets/stare.py /path/to/stare-images.tar /path/to/labels
167187
```
168188

169189
这个脚本将自动生成正确的文件夹结构。
190+
191+
### Dark Zurich
192+
193+
因为我们只支持在此数据集上测试模型,所以您只需下载[验证集](https://data.vision.ee.ethz.ch/csakarid/shared/GCMA_UIoU/Dark_Zurich_val_anon.zip)
194+
195+
### Nighttime Driving
196+
197+
因为我们只支持在此数据集上测试模型,所以您只需下载[测试集](http://data.vision.ee.ethz.ch/daid/NighttimeDriving/NighttimeDrivingTest.zip)

mmseg/datasets/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@
44
from .chase_db1 import ChaseDB1Dataset
55
from .cityscapes import CityscapesDataset
66
from .custom import CustomDataset
7+
from .dark_zurich import DarkZurichDataset
78
from .dataset_wrappers import ConcatDataset, RepeatDataset
89
from .drive import DRIVEDataset
910
from .hrf import HRFDataset
11+
from .night_driving import NightDrivingDataset
1012
from .pascal_context import PascalContextDataset, PascalContextDataset59
1113
from .stare import STAREDataset
1214
from .voc import PascalVOCDataset
@@ -16,5 +18,5 @@
1618
'DATASETS', 'build_dataset', 'PIPELINES', 'CityscapesDataset',
1719
'PascalVOCDataset', 'ADE20KDataset', 'PascalContextDataset',
1820
'PascalContextDataset59', 'ChaseDB1Dataset', 'DRIVEDataset', 'HRFDataset',
19-
'STAREDataset'
21+
'STAREDataset', 'DarkZurichDataset', 'NightDrivingDataset'
2022
]

mmseg/datasets/dark_zurich.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
from .builder import DATASETS
2+
from .cityscapes import CityscapesDataset
3+
4+
5+
@DATASETS.register_module()
6+
class DarkZurichDataset(CityscapesDataset):
7+
"""DarkZurichDataset dataset."""
8+
9+
def __init__(self, **kwargs):
10+
super().__init__(
11+
img_suffix='_rgb_anon.png',
12+
seg_map_suffix='_gt_labelTrainIds.png',
13+
**kwargs)

mmseg/datasets/night_driving.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
from .builder import DATASETS
2+
from .cityscapes import CityscapesDataset
3+
4+
5+
@DATASETS.register_module()
6+
class NightDrivingDataset(CityscapesDataset):
7+
"""NightDrivingDataset dataset."""
8+
9+
def __init__(self, **kwargs):
10+
super().__init__(
11+
img_suffix='_leftImg8bit.png',
12+
seg_map_suffix='_gtCoarse_labelTrainIds.png',
13+
**kwargs)

0 commit comments

Comments
 (0)