Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
Pytorch-Encoding
Commits
ddfb1b92
"tests/python/pytorch/dataloading/test_dataloader.py" did not exist on "bdb88df576aa88610fc9793478e25ca10348f4a9"
Unverified
Commit
ddfb1b92
authored
Apr 27, 2020
by
Hang Zhang
Committed by
GitHub
Apr 27, 2020
Browse files
Add Pascal-Context Models with New SoTA 58.37 (#265)
parent
3e384b4a
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
99 additions
and
34 deletions
+99
-34
README.md
README.md
+1
-0
docs/source/model_zoo/segmentation.rst
docs/source/model_zoo/segmentation.rst
+53
-28
encoding/models/model_store.py
encoding/models/model_store.py
+2
-0
encoding/models/model_zoo.py
encoding/models/model_zoo.py
+2
-0
encoding/models/sseg/deeplab.py
encoding/models/sseg/deeplab.py
+41
-6
No files found.
README.md
View file @
ddfb1b92
...
...
@@ -7,6 +7,7 @@
[

](https://github.com/zhanghang1989/PyTorch-Encoding/actions)
[

](https://paperswithcode.com/sota/semantic-segmentation-on-ade20k?p=resnest-split-attention-networks)
[

](https://paperswithcode.com/sota/semantic-segmentation-on-pascal-context?p=resnest-split-attention-networks)
# PyTorch-Encoding
...
...
docs/source/model_zoo/segmentation.rst
View file @
ddfb1b92
...
...
@@ -32,15 +32,18 @@ Get Pre-trained Model
ResNeSt
Backbone
Models
-----------------------
==============================================================================
==============
==============
=========================================================================================================
Model
pixAcc
mIoU
Command
==============================================================================
==============
==============
=========================================================================================================
FCN_ResNeSt50_ADE
80.18
%
42.94
%
:
raw
-
html
:`<
a
href
=
"javascript:toggleblock('cmd_fcn_nest50_ade')"
class
=
"toggleblock"
>
cmd
</
a
>`
DeepLab_ResNeSt50_ADE
81.17
%
45.12
%
:
raw
-
html
:`<
a
href
=
"javascript:toggleblock('cmd_deeplab_resnest50_ade')"
class
=
"toggleblock"
>
cmd
</
a
>`
DeepLab_ResNeSt101_ADE
82.07
%
46.91
%
:
raw
-
html
:`<
a
href
=
"javascript:toggleblock('cmd_deeplab_resnest101_ade')"
class
=
"toggleblock"
>
cmd
</
a
>`
DeepLab_ResNeSt200_ADE
82.45
%
48.36
%
:
raw
-
html
:`<
a
href
=
"javascript:toggleblock('cmd_deeplab_resnest200_ade')"
class
=
"toggleblock"
>
cmd
</
a
>`
DeepLab_ResNeSt269_ADE
82.62
%
47.60
%
:
raw
-
html
:`<
a
href
=
"javascript:toggleblock('cmd_deeplab_resnest269_ade')"
class
=
"toggleblock"
>
cmd
</
a
>`
==============================================================================
==============
==============
=========================================================================================================
ADE20K
Dataset
~~~~~~~~~~~~~~
==============================================================================
====================
===================
=========================================================================================================
Model
pixAcc
mIoU
Command
==============================================================================
====================
===================
=========================================================================================================
FCN_ResNeSt50_ADE
80.18
%
42.94
%
:
raw
-
html
:`<
a
href
=
"javascript:toggleblock('cmd_fcn_nest50_ade')"
class
=
"toggleblock"
>
cmd
</
a
>`
DeepLab_ResNeSt50_ADE
81.17
%
45.12
%
:
raw
-
html
:`<
a
href
=
"javascript:toggleblock('cmd_deeplab_resnest50_ade')"
class
=
"toggleblock"
>
cmd
</
a
>`
DeepLab_ResNeSt101_ADE
82.07
%
46.91
%
:
raw
-
html
:`<
a
href
=
"javascript:toggleblock('cmd_deeplab_resnest101_ade')"
class
=
"toggleblock"
>
cmd
</
a
>`
DeepLab_ResNeSt200_ADE
82.45
%
48.36
%
:
raw
-
html
:`<
a
href
=
"javascript:toggleblock('cmd_deeplab_resnest200_ade')"
class
=
"toggleblock"
>
cmd
</
a
>`
DeepLab_ResNeSt269_ADE
82.62
%
47.60
%
:
raw
-
html
:`<
a
href
=
"javascript:toggleblock('cmd_deeplab_resnest269_ade')"
class
=
"toggleblock"
>
cmd
</
a
>`
==============================================================================
====================
===================
=========================================================================================================
..
raw
::
html
...
...
@@ -57,7 +60,7 @@ DeepLab_ResNeSt269_ADE
</
code
>
<
code
xml
:
space
=
"preserve"
id
=
"cmd_deeplab_resnest101_ade"
style
=
"display: none; text-align: left; white-space: pre-wrap"
>
python
train
.
py
--
dataset
ADE20K
--
model
deeplab
--
aux
--
backbone
resnest101
python
train
.
py
--
dataset
ADE20K
--
model
deeplab
--
aux
--
backbone
resnest101
--
epochs
180
</
code
>
<
code
xml
:
space
=
"preserve"
id
=
"cmd_deeplab_resnest200_ade"
style
=
"display: none; text-align: left; white-space: pre-wrap"
>
...
...
@@ -69,19 +72,41 @@ DeepLab_ResNeSt269_ADE
</
code
>
Pascal
Context
Dataset
~~~~~~~~~~~~~~~~~~~~~~
==============================================================================
====================
====================
=========================================================================================================
Model
pixAcc
mIoU
Command
==============================================================================
====================
====================
=========================================================================================================
DeepLab_ResNeSt101_PContext
81.91
%
56.49
%
:
raw
-
html
:`<
a
href
=
"javascript:toggleblock('cmd_deeplab_nest101_pcont')"
class
=
"toggleblock"
>
cmd
</
a
>`
DeepLab_ResNeSt200_PContext
82.50
%
58.37
%
:
raw
-
html
:`<
a
href
=
"javascript:toggleblock('cmd_deeplab_nest200_pcont')"
class
=
"toggleblock"
>
cmd
</
a
>`
==============================================================================
====================
====================
=========================================================================================================
..
raw
::
html
<
code
xml
:
space
=
"preserve"
id
=
"cmd_deeplab_nest101_pcont"
style
=
"display: none; text-align: left; white-space: pre-wrap"
>
python
train
.
py
--
dataset
pcontext
--
model
deeplab
--
aux
--
backbone
resnest101
</
code
>
<
code
xml
:
space
=
"preserve"
id
=
"cmd_deeplab_nest200_pcont"
style
=
"display: none; text-align: left; white-space: pre-wrap"
>
python
train
.
py
--
dataset
pcontext
--
model
deeplab
--
aux
--
backbone
resnest200
</
code
>
ResNet
Backbone
Models
----------------------
ADE20K
Dataset
~~~~~~~~~~~~~~
==============================================================================
=================
==============
=============================================================================================
Model
pixAcc
mIoU
Command
==============================================================================
=================
==============
=============================================================================================
FCN_ResNet50s_ADE
78.7
%
38.5
%
:
raw
-
html
:`<
a
href
=
"javascript:toggleblock('cmd_fcn50_ade')"
class
=
"toggleblock"
>
cmd
</
a
>`
EncNet_ResNet50s_ADE
80.1
%
41.5
%
:
raw
-
html
:`<
a
href
=
"javascript:toggleblock('cmd_enc50_ade')"
class
=
"toggleblock"
>
cmd
</
a
>`
EncNet_ResNet101s_ADE
81.3
%
44.4
%
:
raw
-
html
:`<
a
href
=
"javascript:toggleblock('cmd_enc101_ade')"
class
=
"toggleblock"
>
cmd
</
a
>`
==============================================================================
=================
==============
=============================================================================================
==============================================================================
=================
===
==============
======
=============================================================================================
Model
pixAcc
mIoU
Command
==============================================================================
=================
===
==============
======
=============================================================================================
FCN_ResNet50s_ADE
78.7
%
38.5
%
:
raw
-
html
:`<
a
href
=
"javascript:toggleblock('cmd_fcn50_ade')"
class
=
"toggleblock"
>
cmd
</
a
>`
EncNet_ResNet50s_ADE
80.1
%
41.5
%
:
raw
-
html
:`<
a
href
=
"javascript:toggleblock('cmd_enc50_ade')"
class
=
"toggleblock"
>
cmd
</
a
>`
EncNet_ResNet101s_ADE
81.3
%
44.4
%
:
raw
-
html
:`<
a
href
=
"javascript:toggleblock('cmd_enc101_ade')"
class
=
"toggleblock"
>
cmd
</
a
>`
==============================================================================
=================
===
==============
======
=============================================================================================
..
raw
::
html
...
...
@@ -105,12 +130,12 @@ EncNet_ResNet101s_ADE
Pascal
Context
Dataset
~~~~~~~~~~~~~~~~~~~~~~
==============================================================================
=================
==============
=============================================================================================
Model
pixAcc
mIoU
Command
==============================================================================
=================
==============
=============================================================================================
Encnet_ResNet50s_PContext
79.2
%
51.0
%
:
raw
-
html
:`<
a
href
=
"javascript:toggleblock('cmd_enc50_pcont')"
class
=
"toggleblock"
>
cmd
</
a
>`
EncNet_ResNet101s_PContext
80.7
%
54.1
%
:
raw
-
html
:`<
a
href
=
"javascript:toggleblock('cmd_enc101_pcont')"
class
=
"toggleblock"
>
cmd
</
a
>`
==============================================================================
=================
==============
=============================================================================================
==============================================================================
=================
====
=======
==============
=============================================================================================
Model
pixAcc
mIoU
Command
==============================================================================
=================
====
=======
==============
=============================================================================================
Encnet_ResNet50s_PContext
79.2
%
51.0
%
:
raw
-
html
:`<
a
href
=
"javascript:toggleblock('cmd_enc50_pcont')"
class
=
"toggleblock"
>
cmd
</
a
>`
EncNet_ResNet101s_PContext
80.7
%
54.1
%
:
raw
-
html
:`<
a
href
=
"javascript:toggleblock('cmd_enc101_pcont')"
class
=
"toggleblock"
>
cmd
</
a
>`
==============================================================================
=================
====
=======
==============
=============================================================================================
..
raw
::
html
...
...
@@ -130,11 +155,11 @@ EncNet_ResNet101s_PContext
Pascal
VOC
Dataset
~~~~~~~~~~~~~~~~~~
==============================================================================
=================
==============
=============================================================================================
Model
pixAcc
mIoU
Command
==============================================================================
=================
==============
=============================================================================================
EncNet_ResNet101s_VOC
N
/
A
85.9
%
:
raw
-
html
:`<
a
href
=
"javascript:toggleblock('cmd_enc101_voc')"
class
=
"toggleblock"
>
cmd
</
a
>`
==============================================================================
=================
==============
=============================================================================================
==============================================================================
=================
=====
=======
==============
=============================================================================================
Model
pixAcc
mIoU
Command
==============================================================================
=================
=====
=======
==============
=============================================================================================
EncNet_ResNet101s_VOC
N
/
A
85.9
%
:
raw
-
html
:`<
a
href
=
"javascript:toggleblock('cmd_enc101_voc')"
class
=
"toggleblock"
>
cmd
</
a
>`
==============================================================================
=================
=====
=======
==============
=============================================================================================
..
raw
::
html
...
...
encoding/models/model_store.py
View file @
ddfb1b92
...
...
@@ -36,6 +36,8 @@ _model_sha1 = {name: checksum for checksum, name in [
(
'06ca799c8cc148fe0fafb5b6d052052935aa3cc8'
,
'deeplab_resnest101_ade'
),
(
'7b9e7d3e6f0e2c763c7d77cad14d306c0a31fe05'
,
'deeplab_resnest200_ade'
),
(
'0074dd10a6e6696f6f521653fb98224e75955496'
,
'deeplab_resnest269_ade'
),
(
'faf5841853aae64bd965a7bdc2cdc6e7a2b5d898'
,
'deeplab_resnest101_pcontext'
),
(
'fe76a26551dd5dcf2d474fd37cba99d43f6e984e'
,
'deeplab_resnest200_pcontext'
),
]}
encoding_repo_url
=
'https://hangzh.s3.amazonaws.com/'
...
...
encoding/models/model_zoo.py
View file @
ddfb1b92
...
...
@@ -44,6 +44,8 @@ models = {
'deeplab_resnest101_ade'
:
get_deeplab_resnest101_ade
,
'deeplab_resnest200_ade'
:
get_deeplab_resnest200_ade
,
'deeplab_resnest269_ade'
:
get_deeplab_resnest269_ade
,
'deeplab_resnest101_pcontext'
:
get_deeplab_resnest101_pcontext
,
'deeplab_resnest200_pcontext'
:
get_deeplab_resnest200_pcontext
,
}
model_list
=
list
(
models
.
keys
())
...
...
encoding/models/sseg/deeplab.py
View file @
ddfb1b92
...
...
@@ -128,13 +128,8 @@ class ASPP_Module(nn.Module):
def
get_deeplab
(
dataset
=
'pascal_voc'
,
backbone
=
'resnet50s'
,
pretrained
=
False
,
root
=
'~/.encoding/models'
,
**
kwargs
):
acronyms
=
{
'pascal_voc'
:
'voc'
,
'pascal_aug'
:
'voc'
,
'ade20k'
:
'ade'
,
}
# infer number of classes
from
...datasets
import
datasets
,
VOCSegmentation
,
VOCAugSegmentation
,
ADE20KSegmentation
from
...datasets
import
datasets
,
acronyms
model
=
DeepLabV3
(
datasets
[
dataset
.
lower
()].
NUM_CLASS
,
backbone
=
backbone
,
root
=
root
,
**
kwargs
)
if
pretrained
:
from
..model_store
import
get_model_file
...
...
@@ -237,3 +232,43 @@ def get_deeplab_resnest269_ade(pretrained=False, root='~/.encoding/models', **kw
>>> print(model)
"""
return
get_deeplab
(
'ade20k'
,
'resnest269'
,
pretrained
,
aux
=
True
,
root
=
root
,
**
kwargs
)
def
get_deeplab_resnest101_pcontext
(
pretrained
=
False
,
root
=
'~/.encoding/models'
,
**
kwargs
):
r
"""DeepLabV3 model from the paper `"Context Encoding for Semantic Segmentation"
<https://arxiv.org/pdf/1803.08904.pdf>`_
Parameters
----------
pretrained : bool, default False
Whether to load the pretrained weights for model.
root : str, default '~/.encoding/models'
Location for keeping the model parameters.
Examples
--------
>>> model = get_deeplab_resnest101_pcontext(pretrained=True)
>>> print(model)
"""
return
get_deeplab
(
'pcontext'
,
'resnest101'
,
pretrained
,
aux
=
True
,
root
=
root
,
**
kwargs
)
def
get_deeplab_resnest200_pcontext
(
pretrained
=
False
,
root
=
'~/.encoding/models'
,
**
kwargs
):
r
"""DeepLabV3 model from the paper `"Context Encoding for Semantic Segmentation"
<https://arxiv.org/pdf/1803.08904.pdf>`_
Parameters
----------
pretrained : bool, default False
Whether to load the pretrained weights for model.
root : str, default '~/.encoding/models'
Location for keeping the model parameters.
Examples
--------
>>> model = deeplab_resnest200_pcontext(pretrained=True)
>>> print(model)
"""
return
get_deeplab
(
'pcontext'
,
'resnest200'
,
pretrained
,
aux
=
True
,
root
=
root
,
**
kwargs
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment