Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
DAN
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Container Registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Automatic Text Recognition
DAN
Commits
c0eb5bb8
Commit
c0eb5bb8
authored
1 year ago
by
Yoann Schneider
Browse files
Options
Downloads
Plain Diff
Merge branch 'metrics-percentages' into 'main'
Display metrics as percentages during evaluation Closes
#241
See merge request
!335
parents
f02b2d12
07d61dc0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!335
Display metrics as percentages during evaluation
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
dan/ocr/utils.py
+2
-1
2 additions, 1 deletion
dan/ocr/utils.py
tests/data/evaluate/metrics_table.md
+3
-3
3 additions, 3 deletions
tests/data/evaluate/metrics_table.md
tests/test_evaluate.py
+1
-1
1 addition, 1 deletion
tests/test_evaluate.py
with
6 additions
and
5 deletions
dan/ocr/utils.py
+
2
−
1
View file @
c0eb5bb8
...
...
@@ -93,6 +93,7 @@ def add_metrics_table_row(
continue
metric_name
=
REVERSE_HEADER
[
column
]
row
.
append
(
metrics
.
get
(
metric_name
,
"
−
"
))
metric_value
=
metrics
.
get
(
metric_name
)
row
.
append
(
round
(
metric_value
*
100
,
2
)
if
metric_value
is
not
None
else
"
−
"
)
table
.
add_row
(
row
)
This diff is collapsed.
Click to expand it.
tests/data/evaluate/metrics_table.md
+
3
−
3
View file @
c0eb5bb8
| Split | CER (HTR-NER) | CER (HTR) | WER (HTR-NER) | WER (HTR) | WER (HTR no punct) |
|:-----:|:-------------:|:---------:|:-------------:|:---------:|:------------------:|
| train | 1
.
3023 | 1
.
3023 |
1.0
|
1.0
|
1.0
|
| val | 1
.
2683 | 1
.
2683 |
1.0
|
1.0
|
1.0
|
| test | 1
.
1224 | 1
.
1224 |
1.0
|
1.0
|
1.0
|
| train | 130
.
23 | 130
.
23 | 1
00
.0 | 1
00
.0 | 1
00
.0 |
| val | 126
.
83 | 126
.
83 | 1
00
.0 | 1
00
.0 | 1
00
.0 |
| test | 112
.
24 | 112
.
24 | 1
00
.0 | 1
00
.0 | 1
00
.0 |
This diff is collapsed.
Click to expand it.
tests/test_evaluate.py
+
1
−
1
View file @
c0eb5bb8
...
...
@@ -44,7 +44,7 @@ def test_add_metrics_table_row():
"
WER (HTR-NER)
"
,
"
NER
"
,
]
assert
metrics_table
.
rows
==
[[
"
train
"
,
1
.
3023
,
1
.
0
,
"
−
"
]]
assert
metrics_table
.
rows
==
[[
"
train
"
,
130
.
23
,
1
0
0
,
"
−
"
]]
@pytest.mark.parametrize
(
...
...
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