Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8c89ff3

Browse files
AI-TianlongMeowZhengxiexinch
authored
[Datasets] Add Mapillary Vistas Datasets to MMSeg Core Package. (#2576)
## [Datasets] Add Mapillary Vistas Datasets to MMSeg Core Package .## MotivationAdd Mapillary Vistas Datasets to core package.Old PR#2484 ## Modification- Add Mapillary Vistas Datasets to core package.- Delete `tools/datasets_convert/mapillary.py` , dataset does't needconverting.- Add `schedule_240k.py` config.- Add configs files. ```none deeplabv3plus_r101-d8_4xb2-240k_mapillay_v1-512x1024.py deeplabv3plus_r101-d8_4xb2-240k_mapillay_v2-512x1024.py maskformer_swin-s_4xb2-240k_mapillary_v1-512x1024.py maskformer_swin-s_4xb2-240k_mapillary_v2-512x1024.py maskformer_r101-d8_4xb2-240k_mapillary_v1-512x1024.py maskformer_r101-d8_4xb2-240k_mapillary_v2-512x1024.py pspnet_r101-d8_4xb2-240k_mapillay_v1-512x1024.py pspnet_r101-d8_4xb2-240k_mapillay_v2-512x1024.py ```- Synchronized changes to `projects/mapillary_datasets`---------Co-authored-by: Miao Zheng <76149310+MeowZheng@users.noreply.github.com>Co-authored-by: xiexinch <xiexinch@outlook.com>
1 parent447a398 commit8c89ff3

File tree

30 files changed

+1089
-518
lines changed

30 files changed

+1089
-518
lines changed

‎README.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ Results and models are available in the [model zoo](docs/en/model_zoo.md).
181181
-[x][Potsdam](https://github.com/open-mmlab/mmsegmentation/blob/1.x/docs/en/user_guides/2_dataset_prepare.md#isprs-potsdam)
182182
-[x][Vaihingen](https://github.com/open-mmlab/mmsegmentation/blob/1.x/docs/en/user_guides/2_dataset_prepare.md#isprs-vaihingen)
183183
-[x][iSAID](https://github.com/open-mmlab/mmsegmentation/blob/1.x/docs/en/user_guides/2_dataset_prepare.md#isaid)
184+
-[x][Mapillary Vistas](https://github.com/open-mmlab/mmsegmentation/blob/1.x/docs/en/user_guides/2_dataset_prepare.md#mapillary-vistas-datasets)
184185

185186
</details>
186187

‎README_zh-CN.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ MMSegmentation 是一个基于 PyTorch 的语义分割开源工具箱。它是 O
162162
-[x][Potsdam](https://github.com/open-mmlab/mmsegmentation/blob/1.x/docs/zh_cn/dataset_prepare.md#isprs-potsdam)
163163
-[x][Vaihingen](https://github.com/open-mmlab/mmsegmentation/blob/1.x/docs/zh_cn/dataset_prepare.md#isprs-vaihingen)
164164
-[x][iSAID](https://github.com/open-mmlab/mmsegmentation/blob/1.x/docs/zh_cn/dataset_prepare.md#isaid)
165+
-[x][Mapillary Vistas](https://github.com/open-mmlab/mmsegmentation/blob/1.x/docs/en/user_guides/2_dataset_prepare.md#mapillary-vistas-datasets)
165166

166167
</details>
167168

projects/mapillary_dataset/configs/_base_/datasets/mapillary_v1_2.py renamed to configs/_base_/datasets/mapillary_v1.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# dataset settings
2-
dataset_type='MapillaryDataset_v1_2'
2+
dataset_type='MapillaryDataset_v1'
33
data_root='data/mapillary/'
44
crop_size= (512,1024)
55
train_pipeline= [
@@ -48,8 +48,7 @@
4848
type=dataset_type,
4949
data_root=data_root,
5050
data_prefix=dict(
51-
img_path='training/images',
52-
seg_map_path='training/v1.2/labels_mask'),
51+
img_path='training/images',seg_map_path='training/v1.2/labels'),
5352
pipeline=train_pipeline))
5453
val_dataloader=dict(
5554
batch_size=1,
@@ -61,7 +60,7 @@
6160
data_root=data_root,
6261
data_prefix=dict(
6362
img_path='validation/images',
64-
seg_map_path='validation/v1.2/labels_mask'),
63+
seg_map_path='validation/v1.2/labels'),
6564
pipeline=test_pipeline))
6665
test_dataloader=val_dataloader
6766

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# dataset settings
2+
_base_='./mapillary_v1.py'
3+
metainfo=dict(
4+
classes=('Bird','Ground Animal','Curb','Fence','Guard Rail','Barrier',
5+
'Wall','Bike Lane','Crosswalk - Plain','Curb Cut','Parking',
6+
'Pedestrian Area','Rail Track','Road','Service Lane',
7+
'Sidewalk','Bridge','Building','Tunnel','Person','Bicyclist',
8+
'Motorcyclist','Other Rider','Lane Marking - Crosswalk',
9+
'Lane Marking - General','Mountain','Sand','Sky','Snow',
10+
'Terrain','Vegetation','Water','Banner','Bench','Bike Rack',
11+
'Billboard','Catch Basin','CCTV Camera','Fire Hydrant',
12+
'Junction Box','Mailbox','Manhole','Phone Booth','Pothole',
13+
'Street Light','Pole','Traffic Sign Frame','Utility Pole',
14+
'Traffic Light','Traffic Sign (Back)','Traffic Sign (Front)',
15+
'Trash Can','Bicycle','Boat','Bus','Car','Caravan',
16+
'Motorcycle','On Rails','Other Vehicle','Trailer','Truck',
17+
'Wheeled Slow','Car Mount','Ego Vehicle'),
18+
palette=[[165,42,42], [0,192,0], [196,196,196], [190,153,153],
19+
[180,165,180], [90,120,150], [102,102,156], [128,64,255],
20+
[140,140,200], [170,170,170], [250,170,160], [96,96,96],
21+
[230,150,140], [128,64,128], [110,110,110], [244,35,232],
22+
[150,100,100], [70,70,70], [150,120,90], [220,20,60],
23+
[255,0,0], [255,0,100], [255,0,200], [200,128,128],
24+
[255,255,255], [64,170,64], [230,160,50], [70,130,180],
25+
[190,255,255], [152,251,152], [107,142,35], [0,170,30],
26+
[255,255,128], [250,0,30], [100,140,180], [220,220,220],
27+
[220,128,128], [222,40,40], [100,170,30], [40,40,40],
28+
[33,33,33], [100,128,160], [142,0,0], [70,100,150],
29+
[210,170,100], [153,153,153], [128,128,128], [0,0,80],
30+
[250,170,30], [192,192,192], [220,220,0], [140,140,20],
31+
[119,11,32], [150,0,255], [0,60,100], [0,0,142],
32+
[0,0,90], [0,0,230], [0,80,100], [128,64,64], [0,0,110],
33+
[0,0,70], [0,0,192], [32,32,32], [120,10,10]])
34+
35+
train_dataloader=dict(dataset=dict(metainfo=metainfo))
36+
val_dataloader=dict(dataset=dict(metainfo=metainfo))
37+
test_dataloader=val_dataloader

projects/mapillary_dataset/configs/_base_/datasets/mapillary_v2_0.py renamed to configs/_base_/datasets/mapillary_v2.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# dataset settings
2-
dataset_type='MapillaryDataset_v2_0'
2+
dataset_type='MapillaryDataset_v2'
33
data_root='data/mapillary/'
44
crop_size= (512,1024)
55
train_pipeline= [
@@ -48,8 +48,7 @@
4848
type=dataset_type,
4949
data_root=data_root,
5050
data_prefix=dict(
51-
img_path='training/images',
52-
seg_map_path='training/v2.0/labels_mask'),
51+
img_path='training/images',seg_map_path='training/v2.0/labels'),
5352
pipeline=train_pipeline))
5453
val_dataloader=dict(
5554
batch_size=1,
@@ -61,7 +60,7 @@
6160
data_root=data_root,
6261
data_prefix=dict(
6362
img_path='validation/images',
64-
seg_map_path='validation/v2.0/labels_mask'),
63+
seg_map_path='validation/v2.0/labels'),
6564
pipeline=test_pipeline))
6665
test_dataloader=val_dataloader
6766

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# optimizer
2+
optimizer=dict(type='SGD',lr=0.01,momentum=0.9,weight_decay=0.0005)
3+
optim_wrapper=dict(type='OptimWrapper',optimizer=optimizer,clip_grad=None)
4+
# learning policy
5+
param_scheduler= [
6+
dict(
7+
type='PolyLR',
8+
eta_min=1e-4,
9+
power=0.9,
10+
begin=0,
11+
end=240000,
12+
by_epoch=False)
13+
]
14+
# training schedule for 240k
15+
train_cfg=dict(
16+
type='IterBasedTrainLoop',max_iters=240000,val_interval=24000)
17+
val_cfg=dict(type='ValLoop')
18+
test_cfg=dict(type='TestLoop')
19+
default_hooks=dict(
20+
timer=dict(type='IterTimerHook'),
21+
logger=dict(type='LoggerHook',interval=50,log_metric_by_epoch=False),
22+
param_scheduler=dict(type='ParamSchedulerHook'),
23+
checkpoint=dict(type='CheckpointHook',by_epoch=False,interval=24000),
24+
sampler_seed=dict(type='DistSamplerSeedHook'),
25+
visualization=dict(type='SegVisualizationHook'))

‎configs/deeplabv3plus/README.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,12 @@ Spatial pyramid pooling module or encode-decoder structure are used in deep neur
124124
| DeepLabV3+| R-18-D8| 896x896| 80000| 6.19| 24.81| 61.35| 62.61|[config](https://github.com/open-mmlab/mmsegmentation/blob/dev-1.x/configs/deeplabv3plus/deeplabv3plus_r18-d8_4xb4-80k_isaid-896x896.py)|[model](https://download.openmmlab.com/mmsegmentation/v0.5/deeplabv3plus/deeplabv3plus_r18-d8_4x4_896x896_80k_isaid/deeplabv3plus_r18-d8_4x4_896x896_80k_isaid_20220110_180526-7059991d.pth)\|[log](https://download.openmmlab.com/mmsegmentation/v0.5/deeplabv3plus/deeplabv3plus_r18-d8_4x4_896x896_80k_isaid/deeplabv3plus_r18-d8_4x4_896x896_80k_isaid_20220110_180526.log.json)|
125125
| DeepLabV3+| R-50-D8| 896x896| 80000| 21.45| 8.42| 67.06| 68.02|[config](https://github.com/open-mmlab/mmsegmentation/blob/dev-1.x/configs/deeplabv3plus/deeplabv3plus_r50-d8_4xb4-80k_isaid-896x896.py)|[model](https://download.openmmlab.com/mmsegmentation/v0.5/deeplabv3plus/deeplabv3plus_r50-d8_4x4_896x896_80k_isaid/deeplabv3plus_r50-d8_4x4_896x896_80k_isaid_20220110_180526-598be439.pth)\|[log](https://download.openmmlab.com/mmsegmentation/v0.5/deeplabv3plus/deeplabv3plus_r50-d8_4x4_896x896_80k_isaid/deeplabv3plus_r50-d8_4x4_896x896_80k_isaid_20220110_180526.log.json)|
126126

127+
###Mapillary Vistas v1.2
128+
129+
| Method| Backbone| Crop Size| Lr schd| Mem (GB)| Inf time (fps)| Device| mIoU| mIoU(ms+flip)| config| download|
130+
| ----------| --------| ---------| ------:| --------| --------------| ------| ----:| ------------:| ----------------------------------------------------------------------------------------------------------------------------------------------------| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
131+
| DeepLabV3+| R-50-D8| 1280x1280| 300000| 24.04| 17.92| A100| 47.35| -|[config](https://github.com/open-mmlab/mmsegmentation/blob/dev-1.x/configs/deeplabv3plus/deeplabv3plus_r50-d8_4xb2-300k_mapillay_v1_65-1280x1280.py)|[model](https://download.openmmlab.com/mmsegmentation/v0.5/deeplabv3plus/deeplabv3plus_r50-d8_4xb2-300k_mapillay_v1_65-1280x1280/deeplabv3plus_r50-d8_4xb2-300k_mapillay_v1_65-1280x1280_20230301_110504-655f8e43.pth)\|[log](https://download.openmmlab.com/mmsegmentation/v0.5/deeplabv3plus/deeplabv3plus_r50-d8_4xb2-300k_mapillay_v1_65-1280x1280/deeplabv3plus_r50-d8_4xb2-300k_mapillay_v1_65-1280x1280_20230301_110504.json)|
132+
127133
Note:
128134

129135
-`D-8`/`D-16` here corresponding to the output stride 8/16 setting for DeepLab series.

‎configs/deeplabv3plus/deeplabv3plus.yml‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Collections:
1111
-Potsdam
1212
-Vaihingen
1313
-iSAID
14+
-Mapillary Vistas v1.2
1415
Paper:
1516
URL:https://arxiv.org/abs/1802.02611
1617
Title:Encoder-Decoder with Atrous Separable Convolution for Semantic Image Segmentation
@@ -848,3 +849,24 @@ Models:
848849
mIoU(ms+flip):68.02
849850
Config:configs/deeplabv3plus/deeplabv3plus_r50-d8_4xb4-80k_isaid-896x896.py
850851
Weights:https://download.openmmlab.com/mmsegmentation/v0.5/deeplabv3plus/deeplabv3plus_r50-d8_4x4_896x896_80k_isaid/deeplabv3plus_r50-d8_4x4_896x896_80k_isaid_20220110_180526-598be439.pth
852+
-Name:deeplabv3plus_r50-d8_4xb2-300k_mapillay_v1_65-1280x1280
853+
In Collection:DeepLabV3+
854+
Metadata:
855+
backbone:R-50-D8
856+
crop size:(1280,1280)
857+
lr schd:300000
858+
inference time (ms/im):
859+
-value:55.8
860+
hardware:V100
861+
backend:PyTorch
862+
batch size:1
863+
mode:FP32
864+
resolution:(1280,1280)
865+
Training Memory (GB):24.04
866+
Results:
867+
-Task:Semantic Segmentation
868+
Dataset:Mapillary Vistas v1.2
869+
Metrics:
870+
mIoU:47.35
871+
Config:configs/deeplabv3plus/deeplabv3plus_r50-d8_4xb2-300k_mapillay_v1_65-1280x1280.py
872+
Weights:https://download.openmmlab.com/mmsegmentation/v0.5/deeplabv3plus/deeplabv3plus_r50-d8_4xb2-300k_mapillay_v1_65-1280x1280/deeplabv3plus_r50-d8_4xb2-300k_mapillay_v1_65-1280x1280_20230301_110504-655f8e43.pth
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
_base_= [
2+
'../_base_/models/deeplabv3plus_r50-d8.py',
3+
'../_base_/datasets/mapillary_v1_65.py',
4+
'../_base_/default_runtime.py',
5+
]
6+
7+
crop_size= (1280,1280)
8+
data_preprocessor=dict(size=crop_size)
9+
model=dict(
10+
data_preprocessor=data_preprocessor,
11+
pretrained='open-mmlab://resnet50_v1c',
12+
backbone=dict(depth=50),
13+
decode_head=dict(num_classes=65),
14+
auxiliary_head=dict(num_classes=65))
15+
16+
iters=300000
17+
# optimizer
18+
optimizer=dict(
19+
type='AdamW',lr=0.0001,betas=(0.9,0.999),weight_decay=0.0001)
20+
# optimizer
21+
optim_wrapper=dict(
22+
type='OptimWrapper',
23+
optimizer=optimizer,
24+
clip_grad=dict(max_norm=0.01,norm_type=2),
25+
paramwise_cfg=dict(
26+
custom_keys={'backbone':dict(lr_mult=0.1,decay_mult=1.0)}))
27+
param_scheduler= [
28+
dict(
29+
type='PolyLR',
30+
eta_min=0,
31+
power=0.9,
32+
begin=0,
33+
end=iters,
34+
by_epoch=False)
35+
]
36+
37+
# training schedule for 300k
38+
train_cfg=dict(
39+
type='IterBasedTrainLoop',max_iters=iters,val_interval=iters//10)
40+
val_cfg=dict(type='ValLoop')
41+
test_cfg=dict(type='TestLoop')
42+
43+
default_hooks=dict(
44+
timer=dict(type='IterTimerHook'),
45+
logger=dict(type='LoggerHook',interval=50,log_metric_by_epoch=False),
46+
param_scheduler=dict(type='ParamSchedulerHook'),
47+
checkpoint=dict(
48+
type='CheckpointHook',by_epoch=False,interval=iters//10),
49+
sampler_seed=dict(type='DistSamplerSeedHook'),
50+
visualization=dict(type='SegVisualizationHook'))
51+
52+
train_dataloader=dict(batch_size=2)
53+
54+
# Default setting for scaling LR automatically
55+
# - `enable` means enable scaling LR automatically
56+
# or not by default.
57+
# - `base_batch_size` = (4 GPUs) x (2 samples per GPU).
58+
auto_scale_lr=dict(enable=False,base_batch_size=8)

‎docs/en/user_guides/2_dataset_prepare.md‎

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,29 @@ mmsegmentation
154154
│ │ │ ├── training
155155
│ │ │ ├── validation
156156
│ │ │ ├── test
157+
│ ├── mapillary
158+
│ │ ├── training
159+
│ │ │ ├── images
160+
│ │ │ ├── v1.2
161+
| │ │ │ ├── instances
162+
| │ │ │ ├── labels
163+
| │   │   │ └── panoptic
164+
│ │ │ ├── v2.0
165+
| │ │ │ ├── instances
166+
| │ │ │ ├── labels
167+
| │ │ │ ├── panoptic
168+
| │   │   │ └── polygons
169+
│ │ ├── validation
170+
│ │ │ ├── images
171+
| │ │ ├── v1.2
172+
| │ │ │ ├── instances
173+
| │ │ │ ├── labels
174+
| │   │   │ └── panoptic
175+
│ │ │ ├── v2.0
176+
| │ │ │ ├── instances
177+
| │ │ │ ├── labels
178+
| │ │ │ ├── panoptic
179+
| │   │   │ └── polygons
157180
```
158181

159182
###Cityscapes
@@ -551,3 +574,54 @@ The script will make directory structure below:
551574
```
552575

553576
It includes 400 images for training, 400 images for validation and 400 images for testing which is the same as REFUGE 2018 dataset.
577+
578+
##Mapillary Vistas Datasets
579+
580+
- The dataset could be download[here](https://www.mapillary.com/dataset/vistas) after registration.
581+
582+
- Mapillary Vistas Dataset use 8-bit with color-palette to store labels. No conversion operation is required.
583+
584+
- Assumption you have put the dataset zip file in`mmsegmentation/data/mapillary`
585+
586+
- Please run the following commands to unzip dataset.
587+
588+
```bash
589+
cd data/mapillary
590+
unzip An-ZjB1Zm61yAZG0ozTymz8I8NqI4x0MrYrh26dq7kPgfu8vf9ImrdaOAVOFYbJ2pNAgUnVGBmbue9lTgdBOb5BbKXIpFs0fpYWqACbrQDChAA2fdX0zS9PcHu7fY8c-FOvyBVxPNYNFQuM.zip
591+
```
592+
593+
- After unzip, you will get Mapillary Vistas Dataset like this structure. Semantic segmentation mask labels in`labels` folder.
594+
595+
```none
596+
mmsegmentation
597+
├── mmseg
598+
├── tools
599+
├── configs
600+
├── data
601+
│ ├── mapillary
602+
│ │ ├── training
603+
│ │ │ ├── images
604+
│ │ │ ├── v1.2
605+
| │ │ │ ├── instances
606+
| │ │ │ ├── labels
607+
| │   │   │ └── panoptic
608+
│ │ │ ├── v2.0
609+
| │ │ │ ├── instances
610+
| │ │ │ ├── labels
611+
| │ │ │ ├── panoptic
612+
| │   │   │ └── polygons
613+
│ │ ├── validation
614+
│ │ │ ├── images
615+
| │ │ ├── v1.2
616+
| │ │ │ ├── instances
617+
| │ │ │ ├── labels
618+
| │   │   │ └── panoptic
619+
│ │ │ ├── v2.0
620+
| │ │ │ ├── instances
621+
| │ │ │ ├── labels
622+
| │ │ │ ├── panoptic
623+
| │   │   │ └── polygons
624+
```
625+
626+
- You could set Datasets version with`MapillaryDataset_v1` and`MapillaryDataset_v2` in your configs.
627+
View the Mapillary Vistas Datasets config file here[V1.2](https://github.com/open-mmlab/mmsegmentation/blob/dev-1.x/configs/_base_/datasets/mapillary_v1.py) and[V2.0](https://github.com/open-mmlab/mmsegmentation/blob/dev-1.x/configs/_base_/datasets/mapillary_v2.py)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp