starride-teklia
commited on
Commit
•
42f55d2
1
Parent(s):
d83d947
Upload model files
Browse files- README.md +54 -0
- language_model.arpa.gz +3 -0
- lexicon.txt +149 -0
- model +0 -0
- syms.txt +150 -0
- tokens.txt +150 -0
- weights.ckpt +3 -0
README.md
CHANGED
@@ -1,3 +1,57 @@
|
|
1 |
---
|
|
|
2 |
license: mit
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
+
library_name: PyLaia
|
3 |
license: mit
|
4 |
+
tags:
|
5 |
+
- PyLaia
|
6 |
+
- PyTorch
|
7 |
+
- Handwritten text recognition
|
8 |
+
metrics:
|
9 |
+
- CER
|
10 |
+
- WER
|
11 |
+
language:
|
12 |
+
- 'no'
|
13 |
+
datasets:
|
14 |
+
- Teklia/NorHand_v2
|
15 |
---
|
16 |
+
|
17 |
+
# NorHand v2 handwritten text recognition
|
18 |
+
|
19 |
+
This model performs Handwritten Text Recognition in Norwegian on historical documents.
|
20 |
+
|
21 |
+
## Model description
|
22 |
+
|
23 |
+
The model was trained using the PyLaia library on the [NorHand v2 dataset](https://zenodo.org/records/10555698).
|
24 |
+
|
25 |
+
For training, text-lines were resized with a fixed height of 128 pixels, keeping the original aspect ratio. Vertical lines are discarded.
|
26 |
+
|
27 |
+
| split | N lines | N horizontal lines |
|
28 |
+
| ----- | ------: | -----------------: |
|
29 |
+
| train | 146,693 | 145,061 |
|
30 |
+
| val | 15,119 | 14,980 |
|
31 |
+
| test | 1,830 | 1,793 |
|
32 |
+
|
33 |
+
An external 6-gram character language model can be used to improve recognition. The language model is trained on the text from the NorHand v3 training set.
|
34 |
+
|
35 |
+
## Evaluation results
|
36 |
+
|
37 |
+
The model achieves the following results:
|
38 |
+
|
39 |
+
| set | Language model | CER (%) | WER (%) | N lines |
|
40 |
+
|:------|:---------------|:----------:|:-------:|----------:|
|
41 |
+
| test | no | 3.82 | 12.00 | 1,573 |
|
42 |
+
| test | yes | 3.13 | 9.29 | 1,573 |
|
43 |
+
|
44 |
+
## How to use
|
45 |
+
|
46 |
+
Please refer to the [documentation](https://atr.pages.teklia.com/pylaia/).
|
47 |
+
|
48 |
+
## Cite us
|
49 |
+
|
50 |
+
```bibtex
|
51 |
+
@inproceedings{pylaia-lib,
|
52 |
+
author = "Tarride, Solène and Schneider, Yoann and Generali, Marie and Boillet, Melodie and Abadie, Bastien and Kermorvant, Christopher",
|
53 |
+
title = "Improving Automatic Text Recognition with Language Models in the PyLaia Open-Source Library",
|
54 |
+
booktitle = "Submitted at ICDAR2024",
|
55 |
+
year = "2024"
|
56 |
+
}
|
57 |
+
```
|
language_model.arpa.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ec4a7ec5732090516c96968af3e3bfb5c797bfb81f5d07a03877618d4e5b701f
|
3 |
+
size 43250739
|
lexicon.txt
ADDED
@@ -0,0 +1,149 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<space> <space>
|
2 |
+
! !
|
3 |
+
" "
|
4 |
+
# #
|
5 |
+
$ $
|
6 |
+
% %
|
7 |
+
& &
|
8 |
+
' '
|
9 |
+
( (
|
10 |
+
) )
|
11 |
+
* *
|
12 |
+
+ +
|
13 |
+
, ,
|
14 |
+
- -
|
15 |
+
. .
|
16 |
+
/ /
|
17 |
+
0 0
|
18 |
+
1 1
|
19 |
+
2 2
|
20 |
+
3 3
|
21 |
+
4 4
|
22 |
+
5 5
|
23 |
+
6 6
|
24 |
+
7 7
|
25 |
+
8 8
|
26 |
+
9 9
|
27 |
+
: :
|
28 |
+
; ;
|
29 |
+
< <
|
30 |
+
= =
|
31 |
+
> >
|
32 |
+
? ?
|
33 |
+
A A
|
34 |
+
B B
|
35 |
+
C C
|
36 |
+
D D
|
37 |
+
E E
|
38 |
+
F F
|
39 |
+
G G
|
40 |
+
H H
|
41 |
+
I I
|
42 |
+
J J
|
43 |
+
K K
|
44 |
+
L L
|
45 |
+
M M
|
46 |
+
N N
|
47 |
+
O O
|
48 |
+
P P
|
49 |
+
Q Q
|
50 |
+
R R
|
51 |
+
S S
|
52 |
+
T T
|
53 |
+
U U
|
54 |
+
V V
|
55 |
+
W W
|
56 |
+
X X
|
57 |
+
Y Y
|
58 |
+
Z Z
|
59 |
+
[ [
|
60 |
+
\ \
|
61 |
+
] ]
|
62 |
+
a a
|
63 |
+
b b
|
64 |
+
c c
|
65 |
+
d d
|
66 |
+
e e
|
67 |
+
f f
|
68 |
+
g g
|
69 |
+
h h
|
70 |
+
i i
|
71 |
+
j j
|
72 |
+
k k
|
73 |
+
l l
|
74 |
+
m m
|
75 |
+
n n
|
76 |
+
o o
|
77 |
+
p p
|
78 |
+
q q
|
79 |
+
r r
|
80 |
+
s s
|
81 |
+
t t
|
82 |
+
u u
|
83 |
+
v v
|
84 |
+
w w
|
85 |
+
x x
|
86 |
+
y y
|
87 |
+
z z
|
88 |
+
{ {
|
89 |
+
| |
|
90 |
+
} }
|
91 |
+
£ £
|
92 |
+
§ §
|
93 |
+
« «
|
94 |
+
¬ ¬
|
95 |
+
° °
|
96 |
+
´ ´
|
97 |
+
º º
|
98 |
+
» »
|
99 |
+
¼ ¼
|
100 |
+
½ ½
|
101 |
+
Ä Ä
|
102 |
+
Å Å
|
103 |
+
Æ Æ
|
104 |
+
É É
|
105 |
+
Ö Ö
|
106 |
+
Ø Ø
|
107 |
+
Ü Ü
|
108 |
+
Þ Þ
|
109 |
+
ß ß
|
110 |
+
à à
|
111 |
+
á á
|
112 |
+
â â
|
113 |
+
ä ä
|
114 |
+
å å
|
115 |
+
æ æ
|
116 |
+
ç ç
|
117 |
+
è è
|
118 |
+
é é
|
119 |
+
ê ê
|
120 |
+
ë ë
|
121 |
+
í í
|
122 |
+
ï ï
|
123 |
+
ð ð
|
124 |
+
ó ó
|
125 |
+
ô ô
|
126 |
+
ö ö
|
127 |
+
÷ ÷
|
128 |
+
ø ø
|
129 |
+
ù ù
|
130 |
+
ú ú
|
131 |
+
û û
|
132 |
+
ü ü
|
133 |
+
ý ý
|
134 |
+
þ þ
|
135 |
+
œ œ
|
136 |
+
˚ ˚
|
137 |
+
Ֆ Ֆ
|
138 |
+
– –
|
139 |
+
— —
|
140 |
+
‘ ‘
|
141 |
+
’ ’
|
142 |
+
“ “
|
143 |
+
” ”
|
144 |
+
„ „
|
145 |
+
… …
|
146 |
+
⁰ ⁰
|
147 |
+
⅓ ⅓
|
148 |
+
|
149 |
+
<ctc> <ctc>
|
model
ADDED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+
> 30
|
32 |
+
? 31
|
33 |
+
A 32
|
34 |
+
B 33
|
35 |
+
C 34
|
36 |
+
D 35
|
37 |
+
E 36
|
38 |
+
F 37
|
39 |
+
G 38
|
40 |
+
H 39
|
41 |
+
I 40
|
42 |
+
J 41
|
43 |
+
K 42
|
44 |
+
L 43
|
45 |
+
M 44
|
46 |
+
N 45
|
47 |
+
O 46
|
48 |
+
P 47
|
49 |
+
Q 48
|
50 |
+
R 49
|
51 |
+
S 50
|
52 |
+
T 51
|
53 |
+
U 52
|
54 |
+
V 53
|
55 |
+
W 54
|
56 |
+
X 55
|
57 |
+
Y 56
|
58 |
+
Z 57
|
59 |
+
[ 58
|
60 |
+
\ 59
|
61 |
+
] 60
|
62 |
+
a 61
|
63 |
+
b 62
|
64 |
+
c 63
|
65 |
+
d 64
|
66 |
+
e 65
|
67 |
+
f 66
|
68 |
+
g 67
|
69 |
+
h 68
|
70 |
+
i 69
|
71 |
+
j 70
|
72 |
+
k 71
|
73 |
+
l 72
|
74 |
+
m 73
|
75 |
+
n 74
|
76 |
+
o 75
|
77 |
+
p 76
|
78 |
+
q 77
|
79 |
+
r 78
|
80 |
+
s 79
|
81 |
+
t 80
|
82 |
+
u 81
|
83 |
+
v 82
|
84 |
+
w 83
|
85 |
+
x 84
|
86 |
+
y 85
|
87 |
+
z 86
|
88 |
+
{ 87
|
89 |
+
| 88
|
90 |
+
} 89
|
91 |
+
£ 90
|
92 |
+
§ 91
|
93 |
+
« 92
|
94 |
+
¬ 93
|
95 |
+
° 94
|
96 |
+
´ 95
|
97 |
+
º 96
|
98 |
+
» 97
|
99 |
+
¼ 98
|
100 |
+
½ 99
|
101 |
+
Ä 100
|
102 |
+
Å 101
|
103 |
+
Æ 102
|
104 |
+
É 103
|
105 |
+
Ö 104
|
106 |
+
Ø 105
|
107 |
+
Ü 106
|
108 |
+
Þ 107
|
109 |
+
ß 108
|
110 |
+
à 109
|
111 |
+
á 110
|
112 |
+
â 111
|
113 |
+
ä 112
|
114 |
+
å 113
|
115 |
+
æ 114
|
116 |
+
ç 115
|
117 |
+
è 116
|
118 |
+
é 117
|
119 |
+
ê 118
|
120 |
+
ë 119
|
121 |
+
í 120
|
122 |
+
ï 121
|
123 |
+
ð 122
|
124 |
+
ó 123
|
125 |
+
ô 124
|
126 |
+
ö 125
|
127 |
+
÷ 126
|
128 |
+
ø 127
|
129 |
+
ù 128
|
130 |
+
ú 129
|
131 |
+
û 130
|
132 |
+
ü 131
|
133 |
+
ý 132
|
134 |
+
þ 133
|
135 |
+
œ 134
|
136 |
+
˚ 135
|
137 |
+
Ֆ 136
|
138 |
+
– 137
|
139 |
+
— 138
|
140 |
+
‘ 139
|
141 |
+
’ 140
|
142 |
+
“ 141
|
143 |
+
” 142
|
144 |
+
„ 143
|
145 |
+
… 144
|
146 |
+
⁰ 145
|
147 |
+
⅓ 146
|
148 |
+
147
|
149 |
+
<unk> 148
|
150 |
+
<space> 149
|
tokens.txt
ADDED
@@ -0,0 +1,150 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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|
94 |
+
¬
|
95 |
+
°
|
96 |
+
´
|
97 |
+
º
|
98 |
+
»
|
99 |
+
¼
|
100 |
+
½
|
101 |
+
Ä
|
102 |
+
Å
|
103 |
+
Æ
|
104 |
+
É
|
105 |
+
Ö
|
106 |
+
Ø
|
107 |
+
Ü
|
108 |
+
Þ
|
109 |
+
ß
|
110 |
+
à
|
111 |
+
á
|
112 |
+
â
|
113 |
+
ä
|
114 |
+
å
|
115 |
+
æ
|
116 |
+
ç
|
117 |
+
è
|
118 |
+
é
|
119 |
+
ê
|
120 |
+
ë
|
121 |
+
í
|
122 |
+
ï
|
123 |
+
ð
|
124 |
+
ó
|
125 |
+
ô
|
126 |
+
ö
|
127 |
+
÷
|
128 |
+
ø
|
129 |
+
ù
|
130 |
+
ú
|
131 |
+
û
|
132 |
+
ü
|
133 |
+
ý
|
134 |
+
þ
|
135 |
+
œ
|
136 |
+
˚
|
137 |
+
Ֆ
|
138 |
+
–
|
139 |
+
—
|
140 |
+
‘
|
141 |
+
’
|
142 |
+
“
|
143 |
+
”
|
144 |
+
„
|
145 |
+
…
|
146 |
+
⁰
|
147 |
+
⅓
|
148 |
+
|
149 |
+
<unk>
|
150 |
+
<space>
|
weights.ckpt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:cdd12e585cd86144586c0bdcbebf06e3a59532a88de886c5cc4164f0344a71b1
|
3 |
+
size 42954972
|