Skip to content

Commit 3c6dd9e

Browse files
authored
[Feature] Support MobileNetV2 backbone (open-mmlab#86)
* [Feature] Support MobileNetV2 backbone * Fixed import * Fixed test * Fixed test * Fixed dilate * upload model * update table * update table * update bibtex * update MMCV requirement
1 parent 0c04f52 commit 3c6dd9e

15 files changed

+433
-4
lines changed

configs/mobilenet_v2/README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# MobileNetV2: Inverted Residuals and Linear Bottlenecks
2+
3+
## Introduction
4+
5+
```
6+
@inproceedings{sandler2018mobilenetv2,
7+
title={Mobilenetv2: Inverted residuals and linear bottlenecks},
8+
author={Sandler, Mark and Howard, Andrew and Zhu, Menglong and Zhmoginov, Andrey and Chen, Liang-Chieh},
9+
booktitle={Proceedings of the IEEE conference on computer vision and pattern recognition},
10+
pages={4510--4520},
11+
year={2018}
12+
}
13+
```
14+
15+
16+
## Results and models
17+
18+
### Cityscapes
19+
| Method | Backbone | Crop Size | Lr schd | Mem (GB) | Inf time (fps) | mIoU | mIoU(ms+flip) | download |
20+
|------------|----------|-----------|--------:|---------:|----------------|------:|---------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
21+
| FCN | M-V2-D8 | 512x1024 | 80000 | 3.4 | 14.2 | 61.54 | - | [model](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/mobilenet_v2/fcn_m-v2-d8_512x1024_80k_cityscapes/fcn_m-v2-d8_512x1024_80k_cityscapes_20200825_124817-d24c28c1.pth) | [log](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/mobilenet_v2/fcn_m-v2-d8_512x1024_80k_cityscapes/fcn_m-v2-d8_512x1024_80k_cityscapes-20200825_124817.log.json) |
22+
| PSPNet | M-V2-D8 | 512x1024 | 80000 | 3.6 | 11.2 | 70.23 | - | [model](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/mobilenet_v2/pspnet_m-v2-d8_512x1024_80k_cityscapes/pspnet_m-v2-d8_512x1024_80k_cityscapes_20200825_124817-19e81d51.pth) | [log](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/mobilenet_v2/pspnet_m-v2-d8_512x1024_80k_cityscapes/pspnet_m-v2-d8_512x1024_80k_cityscapes-20200825_124817.log.json) |
23+
| DeepLabV3 | M-V2-D8 | 512x1024 | 80000 | 3.9 | 8.4 | 73.84 | - | [model](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/mobilenet_v2/deeplabv3_m-v2-d8_512x1024_80k_cityscapes/deeplabv3_m-v2-d8_512x1024_80k_cityscapes_20200825_124836-bef03590.pth) | [log](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/mobilenet_v2/deeplabv3_m-v2-d8_512x1024_80k_cityscapes/deeplabv3_m-v2-d8_512x1024_80k_cityscapes-20200825_124836.log.json) |
24+
| DeepLabV3+ | M-V2-D8 | 512x1024 | 80000 | 5.1 | 8.4 | 75.20 | - | [model](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/mobilenet_v2/deeplabv3plus_m-v2-d8_512x1024_80k_cityscapes/deeplabv3plus_m-v2-d8_512x1024_80k_cityscapes_20200825_124836-d256dd4b.pth) | [log](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/mobilenet_v2/deeplabv3plus_m-v2-d8_512x1024_80k_cityscapes/deeplabv3plus_m-v2-d8_512x1024_80k_cityscapes-20200825_124836.log.json) |
25+
26+
### ADE20k
27+
| Method | Backbone | Crop Size | Lr schd | Mem (GB) | Inf time (fps) | mIoU | mIoU(ms+flip) | download |
28+
|------------|----------|-----------|--------:|---------:|----------------|------:|---------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
29+
| FCN | M-V2-D8 | 512x512 | 160000 | 6.5 | 64.4 | 19.71 | - | [model](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/mobilenet_v2/fcn_m-v2-d8_512x512_160k_ade20k/fcn_m-v2-d8_512x512_160k_ade20k_20200825_214953-c40e1095.pth) | [log](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/mobilenet_v2/fcn_m-v2-d8_512x512_160k_ade20k/fcn_m-v2-d8_512x512_160k_ade20k-20200825_214953.log.json) |
30+
| PSPNet | M-V2-D8 | 512x512 | 160000 | 6.5 | 57.7 | 29.68 | - | [model](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/mobilenet_v2/pspnet_m-v2-d8_512x512_160k_ade20k/pspnet_m-v2-d8_512x512_160k_ade20k_20200825_214953-f5942f7a.pth) | [log](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/mobilenet_v2/pspnet_m-v2-d8_512x512_160k_ade20k/pspnet_m-v2-d8_512x512_160k_ade20k-20200825_214953.log.json) |
31+
| DeepLabV3 | M-V2-D8 | 512x512 | 160000 | 6.8 | 39.9 | 34.08 | - | [model](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/mobilenet_v2/deeplabv3_m-v2-d8_512x512_160k_ade20k/deeplabv3_m-v2-d8_512x512_160k_ade20k_20200825_223255-63986343.pth) | [log](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/mobilenet_v2/deeplabv3_m-v2-d8_512x512_160k_ade20k/deeplabv3_m-v2-d8_512x512_160k_ade20k-20200825_223255.log.json) |
32+
| DeepLabV3+ | M-V2-D8 | 512x512 | 160000 | 8.2 | 43.1 | 34.02 | - | [model](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/mobilenet_v2/deeplabv3plus_m-v2-d8_512x512_160k_ade20k/deeplabv3plus_m-v2-d8_512x512_160k_ade20k_20200825_223255-465a01d4.pth) | [log](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/mobilenet_v2/deeplabv3plus_m-v2-d8_512x512_160k_ade20k/deeplabv3plus_m-v2-d8_512x512_160k_ade20k-20200825_223255.log.json) |
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
_base_ = '../deeplabv3/deeplabv3_r101-d8_512x1024_80k_cityscapes.py'
2+
model = dict(
3+
pretrained='mmcls://mobilenet_v2',
4+
backbone=dict(
5+
_delete_=True,
6+
type='MobileNetV2',
7+
widen_factor=1.,
8+
strides=(1, 2, 2, 1, 1, 1, 1),
9+
dilations=(1, 1, 1, 2, 2, 4, 4),
10+
out_indices=(1, 2, 4, 6)),
11+
decode_head=dict(in_channels=320),
12+
auxiliary_head=dict(in_channels=96))
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
_base_ = '../deeplabv3/deeplabv3_r101-d8_512x512_160k_ade20k.py'
2+
model = dict(
3+
pretrained='mmcls://mobilenet_v2',
4+
backbone=dict(
5+
_delete_=True,
6+
type='MobileNetV2',
7+
widen_factor=1.,
8+
strides=(1, 2, 2, 1, 1, 1, 1),
9+
dilations=(1, 1, 1, 2, 2, 4, 4),
10+
out_indices=(1, 2, 4, 6)),
11+
decode_head=dict(in_channels=320),
12+
auxiliary_head=dict(in_channels=96))
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
_base_ = '../deeplabv3plus/deeplabv3plus_r101-d8_512x1024_80k_cityscapes.py'
2+
model = dict(
3+
pretrained='mmcls://mobilenet_v2',
4+
backbone=dict(
5+
_delete_=True,
6+
type='MobileNetV2',
7+
widen_factor=1.,
8+
strides=(1, 2, 2, 1, 1, 1, 1),
9+
dilations=(1, 1, 1, 2, 2, 4, 4),
10+
out_indices=(1, 2, 4, 6)),
11+
decode_head=dict(in_channels=320, c1_in_channels=24),
12+
auxiliary_head=dict(in_channels=96))
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
_base_ = '../deeplabv3plus/deeplabv3plus_r101-d8_512x512_160k_ade20k.py'
2+
model = dict(
3+
pretrained='mmcls://mobilenet_v2',
4+
backbone=dict(
5+
_delete_=True,
6+
type='MobileNetV2',
7+
widen_factor=1.,
8+
strides=(1, 2, 2, 1, 1, 1, 1),
9+
dilations=(1, 1, 1, 2, 2, 4, 4),
10+
out_indices=(1, 2, 4, 6)),
11+
decode_head=dict(in_channels=320, c1_in_channels=24),
12+
auxiliary_head=dict(in_channels=96))
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
_base_ = '../fcn/fcn_r101-d8_512x1024_80k_cityscapes.py'
2+
model = dict(
3+
pretrained='mmcls://mobilenet_v2',
4+
backbone=dict(
5+
_delete_=True,
6+
type='MobileNetV2',
7+
widen_factor=1.,
8+
strides=(1, 2, 2, 1, 1, 1, 1),
9+
dilations=(1, 1, 1, 2, 2, 4, 4),
10+
out_indices=(1, 2, 4, 6)),
11+
decode_head=dict(in_channels=320),
12+
auxiliary_head=dict(in_channels=96))
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
_base_ = '../fcn/fcn_r101-d8_512x512_160k_ade20k.py'
2+
model = dict(
3+
pretrained='mmcls://mobilenet_v2',
4+
backbone=dict(
5+
_delete_=True,
6+
type='MobileNetV2',
7+
widen_factor=1.,
8+
strides=(1, 2, 2, 1, 1, 1, 1),
9+
dilations=(1, 1, 1, 2, 2, 4, 4),
10+
out_indices=(1, 2, 4, 6)),
11+
decode_head=dict(in_channels=320),
12+
auxiliary_head=dict(in_channels=96))
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
_base_ = '../pspnet/pspnet_r101-d8_512x1024_80k_cityscapes.py'
2+
model = dict(
3+
pretrained='mmcls://mobilenet_v2',
4+
backbone=dict(
5+
_delete_=True,
6+
type='MobileNetV2',
7+
widen_factor=1.,
8+
strides=(1, 2, 2, 1, 1, 1, 1),
9+
dilations=(1, 1, 1, 2, 2, 4, 4),
10+
out_indices=(1, 2, 4, 6)),
11+
decode_head=dict(in_channels=320),
12+
auxiliary_head=dict(in_channels=96))
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
_base_ = '../pspnet/pspnet_r101-d8_512x512_160k_ade20k.py'
2+
model = dict(
3+
pretrained='mmcls://mobilenet_v2',
4+
backbone=dict(
5+
_delete_=True,
6+
type='MobileNetV2',
7+
widen_factor=1.,
8+
strides=(1, 2, 2, 1, 1, 1, 1),
9+
dilations=(1, 1, 1, 2, 2, 4, 4),
10+
out_indices=(1, 2, 4, 6)),
11+
decode_head=dict(in_channels=320),
12+
auxiliary_head=dict(in_channels=96))

mmseg/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
from .version import __version__, version_info
44

5-
MMCV_MIN = '1.0.5'
6-
MMCV_MAX = '1.1.1'
5+
MMCV_MIN = '1.1.2'
6+
MMCV_MAX = '1.2.0'
77

88

99
def digit_version(version_str):

mmseg/models/backbones/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
from .fast_scnn import FastSCNN
22
from .hrnet import HRNet
3+
from .mobilenet_v2 import MobileNetV2
34
from .resnest import ResNeSt
45
from .resnet import ResNet, ResNetV1c, ResNetV1d
56
from .resnext import ResNeXt
67

78
__all__ = [
89
'ResNet', 'ResNetV1c', 'ResNetV1d', 'ResNeXt', 'HRNet', 'FastSCNN',
9-
'ResNeSt'
10+
'ResNeSt', 'MobileNetV2'
1011
]

0 commit comments

Comments
 (0)