Skip to content

Transforms complex documents like PDFs and Office docs into LLM-ready markdown/JSON for your Agentic workflows.

feat: add ppocr el, th env5

Sidney2333da1ed8443b1
diff --git a/mineru/cli/gradio_app.py b/mineru/cli/gradio_app.py
index 0678f86d..b95dd10e 100644
--- a/mineru/cli/gradio_app.py
+++ b/mineru/cli/gradio_app.py
@@ -145,7 +145,7 @@ devanagari_lang = [
'hi', 'mr', 'ne', 'bh', 'mai', 'ang', 'bho', 'mah', 'sck', 'new', 'gom', # noqa: E126
'sa', 'bgc'
]
-other_lang = ['ch', 'ch_lite', 'ch_server', 'en', 'korean', 'japan', 'chinese_cht', 'ta', 'te', 'ka']
+other_lang = ['ch', 'ch_lite', 'ch_server', 'en', 'korean', 'japan', 'chinese_cht', 'ta', 'te', 'ka', "el", "th"]
add_lang = ['latin', 'arabic', 'east_slavic', 'cyrillic', 'devanagari']
# all_lang = ['', 'auto']
diff --git a/mineru/model/ocr/paddleocr2pytorch/pytorchocr/utils/resources/arch_config.yaml b/mineru/model/ocr/paddleocr2pytorch/pytorchocr/utils/resources/arch_config.yaml
index 1bbbb48d..6372cc41 100644
--- a/mineru/model/ocr/paddleocr2pytorch/pytorchocr/utils/resources/arch_config.yaml
+++ b/mineru/model/ocr/paddleocr2pytorch/pytorchocr/utils/resources/arch_config.yaml
@@ -568,4 +568,80 @@ eslav_PP-OCRv5_rec_infer:
nrtr_dim: 384
max_text_length: 25
+el_PP-OCRv5_rec_infer:
+ model_type: rec
+ algorithm: SVTR_LCNet
+ Transform:
+ Backbone:
+ name: PPLCNetV3
+ scale: 0.95
+ Head:
+ name: MultiHead
+ out_channels_list:
+ CTCLabelDecode: 356
+ head_list:
+ - CTCHead:
+ Neck:
+ name: svtr
+ dims: 120
+ depth: 2
+ hidden_dims: 120
+ kernel_size: [ 1, 3 ]
+ use_guide: True
+ Head:
+ fc_decay: 0.00001
+ - NRTRHead:
+ nrtr_dim: 384
+ max_text_length: 25
+th_PP-OCRv5_rec_infer:
+ model_type: rec
+ algorithm: SVTR_LCNet
+ Transform:
+ Backbone:
+ name: PPLCNetV3
+ scale: 0.95
+ Head:
+ name: MultiHead
+ out_channels_list:
+ CTCLabelDecode: 526
+ head_list:
+ - CTCHead:
+ Neck:
+ name: svtr
+ dims: 120
+ depth: 2
+ hidden_dims: 120
+ kernel_size: [ 1, 3 ]
+ use_guide: True
+ Head:
+ fc_decay: 0.00001
+ - NRTRHead:
+ nrtr_dim: 384
+ max_text_length: 25
+
+en_PP-OCRv5_rec_infer:
+ model_type: rec
+ algorithm: SVTR_LCNet
+ Transform:
+ Backbone:
+ name: PPLCNetV3
+ scale: 0.95
+ Head:
+ name: MultiHead
+ out_channels_list:
+ CTCLabelDecode: 438
+ head_list:
+ - CTCHead:
+ Neck:
+ name: svtr
+ dims: 120
+ depth: 2
+ hidden_dims: 120
+ kernel_size: [ 1, 3 ]
+ use_guide: True
+ Head:
+ fc_decay: 0.00001
+ - NRTRHead:
+ nrtr_dim: 384
+ max_text_length: 25
\ No newline at end of file
diff --git a/mineru/model/ocr/paddleocr2pytorch/pytorchocr/utils/resources/dict/ppocrv5_el_dict.txt b/mineru/model/ocr/paddleocr2pytorch/pytorchocr/utils/resources/dict/ppocrv5_el_dict.txt
new file mode 100644
index 00000000..a2de2e67
--- /dev/null
+++ b/mineru/model/ocr/paddleocr2pytorch/pytorchocr/utils/resources/dict/ppocrv5_el_dict.txt
@@ -0,0 +1,354 @@
+!
+"
+#
+$
+%
+&
+'
+(
+)
+*
++
+,
+-
+.
+/
+0
+1
+2
+3
+4
+5
+6
+7
+8
+9
+:
+;
+<
+=
+>
+?
+@
+[
+]
+_
+`
+^
+~
+©
+®
+™
+°
+²
+³
+´
+µ
+¶
+·
+¸
+¹
+º
+»
+¼
+½
+¾
+¿
+×
+÷
+‖
+‗
+‘
+’
+‚
+‛
+“
+”
+„
+†
+‡
+…
+‰
+′
+″
+‴
+‵
+‶
+‷
+‹
+›
+‼
+‽
+‾
+€
+£
+¥
+¢
+₤
+₡
+₽
+₴
+₹
+₿
+±
+∓
+≈
+≠
+≡
+≤
+≥
+∑
+∏
+∫
+∬
+∭
+∮
+∯
+∰
+√
+∛
+∜
+∝
+∞
+∂
+∇
+∴
+∵
+∷
+∠
+∡
+∢
+∟
+∦
+∩
+∪
+∗
+∖
+∥
+∧
+∨
+⊂
+⊃
+⊥
+∈
+∋
+∉
+∅
+↑
+→
+↓
+↔
+↕
+←
+⇒
+⇐
+⇔
+∀
+∃
+∄
+Ⅰ
+Ⅱ
+Ⅲ
+Ⅳ
+Ⅴ
+Ⅵ
+Ⅶ
+Ⅷ
+Ⅸ
+Ⅹ
+Ⅺ
+Ⅻ
+ⅰ
+ⅱ
+ⅲ
+ⅳ
+ⅴ
+ⅵ
+ⅶ
+ⅷ
+ⅸ
+ⅹ
+ⅺ
+ⅻ
+①
+②
+③
+④
+⑤
+⑥
+⑦
+⑧
+⑨
+⑩
+❶
+❷
+❸
+❹
+❺
+❻
+❼
+❽
+❾
+❿
+A
+B
+C
+D
+E
+F
+G
+H
+I
+J
+K
+L
+M
+N
+O
+P
+Q
+R
+S
+T
+U
+V
+W
+X
+Y
+Z
+a
+b
+c
+d
+e
+f
+g
+h
+i
+j
+k
+l
+m
+n
+o
+p
+q
+r
+s
+t
+u
+v
+w
+x
+y
+z
+Α
+Β
+Γ
+Δ
+Ε
+Ζ
+Η
+Θ
+Ι
+Κ
+Λ
+Μ
+Ν
+Ξ
+Ο
+Π
+Ρ
+Σ
+Τ
+Υ
+Φ
+Χ
+Ψ
+Ω
+ά
+έ
+ή
+ί
+ό
+ύ
+ώ
+Ϊ
+Ϋ
+Ά
+Έ
+Ή
+Ί
+Ό
+Ύ
+Ώ
+ϊ
+ΐ
+ϋ
+ΰ
+α
+β
+γ
+δ
+ε
+ζ
+η
+θ
+ι
+κ
+λ
+μ
+ν
+ξ
+ο
+π
+ρ
+ς
+σ
+τ
+υ
+φ
+χ
+ψ
+ω
+ϐ
+ϑ
+ϒ
+ϓ
+ϔ
+ϕ
+ϖ
+Ϛ
+ϛ
+Ϝ
+ϝ
+Ϟ
+ϟ
+Ϡ
+ϡ
+Ϣ
+ϣ
+Ϥ
+ϥ
+Ϧ
+ϧ
+Ϩ
+ϩ
+Ϫ
+ϫ
+Ϭ
+ϭ
+Ϯ
+ϯ
+ϰ
+ϱ
+ϲ
+ϳ
+ϴ
+ϵ
+϶
+Ϸ
+ϸ
+Ϲ
+Ϻ
+ϻ
diff --git a/mineru/model/ocr/paddleocr2pytorch/pytorchocr/utils/resources/dict/ppocrv5_en_dict.txt b/mineru/model/ocr/paddleocr2pytorch/pytorchocr/utils/resources/dict/ppocrv5_en_dict.txt
new file mode 100644
index 00000000..7bf3f5fa
--- /dev/null
+++ b/mineru/model/ocr/paddleocr2pytorch/pytorchocr/utils/resources/dict/ppocrv5_en_dict.txt
@@ -0,0 +1,436 @@
+0
+1
+2
+3
+4
+5
+6
+7
+8
+9
+A
+B
+C
+D
+E
+F
+G
+H
+I
+J
+K
+L
+M
+N
+O
+P
+Q
+R
+S
+T
+U
+V
+W
+X
+Y
+Z
+a
+b
+c
+d
+e
+f
+g
+h
+i
+j
+k
+l
+m
+n
+o
+p
+q
+r
+s
+t
+u
+v
+w
+x
+y
+z
+!
+"
+#
+$
+%
+&
+'
+(
+)
+*
++
+,
+-
+.
+/
+:
+;
+<
+=
+>
+?
+@
+[
+\
+]
+_
+`
+{
+|
+}
+^
+~
+©
+®
+℉
+№
+Ω
+℮
+™
+∆
+✓
+✔
+✗
+✘
+✕
+☑
+☒
+●
+▪
+▫
+◼
+▶
+◀
+⬆
+¤
+¦
+§
+¨
+ª
+«
+¬
+¯
+°
+²
+³
+´
+µ
+¶
+¸
+¹
+º
+»
+¼
+½
+¾
+¿
+×
+‐
+‑
+‒
+—
+―
+‖
+‗
+‘
+’
+‚
+‛
+“
+”
+„
+‟
+†
+‡
+‣
+․
+…
+‧
+‰
+‴
+‵
+‶
+‷
+‸
+‹
+›
+※
+‼
+‽
+‾
+−
+₤
+₡
+₹
+₽
+₴
+₿
+¢
+€
+£
+¥
+Ⅰ
+Ⅱ
+Ⅲ
+Ⅳ
+Ⅴ
+Ⅵ
+Ⅶ
+Ⅷ
+Ⅸ
+Ⅹ
+Ⅺ
+Ⅻ
+ⅰ
+ⅱ
+ⅲ
+ⅳ
+ⅴ
+ⅵ
+ⅶ
+ⅷ
+ⅸ
+ⅹ
+ⅺ
+ⅻ
+➀
+➁
+➂
+➃
+➄
+➅
+➆
+➇
+➈
+➉
+➊
+➋
+➌
+➍
+➎
+➏
+➐
+➑
+➒
+➓
+❶
+❷
+❸
+❹
+❺
+❻
+❼
+❽
+❾
+❿
+①
+②
+③
+④
+⑤
+⑥
+⑦
+⑧
+⑨
+⑩
+↑
+→
+↓
+↕
+←
+↔
+⇒
+⇐
+⇔
+∀
+∃
+∄
+∴
+∵
+∝
+∞
+∩
+∪
+∂
+∫
+∬
+∭
+∮
+∯
+∰
+∑
+∏
+√
+∛
+∜
+∱
+∲
+∳
+∶
+∷
+∼
+∖
+∗
+≈
+≠
+≡
+≤
+≥
+⊂
+⊃
+⊥
+⊾
+⊿
+□
+∥
+∋
+ƒ
+′
+″
+À
+Á
+Â
+Ã
+Ä
+Å
+Æ
+Ç
+È
+É
+Ê
+Ë
+Ì
+Í
+Î
+Ï
+Ð
+Ñ
+Ò
+Ó
+Ô
+Õ
+Ö
+Ø
+Ù
+Ú
+Û
+Ü
+Ý
+Þ
+à
+á
+â
+ã
+ä
+å
+æ
+ç
+è
+é
+ê
+ë
+ì
+í
+î
+ï
+ð
+ñ
+ò
+ó
+ô
+õ
+ö
+ø
+ù
+ú
+û
+ü
+ý
+þ
+ÿ
+Α
+Β
+Γ
+Δ
+Ε
+Ζ
+Η
+Θ
+Ι
+Κ
+Λ
+Μ
+Ν
+Ξ
+Ο
+Π
+Ρ
+Σ
+Τ
+Υ
+Φ
+Χ
+Ψ
+Ω
+α
+β
+γ
+δ
+ε
+ζ
+η
+θ
+ι
+κ
+λ
+μ
+ν
+ξ
+ο
+π
+ρ
+σ
+ς
+τ
+υ
+φ
+χ
+ψ
+ω
+Å
+ℏ
+⌀
+⍺
+⍵
+𝑢
+𝜓
+०
+‥
+︽
+﹥
+•
+÷
+∕
+∙
+⋅
+·
+±
+∓
+∟
+∠
+∡
+∢
+℧
+☺
diff --git a/mineru/model/ocr/paddleocr2pytorch/pytorchocr/utils/resources/dict/ppocrv5_th_dict.txt b/mineru/model/ocr/paddleocr2pytorch/pytorchocr/utils/resources/dict/ppocrv5_th_dict.txt
new file mode 100644
index 00000000..afab9d5a
--- /dev/null
+++ b/mineru/model/ocr/paddleocr2pytorch/pytorchocr/utils/resources/dict/ppocrv5_th_dict.txt
@@ -0,0 +1,524 @@
+!
+"
+#
+$
+%
+&
+'
+(
+)
+*
++
+,
+-
+.
+/
+0
+1
+2
+3
+4
+5
+6
+7
+8
+9
+:
+;
+<
+=
+>
+?
+A
+B
+C
+D
+E
+F
+G
+H
+I
+J
+K
+L
+M
+N
+O
+P
+Q
+R
+S
+T
+U
+V
+W
+X
+Y
+Z
+[
+]
+_
+`
+a
+b
+c
+d
+e
+f
+g
+h
+i
+j
+k
+l
+m
+n
+o
+p
+q
+r
+s
+t
+u
+v
+w
+x
+y
+z
+©
+‥
+{
+}
+\
+|
+@
+^
+~
+÷
+∕
+∙
+⋅
+·
+±
+∓
+∩
+∪
+□
+←
+↔
+⇒
+⇐
+⇔
+∀
+∃
+∄
+∴
+∵
+∝
+∞
+⊥
+∟
+∠
+∡
+∢
+′
+″
+∥
+⊾
+⊿
+∂
+∫
+∬
+∭
+∮
+∯
+∰
+∑
+∏
+√
+∛
+∜
+∱
+∲
+∳
+∶
+∷
+∼
+®
+℉
+Ω
+℧
+Å
+⌀
+ℏ
+⅀
+⍺
+⍵
+¢
+€
+£
+¥
+₿
+Ⅰ
+Ⅱ
+Ⅲ
+Ⅳ
+Ⅴ
+Ⅵ
+Ⅶ
+Ⅷ
+Ⅸ
+Ⅹ
+Ⅺ
+Ⅻ
+ⅰ
+ⅱ
+ⅲ
+ⅳ
+ⅴ
+ⅵ
+ⅶ
+ⅷ
+ⅸ
+ⅹ
+ⅺ
+ⅻ
+➀
+➁
+➂
+➃
+➄
+➅
+➆
+➇
+➈
+➉
+➊
+➋
+➌
+➍
+➎
+➏
+➐
+➑
+➒
+➓
+❶
+❷
+❸
+❹
+❺
+❻
+❼
+❽
+❾
+❿
+①
+②
+③
+④
+⑤
+⑥
+⑦
+⑧
+⑨
+⑩
+●
+▶
+𝑢
+︽
+–
+﹥
+𝜓
+•
+∋
+ƒ
+०
+⬆
+Ạ
+◀
+
+▫
+︾
+À
+Á
+Â
+Ã
+Ä
+Å
+Æ
+Ç
+È
+É
+Ê
+Ë
+Ì
+Í
+Î
+Ï
+Ð
+Ñ
+Ò
+Ó
+Ô
+Õ
+Ö
+Ø
+Ù
+Ú
+Û
+Ü
+Ý
+Þ
+à
+á
+â
+ã
+ä
+å
+æ
+ç
+è
+é
+ê
+ë
+ì
+í
+î
+ï
+ð
+ñ
+ò
+ó
+ô
+õ
+ö
+ø
+ù
+ú
+û
+ü
+ý
+þ
+ÿ
+¡
+¤
+¦
+§
+¨
+ª
+«
+¬
+¯
+°
+²
+³
+´
+µ
+¶
+¸
+¹
+º
+»
+¼
+½
+¾
+¿
+×
+‐
+‑
+‒
+—
+―
+‖
+‗
+‘
+’
+‚
+‛
+“
+”
+„
+‟
+†
+‡
+‣
+․
+…
+‧
+‰
+‴
+‵
+‶
+‷
+‸
+‹
+›
+※
+‼
+‽
+‾
+₤
+₡
+₹
+−
+∖
+∗
+≈
+≠
+≡
+≤
+≥
+⊂
+⊃
+↑
+→
+↓
+↕
+™
+Ω
+℮
+∆
+✓
+✗
+✘
+▪
+◼
+✔
+✕
+☑
+☒
+№
+₽
+₴
+Α
+α
+Β
+β
+Γ
+γ
+Δ
+δ
+Ε
+ε
+Ζ
+ζ
+Η
+η
+Θ
+θ
+Ι
+ι
+Κ
+κ
+Λ
+λ
+Μ
+μ
+Ν
+ν
+Ξ
+ξ
+Ο
+ο
+Π
+π
+Ρ
+ρ
+Σ
+σ
+ς
+Τ
+τ
+Υ
+υ
+Φ
+φ
+Χ
+χ
+Ψ
+ψ
+ω
+ก
+ข
+ค
+ฅ
+ฆ
+ง
+จ
+ฉ
+ช
+ซ
+ฌ
+ญ
+ฎ
+ฏ
+ฐ
+ฑ
+ฒ
+ณ
+ด
+ต
+ถ
+ท
+ธ
+น
+บ
+ป
+ผ
+ฝ
+พ
+ฟ
+ภ
+ม
+ย
+ร
+ฤ
+ล
+ฦ
+ว
+ศ
+ษ
+ส
+ห
+ฬ
+อ
+ฮ
+ฯ
+ะ
+ั
+า
+ำ
+ิ
+ี
+ึ
+ื
+ุ
+ู
+ฺ
+฿
+เ
+แ
+โ
+ใ
+ไ
+ๅ
+ๆ
+็
+่
+้
+๊
+๋
+์
+ํ
+๐
+๑
+๒
+๓
+๔
+๕
+๖
+๗
+๘
+๙
+๚
diff --git a/mineru/model/ocr/paddleocr2pytorch/pytorchocr/utils/resources/models_config.yml b/mineru/model/ocr/paddleocr2pytorch/pytorchocr/utils/resources/models_config.yml
index da36bf44..5fc1dd51 100644
--- a/mineru/model/ocr/paddleocr2pytorch/pytorchocr/utils/resources/models_config.yml
+++ b/mineru/model/ocr/paddleocr2pytorch/pytorchocr/utils/resources/models_config.yml
@@ -19,7 +19,7 @@ lang:
det: ch_PP-OCRv5_det_infer.pth
rec: ch_PP-OCRv4_rec_server_doc_infer.pth
dict: ppocrv4_doc_dict.txt
- en:
+ en_v4:
det: en_PP-OCRv3_det_infer.pth
rec: en_PP-OCRv4_rec_infer.pth
dict: en_dict.txt
@@ -66,4 +66,16 @@ lang:
east_slavic:
det: ch_PP-OCRv5_det_infer.pth
rec: eslav_PP-OCRv5_rec_infer.pth
- dict: ppocrv5_eslav_dict.txt
\ No newline at end of file
+ dict: ppocrv5_eslav_dict.txt
+ el:
+ det: ch_PP-OCRv5_det_infer.pth
+ rec: el_PP-OCRv5_rec_infer.pth
+ dict: ppocrv5_el_dict.txt
+ th:
+ det: ch_PP-OCRv5_det_infer.pth
+ rec: th_PP-OCRv5_rec_infer.pth
+ dict: ppocrv5_th_dict.txt
+ en:
+ det: ch_PP-OCRv5_det_infer.pth
+ rec: en_PP-OCRv5_rec_infer.pth
+ dict: ppocrv5_en_dict.txt
\ No newline at end of file