From 3a8d8a245526202d74edf65ae5cf2be2d03e664a Mon Sep 17 00:00:00 2001 From: congee <35596075+congee524@users.noreply.github.com> Date: Fri, 8 Jan 2021 20:40:44 +0800 Subject: [PATCH] remove the models with 0 ckpt and ignore the repeat papers when counting papers (#135) --- docs/stat.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/stat.py b/docs/stat.py index dcb8144a..0820d114 100755 --- a/docs/stat.py +++ b/docs/stat.py @@ -20,12 +20,15 @@ for f in files: title = content.split('\n')[0].replace('# ', '') - titles.append(title) ckpts = set(x.lower().strip() for x in re.findall(r'\[model\]\((https?.*)\)', content)) + if len(ckpts) == 0: + continue + num_ckpts += len(ckpts) + titles.append(title) statsmsg = f""" \t* [{title}]({url}) ({len(ckpts)} ckpts) @@ -37,7 +40,7 @@ msglist = '\n'.join(x for _, _, x in stats) modelzoo = f""" # Model Zoo Statistics -* Number of papers: {len(titles)} +* Number of papers: {len(set(titles))} * Number of checkpoints: {num_ckpts} {msglist} """