Skip to content

Commit b99cb5b

Browse files
PkuRainBowxvjiarui
authored andcommitted
add more results of OCRNet (open-mmlab#20)
* update the HRNet-OCR & add ResNet-101-OCR * revise the script * add the results of resnet-101+ocr * add cascade ocr, aspp ocr * add comparison table * move comparison table * support ocr+decoder * revise the ocrnet_sep_aspp * update the results of ocrnet * update the results of ocrnet * add sep-ocr-variants * add bs2x exp of deeplabv3/v3+ * apply sep-conv in ocr module * update the results * update the results * update the results of OCRNet * update the results of OCRNet * correct the results * verify the release branch * init the release branch * add more results of ocrnet and ocrnetplus * resolve the conflicts * rename OCRNetPlus as OCRNet+ * fix the format * fix the lint issues * fix the lint issues * fix the lint issues * fix the lint isort issues * fix the lint yapf issues * fix the format issues * remove the changes by the master branch * remove the changes by the master branch * remove the changes by the master branch * remove the changes by the master branch * remove the changes by the master branch * add the logs folder to .gitignore * recover .gitignore * update readme * update readme * reset the cudnn_benchmark * revise the README of OCRNet * revise the name * revise the reference of OCRNet * revise the Figure of OCRNet+ * update the results of OCR/OCR+ * update the results of OCR/OCR+ * update the results of OCR/OCR+ * fix the format issue * fix the format issue * remove the ocr+ * update the results * update the results * fix the conflicts * fix the lint issue * fix the lint issue * fix the lint issue * fix the lint issue * fix the inconsistency * add urls to README * clean the code * remove the schedule configs * clean the custom code * clean up * remove ocr.png Co-authored-by: Jiarui XU <xvjiarui0826@gmail.com>
1 parent a81b1bb commit b99cb5b

5 files changed

+96
-4
lines changed
+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# model settings
2+
norm_cfg = dict(type='SyncBN', requires_grad=True)
3+
model = dict(
4+
type='CascadeEncoderDecoder',
5+
num_stages=2,
6+
pretrained='open-mmlab://resnet50_v1c',
7+
backbone=dict(
8+
type='ResNetV1c',
9+
depth=50,
10+
num_stages=4,
11+
out_indices=(0, 1, 2, 3),
12+
dilations=(1, 1, 2, 4),
13+
strides=(1, 2, 1, 1),
14+
norm_cfg=norm_cfg,
15+
norm_eval=False,
16+
style='pytorch',
17+
contract_dilation=True),
18+
decode_head=[
19+
dict(
20+
type='FCNHead',
21+
in_channels=1024,
22+
in_index=2,
23+
channels=256,
24+
num_convs=1,
25+
concat_input=False,
26+
drop_out_ratio=0.1,
27+
num_classes=19,
28+
norm_cfg=norm_cfg,
29+
align_corners=False,
30+
loss_decode=dict(
31+
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=0.4)),
32+
dict(
33+
type='OCRHead',
34+
in_channels=2048,
35+
in_index=3,
36+
channels=512,
37+
ocr_channels=256,
38+
drop_out_ratio=0.1,
39+
num_classes=19,
40+
norm_cfg=norm_cfg,
41+
align_corners=False,
42+
loss_decode=dict(
43+
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0))
44+
])
45+
# model training and testing settings
46+
train_cfg = dict()
47+
test_cfg = dict(mode='whole')

configs/ocrnet/README.md

+24-4
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,28 @@
11
# Object-Contextual Representations for Semantic Segmentation
22

33
## Introduction
4+
45
```
5-
@article{yuan2019ocr,
6+
@article{YuanW18,
7+
title={Ocnet: Object context network for scene parsing},
8+
author={Yuhui Yuan and Jingdong Wang},
9+
booktitle={arXiv preprint arXiv:1809.00916},
10+
year={2018}
11+
}
12+
13+
@article{YuanCW20,
614
title={Object-Contextual Representations for Semantic Segmentation},
7-
author={Yuan Yuhui and Chen Xilin and Wang Jingdong},
8-
journal={arXiv preprint arXiv:1909.11065},
9-
year={2019}
15+
author={Yuhui Yuan and Xilin Chen and Jingdong Wang},
16+
booktitle={ECCV},
17+
year={2020}
1018
}
1119
```
1220

1321
## Results and models
1422

1523
### Cityscapes
24+
25+
#### HRNet backbone
1626
| Method | Backbone | Crop Size | Lr schd | Mem (GB) | Inf time (fps) | mIoU | mIoU(ms+flip) | download |
1727
|--------|--------------------|-----------|--------:|----------|----------------|------:|--------------:|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
1828
| OCRNet | HRNetV2p-W18-Small | 512x1024 | 40000 | 3.5 | 10.45 | 74.30 | 75.95 | [model](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/ocrnet/ocrnet_hr18s_512x1024_40k_cityscapes/ocrnet_hr18s_512x1024_40k_cityscapes_20200601_033304-fa2436c2.pth) &#124; [log](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/ocrnet/ocrnet_hr18s_512x1024_40k_cityscapes/ocrnet_hr18s_512x1024_40k_cityscapes_20200601_033304.log.json) |
@@ -25,6 +35,16 @@
2535
| OCRNet | HRNetV2p-W18 | 512x1024 | 160000 | - | - | 79.47 | 80.91 | [model](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/ocrnet/ocrnet_hr18_512x1024_160k_cityscapes/ocrnet_hr18_512x1024_160k_cityscapes_20200602_191001-b9172d0c.pth) &#124; [log](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/ocrnet/ocrnet_hr18_512x1024_160k_cityscapes/ocrnet_hr18_512x1024_160k_cityscapes_20200602_191001.log.json) |
2636
| OCRNet | HRNetV2p-W48 | 512x1024 | 160000 | - | - | 81.35 | 82.70 | [model](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/ocrnet/ocrnet_hr48_512x1024_160k_cityscapes/ocrnet_hr48_512x1024_160k_cityscapes_20200602_191037-dfbf1b0c.pth) &#124; [log](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/ocrnet/ocrnet_hr48_512x1024_160k_cityscapes/ocrnet_hr48_512x1024_160k_cityscapes_20200602_191037.log.json) |
2737

38+
39+
#### ResNet backbone
40+
41+
| Method | Backbone | Crop Size | Batch Size | Lr schd | Mem (GB) | Inf time (fps) | mIoU | mIoU(ms+flip) | download |
42+
|--------|--------------------|-----------|--------|----------|-----------|----------------|------|--------------:|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
43+
| OCRNet | R-101-D8 | 512x1024 | 8 | 40000 | - | - | 80.09 | - | [model](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/ocrnet/ocrnet_r101-d8_512x1024_40k_b8_cityscapes/ocrnet_r101-d8_512x1024_40k_b8_cityscapes-02ac0f13.pth) &#124; [log](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/ocrnet/ocrnet_r101-d8_512x1024_40k_b8_cityscapes/ocrnet_r101-d8_512x1024_40k_b8_cityscapes_20200717_110721.log.json) |
44+
| OCRNet | R-101-D8 | 512x1024 | 16 | 40000 | 8.8 | 3.02 | 80.30 | - | [model](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/ocrnet/ocrnet_r101-d8_512x1024_40k_b16_cityscapes/ocrnet_r101-d8_512x1024_40k_b16_cityscapes-db500f80.pth) &#124; [log](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/ocrnet/ocrnet_r101-d8_512x1024_40k_b16_cityscapes/ocrnet_r101-d8_512x1024_40k_b16_cityscapes_20200723_193726.log.json) |
45+
| OCRNet | R-101-D8 | 512x1024 | 16 | 80000 | 8.8 | 3.02 | 80.81 | - | [model](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/ocrnet/ocrnet_r101-d8_512x1024_80k_b16_cityscapes/ocrnet_r101-d8_512x1024_80k_b16_cityscapes-78688424.pth) &#124; [log](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/ocrnet/ocrnet_r101-d8_512x1024_80k_b16_cityscapes/ocrnet_r101-d8_512x1024_80k_b16_cityscapes_20200723_192421.log.json) |
46+
47+
2848
### ADE20K
2949
| Method | Backbone | Crop Size | Lr schd | Mem (GB) | Inf time (fps) | mIoU | mIoU(ms+flip) | download |
3050
|--------|--------------------|-----------|--------:|----------|----------------|------:|--------------:|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
_base_ = [
2+
'../_base_/models/ocrnet_r50-d8.py',
3+
'../_base_/datasets/cityscapes.py',
4+
'../_base_/default_runtime.py',
5+
'../_base_/schedules/schedule_40k.py'
6+
]
7+
model = dict(pretrained='open-mmlab://resnet101_v1c', backbone=dict(depth=101))
8+
optimizer = dict(lr=0.02)
9+
lr_config = dict(min_lr=2e-4)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
_base_ = [
2+
'../_base_/models/ocrnet_r50-d8.py',
3+
'../_base_/datasets/cityscapes.py',
4+
'../_base_/default_runtime.py',
5+
'../_base_/schedules/schedule_40k.py'
6+
]
7+
model = dict(pretrained='open-mmlab://resnet101_v1c', backbone=dict(depth=101))
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
_base_ = [
2+
'../_base_/models/ocrnet_r50-d8.py',
3+
'../_base_/datasets/cityscapes.py',
4+
'../_base_/default_runtime.py',
5+
'../_base_/schedules/schedule_80k.py'
6+
]
7+
model = dict(pretrained='open-mmlab://resnet101_v1c', backbone=dict(depth=101))
8+
optimizer = dict(lr=0.02)
9+
lr_config = dict(min_lr=2e-4)

0 commit comments

Comments
 (0)