Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
Swin-Transformer-Object-Detection
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to JiHu GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
wanggh
Swin-Transformer-Object-Detection
Commits
2d2e5c6f
Unverified
Commit
2d2e5c6f
authored
4 years ago
by
congee
Committed by
GitHub
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Update stat to classify papers (#4449)
* update stat to classify papers * modify tag of fp16
parent
c762d1e4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
configs/fp16/README.md
+1
-1
1 addition, 1 deletion
configs/fp16/README.md
docs/stat.py
+22
-9
22 additions, 9 deletions
docs/stat.py
with
23 additions
and
10 deletions
configs/fp16/README.md
+
1
−
1
View file @
2d2e5c6f
...
...
@@ -2,7 +2,7 @@
## Introduction
[
ALGORITHM
]
[
OTHERS
]
```
latex
@article
{
micikevicius2017mixed,
...
...
This diff is collapsed.
Click to expand it.
docs/stat.py
+
22
−
9
View file @
2d2e5c6f
#!/usr/bin/env python
import
functools
as
func
import
glob
import
os.path
as
osp
import
re
import
numpy
as
np
url_prefix
=
'
https://github.com/open-mmlab/mmdetection/blob/master/
'
titles_to_be_excluded
=
[
'
Albu Example
'
,
'
Mixed Precision Training
'
]
files
=
sorted
(
glob
.
glob
(
'
../configs/*/README.md
'
))
...
...
@@ -18,32 +20,43 @@ for f in files:
with
open
(
f
,
'
r
'
)
as
content_file
:
content
=
content_file
.
read
()
title
=
content
.
split
(
'
\n
'
)[
0
].
replace
(
'
#
'
,
''
)
if
title
in
titles_to_be_excluded
:
continue
title
=
content
.
split
(
'
\n
'
)[
0
].
replace
(
'
#
'
,
''
).
strip
()
ckpts
=
set
(
x
.
lower
().
strip
()
for
x
in
re
.
findall
(
r
'
\[model\]\((https?.*)\)
'
,
content
))
if
len
(
ckpts
)
==
0
:
continue
_papertype
=
[
x
for
x
in
re
.
findall
(
r
'
\[([A-Z]+)\]
'
,
content
)]
assert
len
(
_papertype
)
>
0
papertype
=
_papertype
[
0
]
paper
=
set
([(
papertype
,
title
)])
titles
.
append
(
title
)
num_ckpts
+=
len
(
ckpts
)
statsmsg
=
f
"""
\t
* [
{
title
}
](
{
url
}
) (
{
len
(
ckpts
)
}
ckpts)
\t
*
[
{
papertype
}
]
[
{
title
}
](
{
url
}
) (
{
len
(
ckpts
)
}
ckpts)
"""
stats
.
append
((
title
,
ckpts
,
statsmsg
))
stats
.
append
((
paper
,
ckpts
,
statsmsg
))
allpapers
=
func
.
reduce
(
lambda
a
,
b
:
a
.
union
(
b
),
[
p
for
p
,
_
,
_
in
stats
])
msglist
=
'
\n
'
.
join
(
x
for
_
,
_
,
x
in
stats
)
papertypes
,
papercounts
=
np
.
unique
([
t
for
t
,
_
in
allpapers
],
return_counts
=
True
)
countstr
=
'
\n
'
.
join
(
[
f
'
-
{
t
}
:
{
c
}
'
for
t
,
c
in
zip
(
papertypes
,
papercounts
)])
modelzoo
=
f
"""
# Model Zoo Statistics
* Number of papers:
{
len
(
titles
)
}
* Number of papers:
{
len
(
set
(
titles
))
}
{
countstr
}
* Number of checkpoints:
{
num_ckpts
}
{
msglist
}
"""
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment