mirror of
https://github.com/open-mmlab/mmsegmentation.git
synced 2025-06-03 22:03:48 +08:00
remove the model with 0 ckpts and exclude the papers without proposing any model (#336)
This commit is contained in:
parent
77e8ce3304
commit
8ed47abd23
11
docs/stat.py
11
docs/stat.py
@ -4,6 +4,7 @@ import os.path as osp
|
|||||||
import re
|
import re
|
||||||
|
|
||||||
url_prefix = 'https://github.com/open-mmlab/mmsegmentation/blob/master/'
|
url_prefix = 'https://github.com/open-mmlab/mmsegmentation/blob/master/'
|
||||||
|
titles_to_be_excluded = ['Mixed Precision Training']
|
||||||
|
|
||||||
files = sorted(glob.glob('../configs/*/README.md'))
|
files = sorted(glob.glob('../configs/*/README.md'))
|
||||||
|
|
||||||
@ -18,10 +19,16 @@ for f in files:
|
|||||||
content = content_file.read()
|
content = content_file.read()
|
||||||
|
|
||||||
title = content.split('\n')[0].replace('#', '')
|
title = content.split('\n')[0].replace('#', '')
|
||||||
titles.append(title)
|
if title.strip() in titles_to_be_excluded:
|
||||||
|
continue
|
||||||
|
|
||||||
ckpts = set(x.lower().strip()
|
ckpts = set(x.lower().strip()
|
||||||
for x in re.findall(r'https?://download.*\.pth', content)
|
for x in re.findall(r'https?://download.*\.pth', content)
|
||||||
if 'mmsegmentation' in x)
|
if 'mmsegmentation' in x)
|
||||||
|
if len(ckpts) == 0:
|
||||||
|
continue
|
||||||
|
|
||||||
|
titles.append(title)
|
||||||
num_ckpts += len(ckpts)
|
num_ckpts += len(ckpts)
|
||||||
statsmsg = f"""
|
statsmsg = f"""
|
||||||
\t* [{title}]({url}) ({len(ckpts)} ckpts)
|
\t* [{title}]({url}) ({len(ckpts)} ckpts)
|
||||||
@ -33,7 +40,7 @@ msglist = '\n'.join(x for _, _, x in stats)
|
|||||||
modelzoo = f"""
|
modelzoo = f"""
|
||||||
# Model Zoo Statistics
|
# Model Zoo Statistics
|
||||||
|
|
||||||
* Number of papers: {len(titles)}
|
* Number of papers: {len(set(titles))}
|
||||||
* Number of checkpoints: {num_ckpts}
|
* Number of checkpoints: {num_ckpts}
|
||||||
{msglist}
|
{msglist}
|
||||||
"""
|
"""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user