starride-teklia commited on
Commit
334c9df
1 Parent(s): 97a9fa6

Upload latest model

Browse files
Files changed (6) hide show
  1. README.md +23 -13
  2. language_model.arpa.gz +3 -0
  3. lexicon.txt +80 -0
  4. model +0 -0
  5. tokens.txt +81 -0
  6. weights.ckpt +2 -2
README.md CHANGED
@@ -10,32 +10,42 @@ metrics:
10
  - WER
11
  language:
12
  - en
 
 
13
  ---
14
 
15
- # English handwritten text recognition
16
 
17
- This model performs Handwritten Text Recognition in English.
18
 
19
  ## Model description
20
 
21
- The model has been trained using the PyLaia library on the [IAM](https://fki.tic.heia-fr.ch/databases/iam-handwriting-database) dataset.
22
- Training images were resized with a fixed height of 128 pixels, keeping the original aspect ratio.
23
 
 
 
 
24
 
25
  ## Evaluation results
26
 
27
  The model achieves the following results:
28
 
29
- | Split | CER (%) | WER (%) | Support |
30
- | ----- | ------- | ------- | ------- |
31
- | train | 0.32 | 1.26 | 6482 |
32
- | val | 6.50 | 19.12 | 1926 |
33
- | test | 7.68 | 19.82 | 1965 |
34
-
35
- A similar model was trained on the RWTH split, corresponding to the results published in [Key-value information extraction from full handwritten pages](https://arxiv.org/pdf/2304.13530.pdf).
36
-
37
- Results can be improved by combining PyLaia with a n-gram language model.
38
 
39
  ## How to use
40
 
41
  Please refer to the [documentation](https://atr.pages.teklia.com/pylaia/).
 
 
 
 
 
 
 
 
 
 
 
 
10
  - WER
11
  language:
12
  - en
13
+ datasets:
14
+ - Teklia/IAM
15
  ---
16
 
17
+ # IAM handwritten text recognition
18
 
19
+ This model performs Handwritten Text Recognition in English on modern documents.
20
 
21
  ## Model description
22
 
23
+ The model was trained using the PyLaia library on the [IAM database](https://fki.tic.heia-fr.ch/databases/iam-handwriting-database).
 
24
 
25
+ For training, text-lines were resized with a fixed height of 128 pixels, keeping the original aspect ratio.
26
+
27
+ An external 6-gram character language model can be used to improve recognition. The language model is trained on the text from the IAM training set.
28
 
29
  ## Evaluation results
30
 
31
  The model achieves the following results:
32
 
33
+ | set | Language model | CER (%) | WER (%) | N lines |
34
+ |:------|:---------------|:----------:|:-------:|----------:|
35
+ | test | no | 8.44 | 24.51 | 2915 |
36
+ | test | yes | 7.50 | 20.98 | 2915 |
 
 
 
 
 
37
 
38
  ## How to use
39
 
40
  Please refer to the [documentation](https://atr.pages.teklia.com/pylaia/).
41
+
42
+ ## Cite us
43
+
44
+ ```bibtex
45
+ @inproceedings{pylaia-lib,
46
+ author = "Tarride, Solène and Schneider, Yoann and Generali, Marie and Boillet, Melodie and Abadie, Bastien and Kermorvant, Christopher",
47
+ title = "Improving Automatic Text Recognition with Language Models in the PyLaia Open-Source Library",
48
+ booktitle = "Submitted at ICDAR2024",
49
+ year = "2024"
50
+ }
51
+ ```
language_model.arpa.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a2ea36e75faa0d9f3e4def71e674cbbbe3d52bc7056d20218372b50fbf999ad6
3
+ size 5355981
lexicon.txt ADDED
@@ -0,0 +1,80 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ▁ <space>
2
+ ! !
3
+ " "
4
+ # #
5
+ & &
6
+ ' '
7
+ ( (
8
+ ) )
9
+ * *
10
+ + +
11
+ , ,
12
+ - -
13
+ . .
14
+ / /
15
+ 0 0
16
+ 1 1
17
+ 2 2
18
+ 3 3
19
+ 4 4
20
+ 5 5
21
+ 6 6
22
+ 7 7
23
+ 8 8
24
+ 9 9
25
+ : :
26
+ ; ;
27
+ ? ?
28
+ A A
29
+ B B
30
+ C C
31
+ D D
32
+ E E
33
+ F F
34
+ G G
35
+ H H
36
+ I I
37
+ J J
38
+ K K
39
+ L L
40
+ M M
41
+ N N
42
+ O O
43
+ P P
44
+ Q Q
45
+ R R
46
+ S S
47
+ T T
48
+ U U
49
+ V V
50
+ W W
51
+ X X
52
+ Y Y
53
+ Z Z
54
+ a a
55
+ b b
56
+ c c
57
+ d d
58
+ e e
59
+ f f
60
+ g g
61
+ h h
62
+ i i
63
+ j j
64
+ k k
65
+ l l
66
+ m m
67
+ n n
68
+ o o
69
+ p p
70
+ q q
71
+ r r
72
+ s s
73
+ t t
74
+ u u
75
+ v v
76
+ w w
77
+ x x
78
+ y y
79
+ z z
80
+ ◌ <ctc>
model CHANGED
Binary files a/model and b/model differ
 
tokens.txt ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <ctc>
2
+ !
3
+ "
4
+ #
5
+ &
6
+ '
7
+ (
8
+ )
9
+ *
10
+ +
11
+ ,
12
+ -
13
+ .
14
+ /
15
+ 0
16
+ 1
17
+ 2
18
+ 3
19
+ 4
20
+ 5
21
+ 6
22
+ 7
23
+ 8
24
+ 9
25
+ :
26
+ ;
27
+ ?
28
+ A
29
+ B
30
+ C
31
+ D
32
+ E
33
+ F
34
+ G
35
+ H
36
+ I
37
+ J
38
+ K
39
+ L
40
+ M
41
+ N
42
+ O
43
+ P
44
+ Q
45
+ R
46
+ S
47
+ T
48
+ U
49
+ V
50
+ W
51
+ X
52
+ Y
53
+ Z
54
+ a
55
+ b
56
+ c
57
+ d
58
+ e
59
+ f
60
+ g
61
+ h
62
+ i
63
+ j
64
+ k
65
+ l
66
+ m
67
+ n
68
+ o
69
+ p
70
+ q
71
+ r
72
+ s
73
+ t
74
+ u
75
+ v
76
+ w
77
+ x
78
+ y
79
+ z
80
+ <unk>
81
+ <space>
weights.ckpt CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:6c5cd4f1157c2b7768fdef5eb0f3264270b477d111f964c7e78a1b18783d09ed
3
- size 42673218
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9b9541eb80007bc817bbe5b91828f3dc3ddc7e461d3480bf14cc6931458474b2
3
+ size 42671836