-
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
(OLD) [Feature] Support LoveDA dataset #1006
Closed
Closed
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
d26173e
update LoveDA dataset api
Junjue-Wang 872a284
revised lint errors in dataset_prepare.md
Junjue-Wang bcd670c
revised lint errors in loveda.py
Junjue-Wang 349fc2d
[Fix] Change `self.loss_decode` back to `dict` in Single Loss situati…
MengzhangLI ddce375
smaller input & channels of unittest (#1004)
MengzhangLI 54435fb
[Feature] Support TIMMBackbone (#998)
Junjun2016 5049651
Bump v0.19.0 (#1009)
Junjun2016 14dc00a
delete benchmark_new.py (#1012)
MengzhangLI 7a1c9a5
[Fix] Fix the bug that vit cannot load pretrain properly when using i…
RockeyCoss b2744ca
revised lint errors in loveda.py
Junjue-Wang ed6cb48
revised lint errors in dataset_prepare.md
Junjue-Wang 2289e27
revised lint errors in dataset_prepare.md
Junjue-Wang 159db2f
checked with isort and yapf
Junjue-Wang 686a51d
checked with isort and yapf
Junjue-Wang b877e12
checked with isort and yapf
Junjue-Wang a116034
Revert "checked with isort and yapf"
Junjue-Wang 6c2fccc
Revert "checked with isort and yapf"
Junjue-Wang 78e21cc
Revert "revised lint errors in dataset_prepare.md"
Junjue-Wang 020acda
Revert "checked with isort and yapf"
Junjue-Wang db3ee5a
Revert "checked with isort and yapf"
Junjue-Wang d55b139
Merge branch 'LoveDA' of github.com:Junjue-Wang/mmsegmentation into L…
MengzhangLI a493897
add configs & fix bugs
MengzhangLI 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
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
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,54 @@ | ||
# dataset settings | ||
dataset_type = 'LoveDADataset' | ||
data_root = 'data/loveDA' | ||
img_norm_cfg = dict( | ||
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True) | ||
crop_size = (512, 512) | ||
train_pipeline = [ | ||
dict(type='LoadImageFromFile'), | ||
dict(type='LoadAnnotations', reduce_zero_label=True), | ||
dict(type='Resize', img_scale=(2048, 512), ratio_range=(0.5, 2.0)), | ||
dict(type='RandomCrop', crop_size=crop_size, cat_max_ratio=0.75), | ||
dict(type='RandomFlip', prob=0.5), | ||
dict(type='PhotoMetricDistortion'), | ||
dict(type='Normalize', **img_norm_cfg), | ||
dict(type='Pad', size=crop_size, pad_val=0, seg_pad_val=255), | ||
dict(type='DefaultFormatBundle'), | ||
dict(type='Collect', keys=['img', 'gt_semantic_seg']), | ||
] | ||
test_pipeline = [ | ||
dict(type='LoadImageFromFile'), | ||
dict( | ||
type='MultiScaleFlipAug', | ||
img_scale=(1024, 1024), | ||
# img_ratios=[0.5, 0.75, 1.0, 1.25, 1.5, 1.75], | ||
flip=False, | ||
transforms=[ | ||
dict(type='Resize', keep_ratio=True), | ||
dict(type='RandomFlip'), | ||
dict(type='Normalize', **img_norm_cfg), | ||
dict(type='ImageToTensor', keys=['img']), | ||
dict(type='Collect', keys=['img']), | ||
]) | ||
] | ||
data = dict( | ||
samples_per_gpu=4, | ||
workers_per_gpu=4, | ||
train=dict( | ||
type=dataset_type, | ||
data_root=data_root, | ||
img_dir='img_dir/train', | ||
ann_dir='ann_dir/train', | ||
pipeline=train_pipeline), | ||
val=dict( | ||
type=dataset_type, | ||
data_root=data_root, | ||
img_dir='img_dir/val', | ||
ann_dir='ann_dir/val', | ||
pipeline=test_pipeline), | ||
test=dict( | ||
type=dataset_type, | ||
data_root=data_root, | ||
img_dir='img_dir/test', | ||
ann_dir=None, | ||
pipeline=test_pipeline)) |
2 changes: 2 additions & 0 deletions
2
configs/deeplabv3plus/deeplabv3plus_r101-d8_512x512_80k_loveda.py
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,2 @@ | ||
_base_ = './deeplabv3plus_r50-d8_512x512_80k_loveda.py' | ||
model = dict(pretrained='open-mmlab://resnet101_v1c', backbone=dict(depth=101)) |
11 changes: 11 additions & 0 deletions
11
configs/deeplabv3plus/deeplabv3plus_r18-d8_512x512_80k_loveda.py
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,11 @@ | ||
_base_ = './deeplabv3plus_r50-d8_512x512_80k_loveda.py' | ||
model = dict( | ||
pretrained='open-mmlab://resnet18_v1c', | ||
backbone=dict(depth=18), | ||
decode_head=dict( | ||
c1_in_channels=64, | ||
c1_channels=12, | ||
in_channels=512, | ||
channels=128, | ||
), | ||
auxiliary_head=dict(in_channels=256, channels=64)) |
6 changes: 6 additions & 0 deletions
6
configs/deeplabv3plus/deeplabv3plus_r50-d8_512x512_80k_loveda.py
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,6 @@ | ||
_base_ = [ | ||
'../_base_/models/deeplabv3plus_r50-d8.py', '../_base_/datasets/loveda.py', | ||
'../_base_/default_runtime.py', '../_base_/schedules/schedule_80k.py' | ||
] | ||
model = dict( | ||
decode_head=dict(num_classes=7), auxiliary_head=dict(num_classes=7)) |
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,4 @@ | ||
_base_ = [ | ||
'../_base_/models/fcn_hr18.py', '../_base_/datasets/loveda.py', | ||
'../_base_/default_runtime.py', '../_base_/schedules/schedule_80k.py' | ||
] |
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_ = './fcn_hr18_512x512_80k_loveda.py' | ||
model = dict( | ||
# pretrained='open-mmlab://msra/hrnetv2_w18_small', | ||
pretrained='./pretrained/hrnetv2_w18_small-b5a04e21.pth', | ||
backbone=dict( | ||
extra=dict( | ||
stage1=dict(num_blocks=(2, )), | ||
stage2=dict(num_blocks=(2, 2)), | ||
stage3=dict(num_modules=3, num_blocks=(2, 2, 2)), | ||
stage4=dict(num_modules=2, num_blocks=(2, 2, 2, 2))))) |
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,11 @@ | ||
_base_ = './fcn_hr18_512x512_80k_loveda.py' | ||
model = dict( | ||
# pretrained='open-mmlab://msra/hrnetv2_w48', | ||
pretrained='./pretrained/hrnetv2_w48-d2186c55.pth', | ||
backbone=dict( | ||
extra=dict( | ||
stage2=dict(num_channels=(48, 96)), | ||
stage3=dict(num_channels=(48, 96, 192)), | ||
stage4=dict(num_channels=(48, 96, 192, 384)))), | ||
decode_head=dict( | ||
in_channels=[48, 96, 192, 384], channels=sum([48, 96, 192, 384]))) |
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,2 @@ | ||
_base_ = './pspnet_r50-d8_512x512_80k_loveda.py' | ||
model = dict(pretrained='open-mmlab://resnet101_v1c', backbone=dict(depth=101)) |
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,9 @@ | ||
_base_ = './pspnet_r50-d8_512x512_80k_loveda.py' | ||
model = dict( | ||
pretrained='open-mmlab://resnet18_v1c', | ||
backbone=dict(depth=18), | ||
decode_head=dict( | ||
in_channels=512, | ||
channels=128, | ||
), | ||
auxiliary_head=dict(in_channels=256, channels=64)) |
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,6 @@ | ||
_base_ = [ | ||
'../_base_/models/pspnet_r50-d8.py', '../_base_/datasets/loveda.py', | ||
'../_base_/default_runtime.py', '../_base_/schedules/schedule_80k.py' | ||
] | ||
model = dict( | ||
decode_head=dict(num_classes=7), auxiliary_head=dict(num_classes=7)) |
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
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
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
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
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.
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.
@MengzhangLI What should we do? Create a new PR for what?