-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fast-SCNN implemented #58
Merged
Merged
Changes from 59 commits
Commits
Show all changes
66 commits
Select commit
Hold shift + click to select a range
6435e3e
init commit: fast_scnn
a5f1095
247917iters
06db844
4x8_80k
9f236f3
configs placed in configs_unify. 4x8_80k exp.running.
e059136
mmseg/utils/collect_env.py modified to support Windows
johnzja 2e43bae
Merge branch 'add_fast_scnn' of github.com:johnzja/mmsegmentation int…
johnzja 2b1f359
study on lr
johnzja dc6e781
bug in configs_unify/***/cityscapes.py fixed.
johnzja 2bf70c5
lr0.08_100k
johnzja e7f6b9e
lr_power changed to 1.2
johnzja 795fb20
log_config by_epoch set to False.
johnzja d3a5342
lr1.2
johnzja 2c77085
doc strings added
johnzja c16940c
add fast_scnn backbone test
johnzja 3d4db48
80k 0.08,0.12
johnzja 8df067e
add 450k
johnzja 54ae2ee
fast_scnn test: fix BN bug.
johnzja dce6ec4
Add different config files into configs/
johnzja 0dd1ae5
.gitignore recovered.
johnzja 94913d1
configs_unify del
johnzja 4102ed3
.gitignore recovered.
johnzja daf93c6
delete sub-optimal config files of fast-scnn
johnzja e35f9ac
Code style improved.
johnzja d8cba3d
add docstrings to component modules of fast-scnn
johnzja e1986a5
relevant files modified according to Jerry's instructions
johnzja 164e038
Merge pull request #1 from open-mmlab/master
johnzja 1456a48
relevant files modified according to Jerry's instructions
johnzja 70456bb
lint problems fixed.
johnzja 8baea98
fast_scnn config extremely simplified.
johnzja 9c6b0b1
InvertedResidual
johnzja 8c553e0
fixed padding problems
johnzja ae85850
add unit test for inverted_residual
johnzja 0d0641b
add unit test for inverted_residual: debug 0
johnzja b3bd282
add unit test for inverted_residual: debug 1
johnzja db364ef
add unit test for inverted_residual: debug 2
johnzja 66224e9
add unit test for inverted_residual: debug 3
johnzja 36228f5
add unit test for sep_fcn_head: debug 0
johnzja 2162e7f
add unit test for sep_fcn_head: debug 1
johnzja 0466908
add unit test for sep_fcn_head: debug 2
johnzja 03ca449
add unit test for sep_fcn_head: debug 3
johnzja c89674d
add unit test for sep_fcn_head: debug 4
johnzja ed3a6d0
add unit test for sep_fcn_head: debug 5
johnzja b08e1d4
FastSCNN type(dwchannels) changed to tuple.
johnzja 80fd7f6
t changed to expand_ratio.
johnzja 887aec2
Spaces fixed.
johnzja 1988f09
Update mmseg/models/backbones/fast_scnn.py
johnzja 95d1a8d
Update mmseg/models/decode_heads/sep_fcn_head.py
johnzja 568106c
Update mmseg/models/decode_heads/sep_fcn_head.py
johnzja a3fb9b1
Docstrings fixed.
johnzja 18cb257
Docstrings fixed.
johnzja 3bc95a4
Inverted Residual kept coherent with mmcl.
johnzja 661ef92
Inverted Residual kept coherent with mmcl. Debug 0
johnzja 12d0090
_make_layer parameters renamed.
johnzja a8a5ff8
final commit
johnzja 88a123d
Arg scale_factor deleted.
johnzja a9ac0d8
Expand_ratio docstrings updated.
johnzja e7458e5
final commit
johnzja b3eaf8a
Readme for Fast-SCNN added.
johnzja cc5cb7d
model-zoo.md modified.
johnzja 4e7cdf9
fast_scnn README updated.
johnzja 9f128f9
Move InvertedResidual module into mmseg/utils.
johnzja 3cbfbf6
Merge branch 'master' of https://github.com/open-mmlab/mmsegmentation…
johnzja 89dcce4
test_inverted_residual module corrected.
johnzja adb1f0d
test_inverted_residual.py moved.
johnzja dd0aadf
encoder_decoder modified to avoid bugs when running PSPNet.
johnzja 4a35807
Revert "encoder_decoder modified to avoid bugs when running PSPNet. "
johnzja File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# model settings | ||
norm_cfg = dict(type='SyncBN', requires_grad=True, momentum=0.01) | ||
model = dict( | ||
type='EncoderDecoder', | ||
backbone=dict( | ||
type='FastSCNN', | ||
downsample_dw_channels=(32, 48), | ||
global_in_channels=64, | ||
global_block_channels=(64, 96, 128), | ||
global_block_strides=(2, 2, 1), | ||
global_out_channels=128, | ||
higher_in_channels=64, | ||
lower_in_channels=128, | ||
fusion_out_channels=128, | ||
out_indices=(0, 1, 2), | ||
norm_cfg=norm_cfg, | ||
align_corners=False), | ||
decode_head=dict( | ||
type='DepthwiseSeparableFCNHead', | ||
in_channels=128, | ||
channels=128, | ||
concat_input=False, | ||
num_classes=19, | ||
in_index=-1, | ||
norm_cfg=norm_cfg, | ||
align_corners=False, | ||
loss_decode=dict( | ||
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.)), | ||
auxiliary_head=[ | ||
dict( | ||
type='FCNHead', | ||
in_channels=128, | ||
channels=32, | ||
num_convs=1, | ||
num_classes=19, | ||
in_index=-2, | ||
norm_cfg=norm_cfg, | ||
concat_input=False, | ||
align_corners=False, | ||
loss_decode=dict( | ||
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=0.4)), | ||
dict( | ||
type='FCNHead', | ||
in_channels=64, | ||
channels=32, | ||
num_convs=1, | ||
num_classes=19, | ||
in_index=-3, | ||
norm_cfg=norm_cfg, | ||
concat_input=False, | ||
align_corners=False, | ||
loss_decode=dict( | ||
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=0.4)), | ||
]) | ||
|
||
# model training and testing settings | ||
train_cfg = dict() | ||
test_cfg = dict(mode='whole') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Fast-SCNN for Semantic Segmentation | ||
|
||
## Introduction | ||
``` | ||
@article{DBLP:journals/corr/abs-1902-04502, | ||
author = {Rudra P. K. Poudel and | ||
Stephan Liwicki and | ||
Roberto Cipolla}, | ||
title = {Fast-SCNN: Fast Semantic Segmentation Network}, | ||
journal = {CoRR}, | ||
volume = {abs/1902.04502}, | ||
year = {2019}, | ||
url = {http://arxiv.org/abs/1902.04502}, | ||
archivePrefix = {arXiv}, | ||
eprint = {1902.04502}, | ||
timestamp = {Tue, 21 May 2019 18:03:38 +0200}, | ||
biburl = {https://dblp.org/rec/journals/corr/abs-1902-04502.bib}, | ||
bibsource = {dblp computer science bibliography, https://dblp.org} | ||
} | ||
``` | ||
|
||
## Results and models | ||
|
||
### Cityscapes | ||
| Method | Backbone | Crop Size | Lr schd | Mem (GB) | Inf time (fps) | mIoU | mIoU(ms+flip) | download | | ||
|------------|-----------|-----------|--------:|----------|----------------|------:|---------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ||
| Fast-SCNN | Fast-SCNN | 512x1024 | 80000 | 8.4 | 63.61 | 69.06 | - | [model](https://openmmlab.oss-cn-hangzhou.aliyuncs.com/mmsegmentation/v0.5/fast_scnn/fast_scnn_4x8_80k_lr0.12_cityscapes-cae6c46a.pth) | [log](https://openmmlab.oss-cn-hangzhou.aliyuncs.com/mmsegmentation/v0.5/fast_scnn/fast_scnn_4x8_80k_lr0.12_cityscapes-20200807_165744.log.json) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
_base_ = [ | ||
'../_base_/models/fast_scnn.py', '../_base_/datasets/cityscapes.py', | ||
'../_base_/default_runtime.py', '../_base_/schedules/schedule_80k.py' | ||
] | ||
|
||
# Re-config the data sampler. | ||
data = dict(samples_per_gpu=8, workers_per_gpu=4) | ||
|
||
# Re-config the optimizer. | ||
optimizer = dict(type='SGD', lr=0.12, momentum=0.9, weight_decay=4e-5) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
from .fast_scnn import FastSCNN | ||
from .hrnet import HRNet | ||
from .resnet import ResNet, ResNetV1c, ResNetV1d | ||
from .resnext import ResNeXt | ||
|
||
__all__ = ['ResNet', 'ResNetV1c', 'ResNetV1d', 'ResNeXt', 'HRNet'] | ||
__all__ = ['ResNet', 'ResNetV1c', 'ResNetV1d', 'ResNeXt', 'HRNet', 'FastSCNN'] |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.