mirror of
https://github.com/open-mmlab/mmsegmentation.git
synced 2025-06-03 22:03:48 +08:00
init commit
This commit is contained in:
parent
0032f0b4ed
commit
b2724da80b
125
.dev/clean_models.py
Normal file
125
.dev/clean_models.py
Normal file
@ -0,0 +1,125 @@
|
||||
import argparse
|
||||
import glob
|
||||
import json
|
||||
import os
|
||||
import os.path as osp
|
||||
|
||||
import mmcv
|
||||
|
||||
# build schedule look-up table to automatically find the final model
|
||||
SCHEDULES_LUT = {
|
||||
'20ki': 20000,
|
||||
'40ki': 40000,
|
||||
'60ki': 60000,
|
||||
'80ki': 80000,
|
||||
'160ki': 160000
|
||||
}
|
||||
RESULTS_LUT = ['mIoU', 'mAcc', 'aAcc']
|
||||
|
||||
|
||||
def get_final_iter(config):
|
||||
iter_num = SCHEDULES_LUT[config.split('_')[-2]]
|
||||
return iter_num
|
||||
|
||||
|
||||
def get_final_results(log_json_path, iter_num):
|
||||
result_dict = dict()
|
||||
with open(log_json_path, 'r') as f:
|
||||
for line in f.readlines():
|
||||
log_line = json.loads(line)
|
||||
if 'mode' not in log_line.keys():
|
||||
continue
|
||||
|
||||
if log_line['mode'] == 'train' and log_line['iter'] == iter_num:
|
||||
result_dict['memory'] = log_line['memory']
|
||||
|
||||
if log_line['iter'] == iter_num:
|
||||
result_dict.update({
|
||||
key: log_line[key]
|
||||
for key in RESULTS_LUT if key in log_line
|
||||
})
|
||||
return result_dict
|
||||
|
||||
|
||||
def parse_args():
|
||||
parser = argparse.ArgumentParser(description='Gather benchmarked models')
|
||||
parser.add_argument(
|
||||
'root',
|
||||
type=str,
|
||||
help='root path of benchmarked models to be gathered')
|
||||
parser.add_argument(
|
||||
'config',
|
||||
type=str,
|
||||
help='root path of benchmarked configs to be gathered')
|
||||
|
||||
args = parser.parse_args()
|
||||
return args
|
||||
|
||||
|
||||
def main():
|
||||
args = parse_args()
|
||||
models_root = args.root
|
||||
config_name = args.config
|
||||
|
||||
# find all models in the root directory to be gathered
|
||||
raw_configs = list(mmcv.scandir(config_name, '.py', recursive=True))
|
||||
|
||||
# filter configs that is not trained in the experiments dir
|
||||
used_configs = []
|
||||
for raw_config in raw_configs:
|
||||
work_dir = osp.splitext(osp.basename(raw_config))[0]
|
||||
if osp.exists(osp.join(models_root, work_dir)):
|
||||
used_configs.append(work_dir)
|
||||
print(f'Find {len(used_configs)} models to be gathered')
|
||||
|
||||
# find final_ckpt and log file for trained each config
|
||||
# and parse the best performance
|
||||
model_infos = []
|
||||
for used_config in used_configs:
|
||||
exp_dir = osp.join(models_root, used_config)
|
||||
# check whether the exps is finished
|
||||
final_iter = get_final_iter(used_config)
|
||||
final_model = 'iter_{}.pth'.format(final_iter)
|
||||
model_path = osp.join(exp_dir, final_model)
|
||||
|
||||
# skip if the model is still training
|
||||
if not osp.exists(model_path):
|
||||
print(f'{used_config} not finished yet')
|
||||
continue
|
||||
|
||||
# get logs
|
||||
log_json_path = glob.glob(osp.join(exp_dir, '*.log.json'))[0]
|
||||
log_txt_path = glob.glob(osp.join(exp_dir, '*.log'))[0]
|
||||
model_performance = get_final_results(log_json_path, final_iter)
|
||||
|
||||
if model_performance is None:
|
||||
print(f'{used_config} does not have performance')
|
||||
continue
|
||||
|
||||
model_time = osp.split(log_txt_path)[-1].split('.')[0]
|
||||
model_infos.append(
|
||||
dict(
|
||||
config=used_config,
|
||||
results=model_performance,
|
||||
iters=final_iter,
|
||||
model_time=model_time,
|
||||
log_json_path=osp.split(log_json_path)[-1]))
|
||||
|
||||
# publish model for each checkpoint
|
||||
for model in model_infos:
|
||||
|
||||
model_name = osp.split(model['config'])[-1].split('.')[0]
|
||||
|
||||
model_name += '_' + model['model_time']
|
||||
for checkpoints in mmcv.scandir(
|
||||
osp.join(models_root, model['config']), suffix='.pth'):
|
||||
if checkpoints.endswith(f"iter_{model['iters']}.pth"
|
||||
) or checkpoints.endswith('latest.pth'):
|
||||
continue
|
||||
print('removing {}'.format(
|
||||
osp.join(models_root, model['config'], checkpoints)))
|
||||
os.remove(osp.join(models_root, model['config'], checkpoints))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
197
.dev/gather_models.py
Normal file
197
.dev/gather_models.py
Normal file
@ -0,0 +1,197 @@
|
||||
import argparse
|
||||
import glob
|
||||
import json
|
||||
import os
|
||||
import os.path as osp
|
||||
import shutil
|
||||
import subprocess
|
||||
|
||||
import mmcv
|
||||
import torch
|
||||
|
||||
# build schedule look-up table to automatically find the final model
|
||||
RESULTS_LUT = ['mIoU', 'mAcc', 'aAcc']
|
||||
|
||||
|
||||
def process_checkpoint(in_file, out_file):
|
||||
checkpoint = torch.load(in_file, map_location='cpu')
|
||||
# remove optimizer for smaller file size
|
||||
if 'optimizer' in checkpoint:
|
||||
del checkpoint['optimizer']
|
||||
# if it is necessary to remove some sensitive data in checkpoint['meta'],
|
||||
# add the code here.
|
||||
torch.save(checkpoint, out_file)
|
||||
sha = subprocess.check_output(['sha256sum', out_file]).decode()
|
||||
final_file = out_file.rstrip('.pth') + '-{}.pth'.format(sha[:8])
|
||||
subprocess.Popen(['mv', out_file, final_file])
|
||||
return final_file
|
||||
|
||||
|
||||
def get_final_iter(config):
|
||||
iter_num = config.split('_')[-2]
|
||||
assert iter_num.endswith('k')
|
||||
return int(iter_num[:-1]) * 1000
|
||||
|
||||
|
||||
def get_final_results(log_json_path, iter_num):
|
||||
result_dict = dict()
|
||||
with open(log_json_path, 'r') as f:
|
||||
for line in f.readlines():
|
||||
log_line = json.loads(line)
|
||||
if 'mode' not in log_line.keys():
|
||||
continue
|
||||
|
||||
if log_line['mode'] == 'train' and log_line['iter'] == iter_num:
|
||||
result_dict['memory'] = log_line['memory']
|
||||
|
||||
if log_line['iter'] == iter_num:
|
||||
result_dict.update({
|
||||
key: log_line[key]
|
||||
for key in RESULTS_LUT if key in log_line
|
||||
})
|
||||
return result_dict
|
||||
|
||||
|
||||
def parse_args():
|
||||
parser = argparse.ArgumentParser(description='Gather benchmarked models')
|
||||
parser.add_argument(
|
||||
'root',
|
||||
type=str,
|
||||
help='root path of benchmarked models to be gathered')
|
||||
parser.add_argument(
|
||||
'config',
|
||||
type=str,
|
||||
help='root path of benchmarked configs to be gathered')
|
||||
parser.add_argument(
|
||||
'out_dir',
|
||||
type=str,
|
||||
help='output path of gathered models to be stored')
|
||||
parser.add_argument('out_file', type=str, help='the output json file name')
|
||||
parser.add_argument(
|
||||
'--filter', type=str, nargs='+', default=[], help='config filter')
|
||||
parser.add_argument(
|
||||
'--all', action='store_true', help='whether include .py and .log')
|
||||
|
||||
args = parser.parse_args()
|
||||
return args
|
||||
|
||||
|
||||
def main():
|
||||
args = parse_args()
|
||||
models_root = args.root
|
||||
models_out = args.out_dir
|
||||
config_name = args.config
|
||||
mmcv.mkdir_or_exist(models_out)
|
||||
|
||||
# find all models in the root directory to be gathered
|
||||
raw_configs = list(mmcv.scandir(config_name, '.py', recursive=True))
|
||||
|
||||
# filter configs that is not trained in the experiments dir
|
||||
used_configs = []
|
||||
for raw_config in raw_configs:
|
||||
work_dir = osp.splitext(osp.basename(raw_config))[0]
|
||||
if osp.exists(osp.join(models_root, work_dir)):
|
||||
used_configs.append((work_dir, raw_config))
|
||||
print(f'Find {len(used_configs)} models to be gathered')
|
||||
|
||||
# find final_ckpt and log file for trained each config
|
||||
# and parse the best performance
|
||||
model_infos = []
|
||||
for used_config, raw_config in used_configs:
|
||||
bypass = True
|
||||
for p in args.filter:
|
||||
if p in used_config:
|
||||
bypass = False
|
||||
break
|
||||
if bypass:
|
||||
continue
|
||||
exp_dir = osp.join(models_root, used_config)
|
||||
# check whether the exps is finished
|
||||
final_iter = get_final_iter(used_config)
|
||||
final_model = 'iter_{}.pth'.format(final_iter)
|
||||
model_path = osp.join(exp_dir, final_model)
|
||||
|
||||
# skip if the model is still training
|
||||
if not osp.exists(model_path):
|
||||
print(f'{used_config} train not finished yet')
|
||||
continue
|
||||
|
||||
# get logs
|
||||
log_json_paths = glob.glob(osp.join(exp_dir, '*.log.json'))
|
||||
log_json_path = log_json_paths[0]
|
||||
model_performance = None
|
||||
for idx, _log_json_path in enumerate(log_json_paths):
|
||||
model_performance = get_final_results(_log_json_path, final_iter)
|
||||
if model_performance is not None:
|
||||
log_json_path = _log_json_path
|
||||
break
|
||||
|
||||
if model_performance is None:
|
||||
print(f'{used_config} model_performance is None')
|
||||
continue
|
||||
|
||||
model_time = osp.split(log_json_path)[-1].split('.')[0]
|
||||
model_infos.append(
|
||||
dict(
|
||||
config=used_config,
|
||||
raw_config=raw_config,
|
||||
results=model_performance,
|
||||
iters=final_iter,
|
||||
model_time=model_time,
|
||||
log_json_path=osp.split(log_json_path)[-1]))
|
||||
|
||||
# publish model for each checkpoint
|
||||
publish_model_infos = []
|
||||
for model in model_infos:
|
||||
model_publish_dir = osp.join(models_out,
|
||||
model['raw_config'].rstrip('.py'))
|
||||
model_name = osp.split(model['config'])[-1].split('.')[0]
|
||||
|
||||
publish_model_path = osp.join(model_publish_dir,
|
||||
model_name + '_' + model['model_time'])
|
||||
trained_model_path = osp.join(models_root, model['config'],
|
||||
'iter_{}.pth'.format(model['iters']))
|
||||
if osp.exists(model_publish_dir):
|
||||
for file in os.listdir(model_publish_dir):
|
||||
if file.endswith('.pth'):
|
||||
print(f'model {file} found')
|
||||
model['model_path'] = osp.abspath(
|
||||
osp.join(model_publish_dir, file))
|
||||
break
|
||||
if 'model_path' not in model:
|
||||
print(f'dir {model_publish_dir} exists, no model found')
|
||||
|
||||
else:
|
||||
mmcv.mkdir_or_exist(model_publish_dir)
|
||||
|
||||
# convert model
|
||||
final_model_path = process_checkpoint(trained_model_path,
|
||||
publish_model_path)
|
||||
model['model_path'] = final_model_path
|
||||
|
||||
new_json_path = f'{model_name}-{model["log_json_path"]}'
|
||||
# copy log
|
||||
shutil.copy(
|
||||
osp.join(models_root, model['config'], model['log_json_path']),
|
||||
osp.join(model_publish_dir, new_json_path))
|
||||
if args.all:
|
||||
new_txt_path = new_json_path.rstrip('.json')
|
||||
shutil.copy(
|
||||
osp.join(models_root, model['config'],
|
||||
model['log_json_path'].rstrip('.json')),
|
||||
osp.join(model_publish_dir, new_txt_path))
|
||||
|
||||
if args.all:
|
||||
# copy config to guarantee reproducibility
|
||||
raw_config = osp.join(config_name, model['raw_config'])
|
||||
mmcv.Config.fromfile(raw_config).dump(
|
||||
osp.join(model_publish_dir, osp.basename(raw_config)))
|
||||
|
||||
publish_model_infos.append(model)
|
||||
|
||||
models = dict(models=publish_model_infos)
|
||||
mmcv.dump(models, osp.join(models_out, args.out_file))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
152
.dev/generate_table.py
Normal file
152
.dev/generate_table.py
Normal file
@ -0,0 +1,152 @@
|
||||
import argparse
|
||||
import csv
|
||||
import glob
|
||||
import json
|
||||
import os.path as osp
|
||||
from collections import OrderedDict
|
||||
|
||||
import mmcv
|
||||
|
||||
# build schedule look-up table to automatically find the final model
|
||||
RESULTS_LUT = ['mIoU', 'mAcc', 'aAcc']
|
||||
|
||||
|
||||
def get_final_iter(config):
|
||||
iter_num = config.split('_')[-2]
|
||||
assert iter_num.endswith('ki')
|
||||
return int(iter_num[:-2]) * 1000
|
||||
|
||||
|
||||
def get_final_results(log_json_path, iter_num):
|
||||
result_dict = dict()
|
||||
with open(log_json_path, 'r') as f:
|
||||
for line in f.readlines():
|
||||
log_line = json.loads(line)
|
||||
if 'mode' not in log_line.keys():
|
||||
continue
|
||||
|
||||
if log_line['mode'] == 'train' and log_line[
|
||||
'iter'] == iter_num - 50:
|
||||
result_dict['memory'] = log_line['memory']
|
||||
|
||||
if log_line['iter'] == iter_num:
|
||||
result_dict.update({
|
||||
key: log_line[key] * 100
|
||||
for key in RESULTS_LUT if key in log_line
|
||||
})
|
||||
return result_dict
|
||||
|
||||
|
||||
def get_total_time(log_json_path, iter_num):
|
||||
|
||||
def convert(seconds):
|
||||
hour = seconds // 3600
|
||||
seconds %= 3600
|
||||
minutes = seconds // 60
|
||||
seconds %= 60
|
||||
|
||||
return f'{hour:d}:{minutes:2d}:{seconds:2d}'
|
||||
|
||||
time_dict = dict()
|
||||
with open(log_json_path, 'r') as f:
|
||||
last_iter = 0
|
||||
total_sec = 0
|
||||
for line in f.readlines():
|
||||
log_line = json.loads(line)
|
||||
if 'mode' not in log_line.keys():
|
||||
continue
|
||||
|
||||
if log_line['mode'] == 'train':
|
||||
cur_iter = log_line['iter']
|
||||
total_sec += (cur_iter - last_iter) * log_line['time']
|
||||
last_iter = cur_iter
|
||||
time_dict['time'] = convert(int(total_sec))
|
||||
|
||||
return time_dict
|
||||
|
||||
|
||||
def parse_args():
|
||||
parser = argparse.ArgumentParser(description='Gather benchmarked models')
|
||||
parser.add_argument(
|
||||
'root',
|
||||
type=str,
|
||||
help='root path of benchmarked models to be gathered')
|
||||
parser.add_argument(
|
||||
'config',
|
||||
type=str,
|
||||
help='root path of benchmarked configs to be gathered')
|
||||
parser.add_argument(
|
||||
'out', type=str, help='output path of gathered models to be stored')
|
||||
|
||||
args = parser.parse_args()
|
||||
return args
|
||||
|
||||
|
||||
def main():
|
||||
args = parse_args()
|
||||
models_root = args.root
|
||||
models_out = args.out
|
||||
config_name = args.config
|
||||
mmcv.mkdir_or_exist(models_out)
|
||||
|
||||
# find all models in the root directory to be gathered
|
||||
raw_configs = list(mmcv.scandir(config_name, '.py', recursive=True))
|
||||
|
||||
# filter configs that is not trained in the experiments dir
|
||||
exp_dirs = []
|
||||
for raw_config in raw_configs:
|
||||
work_dir = osp.splitext(osp.basename(raw_config))[0]
|
||||
if osp.exists(osp.join(models_root, work_dir)):
|
||||
exp_dirs.append(work_dir)
|
||||
print(f'Find {len(exp_dirs)} models to be gathered')
|
||||
|
||||
# find final_ckpt and log file for trained each config
|
||||
# and parse the best performance
|
||||
model_infos = []
|
||||
for work_dir in exp_dirs:
|
||||
exp_dir = osp.join(models_root, work_dir)
|
||||
# check whether the exps is finished
|
||||
final_iter = get_final_iter(work_dir)
|
||||
final_model = 'iter_{}.pth'.format(final_iter)
|
||||
model_path = osp.join(exp_dir, final_model)
|
||||
|
||||
# skip if the model is still training
|
||||
if not osp.exists(model_path):
|
||||
print(f'{model_path} not finished yet')
|
||||
continue
|
||||
|
||||
# get logs
|
||||
log_json_path = glob.glob(osp.join(exp_dir, '*.log.json'))[0]
|
||||
model_performance = get_final_results(log_json_path, final_iter)
|
||||
|
||||
if model_performance is None:
|
||||
continue
|
||||
|
||||
head = work_dir.split('_')[0]
|
||||
backbone = work_dir.split('_')[1]
|
||||
crop_size = work_dir.split('_')[-3]
|
||||
dataset = work_dir.split('_')[-1]
|
||||
model_info = OrderedDict(
|
||||
head=head,
|
||||
backbone=backbone,
|
||||
crop_size=crop_size,
|
||||
dataset=dataset,
|
||||
iters=f'{final_iter//1000}ki')
|
||||
model_info.update(model_performance)
|
||||
model_time = get_total_time(log_json_path, final_iter)
|
||||
model_info.update(model_time)
|
||||
model_info['config'] = work_dir
|
||||
model_infos.append(model_info)
|
||||
|
||||
with open(
|
||||
osp.join(models_out, 'models_table.csv'), 'w',
|
||||
newline='') as csvfile:
|
||||
writer = csv.writer(
|
||||
csvfile, delimiter='\t', quotechar='|', quoting=csv.QUOTE_MINIMAL)
|
||||
writer.writerow(model_infos[0].keys())
|
||||
for model_info in model_infos:
|
||||
writer.writerow(model_info.values())
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
58
.dev/modelzoo_json2md.py
Normal file
58
.dev/modelzoo_json2md.py
Normal file
@ -0,0 +1,58 @@
|
||||
import argparse
|
||||
import os
|
||||
import os.path as osp
|
||||
|
||||
import mmcv
|
||||
from pytablewriter import Align, MarkdownTableWriter
|
||||
|
||||
|
||||
def parse_args():
|
||||
parser = argparse.ArgumentParser(description='Gather benchmarked models')
|
||||
parser.add_argument('table_cache', type=str, help='table_cache input')
|
||||
parser.add_argument('out', type=str, help='output path md')
|
||||
|
||||
args = parser.parse_args()
|
||||
return args
|
||||
|
||||
|
||||
def main():
|
||||
args = parse_args()
|
||||
table_cache = mmcv.load(args.table_cache)
|
||||
output_dir = args.out
|
||||
|
||||
writer = MarkdownTableWriter()
|
||||
writer.headers = [
|
||||
'Method', 'Backbone', 'Crop Size', 'Lr schd', 'Mem (GB)',
|
||||
'Inf time (fps)', 'mIoU', 'mIoU(ms+flip)', 'download'
|
||||
]
|
||||
writer.margin = 1
|
||||
writer.align_list = [Align.CENTER] * len(writer.headers)
|
||||
dataset_maps = {
|
||||
'cityscapes': 'Cityscapes',
|
||||
'ade20k': 'ADE20K',
|
||||
'voc12aug': 'Pascal VOC 2012 + Aug'
|
||||
}
|
||||
for directory in table_cache:
|
||||
for dataset in table_cache[directory]:
|
||||
table = table_cache[directory][dataset][0]
|
||||
writer.table_name = dataset_maps[dataset]
|
||||
writer.value_matrix = table
|
||||
for i in range(len(table)):
|
||||
if table[i][-4] != '-':
|
||||
table[i][-4] = f'{table[i][-4]:.2f}'
|
||||
mmcv.mkdir_or_exist(osp.join(output_dir, directory))
|
||||
writer.dump(
|
||||
osp.join(output_dir, directory, f'README_{dataset}.md'))
|
||||
with open(osp.join(output_dir, directory, 'README.md'), 'w') as dst_f:
|
||||
for dataset in dataset_maps:
|
||||
dataset_md_file = osp.join(output_dir, directory,
|
||||
f'README_{dataset}.md')
|
||||
with open(dataset_md_file) as src_f:
|
||||
for line in src_f:
|
||||
dst_f.write(line)
|
||||
dst_f.write('\n')
|
||||
os.remove(dataset_md_file)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
76
.github/CODE_OF_CONDUCT.md
vendored
Normal file
76
.github/CODE_OF_CONDUCT.md
vendored
Normal file
@ -0,0 +1,76 @@
|
||||
# Contributor Covenant Code of Conduct
|
||||
|
||||
## Our Pledge
|
||||
|
||||
In the interest of fostering an open and welcoming environment, we as
|
||||
contributors and maintainers pledge to making participation in our project and
|
||||
our community a harassment-free experience for everyone, regardless of age, body
|
||||
size, disability, ethnicity, sex characteristics, gender identity and expression,
|
||||
level of experience, education, socio-economic status, nationality, personal
|
||||
appearance, race, religion, or sexual identity and orientation.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to creating a positive environment
|
||||
include:
|
||||
|
||||
* Using welcoming and inclusive language
|
||||
* Being respectful of differing viewpoints and experiences
|
||||
* Gracefully accepting constructive criticism
|
||||
* Focusing on what is best for the community
|
||||
* Showing empathy towards other community members
|
||||
|
||||
Examples of unacceptable behavior by participants include:
|
||||
|
||||
* The use of sexualized language or imagery and unwelcome sexual attention or
|
||||
advances
|
||||
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or electronic
|
||||
address, without explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a
|
||||
professional setting
|
||||
|
||||
## Our Responsibilities
|
||||
|
||||
Project maintainers are responsible for clarifying the standards of acceptable
|
||||
behavior and are expected to take appropriate and fair corrective action in
|
||||
response to any instances of unacceptable behavior.
|
||||
|
||||
Project maintainers have the right and responsibility to remove, edit, or
|
||||
reject comments, commits, code, wiki edits, issues, and other contributions
|
||||
that are not aligned to this Code of Conduct, or to ban temporarily or
|
||||
permanently any contributor for other behaviors that they deem inappropriate,
|
||||
threatening, offensive, or harmful.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies both within project spaces and in public spaces
|
||||
when an individual is representing the project or its community. Examples of
|
||||
representing a project or community include using an official project e-mail
|
||||
address, posting via an official social media account, or acting as an appointed
|
||||
representative at an online or offline event. Representation of a project may be
|
||||
further defined and clarified by project maintainers.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||
reported by contacting the project team at chenkaidev@gmail.com. All
|
||||
complaints will be reviewed and investigated and will result in a response that
|
||||
is deemed necessary and appropriate to the circumstances. The project team is
|
||||
obligated to maintain confidentiality with regard to the reporter of an incident.
|
||||
Further details of specific enforcement policies may be posted separately.
|
||||
|
||||
Project maintainers who do not follow or enforce the Code of Conduct in good
|
||||
faith may face temporary or permanent repercussions as determined by other
|
||||
members of the project's leadership.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
||||
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
|
||||
|
||||
[homepage]: https://www.contributor-covenant.org
|
||||
|
||||
For answers to common questions about this code of conduct, see
|
||||
https://www.contributor-covenant.org/faq
|
53
.github/CONTRIBUTING.md
vendored
Normal file
53
.github/CONTRIBUTING.md
vendored
Normal file
@ -0,0 +1,53 @@
|
||||
# Contributing to mmsegmentation
|
||||
|
||||
All kinds of contributions are welcome, including but not limited to the following.
|
||||
|
||||
- Fixes (typo, bugs)
|
||||
- New features and components
|
||||
|
||||
## Workflow
|
||||
|
||||
1. fork and pull the latest mmsegmentation
|
||||
2. checkout a new branch (do not use master branch for PRs)
|
||||
3. commit your changes
|
||||
4. create a PR
|
||||
|
||||
Note
|
||||
- If you plan to add some new features that involve large changes, it is encouraged to open an issue for discussion first.
|
||||
- If you are the author of some papers and would like to include your method to mmsegmentation,
|
||||
please contact Kai Chen (chenkaidev[at]gmail[dot]com). We will much appreciate your contribution.
|
||||
|
||||
## Code style
|
||||
|
||||
### Python
|
||||
We adopt [PEP8](https://www.python.org/dev/peps/pep-0008/) as the preferred code style.
|
||||
|
||||
We use the following tools for linting and formatting:
|
||||
- [flake8](http://flake8.pycqa.org/en/latest/): linter
|
||||
- [yapf](https://github.com/google/yapf): formatter
|
||||
- [isort](https://github.com/timothycrosley/isort): sort imports
|
||||
|
||||
Style configurations of yapf and isort can be found in [.style.yapf](../.style.yapf) and [.isort.cfg](../.isort.cfg).
|
||||
|
||||
We use [pre-commit hook](https://pre-commit.com/) that checks and formats for `flake8`, `yapf`, `isort`, `trailing whitespaces`,
|
||||
fixes `end-of-files`, sorts `requirments.txt` automatically on every commit.
|
||||
The config for a pre-commit hook is stored in [.pre-commit-config](../.pre-commit-config.yaml).
|
||||
|
||||
After you clone the repository, you will need to install initialize pre-commit hook.
|
||||
|
||||
```
|
||||
pip install -U pre-commit
|
||||
```
|
||||
|
||||
From the repository folder
|
||||
```
|
||||
pre-commit install
|
||||
```
|
||||
|
||||
After this on every commit check code linters and formatter will be enforced.
|
||||
|
||||
|
||||
>Before you create a PR, make sure that your code lints and is formatted by yapf.
|
||||
|
||||
### C++ and CUDA
|
||||
We follow the [Google C++ Style Guide](https://google.github.io/styleguide/cppguide.html).
|
1
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
1
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
@ -0,0 +1 @@
|
||||
blank_issues_enabled: false
|
41
.github/ISSUE_TEMPLATE/error-report.md
vendored
Normal file
41
.github/ISSUE_TEMPLATE/error-report.md
vendored
Normal file
@ -0,0 +1,41 @@
|
||||
---
|
||||
name: Error report
|
||||
about: Create a report to help us improve
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
Thanks for your error report and we appreciate it a lot.
|
||||
|
||||
**Checklist**
|
||||
1. I have searched related issues but cannot get the expected help.
|
||||
2. The bug has not been fixed in the latest version.
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**Reproduction**
|
||||
1. What command or script did you run?
|
||||
```
|
||||
A placeholder for the command.
|
||||
```
|
||||
2. Did you make any modifications on the code or config? Did you understand what you have modified?
|
||||
3. What dataset did you use?
|
||||
|
||||
**Environment**
|
||||
|
||||
1. Please run `python mmseg/utils/collect_env.py` to collect necessary environment infomation and paste it here.
|
||||
2. You may add addition that may be helpful for locating the problem, such as
|
||||
- How you installed PyTorch [e.g., pip, conda, source]
|
||||
- Other environment variables that may be related (such as `$PATH`, `$LD_LIBRARY_PATH`, `$PYTHONPATH`, etc.)
|
||||
|
||||
**Error traceback**
|
||||
If applicable, paste the error trackback here.
|
||||
```
|
||||
A placeholder for trackback.
|
||||
```
|
||||
|
||||
**Bug fix**
|
||||
If you have already identified the reason, you can provide the information here. If you are willing to create a PR to fix it, please also leave a comment here and that would be much appreciated!
|
22
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
22
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Describe the feature**
|
||||
|
||||
**Motivation**
|
||||
A clear and concise description of the motivation of the feature.
|
||||
Ex1. It is inconvenient when [....].
|
||||
Ex2. There is a recent paper [....], which is very helpful for [....].
|
||||
|
||||
**Related resources**
|
||||
If there is an official code release or third-party implementations, please also provide the information here, which would be very helpful.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
||||
If you would like to implement the feature and create a PR, please leave a comment here and that would be much appreciated.
|
8
.github/ISSUE_TEMPLATE/general_questions.md
vendored
Normal file
8
.github/ISSUE_TEMPLATE/general_questions.md
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
---
|
||||
name: General questions
|
||||
about: Ask general questions to get help
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
101
.github/workflows/build.yml
vendored
Normal file
101
.github/workflows/build.yml
vendored
Normal file
@ -0,0 +1,101 @@
|
||||
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
|
||||
|
||||
name: build
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Python 3.7
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: 3.7
|
||||
- name: Install linting dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install flake8 isort==4.3.21 yapf interrogate
|
||||
- name: Lint with flake8
|
||||
run: flake8 .
|
||||
- name: Lint with isort
|
||||
run: isort --recursive --check-only --diff mmseg/ tests/ examples/
|
||||
- name: Format python codes with yapf
|
||||
run: yapf -r -d mmseg/ tests/ examples/
|
||||
- name: Check docstring
|
||||
run: interrogate -v --ignore-init-method --ignore-module --ignore-nested-functions --exclude mmseg/ops --ignore-regex "__repr__" --fail-under 80 mmseg
|
||||
|
||||
build:
|
||||
env:
|
||||
CUDA: 10.1.105-1
|
||||
CUDA_SHORT: 10.1
|
||||
UBUNTU_VERSION: ubuntu1804
|
||||
FORCE_CUDA: 1
|
||||
MMCV_CUDA_ARGS: -gencode=arch=compute_61,code=sm_61
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: [3.6, 3.7]
|
||||
torch: [1.3.0+cpu, 1.5.0+cpu]
|
||||
include:
|
||||
- torch: 1.3.0+cpu
|
||||
torchvision: 0.4.2+cpu
|
||||
- torch: 1.5.0+cpu
|
||||
torchvision: 0.6.0+cpu
|
||||
- torch: 1.5.0+cpu
|
||||
torchvision: 0.6.0+cpu
|
||||
python-version: 3.8
|
||||
- torch: 1.5.0+cu101
|
||||
torchvision: 0.6.0+cu101
|
||||
python-version: 3.7
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Install CUDA
|
||||
if: ${{matrix.torch == '1.5.0+cu101'}}
|
||||
run: |
|
||||
export INSTALLER=cuda-repo-${UBUNTU_VERSION}_${CUDA}_amd64.deb
|
||||
wget http://developer.download.nvidia.com/compute/cuda/repos/${UBUNTU_VERSION}/x86_64/${INSTALLER}
|
||||
sudo dpkg -i ${INSTALLER}
|
||||
wget https://developer.download.nvidia.com/compute/cuda/repos/${UBUNTU_VERSION}/x86_64/7fa2af80.pub
|
||||
sudo apt-key add 7fa2af80.pub
|
||||
sudo apt update -qq
|
||||
sudo apt install -y cuda-${CUDA_SHORT/./-} cuda-cufft-dev-${CUDA_SHORT/./-}
|
||||
sudo apt clean
|
||||
export CUDA_HOME=/usr/local/cuda-${CUDA_SHORT}
|
||||
export LD_LIBRARY_PATH=${CUDA_HOME}/lib64:${CUDA_HOME}/include:${LD_LIBRARY_PATH}
|
||||
export PATH=${CUDA_HOME}/bin:${PATH}
|
||||
sudo apt-get install -y ninja-build
|
||||
- name: Install Pillow
|
||||
if: ${{matrix.torchvision == '0.4.2+cpu'}}
|
||||
run: pip install Pillow==6.2.2
|
||||
- name: Install PyTorch
|
||||
run: pip install torch==${{matrix.torch}} torchvision==${{matrix.torchvision}} -f https://download.pytorch.org/whl/torch_stable.html
|
||||
- name: Install mmseg dependencies
|
||||
run: |
|
||||
pip install mmcv-full==latest+torch${{matrix.torch}} -f https://openmmlab.oss-accelerate.aliyuncs.com/mmcv/dist/index.html
|
||||
pip install -r requirements.txt
|
||||
- name: Build and install
|
||||
run: rm -rf .eggs && pip install -e .
|
||||
- name: Run unittests and generate coverage report
|
||||
run: |
|
||||
coverage run --branch --source mmseg -m pytest tests/
|
||||
coverage xml
|
||||
coverage report -m --omit="mmseg/utils/*","mmseg/apis/*"
|
||||
# Only upload coverage report for python3.7 && pytorch1.5
|
||||
- name: Upload coverage to Codecov
|
||||
if: ${{matrix.torch == '1.5.0+cu101' && matrix.python-version == '3.7'}}
|
||||
uses: codecov/codecov-action@v1.0.10
|
||||
with:
|
||||
file: ./coverage.xml
|
||||
flags: unittests
|
||||
env_vars: OS,PYTHON
|
||||
name: codecov-umbrella
|
||||
fail_ci_if_error: false
|
118
.gitignore
vendored
Normal file
118
.gitignore
vendored
Normal file
@ -0,0 +1,118 @@
|
||||
# Byte-compiled / optimized / DLL files
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
*$py.class
|
||||
|
||||
# C extensions
|
||||
*.so
|
||||
|
||||
# Distribution / packaging
|
||||
.Python
|
||||
build/
|
||||
develop-eggs/
|
||||
dist/
|
||||
downloads/
|
||||
eggs/
|
||||
.eggs/
|
||||
lib/
|
||||
lib64/
|
||||
parts/
|
||||
sdist/
|
||||
var/
|
||||
wheels/
|
||||
*.egg-info/
|
||||
.installed.cfg
|
||||
*.egg
|
||||
MANIFEST
|
||||
|
||||
# PyInstaller
|
||||
# Usually these files are written by a python script from a template
|
||||
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
||||
*.manifest
|
||||
*.spec
|
||||
|
||||
# Installer logs
|
||||
pip-log.txt
|
||||
pip-delete-this-directory.txt
|
||||
|
||||
# Unit test / coverage reports
|
||||
htmlcov/
|
||||
.tox/
|
||||
.coverage
|
||||
.coverage.*
|
||||
.cache
|
||||
nosetests.xml
|
||||
coverage.xml
|
||||
*.cover
|
||||
.hypothesis/
|
||||
.pytest_cache/
|
||||
|
||||
# Translations
|
||||
*.mo
|
||||
*.pot
|
||||
|
||||
# Django stuff:
|
||||
*.log
|
||||
local_settings.py
|
||||
db.sqlite3
|
||||
|
||||
# Flask stuff:
|
||||
instance/
|
||||
.webassets-cache
|
||||
|
||||
# Scrapy stuff:
|
||||
.scrapy
|
||||
|
||||
# Sphinx documentation
|
||||
docs/_build/
|
||||
|
||||
# PyBuilder
|
||||
target/
|
||||
|
||||
# Jupyter Notebook
|
||||
.ipynb_checkpoints
|
||||
|
||||
# pyenv
|
||||
.python-version
|
||||
|
||||
# celery beat schedule file
|
||||
celerybeat-schedule
|
||||
|
||||
# SageMath parsed files
|
||||
*.sage.py
|
||||
|
||||
# Environments
|
||||
.env
|
||||
.venv
|
||||
env/
|
||||
venv/
|
||||
ENV/
|
||||
env.bak/
|
||||
venv.bak/
|
||||
|
||||
# Spyder project settings
|
||||
.spyderproject
|
||||
.spyproject
|
||||
|
||||
# Rope project settings
|
||||
.ropeproject
|
||||
|
||||
# mkdocs documentation
|
||||
/site
|
||||
|
||||
# mypy
|
||||
.mypy_cache/
|
||||
|
||||
mmseg/version.py
|
||||
data
|
||||
.vscode
|
||||
.idea
|
||||
|
||||
# custom
|
||||
*.pkl
|
||||
*.pkl.json
|
||||
*.log.json
|
||||
work_dirs/
|
||||
|
||||
# Pytorch
|
||||
*.pth
|
35
.pre-commit-config.yaml
Normal file
35
.pre-commit-config.yaml
Normal file
@ -0,0 +1,35 @@
|
||||
repos:
|
||||
- repo: https://gitlab.com/pycqa/flake8.git
|
||||
rev: 3.8.3
|
||||
hooks:
|
||||
- id: flake8
|
||||
- repo: https://github.com/asottile/seed-isort-config
|
||||
rev: v2.2.0
|
||||
hooks:
|
||||
- id: seed-isort-config
|
||||
- repo: https://github.com/timothycrosley/isort
|
||||
rev: 4.3.21
|
||||
hooks:
|
||||
- id: isort
|
||||
- repo: https://github.com/pre-commit/mirrors-yapf
|
||||
rev: v0.30.0
|
||||
hooks:
|
||||
- id: yapf
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v3.1.0
|
||||
hooks:
|
||||
- id: trailing-whitespace
|
||||
- id: check-yaml
|
||||
- id: end-of-file-fixer
|
||||
- id: requirements-txt-fixer
|
||||
- id: double-quote-string-fixer
|
||||
- id: check-merge-conflict
|
||||
- id: fix-encoding-pragma
|
||||
args: ["--remove"]
|
||||
- id: mixed-line-ending
|
||||
args: ["--fix=lf"]
|
||||
- repo: https://github.com/myint/docformatter
|
||||
rev: v1.3.1
|
||||
hooks:
|
||||
- id: docformatter
|
||||
args: ["--in-place", "--wrap-descriptions", "79"]
|
4
.style.yapf
Normal file
4
.style.yapf
Normal file
@ -0,0 +1,4 @@
|
||||
[style]
|
||||
BASED_ON_STYLE = pep8
|
||||
BLANK_LINE_BEFORE_NESTED_CLASS_OR_DEF = true
|
||||
SPLIT_BEFORE_EXPRESSION_AFTER_OPENING_PAREN = true
|
2
LICENSE
2
LICENSE
@ -200,4 +200,4 @@ Copyright 2020 The MMSegmentation Authors. All rights reserved.
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
limitations under the License.
|
||||
|
96
README.md
Normal file
96
README.md
Normal file
@ -0,0 +1,96 @@
|
||||
<div align="center">
|
||||
<img src="resources/mmseg-logo.png" width="600"/>
|
||||
</div>
|
||||
|
||||
## Introduction
|
||||
|
||||
MMSegmentation is an open source semantic segmentation toolbox based on PyTorch.
|
||||
It is a part of the OpenMMLab project.
|
||||
|
||||
The master branch works with **PyTorch 1.3 to 1.5**.
|
||||
|
||||

|
||||
|
||||
### Major features
|
||||
|
||||
- **Unified Benchmark**
|
||||
|
||||
We provide a unified benchmark toolbox for various semantic segmentation methods.
|
||||
|
||||
- **Modular Design**
|
||||
|
||||
We decompose the semantic segmentation framework into different components and one can easily construct a customized semantic segmentation framework by combining different modules.
|
||||
|
||||
- **Support of multiple methods out of box**
|
||||
|
||||
The toolbox directly supports popular and contemporary semantic segmentation frameworks, *e.g.* PSPNet, DeepLabV3, PSANet, DeepLabV3+, etc.
|
||||
|
||||
- **High efficiency**
|
||||
|
||||
The training speed is faster than or comparable to other codebases.
|
||||
|
||||
## License
|
||||
|
||||
This project is released under the [Apache 2.0 license](LICENSE).
|
||||
|
||||
## Benchmark and model zoo
|
||||
|
||||
Results and models are available in the [model zoo](docs/model_zoo.md).
|
||||
|
||||
Supported backbones:
|
||||
- [x] ResNet
|
||||
- [x] ResNeXt
|
||||
- [x] HRNet
|
||||
|
||||
Supported methods:
|
||||
- [x] [FCN](configs/fcn)
|
||||
- [x] [PSPNet](configs/pspnet)
|
||||
- [x] [DeepLabV3](configs/deeplabv3)
|
||||
- [x] [PSANet](configs/psanet)
|
||||
- [x] [DeepLabV3+](configs/deeplabv3plus)
|
||||
- [x] [UPerNet](configs/upernet)
|
||||
- [x] [NonLocal Net](configs/nonlocal_net)
|
||||
- [x] [CCNet](configs/ccnet)
|
||||
- [x] [DANet](configs/danet)
|
||||
- [x] [GCNet](configs/gcnet)
|
||||
- [x] [ANN](configs/ann)
|
||||
- [x] [OCRNet](configs/ocrnet)
|
||||
|
||||
## Installation
|
||||
|
||||
Please refer to [INSTALL.md](docs/install.md) for installation and dataset preparation.
|
||||
|
||||
## Get Started
|
||||
|
||||
Please see [getting_started.md](docs/getting_started.md) for the basic usage of MMSegmentation.
|
||||
There are also tutorials for [adding new dataset](docs/tutorials/new_dataset.md), [designing data pipeline](docs/tutorials/data_pipeline.md), and [adding new modules](docs/tutorials/new_modules.md).
|
||||
|
||||
## Contributing
|
||||
|
||||
We appreciate all contributions to improve MMSegmentation. Please refer to [CONTRIBUTING.md](.github/CONTRIBUTING.md) for the contributing guideline.
|
||||
|
||||
## Acknowledgement
|
||||
|
||||
MMSegmentation is an open source project that welcome any contribution and feedback.
|
||||
We wish that the toolbox and benchmark could serve the growing research
|
||||
community by providing a flexible as well as standardized toolkit to reimplement existing methods
|
||||
and develop their own new semantic segmentation methods.
|
||||
|
||||
Many thanks to Ruobing Han ([@drcut](https://github.com/drcut)), Xiaoming Ma([@aishangmaxiaoming](https://github.com/aishangmaxiaoming)), Shiguang Wang ([@sunnyxiaohu](https://github.com/sunnyxiaohu)) for deployment support.
|
||||
|
||||
## Citation
|
||||
|
||||
If you use this toolbox or benchmark in your research, please cite this project.
|
||||
|
||||
```
|
||||
@misc{mmseg2020,
|
||||
author={Xu, Jiarui and Chen, Kai and Lin, Dahua},
|
||||
title={{MMSegmenation}},
|
||||
howpublished={\url{https://github.com/open-mmlab/mmsegmentation}},
|
||||
year={2020}
|
||||
}
|
||||
```
|
||||
|
||||
## Contact
|
||||
|
||||
This repo is currently maintained by Jiarui Xu ([@xvjiarui](https://github.com/xvjiarui)), Kai Chen ([@hellock](http://github.com/hellock)).
|
54
configs/_base_/datasets/ade20k.py
Normal file
54
configs/_base_/datasets/ade20k.py
Normal file
@ -0,0 +1,54 @@
|
||||
# dataset settings
|
||||
dataset_type = 'ADE20KDataset'
|
||||
data_root = 'data/ade/ADEChallengeData2016'
|
||||
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', flip_ratio=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=(2048, 512),
|
||||
# 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='images/training',
|
||||
ann_dir='annotations/training',
|
||||
pipeline=train_pipeline),
|
||||
val=dict(
|
||||
type=dataset_type,
|
||||
data_root=data_root,
|
||||
img_dir='images/validation',
|
||||
ann_dir='annotations/validation',
|
||||
pipeline=test_pipeline),
|
||||
test=dict(
|
||||
type=dataset_type,
|
||||
data_root=data_root,
|
||||
img_dir='images/validation',
|
||||
ann_dir='annotations/validation',
|
||||
pipeline=test_pipeline))
|
54
configs/_base_/datasets/cityscapes.py
Normal file
54
configs/_base_/datasets/cityscapes.py
Normal file
@ -0,0 +1,54 @@
|
||||
# dataset settings
|
||||
dataset_type = 'CityscapesDataset'
|
||||
data_root = 'data/cityscapes/'
|
||||
img_norm_cfg = dict(
|
||||
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
|
||||
crop_size = (512, 1024)
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='LoadAnnotations'),
|
||||
dict(type='Resize', img_scale=(2048, 1024), ratio_range=(0.5, 2.0)),
|
||||
dict(type='RandomCrop', crop_size=crop_size, cat_max_ratio=0.75),
|
||||
dict(type='RandomFlip', flip_ratio=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=(2048, 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=2,
|
||||
workers_per_gpu=2,
|
||||
train=dict(
|
||||
type=dataset_type,
|
||||
data_root=data_root,
|
||||
img_dir='leftImg8bit/train',
|
||||
ann_dir='gtFine/train',
|
||||
pipeline=train_pipeline),
|
||||
val=dict(
|
||||
type=dataset_type,
|
||||
data_root=data_root,
|
||||
img_dir='leftImg8bit/val',
|
||||
ann_dir='gtFine/val',
|
||||
pipeline=test_pipeline),
|
||||
test=dict(
|
||||
type=dataset_type,
|
||||
data_root=data_root,
|
||||
img_dir='leftImg8bit/val',
|
||||
ann_dir='gtFine/val',
|
||||
pipeline=test_pipeline))
|
35
configs/_base_/datasets/cityscapes_769x769.py
Normal file
35
configs/_base_/datasets/cityscapes_769x769.py
Normal file
@ -0,0 +1,35 @@
|
||||
_base_ = './cityscapes.py'
|
||||
img_norm_cfg = dict(
|
||||
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
|
||||
crop_size = (769, 769)
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='LoadAnnotations'),
|
||||
dict(type='Resize', img_scale=(2049, 1025), ratio_range=(0.5, 2.0)),
|
||||
dict(type='RandomCrop', crop_size=crop_size, cat_max_ratio=0.75),
|
||||
dict(type='RandomFlip', flip_ratio=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=(2049, 1025),
|
||||
# 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(
|
||||
train=dict(pipeline=train_pipeline),
|
||||
val=dict(pipeline=test_pipeline),
|
||||
test=dict(pipeline=test_pipeline))
|
57
configs/_base_/datasets/pascal_voc12.py
Normal file
57
configs/_base_/datasets/pascal_voc12.py
Normal file
@ -0,0 +1,57 @@
|
||||
# dataset settings
|
||||
dataset_type = 'PascalVOCDataset'
|
||||
data_root = 'data/VOCdevkit/VOC2012'
|
||||
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'),
|
||||
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', flip_ratio=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=(2048, 512),
|
||||
# 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='JPEGImages',
|
||||
ann_dir='SegmentationClass',
|
||||
split='ImageSets/Segmentation/train.txt',
|
||||
pipeline=train_pipeline),
|
||||
val=dict(
|
||||
type=dataset_type,
|
||||
data_root=data_root,
|
||||
img_dir='JPEGImages',
|
||||
ann_dir='SegmentationClass',
|
||||
split='ImageSets/Segmentation/val.txt',
|
||||
pipeline=test_pipeline),
|
||||
test=dict(
|
||||
type=dataset_type,
|
||||
data_root=data_root,
|
||||
img_dir='JPEGImages',
|
||||
ann_dir='SegmentationClass',
|
||||
split='ImageSets/Segmentation/val.txt',
|
||||
pipeline=test_pipeline))
|
9
configs/_base_/datasets/pascal_voc12_aug.py
Normal file
9
configs/_base_/datasets/pascal_voc12_aug.py
Normal file
@ -0,0 +1,9 @@
|
||||
_base_ = './pascal_voc12.py'
|
||||
# dataset settings
|
||||
data = dict(
|
||||
train=dict(
|
||||
ann_dir=['SegmentationClass', 'SegmentationClassAug'],
|
||||
split=[
|
||||
'ImageSets/Segmentation/train.txt',
|
||||
'ImageSets/Segmentation/aug.txt'
|
||||
]))
|
14
configs/_base_/default_runtime.py
Normal file
14
configs/_base_/default_runtime.py
Normal file
@ -0,0 +1,14 @@
|
||||
# yapf:disable
|
||||
log_config = dict(
|
||||
interval=50,
|
||||
hooks=[
|
||||
dict(type='TextLoggerHook', by_epoch=False),
|
||||
# dict(type='TensorboardLoggerHook')
|
||||
])
|
||||
# yapf:enable
|
||||
dist_params = dict(backend='nccl')
|
||||
log_level = 'INFO'
|
||||
load_from = None
|
||||
resume_from = None
|
||||
workflow = [('train', 1)]
|
||||
cudnn_benchmark = True
|
46
configs/_base_/models/ann_r50-d8.py
Normal file
46
configs/_base_/models/ann_r50-d8.py
Normal file
@ -0,0 +1,46 @@
|
||||
# model settings
|
||||
norm_cfg = dict(type='SyncBN', requires_grad=True)
|
||||
model = dict(
|
||||
type='EncoderDecoder',
|
||||
pretrained='open-mmlab://resnet50_v1c',
|
||||
backbone=dict(
|
||||
type='ResNetV1c',
|
||||
depth=50,
|
||||
num_stages=4,
|
||||
out_indices=(0, 1, 2, 3),
|
||||
dilations=(1, 1, 2, 4),
|
||||
strides=(1, 2, 1, 1),
|
||||
norm_cfg=norm_cfg,
|
||||
norm_eval=False,
|
||||
style='pytorch',
|
||||
contract_dilation=True),
|
||||
decode_head=dict(
|
||||
type='ANNHead',
|
||||
in_channels=[1024, 2048],
|
||||
in_index=[2, 3],
|
||||
channels=512,
|
||||
project_channels=256,
|
||||
query_scales=(1, ),
|
||||
key_pool_scales=(1, 3, 6, 8),
|
||||
drop_out_ratio=0.1,
|
||||
num_classes=19,
|
||||
norm_cfg=norm_cfg,
|
||||
align_corners=False,
|
||||
loss_decode=dict(
|
||||
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0)),
|
||||
auxiliary_head=dict(
|
||||
type='FCNHead',
|
||||
in_channels=1024,
|
||||
in_index=2,
|
||||
channels=256,
|
||||
num_convs=1,
|
||||
concat_input=False,
|
||||
drop_out_ratio=0.1,
|
||||
num_classes=19,
|
||||
norm_cfg=norm_cfg,
|
||||
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')
|
44
configs/_base_/models/ccnet_r50-d8.py
Normal file
44
configs/_base_/models/ccnet_r50-d8.py
Normal file
@ -0,0 +1,44 @@
|
||||
# model settings
|
||||
norm_cfg = dict(type='SyncBN', requires_grad=True)
|
||||
model = dict(
|
||||
type='EncoderDecoder',
|
||||
pretrained='open-mmlab://resnet50_v1c',
|
||||
backbone=dict(
|
||||
type='ResNetV1c',
|
||||
depth=50,
|
||||
num_stages=4,
|
||||
out_indices=(0, 1, 2, 3),
|
||||
dilations=(1, 1, 2, 4),
|
||||
strides=(1, 2, 1, 1),
|
||||
norm_cfg=norm_cfg,
|
||||
norm_eval=False,
|
||||
style='pytorch',
|
||||
contract_dilation=True),
|
||||
decode_head=dict(
|
||||
type='CCHead',
|
||||
in_channels=2048,
|
||||
in_index=3,
|
||||
channels=512,
|
||||
recurrence=2,
|
||||
drop_out_ratio=0.1,
|
||||
num_classes=19,
|
||||
norm_cfg=norm_cfg,
|
||||
align_corners=False,
|
||||
loss_decode=dict(
|
||||
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0)),
|
||||
auxiliary_head=dict(
|
||||
type='FCNHead',
|
||||
in_channels=1024,
|
||||
in_index=2,
|
||||
channels=256,
|
||||
num_convs=1,
|
||||
concat_input=False,
|
||||
drop_out_ratio=0.1,
|
||||
num_classes=19,
|
||||
norm_cfg=norm_cfg,
|
||||
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')
|
44
configs/_base_/models/danet_r50-d8.py
Normal file
44
configs/_base_/models/danet_r50-d8.py
Normal file
@ -0,0 +1,44 @@
|
||||
# model settings
|
||||
norm_cfg = dict(type='SyncBN', requires_grad=True)
|
||||
model = dict(
|
||||
type='EncoderDecoder',
|
||||
pretrained='open-mmlab://resnet50_v1c',
|
||||
backbone=dict(
|
||||
type='ResNetV1c',
|
||||
depth=50,
|
||||
num_stages=4,
|
||||
out_indices=(0, 1, 2, 3),
|
||||
dilations=(1, 1, 2, 4),
|
||||
strides=(1, 2, 1, 1),
|
||||
norm_cfg=norm_cfg,
|
||||
norm_eval=False,
|
||||
style='pytorch',
|
||||
contract_dilation=True),
|
||||
decode_head=dict(
|
||||
type='DAHead',
|
||||
in_channels=2048,
|
||||
in_index=3,
|
||||
channels=512,
|
||||
pam_channels=64,
|
||||
drop_out_ratio=0.1,
|
||||
num_classes=19,
|
||||
norm_cfg=norm_cfg,
|
||||
align_corners=False,
|
||||
loss_decode=dict(
|
||||
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0)),
|
||||
auxiliary_head=dict(
|
||||
type='FCNHead',
|
||||
in_channels=1024,
|
||||
in_index=2,
|
||||
channels=256,
|
||||
num_convs=1,
|
||||
concat_input=False,
|
||||
drop_out_ratio=0.1,
|
||||
num_classes=19,
|
||||
norm_cfg=norm_cfg,
|
||||
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')
|
44
configs/_base_/models/deeplabv3_r50-d8.py
Normal file
44
configs/_base_/models/deeplabv3_r50-d8.py
Normal file
@ -0,0 +1,44 @@
|
||||
# model settings
|
||||
norm_cfg = dict(type='SyncBN', requires_grad=True)
|
||||
model = dict(
|
||||
type='EncoderDecoder',
|
||||
pretrained='open-mmlab://resnet50_v1c',
|
||||
backbone=dict(
|
||||
type='ResNetV1c',
|
||||
depth=50,
|
||||
num_stages=4,
|
||||
out_indices=(0, 1, 2, 3),
|
||||
dilations=(1, 1, 2, 4),
|
||||
strides=(1, 2, 1, 1),
|
||||
norm_cfg=norm_cfg,
|
||||
norm_eval=False,
|
||||
style='pytorch',
|
||||
contract_dilation=True),
|
||||
decode_head=dict(
|
||||
type='ASPPHead',
|
||||
in_channels=2048,
|
||||
in_index=3,
|
||||
channels=512,
|
||||
dilations=(1, 12, 24, 36),
|
||||
drop_out_ratio=0.1,
|
||||
num_classes=19,
|
||||
norm_cfg=norm_cfg,
|
||||
align_corners=False,
|
||||
loss_decode=dict(
|
||||
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0)),
|
||||
auxiliary_head=dict(
|
||||
type='FCNHead',
|
||||
in_channels=1024,
|
||||
in_index=2,
|
||||
channels=256,
|
||||
num_convs=1,
|
||||
concat_input=False,
|
||||
drop_out_ratio=0.1,
|
||||
num_classes=19,
|
||||
norm_cfg=norm_cfg,
|
||||
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')
|
46
configs/_base_/models/deeplabv3plus_r50-d8.py
Normal file
46
configs/_base_/models/deeplabv3plus_r50-d8.py
Normal file
@ -0,0 +1,46 @@
|
||||
# model settings
|
||||
norm_cfg = dict(type='SyncBN', requires_grad=True)
|
||||
model = dict(
|
||||
type='EncoderDecoder',
|
||||
pretrained='open-mmlab://resnet50_v1c',
|
||||
backbone=dict(
|
||||
type='ResNetV1c',
|
||||
depth=50,
|
||||
num_stages=4,
|
||||
out_indices=(0, 1, 2, 3),
|
||||
dilations=(1, 1, 2, 4),
|
||||
strides=(1, 2, 1, 1),
|
||||
norm_cfg=norm_cfg,
|
||||
norm_eval=False,
|
||||
style='pytorch',
|
||||
contract_dilation=True),
|
||||
decode_head=dict(
|
||||
type='DepthwiseSeparableASPPHead',
|
||||
in_channels=2048,
|
||||
in_index=3,
|
||||
channels=512,
|
||||
dilations=(1, 12, 24, 36),
|
||||
c1_in_channels=256,
|
||||
c1_channels=48,
|
||||
drop_out_ratio=0.1,
|
||||
num_classes=19,
|
||||
norm_cfg=norm_cfg,
|
||||
align_corners=False,
|
||||
loss_decode=dict(
|
||||
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0)),
|
||||
auxiliary_head=dict(
|
||||
type='FCNHead',
|
||||
in_channels=1024,
|
||||
in_index=2,
|
||||
channels=256,
|
||||
num_convs=1,
|
||||
concat_input=False,
|
||||
drop_out_ratio=0.1,
|
||||
num_classes=19,
|
||||
norm_cfg=norm_cfg,
|
||||
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')
|
48
configs/_base_/models/encnet_r50-d8.py
Normal file
48
configs/_base_/models/encnet_r50-d8.py
Normal file
@ -0,0 +1,48 @@
|
||||
# model settings
|
||||
norm_cfg = dict(type='SyncBN', requires_grad=True)
|
||||
model = dict(
|
||||
type='EncoderDecoder',
|
||||
pretrained='open-mmlab://resnet50_v1c',
|
||||
backbone=dict(
|
||||
type='ResNetV1c',
|
||||
depth=50,
|
||||
num_stages=4,
|
||||
out_indices=(0, 1, 2, 3),
|
||||
dilations=(1, 1, 2, 4),
|
||||
strides=(1, 2, 1, 1),
|
||||
norm_cfg=norm_cfg,
|
||||
norm_eval=False,
|
||||
style='pytorch',
|
||||
contract_dilation=True),
|
||||
decode_head=dict(
|
||||
type='EncHead',
|
||||
in_channels=[512, 1024, 2048],
|
||||
in_index=(1, 2, 3),
|
||||
channels=512,
|
||||
num_codes=32,
|
||||
use_se_loss=True,
|
||||
add_lateral=False,
|
||||
drop_out_ratio=0.1,
|
||||
num_classes=19,
|
||||
norm_cfg=norm_cfg,
|
||||
align_corners=False,
|
||||
loss_decode=dict(
|
||||
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0),
|
||||
loss_se_decode=dict(
|
||||
type='CrossEntropyLoss', use_sigmoid=True, loss_weight=0.2)),
|
||||
auxiliary_head=dict(
|
||||
type='FCNHead',
|
||||
in_channels=1024,
|
||||
in_index=2,
|
||||
channels=256,
|
||||
num_convs=1,
|
||||
concat_input=False,
|
||||
drop_out_ratio=0.1,
|
||||
num_classes=19,
|
||||
norm_cfg=norm_cfg,
|
||||
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')
|
52
configs/_base_/models/fcn_hr18.py
Normal file
52
configs/_base_/models/fcn_hr18.py
Normal file
@ -0,0 +1,52 @@
|
||||
# model settings
|
||||
norm_cfg = dict(type='SyncBN', requires_grad=True)
|
||||
model = dict(
|
||||
type='EncoderDecoder',
|
||||
pretrained='open-mmlab://msra/hrnetv2_w18',
|
||||
backbone=dict(
|
||||
type='HRNet',
|
||||
norm_cfg=norm_cfg,
|
||||
norm_eval=False,
|
||||
extra=dict(
|
||||
stage1=dict(
|
||||
num_modules=1,
|
||||
num_branches=1,
|
||||
block='BOTTLENECK',
|
||||
num_blocks=(4, ),
|
||||
num_channels=(64, )),
|
||||
stage2=dict(
|
||||
num_modules=1,
|
||||
num_branches=2,
|
||||
block='BASIC',
|
||||
num_blocks=(4, 4),
|
||||
num_channels=(18, 36)),
|
||||
stage3=dict(
|
||||
num_modules=4,
|
||||
num_branches=3,
|
||||
block='BASIC',
|
||||
num_blocks=(4, 4, 4),
|
||||
num_channels=(18, 36, 72)),
|
||||
stage4=dict(
|
||||
num_modules=3,
|
||||
num_branches=4,
|
||||
block='BASIC',
|
||||
num_blocks=(4, 4, 4, 4),
|
||||
num_channels=(18, 36, 72, 144)))),
|
||||
decode_head=dict(
|
||||
type='FCNHead',
|
||||
in_channels=[18, 36, 72, 144],
|
||||
in_index=(0, 1, 2, 3),
|
||||
channels=sum([18, 36, 72, 144]),
|
||||
input_transform='resize_concat',
|
||||
kernel_size=1,
|
||||
num_convs=1,
|
||||
concat_input=False,
|
||||
drop_out_ratio=-1,
|
||||
num_classes=19,
|
||||
norm_cfg=norm_cfg,
|
||||
align_corners=False,
|
||||
loss_decode=dict(
|
||||
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0)))
|
||||
# model training and testing settings
|
||||
train_cfg = dict()
|
||||
test_cfg = dict(mode='whole')
|
45
configs/_base_/models/fcn_r50-d8.py
Normal file
45
configs/_base_/models/fcn_r50-d8.py
Normal file
@ -0,0 +1,45 @@
|
||||
# model settings
|
||||
norm_cfg = dict(type='SyncBN', requires_grad=True)
|
||||
model = dict(
|
||||
type='EncoderDecoder',
|
||||
pretrained='open-mmlab://resnet50_v1c',
|
||||
backbone=dict(
|
||||
type='ResNetV1c',
|
||||
depth=50,
|
||||
num_stages=4,
|
||||
out_indices=(0, 1, 2, 3),
|
||||
dilations=(1, 1, 2, 4),
|
||||
strides=(1, 2, 1, 1),
|
||||
norm_cfg=norm_cfg,
|
||||
norm_eval=False,
|
||||
style='pytorch',
|
||||
contract_dilation=True),
|
||||
decode_head=dict(
|
||||
type='FCNHead',
|
||||
in_channels=2048,
|
||||
in_index=3,
|
||||
channels=512,
|
||||
num_convs=2,
|
||||
concat_input=True,
|
||||
drop_out_ratio=0.1,
|
||||
num_classes=19,
|
||||
norm_cfg=norm_cfg,
|
||||
align_corners=False,
|
||||
loss_decode=dict(
|
||||
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0)),
|
||||
auxiliary_head=dict(
|
||||
type='FCNHead',
|
||||
in_channels=1024,
|
||||
in_index=2,
|
||||
channels=256,
|
||||
num_convs=1,
|
||||
concat_input=False,
|
||||
drop_out_ratio=0.1,
|
||||
num_classes=19,
|
||||
norm_cfg=norm_cfg,
|
||||
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')
|
46
configs/_base_/models/gcnet_r50-d8.py
Normal file
46
configs/_base_/models/gcnet_r50-d8.py
Normal file
@ -0,0 +1,46 @@
|
||||
# model settings
|
||||
norm_cfg = dict(type='SyncBN', requires_grad=True)
|
||||
model = dict(
|
||||
type='EncoderDecoder',
|
||||
pretrained='open-mmlab://resnet50_v1c',
|
||||
backbone=dict(
|
||||
type='ResNetV1c',
|
||||
depth=50,
|
||||
num_stages=4,
|
||||
out_indices=(0, 1, 2, 3),
|
||||
dilations=(1, 1, 2, 4),
|
||||
strides=(1, 2, 1, 1),
|
||||
norm_cfg=norm_cfg,
|
||||
norm_eval=False,
|
||||
style='pytorch',
|
||||
contract_dilation=True),
|
||||
decode_head=dict(
|
||||
type='GCHead',
|
||||
in_channels=2048,
|
||||
in_index=3,
|
||||
channels=512,
|
||||
ratio=1 / 4.,
|
||||
pooling_type='att',
|
||||
fusion_types=('channel_add', ),
|
||||
drop_out_ratio=0.1,
|
||||
num_classes=19,
|
||||
norm_cfg=norm_cfg,
|
||||
align_corners=False,
|
||||
loss_decode=dict(
|
||||
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0)),
|
||||
auxiliary_head=dict(
|
||||
type='FCNHead',
|
||||
in_channels=1024,
|
||||
in_index=2,
|
||||
channels=256,
|
||||
num_convs=1,
|
||||
concat_input=False,
|
||||
drop_out_ratio=0.1,
|
||||
num_classes=19,
|
||||
norm_cfg=norm_cfg,
|
||||
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')
|
46
configs/_base_/models/nonlocal_r50-d8.py
Normal file
46
configs/_base_/models/nonlocal_r50-d8.py
Normal file
@ -0,0 +1,46 @@
|
||||
# model settings
|
||||
norm_cfg = dict(type='SyncBN', requires_grad=True)
|
||||
model = dict(
|
||||
type='EncoderDecoder',
|
||||
pretrained='open-mmlab://resnet50_v1c',
|
||||
backbone=dict(
|
||||
type='ResNetV1c',
|
||||
depth=50,
|
||||
num_stages=4,
|
||||
out_indices=(0, 1, 2, 3),
|
||||
dilations=(1, 1, 2, 4),
|
||||
strides=(1, 2, 1, 1),
|
||||
norm_cfg=norm_cfg,
|
||||
norm_eval=False,
|
||||
style='pytorch',
|
||||
contract_dilation=True),
|
||||
decode_head=dict(
|
||||
type='NLHead',
|
||||
in_channels=2048,
|
||||
in_index=3,
|
||||
channels=512,
|
||||
drop_out_ratio=0.1,
|
||||
reduction=2,
|
||||
use_scale=True,
|
||||
mode='embedded_gaussian',
|
||||
num_classes=19,
|
||||
norm_cfg=norm_cfg,
|
||||
align_corners=False,
|
||||
loss_decode=dict(
|
||||
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0)),
|
||||
auxiliary_head=dict(
|
||||
type='FCNHead',
|
||||
in_channels=1024,
|
||||
in_index=2,
|
||||
channels=256,
|
||||
num_convs=1,
|
||||
concat_input=False,
|
||||
drop_out_ratio=0.1,
|
||||
num_classes=19,
|
||||
norm_cfg=norm_cfg,
|
||||
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')
|
68
configs/_base_/models/ocrnet_hr18.py
Normal file
68
configs/_base_/models/ocrnet_hr18.py
Normal file
@ -0,0 +1,68 @@
|
||||
# model settings
|
||||
norm_cfg = dict(type='SyncBN', requires_grad=True)
|
||||
model = dict(
|
||||
type='CascadeEncoderDecoder',
|
||||
num_stages=2,
|
||||
pretrained='open-mmlab://msra/hrnetv2_w18',
|
||||
backbone=dict(
|
||||
type='HRNet',
|
||||
norm_cfg=norm_cfg,
|
||||
norm_eval=False,
|
||||
extra=dict(
|
||||
stage1=dict(
|
||||
num_modules=1,
|
||||
num_branches=1,
|
||||
block='BOTTLENECK',
|
||||
num_blocks=(4, ),
|
||||
num_channels=(64, )),
|
||||
stage2=dict(
|
||||
num_modules=1,
|
||||
num_branches=2,
|
||||
block='BASIC',
|
||||
num_blocks=(4, 4),
|
||||
num_channels=(18, 36)),
|
||||
stage3=dict(
|
||||
num_modules=4,
|
||||
num_branches=3,
|
||||
block='BASIC',
|
||||
num_blocks=(4, 4, 4),
|
||||
num_channels=(18, 36, 72)),
|
||||
stage4=dict(
|
||||
num_modules=3,
|
||||
num_branches=4,
|
||||
block='BASIC',
|
||||
num_blocks=(4, 4, 4, 4),
|
||||
num_channels=(18, 36, 72, 144)))),
|
||||
decode_head=[
|
||||
dict(
|
||||
type='FCNHead',
|
||||
in_channels=[18, 36, 72, 144],
|
||||
channels=sum([18, 36, 72, 144]),
|
||||
in_index=(0, 1, 2, 3),
|
||||
input_transform='resize_concat',
|
||||
kernel_size=1,
|
||||
num_convs=1,
|
||||
concat_input=False,
|
||||
drop_out_ratio=-1,
|
||||
num_classes=19,
|
||||
norm_cfg=norm_cfg,
|
||||
align_corners=False,
|
||||
loss_decode=dict(
|
||||
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=0.4)),
|
||||
dict(
|
||||
type='OCRHead',
|
||||
in_channels=[18, 36, 72, 144],
|
||||
in_index=(0, 1, 2, 3),
|
||||
input_transform='resize_concat',
|
||||
channels=512,
|
||||
ocr_channels=256,
|
||||
drop_out_ratio=-1,
|
||||
num_classes=19,
|
||||
norm_cfg=norm_cfg,
|
||||
align_corners=False,
|
||||
loss_decode=dict(
|
||||
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0)),
|
||||
])
|
||||
# model training and testing settings
|
||||
train_cfg = dict()
|
||||
test_cfg = dict(mode='whole')
|
49
configs/_base_/models/psanet_r50-d8.py
Normal file
49
configs/_base_/models/psanet_r50-d8.py
Normal file
@ -0,0 +1,49 @@
|
||||
# model settings
|
||||
norm_cfg = dict(type='SyncBN', requires_grad=True)
|
||||
model = dict(
|
||||
type='EncoderDecoder',
|
||||
pretrained='open-mmlab://resnet50_v1c',
|
||||
backbone=dict(
|
||||
type='ResNetV1c',
|
||||
depth=50,
|
||||
num_stages=4,
|
||||
out_indices=(0, 1, 2, 3),
|
||||
dilations=(1, 1, 2, 4),
|
||||
strides=(1, 2, 1, 1),
|
||||
norm_cfg=norm_cfg,
|
||||
norm_eval=False,
|
||||
style='pytorch',
|
||||
contract_dilation=True),
|
||||
decode_head=dict(
|
||||
type='PSAHead',
|
||||
in_channels=2048,
|
||||
in_index=3,
|
||||
channels=512,
|
||||
mask_size=(97, 97),
|
||||
psa_type='bi-direction',
|
||||
compact=False,
|
||||
shrink_factor=2,
|
||||
normalization_factor=1.0,
|
||||
psa_softmax=True,
|
||||
drop_out_ratio=0.1,
|
||||
num_classes=19,
|
||||
norm_cfg=norm_cfg,
|
||||
align_corners=False,
|
||||
loss_decode=dict(
|
||||
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0)),
|
||||
auxiliary_head=dict(
|
||||
type='FCNHead',
|
||||
in_channels=1024,
|
||||
in_index=2,
|
||||
channels=256,
|
||||
num_convs=1,
|
||||
concat_input=False,
|
||||
drop_out_ratio=0.1,
|
||||
num_classes=19,
|
||||
norm_cfg=norm_cfg,
|
||||
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')
|
44
configs/_base_/models/pspnet_r50-d8.py
Normal file
44
configs/_base_/models/pspnet_r50-d8.py
Normal file
@ -0,0 +1,44 @@
|
||||
# model settings
|
||||
norm_cfg = dict(type='SyncBN', requires_grad=True)
|
||||
model = dict(
|
||||
type='EncoderDecoder',
|
||||
pretrained='open-mmlab://resnet50_v1c',
|
||||
backbone=dict(
|
||||
type='ResNetV1c',
|
||||
depth=50,
|
||||
num_stages=4,
|
||||
out_indices=(0, 1, 2, 3),
|
||||
dilations=(1, 1, 2, 4),
|
||||
strides=(1, 2, 1, 1),
|
||||
norm_cfg=norm_cfg,
|
||||
norm_eval=False,
|
||||
style='pytorch',
|
||||
contract_dilation=True),
|
||||
decode_head=dict(
|
||||
type='PSPHead',
|
||||
in_channels=2048,
|
||||
in_index=3,
|
||||
channels=512,
|
||||
pool_scales=(1, 2, 3, 6),
|
||||
drop_out_ratio=0.1,
|
||||
num_classes=19,
|
||||
norm_cfg=norm_cfg,
|
||||
align_corners=False,
|
||||
loss_decode=dict(
|
||||
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0)),
|
||||
auxiliary_head=dict(
|
||||
type='FCNHead',
|
||||
in_channels=1024,
|
||||
in_index=2,
|
||||
channels=256,
|
||||
num_convs=1,
|
||||
concat_input=False,
|
||||
drop_out_ratio=0.1,
|
||||
num_classes=19,
|
||||
norm_cfg=norm_cfg,
|
||||
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')
|
44
configs/_base_/models/upernet_r50.py
Normal file
44
configs/_base_/models/upernet_r50.py
Normal file
@ -0,0 +1,44 @@
|
||||
# model settings
|
||||
norm_cfg = dict(type='SyncBN', requires_grad=True)
|
||||
model = dict(
|
||||
type='EncoderDecoder',
|
||||
pretrained='open-mmlab://resnet50_v1c',
|
||||
backbone=dict(
|
||||
type='ResNetV1c',
|
||||
depth=50,
|
||||
num_stages=4,
|
||||
out_indices=(0, 1, 2, 3),
|
||||
dilations=(1, 1, 1, 1),
|
||||
strides=(1, 2, 2, 2),
|
||||
norm_cfg=norm_cfg,
|
||||
norm_eval=False,
|
||||
style='pytorch',
|
||||
contract_dilation=True),
|
||||
decode_head=dict(
|
||||
type='UPerHead',
|
||||
in_channels=[256, 512, 1024, 2048],
|
||||
in_index=[0, 1, 2, 3],
|
||||
pool_scales=(1, 2, 3, 6),
|
||||
channels=512,
|
||||
drop_out_ratio=0.1,
|
||||
num_classes=19,
|
||||
norm_cfg=norm_cfg,
|
||||
align_corners=False,
|
||||
loss_decode=dict(
|
||||
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0)),
|
||||
auxiliary_head=dict(
|
||||
type='FCNHead',
|
||||
in_channels=1024,
|
||||
in_index=2,
|
||||
channels=256,
|
||||
num_convs=1,
|
||||
concat_input=False,
|
||||
drop_out_ratio=0.1,
|
||||
num_classes=19,
|
||||
norm_cfg=norm_cfg,
|
||||
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')
|
9
configs/_base_/schedules/schedule_160k.py
Normal file
9
configs/_base_/schedules/schedule_160k.py
Normal file
@ -0,0 +1,9 @@
|
||||
# optimizer
|
||||
optimizer = dict(type='SGD', lr=0.01, momentum=0.9, weight_decay=0.0005)
|
||||
optimizer_config = dict()
|
||||
# learning policy
|
||||
lr_config = dict(policy='poly', power=0.9, min_lr=1e-4, by_epoch=False)
|
||||
# runtime settings
|
||||
total_iters = 160000
|
||||
checkpoint_config = dict(by_epoch=False, interval=16000)
|
||||
evaluation = dict(interval=16000, metric='mIoU')
|
9
configs/_base_/schedules/schedule_20k.py
Normal file
9
configs/_base_/schedules/schedule_20k.py
Normal file
@ -0,0 +1,9 @@
|
||||
# optimizer
|
||||
optimizer = dict(type='SGD', lr=0.01, momentum=0.9, weight_decay=0.0005)
|
||||
optimizer_config = dict()
|
||||
# learning policy
|
||||
lr_config = dict(policy='poly', power=0.9, min_lr=1e-4, by_epoch=False)
|
||||
# runtime settings
|
||||
total_iters = 20000
|
||||
checkpoint_config = dict(by_epoch=False, interval=2000)
|
||||
evaluation = dict(interval=2000, metric='mIoU')
|
9
configs/_base_/schedules/schedule_40k.py
Normal file
9
configs/_base_/schedules/schedule_40k.py
Normal file
@ -0,0 +1,9 @@
|
||||
# optimizer
|
||||
optimizer = dict(type='SGD', lr=0.01, momentum=0.9, weight_decay=0.0005)
|
||||
optimizer_config = dict()
|
||||
# learning policy
|
||||
lr_config = dict(policy='poly', power=0.9, min_lr=1e-4, by_epoch=False)
|
||||
# runtime settings
|
||||
total_iters = 40000
|
||||
checkpoint_config = dict(by_epoch=False, interval=4000)
|
||||
evaluation = dict(interval=4000, metric='mIoU')
|
9
configs/_base_/schedules/schedule_80k.py
Normal file
9
configs/_base_/schedules/schedule_80k.py
Normal file
@ -0,0 +1,9 @@
|
||||
# optimizer
|
||||
optimizer = dict(type='SGD', lr=0.01, momentum=0.9, weight_decay=0.0005)
|
||||
optimizer_config = dict()
|
||||
# learning policy
|
||||
lr_config = dict(policy='poly', power=0.9, min_lr=1e-4, by_epoch=False)
|
||||
# runtime settings
|
||||
total_iters = 80000
|
||||
checkpoint_config = dict(by_epoch=False, interval=8000)
|
||||
evaluation = dict(interval=8000, metric='mIoU')
|
46
configs/ann/README.md
Normal file
46
configs/ann/README.md
Normal file
@ -0,0 +1,46 @@
|
||||
# Asymmetric Non-local Neural Networks for Semantic Segmentation
|
||||
|
||||
## Introduction
|
||||
```
|
||||
@inproceedings{annn,
|
||||
author = {Zhen Zhu and
|
||||
Mengde Xu and
|
||||
Song Bai and
|
||||
Tengteng Huang and
|
||||
Xiang Bai},
|
||||
title = {Asymmetric Non-local Neural Networks for Semantic Segmentation},
|
||||
booktitle={International Conference on Computer Vision},
|
||||
year = {2019},
|
||||
url = {http://arxiv.org/abs/1908.07678},
|
||||
}
|
||||
```
|
||||
|
||||
## Results and models
|
||||
|
||||
### Cityscapes
|
||||
| Method | Backbone | Crop Size | Lr schd | Mem (GB) | Inf time (fps) | mIoU | mIoU(ms+flip) | download |
|
||||
|--------|----------|-----------|--------:|----------|----------------|------:|--------------:|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| ANN | R-50-D8 | 512x1024 | 40000 | 6 | 3.71 | 77.40 | 78.57 | [model](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/ann/ann_r50-d8_512x1024_40k_cityscapes/ann_r50-d8_512x1024_40k_cityscapes_20200605_095211-049fc292.pth) | [log](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/ann/ann_r50-d8_512x1024_40k_cityscapes/ann_r50-d8_512x1024_40k_cityscapes_20200605_095211.log.json) |
|
||||
| ANN | R-101-D8 | 512x1024 | 40000 | 9.5 | 2.55 | 76.55 | 78.85 | [model](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/ann/ann_r101-d8_512x1024_40k_cityscapes/ann_r101-d8_512x1024_40k_cityscapes_20200605_095243-adf6eece.pth) | [log](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/ann/ann_r101-d8_512x1024_40k_cityscapes/ann_r101-d8_512x1024_40k_cityscapes_20200605_095243.log.json) |
|
||||
| ANN | R-50-D8 | 769x769 | 40000 | 6.8 | 1.70 | 78.89 | 80.46 | [model](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/ann/ann_r50-d8_769x769_40k_cityscapes/ann_r50-d8_769x769_40k_cityscapes_20200530_025712-2b46b04d.pth) | [log](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/ann/ann_r50-d8_769x769_40k_cityscapes/ann_r50-d8_769x769_40k_cityscapes_20200530_025712.log.json) |
|
||||
| ANN | R-101-D8 | 769x769 | 40000 | 10.7 | 1.15 | 79.32 | 80.94 | [model](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/ann/ann_r101-d8_769x769_40k_cityscapes/ann_r101-d8_769x769_40k_cityscapes_20200530_025720-059bff28.pth) | [log](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/ann/ann_r101-d8_769x769_40k_cityscapes/ann_r101-d8_769x769_40k_cityscapes_20200530_025720.log.json) |
|
||||
| ANN | R-50-D8 | 512x1024 | 80000 | - | - | 77.34 | 78.65 | [model](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/ann/ann_r50-d8_512x1024_80k_cityscapes/ann_r50-d8_512x1024_80k_cityscapes_20200607_101911-5a9ad545.pth) | [log](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/ann/ann_r50-d8_512x1024_80k_cityscapes/ann_r50-d8_512x1024_80k_cityscapes_20200607_101911.log.json) |
|
||||
| ANN | R-101-D8 | 512x1024 | 80000 | - | - | 77.14 | 78.81 | [model](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/ann/ann_r101-d8_512x1024_80k_cityscapes/ann_r101-d8_512x1024_80k_cityscapes_20200607_013728-aceccc6e.pth) | [log](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/ann/ann_r101-d8_512x1024_80k_cityscapes/ann_r101-d8_512x1024_80k_cityscapes_20200607_013728.log.json) |
|
||||
| ANN | R-50-D8 | 769x769 | 80000 | - | - | 78.88 | 80.57 | [model](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/ann/ann_r50-d8_769x769_80k_cityscapes/ann_r50-d8_769x769_80k_cityscapes_20200607_044426-cc7ff323.pth) | [log](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/ann/ann_r50-d8_769x769_80k_cityscapes/ann_r50-d8_769x769_80k_cityscapes_20200607_044426.log.json) |
|
||||
| ANN | R-101-D8 | 769x769 | 80000 | - | - | 78.80 | 80.34 | [model](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/ann/ann_r101-d8_769x769_80k_cityscapes/ann_r101-d8_769x769_80k_cityscapes_20200607_013713-a9d4be8d.pth) | [log](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/ann/ann_r101-d8_769x769_80k_cityscapes/ann_r101-d8_769x769_80k_cityscapes_20200607_013713.log.json) |
|
||||
|
||||
### ADE20K
|
||||
| Method | Backbone | Crop Size | Lr schd | Mem (GB) | Inf time (fps) | mIoU | mIoU(ms+flip) | download |
|
||||
|--------|----------|-----------|--------:|----------|----------------|------:|--------------:|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| ANN | R-50-D8 | 512x512 | 80000 | 9.1 | 21.01 | 41.01 | 42.30 | [model](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/ann/ann_r50-d8_512x512_80k_ade20k/ann_r50-d8_512x512_80k_ade20k_20200615_014818-26f75e11.pth) | [log](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/ann/ann_r50-d8_512x512_80k_ade20k/ann_r50-d8_512x512_80k_ade20k_20200615_014818.log.json) |
|
||||
| ANN | R-101-D8 | 512x512 | 80000 | 12.5 | 14.12 | 42.94 | 44.18 | [model](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/ann/ann_r101-d8_512x512_80k_ade20k/ann_r101-d8_512x512_80k_ade20k_20200615_014818-c0153543.pth) | [log](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/ann/ann_r101-d8_512x512_80k_ade20k/ann_r101-d8_512x512_80k_ade20k_20200615_014818.log.json) |
|
||||
| ANN | R-50-D8 | 512x512 | 160000 | - | - | 41.74 | 42.62 | [model](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/ann/ann_r50-d8_512x512_160k_ade20k/ann_r50-d8_512x512_160k_ade20k_20200615_231733-892247bc.pth) | [log](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/ann/ann_r50-d8_512x512_160k_ade20k/ann_r50-d8_512x512_160k_ade20k_20200615_231733.log.json) |
|
||||
| ANN | R-101-D8 | 512x512 | 160000 | - | - | 42.94 | 44.06 | [model](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/ann/ann_r101-d8_512x512_160k_ade20k/ann_r101-d8_512x512_160k_ade20k_20200615_231733-955eb1ec.pth) | [log](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/ann/ann_r101-d8_512x512_160k_ade20k/ann_r101-d8_512x512_160k_ade20k_20200615_231733.log.json) |
|
||||
|
||||
### Pascal VOC 2012 + Aug
|
||||
| Method | Backbone | Crop Size | Lr schd | Mem (GB) | Inf time (fps) | mIoU | mIoU(ms+flip) | download |
|
||||
|--------|----------|-----------|--------:|----------|----------------|------:|--------------:|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| ANN | R-50-D8 | 512x512 | 20000 | 6 | 20.92 | 74.86 | 76.13 | [model](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/ann/ann_r50-d8_512x512_20k_voc12aug/ann_r50-d8_512x512_20k_voc12aug_20200617_222246-dfcb1c62.pth) | [log](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/ann/ann_r50-d8_512x512_20k_voc12aug/ann_r50-d8_512x512_20k_voc12aug_20200617_222246.log.json) |
|
||||
| ANN | R-101-D8 | 512x512 | 20000 | 9.5 | 13.94 | 77.47 | 78.70 | [model](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/ann/ann_r101-d8_512x512_20k_voc12aug/ann_r101-d8_512x512_20k_voc12aug_20200617_222246-2fad0042.pth) | [log](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/ann/ann_r101-d8_512x512_20k_voc12aug/ann_r101-d8_512x512_20k_voc12aug_20200617_222246.log.json) |
|
||||
| ANN | R-50-D8 | 512x512 | 40000 | - | - | 76.56 | 77.51 | [model](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/ann/ann_r50-d8_512x512_40k_voc12aug/ann_r50-d8_512x512_40k_voc12aug_20200613_231314-b5dac322.pth) | [log](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/ann/ann_r50-d8_512x512_40k_voc12aug/ann_r50-d8_512x512_40k_voc12aug_20200613_231314.log.json) |
|
||||
| ANN | R-101-D8 | 512x512 | 40000 | - | - | 76.70 | 78.06 | [model](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/ann/ann_r101-d8_512x512_40k_voc12aug/ann_r101-d8_512x512_40k_voc12aug_20200613_231314-bd205bbe.pth) | [log](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/ann/ann_r101-d8_512x512_40k_voc12aug/ann_r101-d8_512x512_40k_voc12aug_20200613_231314.log.json) |
|
2
configs/ann/ann_r101-d8_512x1024_40k_cityscapes.py
Normal file
2
configs/ann/ann_r101-d8_512x1024_40k_cityscapes.py
Normal file
@ -0,0 +1,2 @@
|
||||
_base_ = './ann_r50-d8_512x1024_40k_cityscapes.py'
|
||||
model = dict(pretrained='open-mmlab://resnet101_v1c', backbone=dict(depth=101))
|
2
configs/ann/ann_r101-d8_512x1024_80k_cityscapes.py
Normal file
2
configs/ann/ann_r101-d8_512x1024_80k_cityscapes.py
Normal file
@ -0,0 +1,2 @@
|
||||
_base_ = './ann_r50-d8_512x1024_80k_cityscapes.py'
|
||||
model = dict(pretrained='open-mmlab://resnet101_v1c', backbone=dict(depth=101))
|
2
configs/ann/ann_r101-d8_512x512_160k_ade20k.py
Normal file
2
configs/ann/ann_r101-d8_512x512_160k_ade20k.py
Normal file
@ -0,0 +1,2 @@
|
||||
_base_ = './ann_r50-d8_512x512_160k_ade20k.py'
|
||||
model = dict(pretrained='open-mmlab://resnet101_v1c', backbone=dict(depth=101))
|
2
configs/ann/ann_r101-d8_512x512_20k_voc12aug.py
Normal file
2
configs/ann/ann_r101-d8_512x512_20k_voc12aug.py
Normal file
@ -0,0 +1,2 @@
|
||||
_base_ = './ann_r50-d8_512x512_20k_voc12aug.py'
|
||||
model = dict(pretrained='open-mmlab://resnet101_v1c', backbone=dict(depth=101))
|
2
configs/ann/ann_r101-d8_512x512_40k_voc12aug.py
Normal file
2
configs/ann/ann_r101-d8_512x512_40k_voc12aug.py
Normal file
@ -0,0 +1,2 @@
|
||||
_base_ = './ann_r50-d8_512x512_40k_voc12aug.py'
|
||||
model = dict(pretrained='open-mmlab://resnet101_v1c', backbone=dict(depth=101))
|
2
configs/ann/ann_r101-d8_512x512_80k_ade20k.py
Normal file
2
configs/ann/ann_r101-d8_512x512_80k_ade20k.py
Normal file
@ -0,0 +1,2 @@
|
||||
_base_ = './ann_r50-d8_512x512_80k_ade20k.py'
|
||||
model = dict(pretrained='open-mmlab://resnet101_v1c', backbone=dict(depth=101))
|
2
configs/ann/ann_r101-d8_769x769_40k_cityscapes.py
Normal file
2
configs/ann/ann_r101-d8_769x769_40k_cityscapes.py
Normal file
@ -0,0 +1,2 @@
|
||||
_base_ = './ann_r50-d8_769x769_40k_cityscapes.py'
|
||||
model = dict(pretrained='open-mmlab://resnet101_v1c', backbone=dict(depth=101))
|
2
configs/ann/ann_r101-d8_769x769_80k_cityscapes.py
Normal file
2
configs/ann/ann_r101-d8_769x769_80k_cityscapes.py
Normal file
@ -0,0 +1,2 @@
|
||||
_base_ = './ann_r50-d8_769x769_80k_cityscapes.py'
|
||||
model = dict(pretrained='open-mmlab://resnet101_v1c', backbone=dict(depth=101))
|
4
configs/ann/ann_r50-d8_512x1024_40k_cityscapes.py
Normal file
4
configs/ann/ann_r50-d8_512x1024_40k_cityscapes.py
Normal file
@ -0,0 +1,4 @@
|
||||
_base_ = [
|
||||
'../_base_/models/ann_r50-d8.py', '../_base_/datasets/cityscapes.py',
|
||||
'../_base_/default_runtime.py', '../_base_/schedules/schedule_40k.py'
|
||||
]
|
4
configs/ann/ann_r50-d8_512x1024_80k_cityscapes.py
Normal file
4
configs/ann/ann_r50-d8_512x1024_80k_cityscapes.py
Normal file
@ -0,0 +1,4 @@
|
||||
_base_ = [
|
||||
'../_base_/models/ann_r50-d8.py', '../_base_/datasets/cityscapes.py',
|
||||
'../_base_/default_runtime.py', '../_base_/schedules/schedule_80k.py'
|
||||
]
|
6
configs/ann/ann_r50-d8_512x512_160k_ade20k.py
Normal file
6
configs/ann/ann_r50-d8_512x512_160k_ade20k.py
Normal file
@ -0,0 +1,6 @@
|
||||
_base_ = [
|
||||
'../_base_/models/ann_r50-d8.py', '../_base_/datasets/ade20k.py',
|
||||
'../_base_/default_runtime.py', '../_base_/schedules/schedule_160k.py'
|
||||
]
|
||||
model = dict(
|
||||
decode_head=dict(num_classes=150), auxiliary_head=dict(num_classes=150))
|
6
configs/ann/ann_r50-d8_512x512_20k_voc12aug.py
Normal file
6
configs/ann/ann_r50-d8_512x512_20k_voc12aug.py
Normal file
@ -0,0 +1,6 @@
|
||||
_base_ = [
|
||||
'../_base_/models/ann_r50-d8.py', '../_base_/datasets/pascal_voc12_aug.py',
|
||||
'../_base_/default_runtime.py', '../_base_/schedules/schedule_20k.py'
|
||||
]
|
||||
model = dict(
|
||||
decode_head=dict(num_classes=21), auxiliary_head=dict(num_classes=21))
|
6
configs/ann/ann_r50-d8_512x512_40k_voc12aug.py
Normal file
6
configs/ann/ann_r50-d8_512x512_40k_voc12aug.py
Normal file
@ -0,0 +1,6 @@
|
||||
_base_ = [
|
||||
'../_base_/models/ann_r50-d8.py', '../_base_/datasets/pascal_voc12_aug.py',
|
||||
'../_base_/default_runtime.py', '../_base_/schedules/schedule_40k.py'
|
||||
]
|
||||
model = dict(
|
||||
decode_head=dict(num_classes=21), auxiliary_head=dict(num_classes=21))
|
6
configs/ann/ann_r50-d8_512x512_80k_ade20k.py
Normal file
6
configs/ann/ann_r50-d8_512x512_80k_ade20k.py
Normal file
@ -0,0 +1,6 @@
|
||||
_base_ = [
|
||||
'../_base_/models/ann_r50-d8.py', '../_base_/datasets/ade20k.py',
|
||||
'../_base_/default_runtime.py', '../_base_/schedules/schedule_80k.py'
|
||||
]
|
||||
model = dict(
|
||||
decode_head=dict(num_classes=150), auxiliary_head=dict(num_classes=150))
|
9
configs/ann/ann_r50-d8_769x769_40k_cityscapes.py
Normal file
9
configs/ann/ann_r50-d8_769x769_40k_cityscapes.py
Normal file
@ -0,0 +1,9 @@
|
||||
_base_ = [
|
||||
'../_base_/models/ann_r50-d8.py',
|
||||
'../_base_/datasets/cityscapes_769x769.py', '../_base_/default_runtime.py',
|
||||
'../_base_/schedules/schedule_40k.py'
|
||||
]
|
||||
model = dict(
|
||||
decode_head=dict(align_corners=True),
|
||||
auxiliary_head=dict(align_corners=True))
|
||||
test_cfg = dict(mode='slide', crop_size=(769, 769), stride=(513, 513))
|
9
configs/ann/ann_r50-d8_769x769_80k_cityscapes.py
Normal file
9
configs/ann/ann_r50-d8_769x769_80k_cityscapes.py
Normal file
@ -0,0 +1,9 @@
|
||||
_base_ = [
|
||||
'../_base_/models/ann_r50-d8.py',
|
||||
'../_base_/datasets/cityscapes_769x769.py', '../_base_/default_runtime.py',
|
||||
'../_base_/schedules/schedule_80k.py'
|
||||
]
|
||||
model = dict(
|
||||
decode_head=dict(align_corners=True),
|
||||
auxiliary_head=dict(align_corners=True))
|
||||
test_cfg = dict(mode='slide', crop_size=(769, 769), stride=(513, 513))
|
41
configs/ccnet/README.md
Normal file
41
configs/ccnet/README.md
Normal file
@ -0,0 +1,41 @@
|
||||
# CCNet: Criss-Cross Attention for Semantic Segmentation
|
||||
|
||||
## Introduction
|
||||
```
|
||||
@article{huang2018ccnet,
|
||||
title={CCNet: Criss-Cross Attention for Semantic Segmentation},
|
||||
author={Huang, Zilong and Wang, Xinggang and Huang, Lichao and Huang, Chang and Wei, Yunchao and Liu, Wenyu},
|
||||
booktitle={ICCV},
|
||||
year={2019}
|
||||
}
|
||||
```
|
||||
|
||||
## Results and models
|
||||
|
||||
### Cityscapes
|
||||
| Method | Backbone | Crop Size | Lr schd | Mem (GB) | Inf time (fps) | mIoU | mIoU(ms+flip) | download |
|
||||
|--------|----------|-----------|--------:|----------|----------------|------:|--------------:|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| CCNet | R-50-D8 | 512x1024 | 40000 | 6 | 3.32 | 77.76 | 78.87 | [model](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/ccnet/ccnet_r50-d8_512x1024_40k_cityscapes/ccnet_r50-d8_512x1024_40k_cityscapes_20200616_142517-4123f401.pth) | [log](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/ccnet/ccnet_r50-d8_512x1024_40k_cityscapes/ccnet_r50-d8_512x1024_40k_cityscapes_20200616_142517.log.json) |
|
||||
| CCNet | R-101-D8 | 512x1024 | 40000 | 9.5 | 2.31 | 76.35 | 78.19 | [model](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/ccnet/ccnet_r101-d8_512x1024_40k_cityscapes/ccnet_r101-d8_512x1024_40k_cityscapes_20200616_142540-a3b84ba6.pth) | [log](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/ccnet/ccnet_r101-d8_512x1024_40k_cityscapes/ccnet_r101-d8_512x1024_40k_cityscapes_20200616_142540.log.json) |
|
||||
| CCNet | R-50-D8 | 769x769 | 40000 | 6.8 | 1.43 | 78.46 | 79.93 | [model](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/ccnet/ccnet_r50-d8_769x769_40k_cityscapes/ccnet_r50-d8_769x769_40k_cityscapes_20200616_145125-76d11884.pth) | [log](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/ccnet/ccnet_r50-d8_769x769_40k_cityscapes/ccnet_r50-d8_769x769_40k_cityscapes_20200616_145125.log.json) |
|
||||
| CCNet | R-101-D8 | 769x769 | 40000 | 10.7 | 1.01 | 76.94 | 78.62 | [model](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/ccnet/ccnet_r101-d8_769x769_40k_cityscapes/ccnet_r101-d8_769x769_40k_cityscapes_20200617_101428-4f57c8d0.pth) | [log](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/ccnet/ccnet_r101-d8_769x769_40k_cityscapes/ccnet_r101-d8_769x769_40k_cityscapes_20200617_101428.log.json) |
|
||||
| CCNet | R-50-D8 | 512x1024 | 80000 | - | - | 79.03 | 80.16 | [model](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/ccnet/ccnet_r50-d8_512x1024_80k_cityscapes/ccnet_r50-d8_512x1024_80k_cityscapes_20200617_010421-869a3423.pth) | [log](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/ccnet/ccnet_r50-d8_512x1024_80k_cityscapes/ccnet_r50-d8_512x1024_80k_cityscapes_20200617_010421.log.json) |
|
||||
| CCNet | R-101-D8 | 512x1024 | 80000 | - | - | 78.87 | 79.90 | [model](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/ccnet/ccnet_r101-d8_512x1024_80k_cityscapes/ccnet_r101-d8_512x1024_80k_cityscapes_20200617_203935-ffae8917.pth) | [log](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/ccnet/ccnet_r101-d8_512x1024_80k_cityscapes/ccnet_r101-d8_512x1024_80k_cityscapes_20200617_203935.log.json) |
|
||||
| CCNet | R-50-D8 | 769x769 | 80000 | - | - | 79.29 | 81.08 | [model](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/ccnet/ccnet_r50-d8_769x769_80k_cityscapes/ccnet_r50-d8_769x769_80k_cityscapes_20200617_010421-73eed8ca.pth) | [log](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/ccnet/ccnet_r50-d8_769x769_80k_cityscapes/ccnet_r50-d8_769x769_80k_cityscapes_20200617_010421.log.json) |
|
||||
| CCNet | R-101-D8 | 769x769 | 80000 | - | - | 79.45 | 80.66 | [model](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/ccnet/ccnet_r101-d8_769x769_80k_cityscapes/ccnet_r101-d8_769x769_80k_cityscapes_20200618_011502-ad3cd481.pth) | [log](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/ccnet/ccnet_r101-d8_769x769_80k_cityscapes/ccnet_r101-d8_769x769_80k_cityscapes_20200618_011502.log.json) |
|
||||
|
||||
### ADE20K
|
||||
| Method | Backbone | Crop Size | Lr schd | Mem (GB) | Inf time (fps) | mIoU | mIoU(ms+flip) | download |
|
||||
|--------|----------|-----------|--------:|----------|----------------|------:|--------------:|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| CCNet | R-50-D8 | 512x512 | 80000 | 8.8 | 20.89 | 41.78 | 42.98 | [model](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/ccnet/ccnet_r50-d8_512x512_80k_ade20k/ccnet_r50-d8_512x512_80k_ade20k_20200615_014848-aa37f61e.pth) | [log](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/ccnet/ccnet_r50-d8_512x512_80k_ade20k/ccnet_r50-d8_512x512_80k_ade20k_20200615_014848.log.json) |
|
||||
| CCNet | R-101-D8 | 512x512 | 80000 | 12.2 | 14.11 | 43.97 | 45.13 | [model](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/ccnet/ccnet_r101-d8_512x512_80k_ade20k/ccnet_r101-d8_512x512_80k_ade20k_20200615_014848-1f4929a3.pth) | [log](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/ccnet/ccnet_r101-d8_512x512_80k_ade20k/ccnet_r101-d8_512x512_80k_ade20k_20200615_014848.log.json) |
|
||||
| CCNet | R-50-D8 | 512x512 | 160000 | - | - | 42.08 | 43.13 | [model](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/ccnet/ccnet_r50-d8_512x512_160k_ade20k/ccnet_r50-d8_512x512_160k_ade20k_20200616_084435-7c97193b.pth) | [log](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/ccnet/ccnet_r50-d8_512x512_160k_ade20k/ccnet_r50-d8_512x512_160k_ade20k_20200616_084435.log.json) |
|
||||
| CCNet | R-101-D8 | 512x512 | 160000 | - | - | 43.71 | 45.04 | [model](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/ccnet/ccnet_r101-d8_512x512_160k_ade20k/ccnet_r101-d8_512x512_160k_ade20k_20200616_000644-e849e007.pth) | [log](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/ccnet/ccnet_r101-d8_512x512_160k_ade20k/ccnet_r101-d8_512x512_160k_ade20k_20200616_000644.log.json) |
|
||||
|
||||
### Pascal VOC 2012 + Aug
|
||||
| Method | Backbone | Crop Size | Lr schd | Mem (GB) | Inf time (fps) | mIoU | mIoU(ms+flip) | download |
|
||||
|--------|----------|-----------|--------:|----------|----------------|------:|--------------:|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| CCNet | R-50-D8 | 512x512 | 20000 | 6 | 20.45 | 76.17 | 77.51 | [model](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/ccnet/ccnet_r50-d8_512x512_20k_voc12aug/ccnet_r50-d8_512x512_20k_voc12aug_20200617_193212-fad81784.pth) | [log](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/ccnet/ccnet_r50-d8_512x512_20k_voc12aug/ccnet_r50-d8_512x512_20k_voc12aug_20200617_193212.log.json) |
|
||||
| CCNet | R-101-D8 | 512x512 | 20000 | 9.5 | 13.64 | 77.27 | 79.02 | [model](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/ccnet/ccnet_r101-d8_512x512_20k_voc12aug/ccnet_r101-d8_512x512_20k_voc12aug_20200617_193212-0007b61d.pth) | [log](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/ccnet/ccnet_r101-d8_512x512_20k_voc12aug/ccnet_r101-d8_512x512_20k_voc12aug_20200617_193212.log.json) |
|
||||
| CCNet | R-50-D8 | 512x512 | 40000 | - | - | 75.96 | 77.04 | [model](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/ccnet/ccnet_r50-d8_512x512_40k_voc12aug/ccnet_r50-d8_512x512_40k_voc12aug_20200613_232127-c2a15f02.pth) | [log](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/ccnet/ccnet_r50-d8_512x512_40k_voc12aug/ccnet_r50-d8_512x512_40k_voc12aug_20200613_232127.log.json) |
|
||||
| CCNet | R-101-D8 | 512x512 | 40000 | - | - | 77.87 | 78.90 | [model](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/ccnet/ccnet_r101-d8_512x512_40k_voc12aug/ccnet_r101-d8_512x512_40k_voc12aug_20200613_232127-c30da577.pth) | [log](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/ccnet/ccnet_r101-d8_512x512_40k_voc12aug/ccnet_r101-d8_512x512_40k_voc12aug_20200613_232127.log.json) |
|
2
configs/ccnet/ccnet_r101-d8_512x1024_40k_cityscapes.py
Normal file
2
configs/ccnet/ccnet_r101-d8_512x1024_40k_cityscapes.py
Normal file
@ -0,0 +1,2 @@
|
||||
_base_ = './ccnet_r50-d8_512x1024_40k_cityscapes.py'
|
||||
model = dict(pretrained='open-mmlab://resnet101_v1c', backbone=dict(depth=101))
|
2
configs/ccnet/ccnet_r101-d8_512x1024_80k_cityscapes.py
Normal file
2
configs/ccnet/ccnet_r101-d8_512x1024_80k_cityscapes.py
Normal file
@ -0,0 +1,2 @@
|
||||
_base_ = './ccnet_r50-d8_512x1024_80k_cityscapes.py'
|
||||
model = dict(pretrained='open-mmlab://resnet101_v1c', backbone=dict(depth=101))
|
2
configs/ccnet/ccnet_r101-d8_512x512_160k_ade20k.py
Normal file
2
configs/ccnet/ccnet_r101-d8_512x512_160k_ade20k.py
Normal file
@ -0,0 +1,2 @@
|
||||
_base_ = './ccnet_r50-d8_512x512_160k_ade20k.py'
|
||||
model = dict(pretrained='open-mmlab://resnet101_v1c', backbone=dict(depth=101))
|
2
configs/ccnet/ccnet_r101-d8_512x512_20k_voc12aug.py
Normal file
2
configs/ccnet/ccnet_r101-d8_512x512_20k_voc12aug.py
Normal file
@ -0,0 +1,2 @@
|
||||
_base_ = './ccnet_r50-d8_512x512_20k_voc12aug.py'
|
||||
model = dict(pretrained='open-mmlab://resnet101_v1c', backbone=dict(depth=101))
|
2
configs/ccnet/ccnet_r101-d8_512x512_40k_voc12aug.py
Normal file
2
configs/ccnet/ccnet_r101-d8_512x512_40k_voc12aug.py
Normal file
@ -0,0 +1,2 @@
|
||||
_base_ = './ccnet_r50-d8_512x512_40k_voc12aug.py'
|
||||
model = dict(pretrained='open-mmlab://resnet101_v1c', backbone=dict(depth=101))
|
2
configs/ccnet/ccnet_r101-d8_512x512_80k_ade20k.py
Normal file
2
configs/ccnet/ccnet_r101-d8_512x512_80k_ade20k.py
Normal file
@ -0,0 +1,2 @@
|
||||
_base_ = './ccnet_r50-d8_512x512_80k_ade20k.py'
|
||||
model = dict(pretrained='open-mmlab://resnet101_v1c', backbone=dict(depth=101))
|
2
configs/ccnet/ccnet_r101-d8_769x769_40k_cityscapes.py
Normal file
2
configs/ccnet/ccnet_r101-d8_769x769_40k_cityscapes.py
Normal file
@ -0,0 +1,2 @@
|
||||
_base_ = './ccnet_r50-d8_769x769_40k_cityscapes.py'
|
||||
model = dict(pretrained='open-mmlab://resnet101_v1c', backbone=dict(depth=101))
|
2
configs/ccnet/ccnet_r101-d8_769x769_80k_cityscapes.py
Normal file
2
configs/ccnet/ccnet_r101-d8_769x769_80k_cityscapes.py
Normal file
@ -0,0 +1,2 @@
|
||||
_base_ = './ccnet_r50-d8_769x769_80k_cityscapes.py'
|
||||
model = dict(pretrained='open-mmlab://resnet101_v1c', backbone=dict(depth=101))
|
4
configs/ccnet/ccnet_r50-d8_512x1024_40k_cityscapes.py
Normal file
4
configs/ccnet/ccnet_r50-d8_512x1024_40k_cityscapes.py
Normal file
@ -0,0 +1,4 @@
|
||||
_base_ = [
|
||||
'../_base_/models/ccnet_r50-d8.py', '../_base_/datasets/cityscapes.py',
|
||||
'../_base_/default_runtime.py', '../_base_/schedules/schedule_40k.py'
|
||||
]
|
4
configs/ccnet/ccnet_r50-d8_512x1024_80k_cityscapes.py
Normal file
4
configs/ccnet/ccnet_r50-d8_512x1024_80k_cityscapes.py
Normal file
@ -0,0 +1,4 @@
|
||||
_base_ = [
|
||||
'../_base_/models/ccnet_r50-d8.py', '../_base_/datasets/cityscapes.py',
|
||||
'../_base_/default_runtime.py', '../_base_/schedules/schedule_80k.py'
|
||||
]
|
6
configs/ccnet/ccnet_r50-d8_512x512_160k_ade20k.py
Normal file
6
configs/ccnet/ccnet_r50-d8_512x512_160k_ade20k.py
Normal file
@ -0,0 +1,6 @@
|
||||
_base_ = [
|
||||
'../_base_/models/ccnet_r50-d8.py', '../_base_/datasets/ade20k.py',
|
||||
'../_base_/default_runtime.py', '../_base_/schedules/schedule_160k.py'
|
||||
]
|
||||
model = dict(
|
||||
decode_head=dict(num_classes=150), auxiliary_head=dict(num_classes=150))
|
7
configs/ccnet/ccnet_r50-d8_512x512_20k_voc12aug.py
Normal file
7
configs/ccnet/ccnet_r50-d8_512x512_20k_voc12aug.py
Normal file
@ -0,0 +1,7 @@
|
||||
_base_ = [
|
||||
'../_base_/models/ccnet_r50-d8.py',
|
||||
'../_base_/datasets/pascal_voc12_aug.py', '../_base_/default_runtime.py',
|
||||
'../_base_/schedules/schedule_20k.py'
|
||||
]
|
||||
model = dict(
|
||||
decode_head=dict(num_classes=21), auxiliary_head=dict(num_classes=21))
|
7
configs/ccnet/ccnet_r50-d8_512x512_40k_voc12aug.py
Normal file
7
configs/ccnet/ccnet_r50-d8_512x512_40k_voc12aug.py
Normal file
@ -0,0 +1,7 @@
|
||||
_base_ = [
|
||||
'../_base_/models/ccnet_r50-d8.py',
|
||||
'../_base_/datasets/pascal_voc12_aug.py', '../_base_/default_runtime.py',
|
||||
'../_base_/schedules/schedule_40k.py'
|
||||
]
|
||||
model = dict(
|
||||
decode_head=dict(num_classes=21), auxiliary_head=dict(num_classes=21))
|
6
configs/ccnet/ccnet_r50-d8_512x512_80k_ade20k.py
Normal file
6
configs/ccnet/ccnet_r50-d8_512x512_80k_ade20k.py
Normal file
@ -0,0 +1,6 @@
|
||||
_base_ = [
|
||||
'../_base_/models/ccnet_r50-d8.py', '../_base_/datasets/ade20k.py',
|
||||
'../_base_/default_runtime.py', '../_base_/schedules/schedule_80k.py'
|
||||
]
|
||||
model = dict(
|
||||
decode_head=dict(num_classes=150), auxiliary_head=dict(num_classes=150))
|
9
configs/ccnet/ccnet_r50-d8_769x769_40k_cityscapes.py
Normal file
9
configs/ccnet/ccnet_r50-d8_769x769_40k_cityscapes.py
Normal file
@ -0,0 +1,9 @@
|
||||
_base_ = [
|
||||
'../_base_/models/ccnet_r50-d8.py',
|
||||
'../_base_/datasets/cityscapes_769x769.py', '../_base_/default_runtime.py',
|
||||
'../_base_/schedules/schedule_40k.py'
|
||||
]
|
||||
model = dict(
|
||||
decode_head=dict(align_corners=True),
|
||||
auxiliary_head=dict(align_corners=True))
|
||||
test_cfg = dict(mode='slide', crop_size=(769, 769), stride=(513, 513))
|
9
configs/ccnet/ccnet_r50-d8_769x769_80k_cityscapes.py
Normal file
9
configs/ccnet/ccnet_r50-d8_769x769_80k_cityscapes.py
Normal file
@ -0,0 +1,9 @@
|
||||
_base_ = [
|
||||
'../_base_/models/ccnet_r50-d8.py',
|
||||
'../_base_/datasets/cityscapes_769x769.py', '../_base_/default_runtime.py',
|
||||
'../_base_/schedules/schedule_80k.py'
|
||||
]
|
||||
model = dict(
|
||||
decode_head=dict(align_corners=True),
|
||||
auxiliary_head=dict(align_corners=True))
|
||||
test_cfg = dict(mode='slide', crop_size=(769, 769), stride=(513, 513))
|
41
configs/danet/README.md
Normal file
41
configs/danet/README.md
Normal file
@ -0,0 +1,41 @@
|
||||
# Dual Attention Network for Scene Segmentation
|
||||
|
||||
## Introduction
|
||||
```
|
||||
@article{fu2018dual,
|
||||
title={Dual Attention Network for Scene Segmentation},
|
||||
author={Jun Fu, Jing Liu, Haijie Tian, Yong Li, Yongjun Bao, Zhiwei Fang,and Hanqing Lu},
|
||||
booktitle={The IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
|
||||
year={2019}
|
||||
}
|
||||
```
|
||||
|
||||
## Results and models
|
||||
|
||||
### Cityscapes
|
||||
| Method | Backbone | Crop Size | Lr schd | Mem (GB) | Inf time (fps) | mIoU | mIoU(ms+flip) | download |
|
||||
|--------|----------|-----------|--------:|----------|----------------|------:|---------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| DANet | R-50-D8 | 512x1024 | 40000 | 7.4 | 2.66 | 78.74 | - | [model](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/danet/danet_r50-d8_512x1024_40k_cityscapes/danet_r50-d8_512x1024_40k_cityscapes_20200605_191324-c0dbfa5f.pth) | [log](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/danet/danet_r50-d8_512x1024_40k_cityscapes/danet_r50-d8_512x1024_40k_cityscapes_20200605_191324.log.json) |
|
||||
| DANet | R-101-D8 | 512x1024 | 40000 | 10.9 | 1.99 | 80.52 | - | [model](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/danet/danet_r101-d8_512x1024_40k_cityscapes/danet_r101-d8_512x1024_40k_cityscapes_20200605_200831-c57a7157.pth) | [log](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/danet/danet_r101-d8_512x1024_40k_cityscapes/danet_r101-d8_512x1024_40k_cityscapes_20200605_200831.log.json) |
|
||||
| DANet | R-50-D8 | 769x769 | 40000 | 8.8 | 1.56 | 78.88 | 80.62 | [model](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/danet/danet_r50-d8_769x769_40k_cityscapes/danet_r50-d8_769x769_40k_cityscapes_20200530_025703-76681c60.pth) | [log](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/danet/danet_r50-d8_769x769_40k_cityscapes/danet_r50-d8_769x769_40k_cityscapes_20200530_025703.log.json) |
|
||||
| DANet | R-101-D8 | 769x769 | 40000 | 12.8 | 1.07 | 79.88 | 81.47 | [model](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/danet/danet_r101-d8_769x769_40k_cityscapes/danet_r101-d8_769x769_40k_cityscapes_20200530_025717-dcb7fd4e.pth) | [log](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/danet/danet_r101-d8_769x769_40k_cityscapes/danet_r101-d8_769x769_40k_cityscapes_20200530_025717.log.json) |
|
||||
| DANet | R-50-D8 | 512x1024 | 80000 | - | - | 79.34 | - | [model](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/danet/danet_r50-d8_512x1024_80k_cityscapes/danet_r50-d8_512x1024_80k_cityscapes_20200607_133029-2bfa2293.pth) | [log](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/danet/danet_r50-d8_512x1024_80k_cityscapes/danet_r50-d8_512x1024_80k_cityscapes_20200607_133029.log.json) |
|
||||
| DANet | R-101-D8 | 512x1024 | 80000 | - | - | 80.41 | - | [model](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/danet/danet_r101-d8_512x1024_80k_cityscapes/danet_r101-d8_512x1024_80k_cityscapes_20200607_132918-955e6350.pth) | [log](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/danet/danet_r101-d8_512x1024_80k_cityscapes/danet_r101-d8_512x1024_80k_cityscapes_20200607_132918.log.json) |
|
||||
| DANet | R-50-D8 | 769x769 | 80000 | - | - | 79.27 | 80.96 | [model](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/danet/danet_r50-d8_769x769_80k_cityscapes/danet_r50-d8_769x769_80k_cityscapes_20200607_132954-495689b4.pth) | [log](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/danet/danet_r50-d8_769x769_80k_cityscapes/danet_r50-d8_769x769_80k_cityscapes_20200607_132954.log.json) |
|
||||
| DANet | R-101-D8 | 769x769 | 80000 | - | - | 80.47 | 82.02 | [model](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/danet/danet_r101-d8_769x769_80k_cityscapes/danet_r101-d8_769x769_80k_cityscapes_20200607_132918-f3a929e7.pth) | [log](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/danet/danet_r101-d8_769x769_80k_cityscapes/danet_r101-d8_769x769_80k_cityscapes_20200607_132918.log.json) |
|
||||
|
||||
### ADE20K
|
||||
| Method | Backbone | Crop Size | Lr schd | Mem (GB) | Inf time (fps) | mIoU | mIoU(ms+flip) | download |
|
||||
|--------|----------|-----------|--------:|----------|----------------|------:|--------------:|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| DANet | R-50-D8 | 512x512 | 80000 | 11.5 | 21.20 | 41.66 | 42.90 | [model](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/danet/danet_r50-d8_512x512_80k_ade20k/danet_r50-d8_512x512_80k_ade20k_20200615_015125-edb18e08.pth) | [log](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/danet/danet_r50-d8_512x512_80k_ade20k/danet_r50-d8_512x512_80k_ade20k_20200615_015125.log.json) |
|
||||
| DANet | R-101-D8 | 512x512 | 80000 | 15 | 14.18 | 43.64 | 45.19 | [model](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/danet/danet_r101-d8_512x512_80k_ade20k/danet_r101-d8_512x512_80k_ade20k_20200615_015126-d0357c73.pth) | [log](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/danet/danet_r101-d8_512x512_80k_ade20k/danet_r101-d8_512x512_80k_ade20k_20200615_015126.log.json) |
|
||||
| DANet | R-50-D8 | 512x512 | 160000 | - | - | 42.45 | 43.25 | [model](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/danet/danet_r50-d8_512x512_160k_ade20k/danet_r50-d8_512x512_160k_ade20k_20200616_082340-9cb35dcd.pth) | [log](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/danet/danet_r50-d8_512x512_160k_ade20k/danet_r50-d8_512x512_160k_ade20k_20200616_082340.log.json) |
|
||||
| DANet | R-101-D8 | 512x512 | 160000 | - | - | 44.17 | 45.02 | [model](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/danet/danet_r101-d8_512x512_160k_ade20k/danet_r101-d8_512x512_160k_ade20k_20200616_082348-23bf12f9.pth) | [log](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/danet/danet_r101-d8_512x512_160k_ade20k/danet_r101-d8_512x512_160k_ade20k_20200616_082348.log.json) |
|
||||
|
||||
### Pascal VOC 2012 + Aug
|
||||
| Method | Backbone | Crop Size | Lr schd | Mem (GB) | Inf time (fps) | mIoU | mIoU(ms+flip) | download |
|
||||
|--------|----------|-----------|--------:|----------|----------------|------:|--------------:|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| DANet | R-50-D8 | 512x512 | 20000 | 6.5 | 20.94 | 74.45 | 75.69 | [model](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/danet/danet_r50-d8_512x512_20k_voc12aug/danet_r50-d8_512x512_20k_voc12aug_20200618_070026-9e9e3ab3.pth) | [log](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/danet/danet_r50-d8_512x512_20k_voc12aug/danet_r50-d8_512x512_20k_voc12aug_20200618_070026.log.json) |
|
||||
| DANet | R-101-D8 | 512x512 | 20000 | 9.9 | 13.76 | 76.02 | 77.23 | [model](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/danet/danet_r101-d8_512x512_20k_voc12aug/danet_r101-d8_512x512_20k_voc12aug_20200618_070026-d48d23b2.pth) | [log](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/danet/danet_r101-d8_512x512_20k_voc12aug/danet_r101-d8_512x512_20k_voc12aug_20200618_070026.log.json) |
|
||||
| DANet | R-50-D8 | 512x512 | 40000 | - | - | 76.37 | 77.29 | [model](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/danet/danet_r50-d8_512x512_40k_voc12aug/danet_r50-d8_512x512_40k_voc12aug_20200613_235526-426e3a64.pth) | [log](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/danet/danet_r50-d8_512x512_40k_voc12aug/danet_r50-d8_512x512_40k_voc12aug_20200613_235526.log.json) |
|
||||
| DANet | R-101-D8 | 512x512 | 40000 | - | - | 76.51 | 77.32 | [model](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/danet/danet_r101-d8_512x512_40k_voc12aug/danet_r101-d8_512x512_40k_voc12aug_20200613_223031-788e232a.pth) | [log](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/danet/danet_r101-d8_512x512_40k_voc12aug/danet_r101-d8_512x512_40k_voc12aug_20200613_223031.log.json) |
|
2
configs/danet/danet_r101-d8_512x1024_40k_cityscapes.py
Normal file
2
configs/danet/danet_r101-d8_512x1024_40k_cityscapes.py
Normal file
@ -0,0 +1,2 @@
|
||||
_base_ = './danet_r50-d8_512x1024_40k_cityscapes.py'
|
||||
model = dict(pretrained='open-mmlab://resnet101_v1c', backbone=dict(depth=101))
|
2
configs/danet/danet_r101-d8_512x1024_80k_cityscapes.py
Normal file
2
configs/danet/danet_r101-d8_512x1024_80k_cityscapes.py
Normal file
@ -0,0 +1,2 @@
|
||||
_base_ = './danet_r50-d8_512x1024_80k_cityscapes.py'
|
||||
model = dict(pretrained='open-mmlab://resnet101_v1c', backbone=dict(depth=101))
|
2
configs/danet/danet_r101-d8_512x512_160k_ade20k.py
Normal file
2
configs/danet/danet_r101-d8_512x512_160k_ade20k.py
Normal file
@ -0,0 +1,2 @@
|
||||
_base_ = './danet_r50-d8_512x512_160k_ade20k.py'
|
||||
model = dict(pretrained='open-mmlab://resnet101_v1c', backbone=dict(depth=101))
|
2
configs/danet/danet_r101-d8_512x512_20k_voc12aug.py
Normal file
2
configs/danet/danet_r101-d8_512x512_20k_voc12aug.py
Normal file
@ -0,0 +1,2 @@
|
||||
_base_ = './danet_r50-d8_512x512_20k_voc12aug.py'
|
||||
model = dict(pretrained='open-mmlab://resnet101_v1c', backbone=dict(depth=101))
|
2
configs/danet/danet_r101-d8_512x512_40k_voc12aug.py
Normal file
2
configs/danet/danet_r101-d8_512x512_40k_voc12aug.py
Normal file
@ -0,0 +1,2 @@
|
||||
_base_ = './danet_r50-d8_512x512_40k_voc12aug.py'
|
||||
model = dict(pretrained='open-mmlab://resnet101_v1c', backbone=dict(depth=101))
|
2
configs/danet/danet_r101-d8_512x512_80k_ade20k.py
Normal file
2
configs/danet/danet_r101-d8_512x512_80k_ade20k.py
Normal file
@ -0,0 +1,2 @@
|
||||
_base_ = './danet_r50-d8_512x512_80k_ade20k.py'
|
||||
model = dict(pretrained='open-mmlab://resnet101_v1c', backbone=dict(depth=101))
|
2
configs/danet/danet_r101-d8_769x769_40k_cityscapes.py
Normal file
2
configs/danet/danet_r101-d8_769x769_40k_cityscapes.py
Normal file
@ -0,0 +1,2 @@
|
||||
_base_ = './danet_r50-d8_769x769_40k_cityscapes.py'
|
||||
model = dict(pretrained='open-mmlab://resnet101_v1c', backbone=dict(depth=101))
|
2
configs/danet/danet_r101-d8_769x769_80k_cityscapes.py
Normal file
2
configs/danet/danet_r101-d8_769x769_80k_cityscapes.py
Normal file
@ -0,0 +1,2 @@
|
||||
_base_ = './danet_r50-d8_769x769_80k_cityscapes.py'
|
||||
model = dict(pretrained='open-mmlab://resnet101_v1c', backbone=dict(depth=101))
|
4
configs/danet/danet_r50-d8_512x1024_40k_cityscapes.py
Normal file
4
configs/danet/danet_r50-d8_512x1024_40k_cityscapes.py
Normal file
@ -0,0 +1,4 @@
|
||||
_base_ = [
|
||||
'../_base_/models/danet_r50-d8.py', '../_base_/datasets/cityscapes.py',
|
||||
'../_base_/default_runtime.py', '../_base_/schedules/schedule_40k.py'
|
||||
]
|
4
configs/danet/danet_r50-d8_512x1024_80k_cityscapes.py
Normal file
4
configs/danet/danet_r50-d8_512x1024_80k_cityscapes.py
Normal file
@ -0,0 +1,4 @@
|
||||
_base_ = [
|
||||
'../_base_/models/danet_r50-d8.py', '../_base_/datasets/cityscapes.py',
|
||||
'../_base_/default_runtime.py', '../_base_/schedules/schedule_80k.py'
|
||||
]
|
6
configs/danet/danet_r50-d8_512x512_160k_ade20k.py
Normal file
6
configs/danet/danet_r50-d8_512x512_160k_ade20k.py
Normal file
@ -0,0 +1,6 @@
|
||||
_base_ = [
|
||||
'../_base_/models/danet_r50-d8.py', '../_base_/datasets/ade20k.py',
|
||||
'../_base_/default_runtime.py', '../_base_/schedules/schedule_160k.py'
|
||||
]
|
||||
model = dict(
|
||||
decode_head=dict(num_classes=150), auxiliary_head=dict(num_classes=150))
|
7
configs/danet/danet_r50-d8_512x512_20k_voc12aug.py
Normal file
7
configs/danet/danet_r50-d8_512x512_20k_voc12aug.py
Normal file
@ -0,0 +1,7 @@
|
||||
_base_ = [
|
||||
'../_base_/models/danet_r50-d8.py',
|
||||
'../_base_/datasets/pascal_voc12_aug.py', '../_base_/default_runtime.py',
|
||||
'../_base_/schedules/schedule_20k.py'
|
||||
]
|
||||
model = dict(
|
||||
decode_head=dict(num_classes=21), auxiliary_head=dict(num_classes=21))
|
7
configs/danet/danet_r50-d8_512x512_40k_voc12aug.py
Normal file
7
configs/danet/danet_r50-d8_512x512_40k_voc12aug.py
Normal file
@ -0,0 +1,7 @@
|
||||
_base_ = [
|
||||
'../_base_/models/danet_r50-d8.py',
|
||||
'../_base_/datasets/pascal_voc12_aug.py', '../_base_/default_runtime.py',
|
||||
'../_base_/schedules/schedule_40k.py'
|
||||
]
|
||||
model = dict(
|
||||
decode_head=dict(num_classes=21), auxiliary_head=dict(num_classes=21))
|
6
configs/danet/danet_r50-d8_512x512_80k_ade20k.py
Normal file
6
configs/danet/danet_r50-d8_512x512_80k_ade20k.py
Normal file
@ -0,0 +1,6 @@
|
||||
_base_ = [
|
||||
'../_base_/models/danet_r50-d8.py', '../_base_/datasets/ade20k.py',
|
||||
'../_base_/default_runtime.py', '../_base_/schedules/schedule_80k.py'
|
||||
]
|
||||
model = dict(
|
||||
decode_head=dict(num_classes=150), auxiliary_head=dict(num_classes=150))
|
9
configs/danet/danet_r50-d8_769x769_40k_cityscapes.py
Normal file
9
configs/danet/danet_r50-d8_769x769_40k_cityscapes.py
Normal file
@ -0,0 +1,9 @@
|
||||
_base_ = [
|
||||
'../_base_/models/danet_r50-d8.py',
|
||||
'../_base_/datasets/cityscapes_769x769.py', '../_base_/default_runtime.py',
|
||||
'../_base_/schedules/schedule_40k.py'
|
||||
]
|
||||
model = dict(
|
||||
decode_head=dict(align_corners=True),
|
||||
auxiliary_head=dict(align_corners=True))
|
||||
test_cfg = dict(mode='slide', crop_size=(769, 769), stride=(513, 513))
|
9
configs/danet/danet_r50-d8_769x769_80k_cityscapes.py
Normal file
9
configs/danet/danet_r50-d8_769x769_80k_cityscapes.py
Normal file
@ -0,0 +1,9 @@
|
||||
_base_ = [
|
||||
'../_base_/models/danet_r50-d8.py',
|
||||
'../_base_/datasets/cityscapes_769x769.py', '../_base_/default_runtime.py',
|
||||
'../_base_/schedules/schedule_80k.py'
|
||||
]
|
||||
model = dict(
|
||||
decode_head=dict(align_corners=True),
|
||||
auxiliary_head=dict(align_corners=True))
|
||||
test_cfg = dict(mode='slide', crop_size=(769, 769), stride=(513, 513))
|
43
configs/deeplabv3/README.md
Normal file
43
configs/deeplabv3/README.md
Normal file
@ -0,0 +1,43 @@
|
||||
# Rethinking atrous convolution for semantic image segmentation
|
||||
|
||||
## Introduction
|
||||
```
|
||||
@article{chen2017rethinking,
|
||||
title={Rethinking atrous convolution for semantic image segmentation},
|
||||
author={Chen, Liang-Chieh and Papandreou, George and Schroff, Florian and Adam, Hartwig},
|
||||
journal={arXiv preprint arXiv:1706.05587},
|
||||
year={2017}
|
||||
}
|
||||
```
|
||||
|
||||
## Results and models
|
||||
|
||||
Note: `D-8` here corresponding to the output stride 8 setting for DeepLab series.
|
||||
|
||||
### Cityscapes
|
||||
| Method | Backbone | Crop Size | Lr schd | Mem (GB) | Inf time (fps) | mIoU | mIoU(ms+flip) | download |
|
||||
|-----------|----------|-----------|--------:|----------|----------------|------:|--------------:|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| DeepLabV3 | R-50-D8 | 512x1024 | 40000 | 6.1 | 2.57 | 79.09 | 80.45 | [model](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/deeplabv3/deeplabv3_r50-d8_512x1024_40k_cityscapes/deeplabv3_r50-d8_512x1024_40k_cityscapes_20200605_022449-acadc2f8.pth) | [log](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/deeplabv3/deeplabv3_r50-d8_512x1024_40k_cityscapes/deeplabv3_r50-d8_512x1024_40k_cityscapes_20200605_022449.log.json) |
|
||||
| DeepLabV3 | R-101-D8 | 512x1024 | 40000 | 9.6 | 1.92 | 77.12 | 79.61 | [model](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/deeplabv3/deeplabv3_r101-d8_512x1024_40k_cityscapes/deeplabv3_r101-d8_512x1024_40k_cityscapes_20200605_012241-7fd3f799.pth) | [log](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/deeplabv3/deeplabv3_r101-d8_512x1024_40k_cityscapes/deeplabv3_r101-d8_512x1024_40k_cityscapes_20200605_012241.log.json) |
|
||||
| DeepLabV3 | R-50-D8 | 769x769 | 40000 | 6.9 | 1.11 | 78.58 | 79.89 | [model](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/deeplabv3/deeplabv3_r50-d8_769x769_40k_cityscapes/deeplabv3_r50-d8_769x769_40k_cityscapes_20200606_113723-7eda553c.pth) | [log](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/deeplabv3/deeplabv3_r50-d8_769x769_40k_cityscapes/deeplabv3_r50-d8_769x769_40k_cityscapes_20200606_113723.log.json) |
|
||||
| DeepLabV3 | R-101-D8 | 769x769 | 40000 | 10.9 | 0.83 | 79.27 | 80.11 | [model](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/deeplabv3/deeplabv3_r101-d8_769x769_40k_cityscapes/deeplabv3_r101-d8_769x769_40k_cityscapes_20200606_113809-c64f889f.pth) | [log](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/deeplabv3/deeplabv3_r101-d8_769x769_40k_cityscapes/deeplabv3_r101-d8_769x769_40k_cityscapes_20200606_113809.log.json) |
|
||||
| DeepLabV3 | R-50-D8 | 512x1024 | 80000 | - | - | 79.32 | 80.57 | [model](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/deeplabv3/deeplabv3_r50-d8_512x1024_80k_cityscapes/deeplabv3_r50-d8_512x1024_80k_cityscapes_20200606_113404-b92cfdd4.pth) | [log](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/deeplabv3/deeplabv3_r50-d8_512x1024_80k_cityscapes/deeplabv3_r50-d8_512x1024_80k_cityscapes_20200606_113404.log.json) |
|
||||
| DeepLabV3 | R-101-D8 | 512x1024 | 80000 | - | - | 80.20 | 81.21 | [model](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/deeplabv3/deeplabv3_r101-d8_512x1024_80k_cityscapes/deeplabv3_r101-d8_512x1024_80k_cityscapes_20200606_113503-9e428899.pth) | [log](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/deeplabv3/deeplabv3_r101-d8_512x1024_80k_cityscapes/deeplabv3_r101-d8_512x1024_80k_cityscapes_20200606_113503.log.json) |
|
||||
| DeepLabV3 | R-50-D8 | 769x769 | 80000 | - | - | 79.89 | 81.06 | [model](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/deeplabv3/deeplabv3_r50-d8_769x769_80k_cityscapes/deeplabv3_r50-d8_769x769_80k_cityscapes_20200606_221338-788d6228.pth) | [log](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/deeplabv3/deeplabv3_r50-d8_769x769_80k_cityscapes/deeplabv3_r50-d8_769x769_80k_cityscapes_20200606_221338.log.json) |
|
||||
| DeepLabV3 | R-101-D8 | 769x769 | 80000 | - | - | 79.67 | 80.81 | [model](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/deeplabv3/deeplabv3_r101-d8_769x769_80k_cityscapes/deeplabv3_r101-d8_769x769_80k_cityscapes_20200607_013353-60e95418.pth) | [log](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/deeplabv3/deeplabv3_r101-d8_769x769_80k_cityscapes/deeplabv3_r101-d8_769x769_80k_cityscapes_20200607_013353.log.json) |
|
||||
|
||||
### ADE20K
|
||||
| Method | Backbone | Crop Size | Lr schd | Mem (GB) | Inf time (fps) | mIoU | mIoU(ms+flip) | download |
|
||||
|-----------|----------|-----------|--------:|----------|----------------|------:|--------------:|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| DeepLabV3 | R-50-D8 | 512x512 | 80000 | 8.9 | 14.76 | 42.42 | 43.28 | [model](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/deeplabv3/deeplabv3_r50-d8_512x512_80k_ade20k/deeplabv3_r50-d8_512x512_80k_ade20k_20200614_185028-0bb3f844.pth) | [log](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/deeplabv3/deeplabv3_r50-d8_512x512_80k_ade20k/deeplabv3_r50-d8_512x512_80k_ade20k_20200614_185028.log.json) |
|
||||
| DeepLabV3 | R-101-D8 | 512x512 | 80000 | 12.4 | 10.14 | 44.08 | 45.19 | [model](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/deeplabv3/deeplabv3_r101-d8_512x512_80k_ade20k/deeplabv3_r101-d8_512x512_80k_ade20k_20200615_021256-d89c7fa4.pth) | [log](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/deeplabv3/deeplabv3_r101-d8_512x512_80k_ade20k/deeplabv3_r101-d8_512x512_80k_ade20k_20200615_021256.log.json) |
|
||||
| DeepLabV3 | R-50-D8 | 512x512 | 160000 | - | - | 42.66 | 44.09 | [model](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/deeplabv3/deeplabv3_r50-d8_512x512_160k_ade20k/deeplabv3_r50-d8_512x512_160k_ade20k_20200615_123227-5d0ee427.pth) | [log](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/deeplabv3/deeplabv3_r50-d8_512x512_160k_ade20k/deeplabv3_r50-d8_512x512_160k_ade20k_20200615_123227.log.json) |
|
||||
| DeepLabV3 | R-101-D8 | 512x512 | 160000 | - | - | 45.00 | 46.66 | [model](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/deeplabv3/deeplabv3_r101-d8_512x512_160k_ade20k/deeplabv3_r101-d8_512x512_160k_ade20k_20200615_105816-b1f72b3b.pth) | [log](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/deeplabv3/deeplabv3_r101-d8_512x512_160k_ade20k/deeplabv3_r101-d8_512x512_160k_ade20k_20200615_105816.log.json) |
|
||||
|
||||
### Pascal VOC 2012 + Aug
|
||||
| Method | Backbone | Crop Size | Lr schd | Mem (GB) | Inf time (fps) | mIoU | mIoU(ms+flip) | download |
|
||||
|-----------|----------|-----------|--------:|----------|----------------|------:|--------------:|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| DeepLabV3 | R-50-D8 | 512x512 | 20000 | 6.1 | 13.88 | 76.17 | 77.42 | [model](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/deeplabv3/deeplabv3_r50-d8_512x512_20k_voc12aug/deeplabv3_r50-d8_512x512_20k_voc12aug_20200617_010906-596905ef.pth) | [log](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/deeplabv3/deeplabv3_r50-d8_512x512_20k_voc12aug/deeplabv3_r50-d8_512x512_20k_voc12aug_20200617_010906.log.json) |
|
||||
| DeepLabV3 | R-101-D8 | 512x512 | 20000 | 9.6 | 9.81 | 78.70 | 79.95 | [model](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/deeplabv3/deeplabv3_r101-d8_512x512_20k_voc12aug/deeplabv3_r101-d8_512x512_20k_voc12aug_20200617_010932-8d13832f.pth) | [log](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/deeplabv3/deeplabv3_r101-d8_512x512_20k_voc12aug/deeplabv3_r101-d8_512x512_20k_voc12aug_20200617_010932.log.json) |
|
||||
| DeepLabV3 | R-50-D8 | 512x512 | 40000 | - | - | 77.68 | 78.78 | [model](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/deeplabv3/deeplabv3_r50-d8_512x512_40k_voc12aug/deeplabv3_r50-d8_512x512_40k_voc12aug_20200613_161546-2ae96e7e.pth) | [log](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/deeplabv3/deeplabv3_r50-d8_512x512_40k_voc12aug/deeplabv3_r50-d8_512x512_40k_voc12aug_20200613_161546.log.json) |
|
||||
| DeepLabV3 | R-101-D8 | 512x512 | 40000 | - | - | 77.92 | 79.18 | [model](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/deeplabv3/deeplabv3_r101-d8_512x512_40k_voc12aug/deeplabv3_r101-d8_512x512_40k_voc12aug_20200613_161432-0017d784.pth) | [log](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/deeplabv3/deeplabv3_r101-d8_512x512_40k_voc12aug/deeplabv3_r101-d8_512x512_40k_voc12aug_20200613_161432.log.json) |
|
@ -0,0 +1,2 @@
|
||||
_base_ = './deeplabv3_r50-d8_512x1024_40k_cityscapes.py'
|
||||
model = dict(pretrained='open-mmlab://resnet101_v1c', backbone=dict(depth=101))
|
@ -0,0 +1,2 @@
|
||||
_base_ = './deeplabv3_r50-d8_512x1024_80k_cityscapes.py'
|
||||
model = dict(pretrained='open-mmlab://resnet101_v1c', backbone=dict(depth=101))
|
@ -0,0 +1,2 @@
|
||||
_base_ = './deeplabv3_r50-d8_512x512_160k_ade20k.py'
|
||||
model = dict(pretrained='open-mmlab://resnet101_v1c', backbone=dict(depth=101))
|
@ -0,0 +1,2 @@
|
||||
_base_ = './deeplabv3_r50-d8_512x512_20k_voc12aug.py'
|
||||
model = dict(pretrained='open-mmlab://resnet101_v1c', backbone=dict(depth=101))
|
@ -0,0 +1,2 @@
|
||||
_base_ = './deeplabv3_r50-d8_512x512_40k_voc12aug.py'
|
||||
model = dict(pretrained='open-mmlab://resnet101_v1c', backbone=dict(depth=101))
|
@ -0,0 +1,2 @@
|
||||
_base_ = './deeplabv3_r50-d8_512x512_80k_ade20k.py'
|
||||
model = dict(pretrained='open-mmlab://resnet101_v1c', backbone=dict(depth=101))
|
@ -0,0 +1,2 @@
|
||||
_base_ = './deeplabv3_r50-d8_769x769_40k_cityscapes.py'
|
||||
model = dict(pretrained='open-mmlab://resnet101_v1c', backbone=dict(depth=101))
|
@ -0,0 +1,2 @@
|
||||
_base_ = './deeplabv3_r50-d8_769x769_80k_cityscapes.py'
|
||||
model = dict(pretrained='open-mmlab://resnet101_v1c', backbone=dict(depth=101))
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user