Skip to content

Commit f0c6207

Browse files
authored
Add files via upload
1 parent 2d1cd94 commit f0c6207

18 files changed

+1763
-0
lines changed
+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# ADE20K config file that define test pipeline
2+
# Please refer to here https://github.com/wangf3014/SCLIP/blob/main/configs/cfg_ade20k.py
3+
_base_ = './base_config.py'
4+
5+
# model settings
6+
model = dict(
7+
name_path='./training/seg_configs/cls_ade20k.txt'
8+
)
9+
10+
# dataset settings
11+
dataset_type = 'ADE20KDataset'
12+
data_root = '/mmsegmentation_datasets/data/ade/ADEChallengeData2016'
13+
14+
test_pipeline = [
15+
dict(type='LoadImageFromFile'),
16+
dict(type='Resize', scale=(2048, 336), keep_ratio=True),
17+
dict(type='LoadAnnotations', reduce_zero_label=True),
18+
dict(type='PackSegInputs')
19+
]
20+
21+
test_dataloader = dict(
22+
batch_size=1,
23+
num_workers=4,
24+
persistent_workers=True,
25+
sampler=dict(type='DefaultSampler', shuffle=False),
26+
dataset=dict(
27+
type=dataset_type,
28+
data_root=data_root,
29+
data_prefix=dict(
30+
img_path='images/validation',
31+
seg_map_path='annotations/validation'),
32+
pipeline=test_pipeline))
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
_base_ = './base_config.py'
2+
3+
# model settings
4+
model = dict(
5+
name_path='./training/seg_configs/cls_city_scapes.txt'
6+
)
7+
8+
# dataset settings
9+
dataset_type = 'CityscapesDataset'
10+
data_root = '/mmsegmentation_datasets/data/cityscapes'
11+
12+
test_pipeline = [
13+
dict(type='LoadImageFromFile'),
14+
dict(type='Resize', scale=(2048, 560), keep_ratio=True),
15+
# add loading annotation after ``Resize`` because ground truth
16+
# does not need to do resize data transform
17+
dict(type='LoadAnnotations'),
18+
dict(type='PackSegInputs')
19+
]
20+
21+
test_dataloader = dict(
22+
batch_size=1,
23+
num_workers=4,
24+
persistent_workers=True,
25+
sampler=dict(type='DefaultSampler', shuffle=False),
26+
dataset=dict(
27+
type=dataset_type,
28+
data_root=data_root,
29+
data_prefix=dict(
30+
img_path='leftImg8bit/val', seg_map_path='gtFine/val'),
31+
pipeline=test_pipeline))
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
_base_ = './base_config.py'
2+
3+
# model settings
4+
model = dict(
5+
name_path='./training/seg_configs/cls_coco_object.txt',
6+
logit_scale=50,
7+
prob_thd=0.1
8+
)
9+
10+
# dataset settings
11+
dataset_type = 'COCOObjectDataset'
12+
data_root = '/mmsegmentation_datasets/data/coco_stuff164k'
13+
14+
test_pipeline = [
15+
dict(type='LoadImageFromFile'),
16+
dict(type='Resize', scale=(2048, 336), keep_ratio=True),
17+
# add loading annotation after ``Resize`` because ground truth
18+
# does not need to do resize data transform
19+
dict(type='LoadAnnotations'),
20+
dict(type='PackSegInputs')
21+
]
22+
23+
test_dataloader = dict(
24+
batch_size=1,
25+
num_workers=4,
26+
persistent_workers=True,
27+
sampler=dict(type='DefaultSampler', shuffle=False),
28+
dataset=dict(
29+
type=dataset_type,
30+
data_root=data_root,
31+
reduce_zero_label=False,
32+
data_prefix=dict(
33+
img_path='images/val2017', seg_map_path='annotations/val2017'),
34+
pipeline=test_pipeline))
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
_base_ = './base_config.py'
2+
3+
# model settings
4+
model = dict(
5+
name_path='./training/seg_configs/cls_coco_stuff.txt'
6+
)
7+
8+
# dataset settings
9+
dataset_type = 'COCOStuffDataset'
10+
data_root = '/mmsegmentation_datasets/data/coco_stuff164k'
11+
12+
test_pipeline = [
13+
dict(type='LoadImageFromFile'),
14+
dict(type='Resize', scale=(2048, 448), keep_ratio=True),
15+
dict(type='LoadAnnotations'),
16+
dict(type='PackSegInputs')
17+
]
18+
19+
test_dataloader = dict(
20+
batch_size=1,
21+
num_workers=4,
22+
persistent_workers=True,
23+
sampler=dict(type='DefaultSampler', shuffle=False),
24+
dataset=dict(
25+
type=dataset_type,
26+
data_root=data_root,
27+
data_prefix=dict(
28+
img_path='images/val2017', seg_map_path='annotations/val2017'),
29+
pipeline=test_pipeline))
+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
_base_ = './base_config.py'
2+
3+
# model settings
4+
model = dict(
5+
name_path='./training/seg_configs/cls_context59.txt'
6+
)
7+
8+
# dataset settings
9+
dataset_type = 'PascalContext59Dataset'
10+
data_root = '/mmsegmentation_datasets/data/VOCdevkit/VOC2010'
11+
12+
test_pipeline = [
13+
dict(type='LoadImageFromFile'),
14+
dict(type='Resize', scale=(2048, 336), keep_ratio=True),
15+
dict(type='LoadAnnotations', reduce_zero_label=True),
16+
dict(type='PackSegInputs')
17+
]
18+
19+
test_dataloader = dict(
20+
batch_size=1,
21+
num_workers=4,
22+
persistent_workers=True,
23+
sampler=dict(type='DefaultSampler', shuffle=False),
24+
dataset=dict(
25+
type=dataset_type,
26+
data_root=data_root,
27+
data_prefix=dict(
28+
img_path='JPEGImages', seg_map_path='SegmentationClassContext'),
29+
ann_file='ImageSets/SegmentationContext/val.txt',
30+
pipeline=test_pipeline))
+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
_base_ = './base_config.py'
2+
3+
# model settings
4+
model = dict(
5+
name_path='./training/seg_configs/cls_context60.txt',
6+
logit_scale=50,
7+
prob_thd=0.1
8+
)
9+
10+
# dataset settings
11+
dataset_type = 'PascalContext60Dataset'
12+
data_root = '/mmsegmentation_datasets/data/VOCdevkit/VOC2010'
13+
14+
test_pipeline = [
15+
dict(type='LoadImageFromFile'),
16+
dict(type='Resize', scale=(2048, 336), keep_ratio=True),
17+
dict(type='LoadAnnotations'),
18+
dict(type='PackSegInputs')
19+
]
20+
21+
test_dataloader = dict(
22+
batch_size=1,
23+
num_workers=4,
24+
persistent_workers=True,
25+
sampler=dict(type='DefaultSampler', shuffle=False),
26+
dataset=dict(
27+
type=dataset_type,
28+
data_root=data_root,
29+
data_prefix=dict(
30+
img_path='JPEGImages', seg_map_path='SegmentationClassContext'),
31+
ann_file='ImageSets/SegmentationContext/val.txt',
32+
pipeline=test_pipeline))

src/training/seg_configs/cfg_voc20.py

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# VOC20 config file that define test pipeline
2+
# Please refer to here https://github.com/wangf3014/SCLIP/blob/main/configs/cfg_voc20.py
3+
_base_ = './base_config.py'
4+
5+
# model settings
6+
model = dict(
7+
name_path='./training/seg_configs/cls_voc20.txt'
8+
)
9+
10+
# dataset settings
11+
dataset_type = 'PascalVOC20Dataset'
12+
data_root = '/mmsegmentation_datasets/data/VOCdevkit/VOC2012'
13+
14+
test_pipeline = [
15+
dict(type='LoadImageFromFile'),
16+
dict(type='Resize', scale=(2048, 336), keep_ratio=True),
17+
dict(type='LoadAnnotations'),
18+
dict(type='PackSegInputs')
19+
]
20+
21+
test_dataloader = dict(
22+
batch_size=1,
23+
num_workers=4,
24+
persistent_workers=True,
25+
sampler=dict(type='DefaultSampler', shuffle=False),
26+
dataset=dict(
27+
type=dataset_type,
28+
data_root=data_root,
29+
data_prefix=dict(
30+
img_path='JPEGImages', seg_map_path='SegmentationClass'),
31+
ann_file='ImageSets/Segmentation/val.txt',
32+
pipeline=test_pipeline))

src/training/seg_configs/cfg_voc21.py

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
_base_ = './base_config.py'
2+
3+
# model settings
4+
model = dict(
5+
name_path='./training/seg_configs/cls_voc21.txt',
6+
logit_scale=65,
7+
prob_thd=0.1,
8+
area_thd=0.1
9+
)
10+
11+
# dataset settings
12+
dataset_type = 'PascalVOCDataset'
13+
data_root = '/mmsegmentation_datasets/data/VOCdevkit/VOC2012'
14+
15+
test_pipeline = [
16+
dict(type='LoadImageFromFile'),
17+
dict(type='Resize', scale=(2048, 336), keep_ratio=True),
18+
dict(type='LoadAnnotations'),
19+
dict(type='PackSegInputs')
20+
]
21+
22+
test_dataloader = dict(
23+
batch_size=1,
24+
num_workers=4,
25+
persistent_workers=True,
26+
sampler=dict(type='DefaultSampler', shuffle=False),
27+
dataset=dict(
28+
type=dataset_type,
29+
data_root=data_root,
30+
data_prefix=dict(
31+
img_path='JPEGImages', seg_map_path='SegmentationClass'),
32+
ann_file='ImageSets/Segmentation/val.txt',
33+
pipeline=test_pipeline))

0 commit comments

Comments
 (0)