Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix] Update correct In Collection in metafile of each configs. #1239

Merged
merged 16 commits into from
Feb 23, 2022
21 changes: 18 additions & 3 deletions .dev/md2yml.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,13 @@ def parse_md(md_file):
code_version = None
repo_url = None

# To avoid re-counting number of backbone model in OpenMMLab,
# if certain model in configs folder is backbone whose name is already
# recorded in MMClassification, then the `COLLECTION` dict of this model
# in MMSegmentation should be deleted, and `In Collection` in `Models`
# should be set with head or neck of this config file.
is_backbone = None

with open(md_file, 'r') as md:
lines = md.readlines()
i = 0
Expand Down Expand Up @@ -117,9 +124,13 @@ def parse_md(md_file):
datasets.append(line[4:])
current_dataset = line[4:]
i += 2
elif line[:15] == '<!-- [BACKBONE]':
is_backbone = True
i += 1
elif line[0] == '|' and (
i + 1) < len(lines) and lines[i + 1][:3] == '| -':
cols = [col.strip() for col in line.split('|')]
method_id = cols.index('Method')
backbone_id = cols.index('Backbone')
crop_size_id = cols.index('Crop Size')
lr_schd_id = cols.index('Lr schd')
Expand Down Expand Up @@ -155,11 +166,13 @@ def parse_md(md_file):
mem_id] != '' else -1
crop_size = els[crop_size_id].split('x')
assert len(crop_size) == 2
method = els[method_id].split(
'-')[-1] if is_backbone else collection_name
model = {
'Name':
model_name,
'In Collection':
collection_name,
method,
'Metadata': {
'backbone': els[backbone_id],
'crop size': f'({crop_size[0]},{crop_size[1]})',
Expand Down Expand Up @@ -232,8 +245,10 @@ def parse_md(md_file):
collection.pop(check_key)
else:
collection[check_key].pop(key)

result = {'Collections': [collection], 'Models': models}
if is_backbone:
result = {'Models': models}
else:
result = {'Collections': [collection], 'Models': models}
yml_file = f'{md_file[:-9]}{collection_name}.yml'
return dump_yaml_and_check_difference(result, yml_file)

Expand Down
89 changes: 34 additions & 55 deletions configs/hrnet/hrnet.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,6 @@
Collections:
- Name: hrnet
Metadata:
Training Data:
- Cityscapes
- ADE20K
- Pascal VOC 2012 + Aug
- Pascal Context
- Pascal Context 59
- LoveDA
- Potsdam
- Vaihingen
Paper:
URL: https://arxiv.org/abs/1908.07919
Title: Deep High-Resolution Representation Learning for Human Pose Estimation
README: configs/hrnet/README.md
Code:
URL: https://github.com/open-mmlab/mmsegmentation/blob/v0.17.0/mmseg/models/backbones/hrnet.py#L218
Version: v0.17.0
Converted From:
Code: https://github.com/HRNet/HRNet-Semantic-Segmentation
Models:
- Name: fcn_hr18s_512x1024_40k_cityscapes
In Collection: hrnet
In Collection: FCN
Metadata:
backbone: HRNetV2p-W18-Small
crop size: (512,1024)
Expand All @@ -43,7 +22,7 @@ Models:
Config: configs/hrnet/fcn_hr18s_512x1024_40k_cityscapes.py
Weights: https://download.openmmlab.com/mmsegmentation/v0.5/hrnet/fcn_hr18s_512x1024_40k_cityscapes/fcn_hr18s_512x1024_40k_cityscapes_20200601_014216-93db27d0.pth
- Name: fcn_hr18_512x1024_40k_cityscapes
In Collection: hrnet
In Collection: FCN
Metadata:
backbone: HRNetV2p-W18
crop size: (512,1024)
Expand All @@ -65,7 +44,7 @@ Models:
Config: configs/hrnet/fcn_hr18_512x1024_40k_cityscapes.py
Weights: https://download.openmmlab.com/mmsegmentation/v0.5/hrnet/fcn_hr18_512x1024_40k_cityscapes/fcn_hr18_512x1024_40k_cityscapes_20200601_014216-f196fb4e.pth
- Name: fcn_hr48_512x1024_40k_cityscapes
In Collection: hrnet
In Collection: FCN
Metadata:
backbone: HRNetV2p-W48
crop size: (512,1024)
Expand All @@ -87,7 +66,7 @@ Models:
Config: configs/hrnet/fcn_hr48_512x1024_40k_cityscapes.py
Weights: https://download.openmmlab.com/mmsegmentation/v0.5/hrnet/fcn_hr48_512x1024_40k_cityscapes/fcn_hr48_512x1024_40k_cityscapes_20200601_014240-a989b146.pth
- Name: fcn_hr18s_512x1024_80k_cityscapes
In Collection: hrnet
In Collection: FCN
Metadata:
backbone: HRNetV2p-W18-Small
crop size: (512,1024)
Expand All @@ -101,7 +80,7 @@ Models:
Config: configs/hrnet/fcn_hr18s_512x1024_80k_cityscapes.py
Weights: https://download.openmmlab.com/mmsegmentation/v0.5/hrnet/fcn_hr18s_512x1024_80k_cityscapes/fcn_hr18s_512x1024_80k_cityscapes_20200601_202700-1462b75d.pth
- Name: fcn_hr18_512x1024_80k_cityscapes
In Collection: hrnet
In Collection: FCN
Metadata:
backbone: HRNetV2p-W18
crop size: (512,1024)
Expand All @@ -115,7 +94,7 @@ Models:
Config: configs/hrnet/fcn_hr18_512x1024_80k_cityscapes.py
Weights: https://download.openmmlab.com/mmsegmentation/v0.5/hrnet/fcn_hr18_512x1024_80k_cityscapes/fcn_hr18_512x1024_80k_cityscapes_20200601_223255-4e7b345e.pth
- Name: fcn_hr48_512x1024_80k_cityscapes
In Collection: hrnet
In Collection: FCN
Metadata:
backbone: HRNetV2p-W48
crop size: (512,1024)
Expand All @@ -129,7 +108,7 @@ Models:
Config: configs/hrnet/fcn_hr48_512x1024_80k_cityscapes.py
Weights: https://download.openmmlab.com/mmsegmentation/v0.5/hrnet/fcn_hr48_512x1024_80k_cityscapes/fcn_hr48_512x1024_80k_cityscapes_20200601_202606-58ea95d6.pth
- Name: fcn_hr18s_512x1024_160k_cityscapes
In Collection: hrnet
In Collection: FCN
Metadata:
backbone: HRNetV2p-W18-Small
crop size: (512,1024)
Expand All @@ -143,7 +122,7 @@ Models:
Config: configs/hrnet/fcn_hr18s_512x1024_160k_cityscapes.py
Weights: https://download.openmmlab.com/mmsegmentation/v0.5/hrnet/fcn_hr18s_512x1024_160k_cityscapes/fcn_hr18s_512x1024_160k_cityscapes_20200602_190901-4a0797ea.pth
- Name: fcn_hr18_512x1024_160k_cityscapes
In Collection: hrnet
In Collection: FCN
Metadata:
backbone: HRNetV2p-W18
crop size: (512,1024)
Expand All @@ -157,7 +136,7 @@ Models:
Config: configs/hrnet/fcn_hr18_512x1024_160k_cityscapes.py
Weights: https://download.openmmlab.com/mmsegmentation/v0.5/hrnet/fcn_hr18_512x1024_160k_cityscapes/fcn_hr18_512x1024_160k_cityscapes_20200602_190822-221e4a4f.pth
- Name: fcn_hr48_512x1024_160k_cityscapes
In Collection: hrnet
In Collection: FCN
Metadata:
backbone: HRNetV2p-W48
crop size: (512,1024)
Expand All @@ -171,7 +150,7 @@ Models:
Config: configs/hrnet/fcn_hr48_512x1024_160k_cityscapes.py
Weights: https://download.openmmlab.com/mmsegmentation/v0.5/hrnet/fcn_hr48_512x1024_160k_cityscapes/fcn_hr48_512x1024_160k_cityscapes_20200602_190946-59b7973e.pth
- Name: fcn_hr18s_512x512_80k_ade20k
In Collection: hrnet
In Collection: FCN
Metadata:
backbone: HRNetV2p-W18-Small
crop size: (512,512)
Expand All @@ -193,7 +172,7 @@ Models:
Config: configs/hrnet/fcn_hr18s_512x512_80k_ade20k.py
Weights: https://download.openmmlab.com/mmsegmentation/v0.5/hrnet/fcn_hr18s_512x512_80k_ade20k/fcn_hr18s_512x512_80k_ade20k_20200614_144345-77fc814a.pth
- Name: fcn_hr18_512x512_80k_ade20k
In Collection: hrnet
In Collection: FCN
Metadata:
backbone: HRNetV2p-W18
crop size: (512,512)
Expand All @@ -215,7 +194,7 @@ Models:
Config: configs/hrnet/fcn_hr18_512x512_80k_ade20k.py
Weights: https://download.openmmlab.com/mmsegmentation/v0.5/hrnet/fcn_hr18_512x512_80k_ade20k/fcn_hr18_512x512_80k_ade20k_20210827_114910-6c9382c0.pth
- Name: fcn_hr48_512x512_80k_ade20k
In Collection: hrnet
In Collection: FCN
Metadata:
backbone: HRNetV2p-W48
crop size: (512,512)
Expand All @@ -237,7 +216,7 @@ Models:
Config: configs/hrnet/fcn_hr48_512x512_80k_ade20k.py
Weights: https://download.openmmlab.com/mmsegmentation/v0.5/hrnet/fcn_hr48_512x512_80k_ade20k/fcn_hr48_512x512_80k_ade20k_20200614_193946-7ba5258d.pth
- Name: fcn_hr18s_512x512_160k_ade20k
In Collection: hrnet
In Collection: FCN
Metadata:
backbone: HRNetV2p-W18-Small
crop size: (512,512)
Expand All @@ -251,7 +230,7 @@ Models:
Config: configs/hrnet/fcn_hr18s_512x512_160k_ade20k.py
Weights: https://download.openmmlab.com/mmsegmentation/v0.5/hrnet/fcn_hr18s_512x512_160k_ade20k/fcn_hr18s_512x512_160k_ade20k_20210829_174739-f1e7c2e7.pth
- Name: fcn_hr18_512x512_160k_ade20k
In Collection: hrnet
In Collection: FCN
Metadata:
backbone: HRNetV2p-W18
crop size: (512,512)
Expand All @@ -265,7 +244,7 @@ Models:
Config: configs/hrnet/fcn_hr18_512x512_160k_ade20k.py
Weights: https://download.openmmlab.com/mmsegmentation/v0.5/hrnet/fcn_hr18_512x512_160k_ade20k/fcn_hr18_512x512_160k_ade20k_20200614_214426-ca961836.pth
- Name: fcn_hr48_512x512_160k_ade20k
In Collection: hrnet
In Collection: FCN
Metadata:
backbone: HRNetV2p-W48
crop size: (512,512)
Expand All @@ -279,7 +258,7 @@ Models:
Config: configs/hrnet/fcn_hr48_512x512_160k_ade20k.py
Weights: https://download.openmmlab.com/mmsegmentation/v0.5/hrnet/fcn_hr48_512x512_160k_ade20k/fcn_hr48_512x512_160k_ade20k_20200614_214407-a52fc02c.pth
- Name: fcn_hr18s_512x512_20k_voc12aug
In Collection: hrnet
In Collection: FCN
Metadata:
backbone: HRNetV2p-W18-Small
crop size: (512,512)
Expand All @@ -301,7 +280,7 @@ Models:
Config: configs/hrnet/fcn_hr18s_512x512_20k_voc12aug.py
Weights: https://download.openmmlab.com/mmsegmentation/v0.5/hrnet/fcn_hr18s_512x512_20k_voc12aug/fcn_hr18s_512x512_20k_voc12aug_20210829_174910-0aceadb4.pth
- Name: fcn_hr18_512x512_20k_voc12aug
In Collection: hrnet
In Collection: FCN
Metadata:
backbone: HRNetV2p-W18
crop size: (512,512)
Expand All @@ -323,7 +302,7 @@ Models:
Config: configs/hrnet/fcn_hr18_512x512_20k_voc12aug.py
Weights: https://download.openmmlab.com/mmsegmentation/v0.5/hrnet/fcn_hr18_512x512_20k_voc12aug/fcn_hr18_512x512_20k_voc12aug_20200617_224503-488d45f7.pth
- Name: fcn_hr48_512x512_20k_voc12aug
In Collection: hrnet
In Collection: FCN
Metadata:
backbone: HRNetV2p-W48
crop size: (512,512)
Expand All @@ -345,7 +324,7 @@ Models:
Config: configs/hrnet/fcn_hr48_512x512_20k_voc12aug.py
Weights: https://download.openmmlab.com/mmsegmentation/v0.5/hrnet/fcn_hr48_512x512_20k_voc12aug/fcn_hr48_512x512_20k_voc12aug_20200617_224419-89de05cd.pth
- Name: fcn_hr18s_512x512_40k_voc12aug
In Collection: hrnet
In Collection: FCN
Metadata:
backbone: HRNetV2p-W18-Small
crop size: (512,512)
Expand All @@ -359,7 +338,7 @@ Models:
Config: configs/hrnet/fcn_hr18s_512x512_40k_voc12aug.py
Weights: https://download.openmmlab.com/mmsegmentation/v0.5/hrnet/fcn_hr18s_512x512_40k_voc12aug/fcn_hr18s_512x512_40k_voc12aug_20200614_000648-4f8d6e7f.pth
- Name: fcn_hr18_512x512_40k_voc12aug
In Collection: hrnet
In Collection: FCN
Metadata:
backbone: HRNetV2p-W18
crop size: (512,512)
Expand All @@ -373,7 +352,7 @@ Models:
Config: configs/hrnet/fcn_hr18_512x512_40k_voc12aug.py
Weights: https://download.openmmlab.com/mmsegmentation/v0.5/hrnet/fcn_hr18_512x512_40k_voc12aug/fcn_hr18_512x512_40k_voc12aug_20200613_224401-1b4b76cd.pth
- Name: fcn_hr48_512x512_40k_voc12aug
In Collection: hrnet
In Collection: FCN
Metadata:
backbone: HRNetV2p-W48
crop size: (512,512)
Expand All @@ -387,7 +366,7 @@ Models:
Config: configs/hrnet/fcn_hr48_512x512_40k_voc12aug.py
Weights: https://download.openmmlab.com/mmsegmentation/v0.5/hrnet/fcn_hr48_512x512_40k_voc12aug/fcn_hr48_512x512_40k_voc12aug_20200613_222111-1b0f18bc.pth
- Name: fcn_hr48_480x480_40k_pascal_context
In Collection: hrnet
In Collection: FCN
Metadata:
backbone: HRNetV2p-W48
crop size: (480,480)
Expand All @@ -409,7 +388,7 @@ Models:
Config: configs/hrnet/fcn_hr48_480x480_40k_pascal_context.py
Weights: https://download.openmmlab.com/mmsegmentation/v0.5/hrnet/fcn_hr48_480x480_40k_pascal_context/fcn_hr48_480x480_40k_pascal_context_20200911_164852-667d00b0.pth
- Name: fcn_hr48_480x480_80k_pascal_context
In Collection: hrnet
In Collection: FCN
Metadata:
backbone: HRNetV2p-W48
crop size: (480,480)
Expand All @@ -423,7 +402,7 @@ Models:
Config: configs/hrnet/fcn_hr48_480x480_80k_pascal_context.py
Weights: https://download.openmmlab.com/mmsegmentation/v0.5/hrnet/fcn_hr48_480x480_80k_pascal_context/fcn_hr48_480x480_80k_pascal_context_20200911_155322-847a6711.pth
- Name: fcn_hr48_480x480_40k_pascal_context_59
In Collection: hrnet
In Collection: FCN
Metadata:
backbone: HRNetV2p-W48
crop size: (480,480)
Expand All @@ -437,7 +416,7 @@ Models:
Config: configs/hrnet/fcn_hr48_480x480_40k_pascal_context_59.py
Weights: https://download.openmmlab.com/mmsegmentation/v0.5/hrnet/fcn_hr48_480x480_40k_pascal_context_59/fcn_hr48_480x480_40k_pascal_context_59_20210410_122738-b808b8b2.pth
- Name: fcn_hr48_480x480_80k_pascal_context_59
In Collection: hrnet
In Collection: FCN
Metadata:
backbone: HRNetV2p-W48
crop size: (480,480)
Expand All @@ -451,7 +430,7 @@ Models:
Config: configs/hrnet/fcn_hr48_480x480_80k_pascal_context_59.py
Weights: https://download.openmmlab.com/mmsegmentation/v0.5/hrnet/fcn_hr48_480x480_80k_pascal_context_59/fcn_hr48_480x480_80k_pascal_context_59_20210411_003240-3ae7081e.pth
- Name: fcn_hr18s_512x512_80k_loveda
In Collection: hrnet
In Collection: FCN
Metadata:
backbone: HRNetV2p-W18-Small
crop size: (512,512)
Expand All @@ -473,7 +452,7 @@ Models:
Config: configs/hrnet/fcn_hr18s_512x512_80k_loveda.py
Weights: https://download.openmmlab.com/mmsegmentation/v0.5/hrnet/fcn_hr18s_512x512_80k_loveda/fcn_hr18s_512x512_80k_loveda_20211210_203228-60a86a7a.pth
- Name: fcn_hr18_512x512_80k_loveda
In Collection: hrnet
In Collection: FCN
Metadata:
backbone: HRNetV2p-W18
crop size: (512,512)
Expand All @@ -495,7 +474,7 @@ Models:
Config: configs/hrnet/fcn_hr18_512x512_80k_loveda.py
Weights: https://download.openmmlab.com/mmsegmentation/v0.5/hrnet/fcn_hr18_512x512_80k_loveda/fcn_hr18_512x512_80k_loveda_20211210_203952-93d9c3b3.pth
- Name: fcn_hr48_512x512_80k_loveda
In Collection: hrnet
In Collection: FCN
Metadata:
backbone: HRNetV2p-W48
crop size: (512,512)
Expand All @@ -517,7 +496,7 @@ Models:
Config: configs/hrnet/fcn_hr48_512x512_80k_loveda.py
Weights: https://download.openmmlab.com/mmsegmentation/v0.5/hrnet/fcn_hr48_512x512_80k_loveda/fcn_hr48_512x512_80k_loveda_20211211_044756-67072f55.pth
- Name: fcn_hr18s_512x512_80k_potsdam
In Collection: hrnet
In Collection: FCN
Metadata:
backbone: HRNetV2p-W18-Small
crop size: (512,512)
Expand All @@ -539,7 +518,7 @@ Models:
Config: configs/hrnet/fcn_hr18s_512x512_80k_potsdam.py
Weights: https://download.openmmlab.com/mmsegmentation/v0.5/hrnet/fcn_hr18s_512x512_80k_potsdam/fcn_hr18s_512x512_80k_potsdam_20211218_205517-ba32af63.pth
- Name: fcn_hr18_512x512_80k_potsdam
In Collection: hrnet
In Collection: FCN
Metadata:
backbone: HRNetV2p-W18
crop size: (512,512)
Expand All @@ -561,7 +540,7 @@ Models:
Config: configs/hrnet/fcn_hr18_512x512_80k_potsdam.py
Weights: https://download.openmmlab.com/mmsegmentation/v0.5/hrnet/fcn_hr18_512x512_80k_potsdam/fcn_hr18_512x512_80k_potsdam_20211218_205517-5d0387ad.pth
- Name: fcn_hr48_512x512_80k_potsdam
In Collection: hrnet
In Collection: FCN
Metadata:
backbone: HRNetV2p-W48
crop size: (512,512)
Expand All @@ -583,7 +562,7 @@ Models:
Config: configs/hrnet/fcn_hr48_512x512_80k_potsdam.py
Weights: https://download.openmmlab.com/mmsegmentation/v0.5/hrnet/fcn_hr48_512x512_80k_potsdam/fcn_hr48_512x512_80k_potsdam_20211219_020601-97434c78.pth
- Name: fcn_hr18s_4x4_512x512_80k_vaihingen
In Collection: hrnet
In Collection: FCN
Metadata:
backbone: HRNetV2p-W18-Small
crop size: (512,512)
Expand All @@ -605,7 +584,7 @@ Models:
Config: configs/hrnet/fcn_hr18s_4x4_512x512_80k_vaihingen.py
Weights: https://download.openmmlab.com/mmsegmentation/v0.5/hrnet/fcn_hr18s_4x4_512x512_80k_vaihingen/fcn_hr18s_4x4_512x512_80k_vaihingen_20211231_230909-b23aae02.pth
- Name: fcn_hr18_4x4_512x512_80k_vaihingen
In Collection: hrnet
In Collection: FCN
Metadata:
backbone: HRNetV2p-W18
crop size: (512,512)
Expand All @@ -627,7 +606,7 @@ Models:
Config: configs/hrnet/fcn_hr18_4x4_512x512_80k_vaihingen.py
Weights: https://download.openmmlab.com/mmsegmentation/v0.5/hrnet/fcn_hr18_4x4_512x512_80k_vaihingen/fcn_hr18_4x4_512x512_80k_vaihingen_20211231_231216-2ec3ae8a.pth
- Name: fcn_hr48_4x4_512x512_80k_vaihingen
In Collection: hrnet
In Collection: FCN
Metadata:
backbone: HRNetV2p-W48
crop size: (512,512)
Expand Down
Loading