paddleocr 3.0.0__tar.gz → 3.0.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (290) hide show
  1. {paddleocr-3.0.0/paddleocr.egg-info → paddleocr-3.0.1}/PKG-INFO +58 -62
  2. {paddleocr-3.0.0 → paddleocr-3.0.1}/README.md +56 -60
  3. {paddleocr-3.0.0 → paddleocr-3.0.1}/README_en.md +56 -61
  4. {paddleocr-3.0.0 → paddleocr-3.0.1}/paddleocr/_cli.py +10 -4
  5. {paddleocr-3.0.0 → paddleocr-3.0.1}/paddleocr/_common_args.py +3 -8
  6. {paddleocr-3.0.0 → paddleocr-3.0.1}/paddleocr/_constants.py +1 -1
  7. {paddleocr-3.0.0 → paddleocr-3.0.1}/paddleocr/_models/__init__.py +1 -1
  8. {paddleocr-3.0.0 → paddleocr-3.0.1}/paddleocr/_models/base.py +0 -10
  9. {paddleocr-3.0.0 → paddleocr-3.0.1}/paddleocr/_models/layout_detection.py +1 -1
  10. {paddleocr-3.0.0 → paddleocr-3.0.1}/paddleocr/_models/text_detection.py +1 -1
  11. {paddleocr-3.0.0 → paddleocr-3.0.1}/paddleocr/_models/text_recognition.py +1 -1
  12. paddleocr-3.0.0/paddleocr/_models/text_line_orientation_classification.py → paddleocr-3.0.1/paddleocr/_models/textline_orientation_classification.py +1 -1
  13. {paddleocr-3.0.0 → paddleocr-3.0.1}/paddleocr/_pipelines/base.py +0 -10
  14. {paddleocr-3.0.0 → paddleocr-3.0.1}/paddleocr/_pipelines/doc_preprocessor.py +2 -2
  15. {paddleocr-3.0.0 → paddleocr-3.0.1}/paddleocr/_pipelines/ocr.py +39 -19
  16. {paddleocr-3.0.0 → paddleocr-3.0.1}/paddleocr/_pipelines/pp_chatocrv4_doc.py +42 -2
  17. {paddleocr-3.0.0 → paddleocr-3.0.1}/paddleocr/_pipelines/pp_structurev3.py +19 -5
  18. {paddleocr-3.0.0 → paddleocr-3.0.1}/paddleocr/_pipelines/seal_recognition.py +3 -3
  19. {paddleocr-3.0.0 → paddleocr-3.0.1}/paddleocr/_pipelines/table_recognition_v2.py +2 -2
  20. {paddleocr-3.0.0 → paddleocr-3.0.1}/paddleocr/_utils/cli.py +13 -3
  21. {paddleocr-3.0.0 → paddleocr-3.0.1/paddleocr.egg-info}/PKG-INFO +58 -62
  22. {paddleocr-3.0.0 → paddleocr-3.0.1}/paddleocr.egg-info/SOURCES.txt +1 -2
  23. {paddleocr-3.0.0 → paddleocr-3.0.1}/paddleocr.egg-info/requires.txt +1 -1
  24. {paddleocr-3.0.0 → paddleocr-3.0.1}/pyproject.toml +1 -1
  25. paddleocr-3.0.0/paddleocr/_mkldnn_blocklists.py +0 -31
  26. {paddleocr-3.0.0 → paddleocr-3.0.1}/LICENSE +0 -0
  27. {paddleocr-3.0.0 → paddleocr-3.0.1}/MANIFEST.in +0 -0
  28. {paddleocr-3.0.0 → paddleocr-3.0.1}/awesome_projects.md +0 -0
  29. {paddleocr-3.0.0 → paddleocr-3.0.1}/paddleocr/__init__.py +0 -0
  30. {paddleocr-3.0.0 → paddleocr-3.0.1}/paddleocr/__main__.py +0 -0
  31. {paddleocr-3.0.0 → paddleocr-3.0.1}/paddleocr/_abstract.py +0 -0
  32. {paddleocr-3.0.0 → paddleocr-3.0.1}/paddleocr/_env.py +0 -0
  33. {paddleocr-3.0.0 → paddleocr-3.0.1}/paddleocr/_models/_image_classification.py +0 -0
  34. {paddleocr-3.0.0 → paddleocr-3.0.1}/paddleocr/_models/_object_detection.py +0 -0
  35. {paddleocr-3.0.0 → paddleocr-3.0.1}/paddleocr/_models/_text_detection.py +0 -0
  36. {paddleocr-3.0.0 → paddleocr-3.0.1}/paddleocr/_models/doc_img_orientation_classification.py +0 -0
  37. {paddleocr-3.0.0 → paddleocr-3.0.1}/paddleocr/_models/doc_vlm.py +0 -0
  38. {paddleocr-3.0.0 → paddleocr-3.0.1}/paddleocr/_models/formula_recognition.py +0 -0
  39. {paddleocr-3.0.0 → paddleocr-3.0.1}/paddleocr/_models/seal_text_detection.py +0 -0
  40. {paddleocr-3.0.0 → paddleocr-3.0.1}/paddleocr/_models/table_cells_detection.py +0 -0
  41. {paddleocr-3.0.0 → paddleocr-3.0.1}/paddleocr/_models/table_classification.py +0 -0
  42. {paddleocr-3.0.0 → paddleocr-3.0.1}/paddleocr/_models/table_structure_recognition.py +0 -0
  43. {paddleocr-3.0.0 → paddleocr-3.0.1}/paddleocr/_models/text_image_unwarping.py +0 -0
  44. {paddleocr-3.0.0 → paddleocr-3.0.1}/paddleocr/_pipelines/__init__.py +0 -0
  45. {paddleocr-3.0.0 → paddleocr-3.0.1}/paddleocr/_pipelines/doc_understanding.py +0 -0
  46. {paddleocr-3.0.0 → paddleocr-3.0.1}/paddleocr/_pipelines/formula_recognition.py +0 -0
  47. {paddleocr-3.0.0 → paddleocr-3.0.1}/paddleocr/_pipelines/utils.py +0 -0
  48. {paddleocr-3.0.0 → paddleocr-3.0.1}/paddleocr/_utils/__init__.py +0 -0
  49. {paddleocr-3.0.0 → paddleocr-3.0.1}/paddleocr/_utils/deprecation.py +0 -0
  50. {paddleocr-3.0.0 → paddleocr-3.0.1}/paddleocr/_utils/logging.py +0 -0
  51. {paddleocr-3.0.0 → paddleocr-3.0.1}/paddleocr/_version.py +0 -0
  52. {paddleocr-3.0.0 → paddleocr-3.0.1}/paddleocr.egg-info/dependency_links.txt +0 -0
  53. {paddleocr-3.0.0 → paddleocr-3.0.1}/paddleocr.egg-info/entry_points.txt +0 -0
  54. {paddleocr-3.0.0 → paddleocr-3.0.1}/paddleocr.egg-info/top_level.txt +0 -0
  55. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/__init__.py +0 -0
  56. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/data/__init__.py +0 -0
  57. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/data/collate_fn.py +0 -0
  58. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/data/imaug/ColorJitter.py +0 -0
  59. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/data/imaug/__init__.py +0 -0
  60. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/data/imaug/abinet_aug.py +0 -0
  61. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/data/imaug/copy_paste.py +0 -0
  62. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/data/imaug/ct_process.py +0 -0
  63. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/data/imaug/drrg_targets.py +0 -0
  64. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/data/imaug/east_process.py +0 -0
  65. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/data/imaug/fce_aug.py +0 -0
  66. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/data/imaug/fce_targets.py +0 -0
  67. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/data/imaug/frost_img/frost1.jpg +0 -0
  68. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/data/imaug/frost_img/frost2.png +0 -0
  69. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/data/imaug/frost_img/frost3.png +0 -0
  70. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/data/imaug/frost_img/frost4.jpg +0 -0
  71. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/data/imaug/frost_img/frost5.jpg +0 -0
  72. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/data/imaug/frost_img/frost6.jpg +0 -0
  73. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/data/imaug/iaa_augment.py +0 -0
  74. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/data/imaug/label_ops.py +0 -0
  75. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/data/imaug/latex_ocr_aug.py +0 -0
  76. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/data/imaug/make_border_map.py +0 -0
  77. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/data/imaug/make_pse_gt.py +0 -0
  78. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/data/imaug/make_shrink_map.py +0 -0
  79. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/data/imaug/operators.py +0 -0
  80. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/data/imaug/pg_process.py +0 -0
  81. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/data/imaug/randaugment.py +0 -0
  82. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/data/imaug/random_crop_data.py +0 -0
  83. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/data/imaug/rec_img_aug.py +0 -0
  84. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/data/imaug/sast_process.py +0 -0
  85. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/data/imaug/ssl_img_aug.py +0 -0
  86. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/data/imaug/table_ops.py +0 -0
  87. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/data/imaug/text_image_aug/__init__.py +0 -0
  88. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/data/imaug/text_image_aug/augment.py +0 -0
  89. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/data/imaug/text_image_aug/warp_mls.py +0 -0
  90. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/data/imaug/unimernet_aug.py +0 -0
  91. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/data/imaug/vqa/__init__.py +0 -0
  92. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/data/imaug/vqa/augment.py +0 -0
  93. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/data/imaug/vqa/token/__init__.py +0 -0
  94. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/data/imaug/vqa/token/vqa_re_convert.py +0 -0
  95. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/data/imaug/vqa/token/vqa_token_chunk.py +0 -0
  96. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/data/imaug/vqa/token/vqa_token_pad.py +0 -0
  97. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/data/imaug/vqa/token/vqa_token_relation.py +0 -0
  98. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/data/latexocr_dataset.py +0 -0
  99. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/data/lmdb_dataset.py +0 -0
  100. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/data/multi_scale_sampler.py +0 -0
  101. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/data/pgnet_dataset.py +0 -0
  102. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/data/pubtab_dataset.py +0 -0
  103. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/data/simple_dataset.py +0 -0
  104. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/postprocess/__init__.py +0 -0
  105. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/postprocess/cls_postprocess.py +0 -0
  106. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/postprocess/ct_postprocess.py +0 -0
  107. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/postprocess/db_postprocess.py +0 -0
  108. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/postprocess/drrg_postprocess.py +0 -0
  109. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/postprocess/east_postprocess.py +0 -0
  110. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/postprocess/fce_postprocess.py +0 -0
  111. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/postprocess/locality_aware_nms.py +0 -0
  112. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/postprocess/pg_postprocess.py +0 -0
  113. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/postprocess/picodet_postprocess.py +0 -0
  114. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/postprocess/pse_postprocess/__init__.py +0 -0
  115. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/postprocess/pse_postprocess/pse/README.md +0 -0
  116. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/postprocess/pse_postprocess/pse/__init__.py +0 -0
  117. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/postprocess/pse_postprocess/pse/pse.pyx +0 -0
  118. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/postprocess/pse_postprocess/pse/setup.py +0 -0
  119. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/postprocess/pse_postprocess/pse_postprocess.py +0 -0
  120. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/postprocess/rec_postprocess.py +0 -0
  121. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/postprocess/sast_postprocess.py +0 -0
  122. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/postprocess/table_postprocess.py +0 -0
  123. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/postprocess/vqa_token_re_layoutlm_postprocess.py +0 -0
  124. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/postprocess/vqa_token_ser_layoutlm_postprocess.py +0 -0
  125. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/EN_symbol_dict.txt +0 -0
  126. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/__init__.py +0 -0
  127. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/dict/README.md +0 -0
  128. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/dict/ar_dict.txt +0 -0
  129. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/dict/arabic_dict.txt +0 -0
  130. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/dict/be_dict.txt +0 -0
  131. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/dict/bengali_dict.txt +0 -0
  132. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/dict/bg_dict.txt +0 -0
  133. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/dict/bm_dict.txt +0 -0
  134. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/dict/bm_dict_add.txt +0 -0
  135. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/dict/bn_dict.txt +0 -0
  136. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/dict/chinese_cht_dict.txt +0 -0
  137. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/dict/confuse.pkl +0 -0
  138. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/dict/cyrillic_dict.txt +0 -0
  139. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/dict/devanagari_dict.txt +0 -0
  140. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/dict/en_dict.txt +0 -0
  141. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/dict/fa_dict.txt +0 -0
  142. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/dict/french_dict.txt +0 -0
  143. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/dict/german_dict.txt +0 -0
  144. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/dict/gujarati_dict.txt +0 -0
  145. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/dict/hebrew_dict.txt +0 -0
  146. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/dict/hi_dict.txt +0 -0
  147. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/dict/it_dict.txt +0 -0
  148. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/dict/japan_dict.txt +0 -0
  149. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/dict/ka_dict.txt +0 -0
  150. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/dict/kazakh_dict.txt +0 -0
  151. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/dict/kie_dict/xfund_class_list.txt +0 -0
  152. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/dict/korean_dict.txt +0 -0
  153. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/dict/latex_ocr_tokenizer.json +0 -0
  154. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/dict/latex_symbol_dict.txt +0 -0
  155. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/dict/latin_dict.txt +0 -0
  156. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/dict/layout_dict/layout_cdla_dict.txt +0 -0
  157. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/dict/layout_dict/layout_publaynet_dict.txt +0 -0
  158. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/dict/layout_dict/layout_table_dict.txt +0 -0
  159. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/dict/mr_dict.txt +0 -0
  160. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/dict/ne_dict.txt +0 -0
  161. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/dict/oc_dict.txt +0 -0
  162. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/dict/parseq_dict.txt +0 -0
  163. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/dict/ppocrv4_doc_dict.txt +0 -0
  164. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/dict/ppocrv5_dict.txt +0 -0
  165. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/dict/pu_dict.txt +0 -0
  166. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/dict/rs_dict.txt +0 -0
  167. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/dict/rsc_dict.txt +0 -0
  168. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/dict/ru_dict.txt +0 -0
  169. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/dict/samaritan_dict.txt +0 -0
  170. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/dict/spin_dict.txt +0 -0
  171. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/dict/syriac_dict.txt +0 -0
  172. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/dict/ta_dict.txt +0 -0
  173. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/dict/table_dict.txt +0 -0
  174. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/dict/table_master_structure_dict.txt +0 -0
  175. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/dict/table_structure_dict.txt +0 -0
  176. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/dict/table_structure_dict_ch.txt +0 -0
  177. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/dict/te_dict.txt +0 -0
  178. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/dict/th_dict.txt +0 -0
  179. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/dict/ug_dict.txt +0 -0
  180. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/dict/uk_dict.txt +0 -0
  181. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/dict/unimernet_tokenizer/tokenizer.json +0 -0
  182. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/dict/unimernet_tokenizer/tokenizer_config.json +0 -0
  183. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/dict/ur_dict.txt +0 -0
  184. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/dict/vi_dict.txt +0 -0
  185. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/dict/xi_dict.txt +0 -0
  186. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/dict90.txt +0 -0
  187. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/e2e_metric/Deteval.py +0 -0
  188. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/e2e_metric/polygon_fast.py +0 -0
  189. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/e2e_utils/extract_batchsize.py +0 -0
  190. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/e2e_utils/extract_textpoint_fast.py +0 -0
  191. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/e2e_utils/extract_textpoint_slow.py +0 -0
  192. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/e2e_utils/pgnet_pp_utils.py +0 -0
  193. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/e2e_utils/visual.py +0 -0
  194. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/en_dict.txt +0 -0
  195. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/export_model.py +0 -0
  196. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/formula_utils/math_txt2pkl.py +0 -0
  197. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/formula_utils/unimernet_data_convert.py +0 -0
  198. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/gen_label.py +0 -0
  199. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/ic15_dict.txt +0 -0
  200. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/iou.py +0 -0
  201. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/loggers/__init__.py +0 -0
  202. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/loggers/base_logger.py +0 -0
  203. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/loggers/loggers.py +0 -0
  204. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/loggers/wandb_logger.py +0 -0
  205. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/logging.py +0 -0
  206. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/network.py +0 -0
  207. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/poly_nms.py +0 -0
  208. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/ppocr_keys_v1.txt +0 -0
  209. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/profiler.py +0 -0
  210. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/save_load.py +0 -0
  211. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/stats.py +0 -0
  212. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/utility.py +0 -0
  213. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppocr/utils/visual.py +0 -0
  214. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppstructure/README.md +0 -0
  215. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppstructure/__init__.py +0 -0
  216. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppstructure/kie/README.md +0 -0
  217. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppstructure/kie/README_ch.md +0 -0
  218. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppstructure/kie/how_to_do_kie.md +0 -0
  219. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppstructure/kie/how_to_do_kie_en.md +0 -0
  220. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppstructure/kie/predict_kie_token_ser.py +0 -0
  221. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppstructure/kie/predict_kie_token_ser_re.py +0 -0
  222. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppstructure/kie/requirements.txt +0 -0
  223. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppstructure/kie/tools/eval_with_label_end2end.py +0 -0
  224. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppstructure/kie/tools/trans_funsd_label.py +0 -0
  225. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppstructure/kie/tools/trans_xfun_data.py +0 -0
  226. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppstructure/layout/README.md +0 -0
  227. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppstructure/layout/README_ch.md +0 -0
  228. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppstructure/layout/__init__.py +0 -0
  229. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppstructure/layout/predict_layout.py +0 -0
  230. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppstructure/pdf2word/README.md +0 -0
  231. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppstructure/pdf2word/icons/chinese.png +0 -0
  232. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppstructure/pdf2word/icons/english.png +0 -0
  233. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppstructure/pdf2word/icons/folder-open.png +0 -0
  234. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppstructure/pdf2word/icons/folder-plus.png +0 -0
  235. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppstructure/pdf2word/pdf2word.py +0 -0
  236. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppstructure/predict_system.py +0 -0
  237. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppstructure/recovery/README.md +0 -0
  238. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppstructure/recovery/README_ch.md +0 -0
  239. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppstructure/recovery/__init__.py +0 -0
  240. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppstructure/recovery/recovery_to_doc.py +0 -0
  241. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppstructure/recovery/recovery_to_markdown.py +0 -0
  242. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppstructure/recovery/requirements.txt +0 -0
  243. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppstructure/recovery/table_process.py +0 -0
  244. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppstructure/table/README.md +0 -0
  245. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppstructure/table/README_ch.md +0 -0
  246. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppstructure/table/__init__.py +0 -0
  247. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppstructure/table/convert_label2html.py +0 -0
  248. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppstructure/table/eval_table.py +0 -0
  249. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppstructure/table/matcher.py +0 -0
  250. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppstructure/table/predict_structure.py +0 -0
  251. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppstructure/table/predict_table.py +0 -0
  252. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppstructure/table/table_master_match.py +0 -0
  253. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppstructure/table/table_metric/__init__.py +0 -0
  254. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppstructure/table/table_metric/parallel.py +0 -0
  255. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppstructure/table/table_metric/table_metric.py +0 -0
  256. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppstructure/table/tablepyxl/__init__.py +0 -0
  257. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppstructure/table/tablepyxl/style.py +0 -0
  258. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppstructure/table/tablepyxl/tablepyxl.py +0 -0
  259. {paddleocr-3.0.0 → paddleocr-3.0.1}/ppstructure/utility.py +0 -0
  260. {paddleocr-3.0.0 → paddleocr-3.0.1}/requirements.txt +0 -0
  261. {paddleocr-3.0.0 → paddleocr-3.0.1}/setup.cfg +0 -0
  262. {paddleocr-3.0.0 → paddleocr-3.0.1}/setup.py +0 -0
  263. {paddleocr-3.0.0 → paddleocr-3.0.1}/tools/__init__.py +0 -0
  264. {paddleocr-3.0.0 → paddleocr-3.0.1}/tools/end2end/convert_ppocr_label.py +0 -0
  265. {paddleocr-3.0.0 → paddleocr-3.0.1}/tools/end2end/draw_html.py +0 -0
  266. {paddleocr-3.0.0 → paddleocr-3.0.1}/tools/end2end/eval_end2end.py +0 -0
  267. {paddleocr-3.0.0 → paddleocr-3.0.1}/tools/end2end/readme.md +0 -0
  268. {paddleocr-3.0.0 → paddleocr-3.0.1}/tools/eval.py +0 -0
  269. {paddleocr-3.0.0 → paddleocr-3.0.1}/tools/export_center.py +0 -0
  270. {paddleocr-3.0.0 → paddleocr-3.0.1}/tools/export_model.py +0 -0
  271. {paddleocr-3.0.0 → paddleocr-3.0.1}/tools/infer/predict_cls.py +0 -0
  272. {paddleocr-3.0.0 → paddleocr-3.0.1}/tools/infer/predict_det.py +0 -0
  273. {paddleocr-3.0.0 → paddleocr-3.0.1}/tools/infer/predict_e2e.py +0 -0
  274. {paddleocr-3.0.0 → paddleocr-3.0.1}/tools/infer/predict_rec.py +0 -0
  275. {paddleocr-3.0.0 → paddleocr-3.0.1}/tools/infer/predict_sr.py +0 -0
  276. {paddleocr-3.0.0 → paddleocr-3.0.1}/tools/infer/predict_system.py +0 -0
  277. {paddleocr-3.0.0 → paddleocr-3.0.1}/tools/infer/utility.py +0 -0
  278. {paddleocr-3.0.0 → paddleocr-3.0.1}/tools/infer_cls.py +0 -0
  279. {paddleocr-3.0.0 → paddleocr-3.0.1}/tools/infer_det.py +0 -0
  280. {paddleocr-3.0.0 → paddleocr-3.0.1}/tools/infer_e2e.py +0 -0
  281. {paddleocr-3.0.0 → paddleocr-3.0.1}/tools/infer_kie.py +0 -0
  282. {paddleocr-3.0.0 → paddleocr-3.0.1}/tools/infer_kie_token_ser.py +0 -0
  283. {paddleocr-3.0.0 → paddleocr-3.0.1}/tools/infer_kie_token_ser_re.py +0 -0
  284. {paddleocr-3.0.0 → paddleocr-3.0.1}/tools/infer_rec.py +0 -0
  285. {paddleocr-3.0.0 → paddleocr-3.0.1}/tools/infer_sr.py +0 -0
  286. {paddleocr-3.0.0 → paddleocr-3.0.1}/tools/infer_table.py +0 -0
  287. {paddleocr-3.0.0 → paddleocr-3.0.1}/tools/naive_sync_bn.py +0 -0
  288. {paddleocr-3.0.0 → paddleocr-3.0.1}/tools/program.py +0 -0
  289. {paddleocr-3.0.0 → paddleocr-3.0.1}/tools/test_hubserving.py +0 -0
  290. {paddleocr-3.0.0 → paddleocr-3.0.1}/tools/train.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: paddleocr
3
- Version: 3.0.0
3
+ Version: 3.0.1
4
4
  Summary: Awesome OCR toolkit based on PaddlePaddle
5
5
  Author-email: PaddlePaddle <Paddle-better@baidu.com>
6
6
  Maintainer-email: PaddlePaddle <Paddle-better@baidu.com>
@@ -18,7 +18,7 @@ Classifier: Topic :: Utilities
18
18
  Requires-Python: >=3.8
19
19
  Description-Content-Type: text/markdown
20
20
  License-File: LICENSE
21
- Requires-Dist: paddlex[ie,multimodal,ocr]==3.0.0
21
+ Requires-Dist: paddlex[ie,multimodal,ocr]==3.0.1
22
22
  Requires-Dist: PyYAML>=6
23
23
  Requires-Dist: typing-extensions>=4.12
24
24
 
@@ -28,14 +28,16 @@ Requires-Dist: typing-extensions>=4.12
28
28
  </p>
29
29
 
30
30
  <!-- language -->
31
- 中文 | [English](./README_en.md) | [日本語](./README_ja.md)
31
+ 中文 | [English](./README_en.md)
32
32
 
33
33
  <!-- icon -->
34
34
 
35
35
  [![stars](https://img.shields.io/github/stars/PaddlePaddle/PaddleOCR?color=ccf)](https://github.com/PaddlePaddle/PaddleOCR)
36
36
  [![Downloads](https://img.shields.io/pypi/dm/paddleocr)](https://pypi.org/project/PaddleOCR/)
37
- ![python](https://img.shields.io/badge/python-3.8+-aff.svg)
37
+ ![python](https://img.shields.io/badge/python-3.8~3.12-aff.svg)
38
38
  ![os](https://img.shields.io/badge/os-linux%2C%20win%2C%20mac-pink.svg)
39
+ ![hardware](https://img.shields.io/badge/hardware-cpu%2C%20gpu%2C%20xpu%2C%20npu-yellow.svg)
40
+
39
41
 
40
42
  [![Website](https://img.shields.io/badge/Website-PaddleOCR-blue?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmmRkdj0AAAAASUVORK5CYII=)](https://www.paddleocr.ai/)
41
43
  [![AI Studio](https://img.shields.io/badge/PP_OCRv5-AI_Studio-green)](https://aistudio.baidu.com/community/app/91660/webUI)
@@ -45,12 +47,12 @@ Requires-Dist: typing-extensions>=4.12
45
47
  </div>
46
48
 
47
49
  ## 🚀 简介
48
- PaddleOCR自发布以来凭借学术前沿算法和产业落地实践,受到了产学研各方的喜爱,并被广泛应用于众多知名开源项目,例如:Umi-OCR、OmniParser、MinerU、RAGFlow等,已成为广大开发者心中的开源OCR领域的首选工具。2025年5月20日,飞桨团队发布**PaddleOCR 3.0**,全面适配**飞桨框架3.0正式版**,进一步**提升文字识别精度**,支持**多文字类型识别**和**手写体识别**,满足大模型应用对**复杂文档高精度解析**的旺盛需求,结合**文心大模型4.5 Turbo**显著提升关键信息抽取精度,并新增**对昆仑芯、昇腾等国产硬件**的支持。
50
+ PaddleOCR自发布以来凭借学术前沿算法和产业落地实践,受到了产学研各方的喜爱,并被广泛应用于众多知名开源项目,例如:Umi-OCR、OmniParser、MinerU、RAGFlow等,已成为广大开发者心中的开源OCR领域的首选工具。2025年5月20日,飞桨团队发布**PaddleOCR 3.0**,全面适配**飞桨框架3.0正式版**,进一步**提升文字识别精度**,支持**多文字类型识别**和**手写体识别**,满足大模型应用对**复杂文档高精度解析**的旺盛需求,结合**文心大模型4.5 Turbo**显著提升关键信息抽取精度,并新增**对昆仑芯、昇腾等国产硬件**的支持。完整使用文档请参考 [PaddleOCR 3.0 文档](https://paddlepaddle.github.io/PaddleOCR/latest/)。
49
51
 
50
52
  PaddleOCR 3.0**新增**三大特色能力:
51
- - 全场景文字识别模型[PP-OCRv5](docs/version3.x/algorithm/PP-OCRv5/PP-OCRv5.md):单模型支持五种文字类型和复杂手写体识别;整体识别精度相比上一代**提升13个百分点**。
52
- - 通用文档解析方案[PP-StructureV3](docs/version3.x/algorithm/PP-StructureV3/PP-StructureV3.md):支持多场景、多版式 PDF 高精度解析,在公开评测集中**领先众多开源和闭源方案**。
53
- - 智能文档理解方案[PP-ChatOCRv4](docs/version3.x/algorithm/PP-ChatOCRv4/PP-ChatOCRv4.md):原生支持文心大模型4.5 Turbo,精度相比上一代**提升15个百分点**。
53
+ - 全场景文字识别模型[PP-OCRv5](docs/version3.x/algorithm/PP-OCRv5/PP-OCRv5.md):单模型支持五种文字类型和复杂手写体识别;整体识别精度相比上一代**提升13个百分点**。[在线体验](https://aistudio.baidu.com/community/app/91660/webUI)
54
+ - 通用文档解析方案[PP-StructureV3](docs/version3.x/algorithm/PP-StructureV3/PP-StructureV3.md):支持多场景、多版式 PDF 高精度解析,在公开评测集中**领先众多开源和闭源方案**。[在线体验](https://aistudio.baidu.com/community/app/518494/webUI)
55
+ - 智能文档理解方案[PP-ChatOCRv4](docs/version3.x/algorithm/PP-ChatOCRv4/PP-ChatOCRv4.md):原生支持文心大模型4.5 Turbo,精度相比上一代**提升15个百分点**。[在线体验](https://aistudio.baidu.com/community/app/518493/webUI)
54
56
 
55
57
  PaddleOCR 3.0除了提供优秀的模型库外,还提供好学易用的工具,覆盖模型训练、推理和服务化部署,方便开发者快速落地AI应用。
56
58
  <div align="center">
@@ -61,6 +63,14 @@ PaddleOCR 3.0除了提供优秀的模型库外,还提供好学易用的工具
61
63
 
62
64
 
63
65
  ## 📣 最新动态
66
+ 🔥🔥2025.06.05: **PaddleOCR 3.0.1** 发布,包含:
67
+
68
+ - **优化部分模型和模型配置:**
69
+ - 更新 PP-OCRv5默认模型配置,检测和识别均由mobile改为server模型。为了改善大多数的场景默认效果,配置中的参数`limit_side_len`由736改为64
70
+ - 新增文本行方向分类`PP-LCNet_x1_0_textline_ori`模型,精度99.42%,OCR、PP-StructureV3、PP-ChatOCRv4产线的默认文本行方向分类器改为该模型
71
+ - 优化文本行方向分类`PP-LCNet_x0_25_textline_ori`模型,精度提升3.3个百分点,当前精度98.85%
72
+ - **优化和修复3.0.0版本部分存在的问题,[详情](https://paddlepaddle.github.io/PaddleOCR/latest/update/update.html)**
73
+
64
74
  🔥🔥2025.05.20: **PaddleOCR 3.0** 正式发布,包含:
65
75
  - **PP-OCRv5**: 全场景高精度文字识别
66
76
 
@@ -98,13 +108,13 @@ pip install paddleocr
98
108
  ### 3. 命令行方式推理
99
109
  ```bash
100
110
  # 运行 PP-OCRv5 推理
101
- paddleocr ocr -i https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/general_ocr_002.png
111
+ paddleocr ocr -i https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/general_ocr_002.png --use_doc_orientation_classify False --use_doc_unwarping False --use_textline_orientation False
102
112
 
103
113
  # 运行 PP-StructureV3 推理
104
- paddleocr PP-StructureV3 -i https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/pp_structure_v3_demo.png
114
+ paddleocr pp_structurev3 -i https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/pp_structure_v3_demo.png --use_doc_orientation_classify False --use_doc_unwarping False
105
115
 
106
- # 运行 PP-ChatOCRv4 推理前,需要先获得千帆KPI Key
107
- paddleocr pp_chatocrv4_doc -i https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/vehicle_certificate-1.png -k 驾驶室准乘人数 --qianfan_api_key your_api_key
116
+ # 运行 PP-ChatOCRv4 推理前,需要先获得千帆API Key
117
+ paddleocr pp_chatocrv4_doc -i https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/vehicle_certificate-1.png -k 驾驶室准乘人数 --qianfan_api_key your_api_key --use_doc_orientation_classify False --use_doc_unwarping False
108
118
 
109
119
  # 查看 "paddleocr ocr" 详细参数
110
120
  paddleocr ocr --help
@@ -115,9 +125,13 @@ paddleocr ocr --help
115
125
  ```python
116
126
  from paddleocr import PaddleOCR
117
127
  # 初始化 PaddleOCR 实例
118
- ocr = PaddleOCR()
128
+ ocr = PaddleOCR(
129
+ use_doc_orientation_classify=False,
130
+ use_doc_unwarping=False,
131
+ use_textline_orientation=False)
119
132
  # 对示例图像执行 OCR 推理
120
- result = ocr.predict("https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/general_ocr_002.png")
133
+ result = ocr.predict(
134
+ input="https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/general_ocr_002.png")
121
135
  # 可视化结果并保存 json 结果
122
136
  for res in result:
123
137
  res.print()
@@ -132,45 +146,21 @@ for res in result:
132
146
  from pathlib import Path
133
147
  from paddleocr import PPStructureV3
134
148
 
135
- pipeline = PPStructureV3()
149
+ pipeline = PPStructureV3(
150
+ use_doc_orientation_classify=False,
151
+ use_doc_unwarping=False
152
+ )
136
153
 
137
154
  # For Image
138
- output = pipeline.predict("https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/pp_structure_v3_demo.png")
155
+ output = pipeline.predict(
156
+ input="https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/pp_structure_v3_demo.png",
157
+ )
139
158
 
140
159
  # 可视化结果并保存 json 结果
141
160
  for res in output:
142
161
  res.print()
143
162
  res.save_to_json(save_path="output")
144
163
  res.save_to_markdown(save_path="output")
145
-
146
- # For PDF File
147
- input_file = "./your_pdf_file.pdf"
148
- output_path = Path("./output")
149
-
150
- output = pipeline.predict(input_file)
151
-
152
- markdown_list = []
153
- markdown_images = []
154
-
155
- for res in output:
156
- md_info = res.markdown
157
- markdown_list.append(md_info)
158
- markdown_images.append(md_info.get("markdown_images", {}))
159
-
160
- markdown_texts = pipeline.concatenate_markdown_pages(markdown_list)
161
-
162
- mkd_file_path = output_path / f"{Path(input_file).stem}.md"
163
- mkd_file_path.parent.mkdir(parents=True, exist_ok=True)
164
-
165
- with open(mkd_file_path, "w", encoding="utf-8") as f:
166
- f.write(markdown_texts)
167
-
168
- for item in markdown_images:
169
- if item:
170
- for path, image in item.items():
171
- file_path = output_path / path
172
- file_path.parent.mkdir(parents=True, exist_ok=True)
173
- image.save(file_path)
174
164
  ```
175
165
 
176
166
  </details>
@@ -198,25 +188,37 @@ retriever_config = {
198
188
  "api_key": "api_key", # your api_key
199
189
  }
200
190
 
201
- mllm_chat_bot_config = {
202
- "module_name": "chat_bot",
203
- "model_name": "PP-DocBee",
204
- "base_url": "http://127.0.0.1:8080/", # your local mllm service url
205
- "api_type": "openai",
206
- "api_key": "api_key", # your api_key
207
- }
208
-
209
- pipeline = PPChatOCRv4Doc()
191
+ pipeline = PPChatOCRv4Doc(
192
+ use_doc_orientation_classify=False,
193
+ use_doc_unwarping=False
194
+ )
210
195
 
211
196
  visual_predict_res = pipeline.visual_predict(
212
197
  input="https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/vehicle_certificate-1.png",
213
- use_doc_orientation_classify=False,
214
- use_doc_unwarping=False,
215
198
  use_common_ocr=True,
216
199
  use_seal_recognition=True,
217
200
  use_table_recognition=True,
218
201
  )
219
202
 
203
+ mllm_predict_info = None
204
+ use_mllm = False
205
+ # 如果使用多模态大模型,需要启动本地 mllm 服务,可以参考文档:https://github.com/PaddlePaddle/PaddleX/blob/release/3.0/docs/pipeline_usage/tutorials/vlm_pipelines/doc_understanding.md 进行部署,并更新 mllm_chat_bot_config 配置。
206
+ if use_mllm:
207
+ mllm_chat_bot_config = {
208
+ "module_name": "chat_bot",
209
+ "model_name": "PP-DocBee",
210
+ "base_url": "http://127.0.0.1:8080/", # your local mllm service url
211
+ "api_type": "openai",
212
+ "api_key": "api_key", # your api_key
213
+ }
214
+
215
+ mllm_predict_res = pipeline.mllm_pred(
216
+ input="https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/vehicle_certificate-1.png",
217
+ key_list=["驾驶室准乘人数"],
218
+ mllm_chat_bot_config=mllm_chat_bot_config,
219
+ )
220
+ mllm_predict_info = mllm_predict_res["mllm_res"]
221
+
220
222
  visual_info_list = []
221
223
  for res in visual_predict_res:
222
224
  visual_info_list.append(res["visual_info"])
@@ -225,12 +227,6 @@ for res in visual_predict_res:
225
227
  vector_info = pipeline.build_vector(
226
228
  visual_info_list, flag_save_bytes_vector=True, retriever_config=retriever_config
227
229
  )
228
- mllm_predict_res = pipeline.mllm_pred(
229
- input="vehicle_certificate-1.png",
230
- key_list=["驾驶室准乘人数"],
231
- mllm_chat_bot_config=mllm_chat_bot_config,
232
- )
233
- mllm_predict_info = mllm_predict_res["mllm_res"]
234
230
  chat_result = pipeline.chat(
235
231
  key_list=["驾驶室准乘人数"],
236
232
  visual_info=visual_info_list,
@@ -4,14 +4,16 @@
4
4
  </p>
5
5
 
6
6
  <!-- language -->
7
- 中文 | [English](./README_en.md) | [日本語](./README_ja.md)
7
+ 中文 | [English](./README_en.md)
8
8
 
9
9
  <!-- icon -->
10
10
 
11
11
  [![stars](https://img.shields.io/github/stars/PaddlePaddle/PaddleOCR?color=ccf)](https://github.com/PaddlePaddle/PaddleOCR)
12
12
  [![Downloads](https://img.shields.io/pypi/dm/paddleocr)](https://pypi.org/project/PaddleOCR/)
13
- ![python](https://img.shields.io/badge/python-3.8+-aff.svg)
13
+ ![python](https://img.shields.io/badge/python-3.8~3.12-aff.svg)
14
14
  ![os](https://img.shields.io/badge/os-linux%2C%20win%2C%20mac-pink.svg)
15
+ ![hardware](https://img.shields.io/badge/hardware-cpu%2C%20gpu%2C%20xpu%2C%20npu-yellow.svg)
16
+
15
17
 
16
18
  [![Website](https://img.shields.io/badge/Website-PaddleOCR-blue?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmmRkdj0AAAAASUVORK5CYII=)](https://www.paddleocr.ai/)
17
19
  [![AI Studio](https://img.shields.io/badge/PP_OCRv5-AI_Studio-green)](https://aistudio.baidu.com/community/app/91660/webUI)
@@ -21,12 +23,12 @@
21
23
  </div>
22
24
 
23
25
  ## 🚀 简介
24
- PaddleOCR自发布以来凭借学术前沿算法和产业落地实践,受到了产学研各方的喜爱,并被广泛应用于众多知名开源项目,例如:Umi-OCR、OmniParser、MinerU、RAGFlow等,已成为广大开发者心中的开源OCR领域的首选工具。2025年5月20日,飞桨团队发布**PaddleOCR 3.0**,全面适配**飞桨框架3.0正式版**,进一步**提升文字识别精度**,支持**多文字类型识别**和**手写体识别**,满足大模型应用对**复杂文档高精度解析**的旺盛需求,结合**文心大模型4.5 Turbo**显著提升关键信息抽取精度,并新增**对昆仑芯、昇腾等国产硬件**的支持。
26
+ PaddleOCR自发布以来凭借学术前沿算法和产业落地实践,受到了产学研各方的喜爱,并被广泛应用于众多知名开源项目,例如:Umi-OCR、OmniParser、MinerU、RAGFlow等,已成为广大开发者心中的开源OCR领域的首选工具。2025年5月20日,飞桨团队发布**PaddleOCR 3.0**,全面适配**飞桨框架3.0正式版**,进一步**提升文字识别精度**,支持**多文字类型识别**和**手写体识别**,满足大模型应用对**复杂文档高精度解析**的旺盛需求,结合**文心大模型4.5 Turbo**显著提升关键信息抽取精度,并新增**对昆仑芯、昇腾等国产硬件**的支持。完整使用文档请参考 [PaddleOCR 3.0 文档](https://paddlepaddle.github.io/PaddleOCR/latest/)。
25
27
 
26
28
  PaddleOCR 3.0**新增**三大特色能力:
27
- - 全场景文字识别模型[PP-OCRv5](docs/version3.x/algorithm/PP-OCRv5/PP-OCRv5.md):单模型支持五种文字类型和复杂手写体识别;整体识别精度相比上一代**提升13个百分点**。
28
- - 通用文档解析方案[PP-StructureV3](docs/version3.x/algorithm/PP-StructureV3/PP-StructureV3.md):支持多场景、多版式 PDF 高精度解析,在公开评测集中**领先众多开源和闭源方案**。
29
- - 智能文档理解方案[PP-ChatOCRv4](docs/version3.x/algorithm/PP-ChatOCRv4/PP-ChatOCRv4.md):原生支持文心大模型4.5 Turbo,精度相比上一代**提升15个百分点**。
29
+ - 全场景文字识别模型[PP-OCRv5](docs/version3.x/algorithm/PP-OCRv5/PP-OCRv5.md):单模型支持五种文字类型和复杂手写体识别;整体识别精度相比上一代**提升13个百分点**。[在线体验](https://aistudio.baidu.com/community/app/91660/webUI)
30
+ - 通用文档解析方案[PP-StructureV3](docs/version3.x/algorithm/PP-StructureV3/PP-StructureV3.md):支持多场景、多版式 PDF 高精度解析,在公开评测集中**领先众多开源和闭源方案**。[在线体验](https://aistudio.baidu.com/community/app/518494/webUI)
31
+ - 智能文档理解方案[PP-ChatOCRv4](docs/version3.x/algorithm/PP-ChatOCRv4/PP-ChatOCRv4.md):原生支持文心大模型4.5 Turbo,精度相比上一代**提升15个百分点**。[在线体验](https://aistudio.baidu.com/community/app/518493/webUI)
30
32
 
31
33
  PaddleOCR 3.0除了提供优秀的模型库外,还提供好学易用的工具,覆盖模型训练、推理和服务化部署,方便开发者快速落地AI应用。
32
34
  <div align="center">
@@ -37,6 +39,14 @@ PaddleOCR 3.0除了提供优秀的模型库外,还提供好学易用的工具
37
39
 
38
40
 
39
41
  ## 📣 最新动态
42
+ 🔥🔥2025.06.05: **PaddleOCR 3.0.1** 发布,包含:
43
+
44
+ - **优化部分模型和模型配置:**
45
+ - 更新 PP-OCRv5默认模型配置,检测和识别均由mobile改为server模型。为了改善大多数的场景默认效果,配置中的参数`limit_side_len`由736改为64
46
+ - 新增文本行方向分类`PP-LCNet_x1_0_textline_ori`模型,精度99.42%,OCR、PP-StructureV3、PP-ChatOCRv4产线的默认文本行方向分类器改为该模型
47
+ - 优化文本行方向分类`PP-LCNet_x0_25_textline_ori`模型,精度提升3.3个百分点,当前精度98.85%
48
+ - **优化和修复3.0.0版本部分存在的问题,[详情](https://paddlepaddle.github.io/PaddleOCR/latest/update/update.html)**
49
+
40
50
  🔥🔥2025.05.20: **PaddleOCR 3.0** 正式发布,包含:
41
51
  - **PP-OCRv5**: 全场景高精度文字识别
42
52
 
@@ -74,13 +84,13 @@ pip install paddleocr
74
84
  ### 3. 命令行方式推理
75
85
  ```bash
76
86
  # 运行 PP-OCRv5 推理
77
- paddleocr ocr -i https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/general_ocr_002.png
87
+ paddleocr ocr -i https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/general_ocr_002.png --use_doc_orientation_classify False --use_doc_unwarping False --use_textline_orientation False
78
88
 
79
89
  # 运行 PP-StructureV3 推理
80
- paddleocr PP-StructureV3 -i https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/pp_structure_v3_demo.png
90
+ paddleocr pp_structurev3 -i https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/pp_structure_v3_demo.png --use_doc_orientation_classify False --use_doc_unwarping False
81
91
 
82
- # 运行 PP-ChatOCRv4 推理前,需要先获得千帆KPI Key
83
- paddleocr pp_chatocrv4_doc -i https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/vehicle_certificate-1.png -k 驾驶室准乘人数 --qianfan_api_key your_api_key
92
+ # 运行 PP-ChatOCRv4 推理前,需要先获得千帆API Key
93
+ paddleocr pp_chatocrv4_doc -i https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/vehicle_certificate-1.png -k 驾驶室准乘人数 --qianfan_api_key your_api_key --use_doc_orientation_classify False --use_doc_unwarping False
84
94
 
85
95
  # 查看 "paddleocr ocr" 详细参数
86
96
  paddleocr ocr --help
@@ -91,9 +101,13 @@ paddleocr ocr --help
91
101
  ```python
92
102
  from paddleocr import PaddleOCR
93
103
  # 初始化 PaddleOCR 实例
94
- ocr = PaddleOCR()
104
+ ocr = PaddleOCR(
105
+ use_doc_orientation_classify=False,
106
+ use_doc_unwarping=False,
107
+ use_textline_orientation=False)
95
108
  # 对示例图像执行 OCR 推理
96
- result = ocr.predict("https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/general_ocr_002.png")
109
+ result = ocr.predict(
110
+ input="https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/general_ocr_002.png")
97
111
  # 可视化结果并保存 json 结果
98
112
  for res in result:
99
113
  res.print()
@@ -108,45 +122,21 @@ for res in result:
108
122
  from pathlib import Path
109
123
  from paddleocr import PPStructureV3
110
124
 
111
- pipeline = PPStructureV3()
125
+ pipeline = PPStructureV3(
126
+ use_doc_orientation_classify=False,
127
+ use_doc_unwarping=False
128
+ )
112
129
 
113
130
  # For Image
114
- output = pipeline.predict("https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/pp_structure_v3_demo.png")
131
+ output = pipeline.predict(
132
+ input="https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/pp_structure_v3_demo.png",
133
+ )
115
134
 
116
135
  # 可视化结果并保存 json 结果
117
136
  for res in output:
118
137
  res.print()
119
138
  res.save_to_json(save_path="output")
120
139
  res.save_to_markdown(save_path="output")
121
-
122
- # For PDF File
123
- input_file = "./your_pdf_file.pdf"
124
- output_path = Path("./output")
125
-
126
- output = pipeline.predict(input_file)
127
-
128
- markdown_list = []
129
- markdown_images = []
130
-
131
- for res in output:
132
- md_info = res.markdown
133
- markdown_list.append(md_info)
134
- markdown_images.append(md_info.get("markdown_images", {}))
135
-
136
- markdown_texts = pipeline.concatenate_markdown_pages(markdown_list)
137
-
138
- mkd_file_path = output_path / f"{Path(input_file).stem}.md"
139
- mkd_file_path.parent.mkdir(parents=True, exist_ok=True)
140
-
141
- with open(mkd_file_path, "w", encoding="utf-8") as f:
142
- f.write(markdown_texts)
143
-
144
- for item in markdown_images:
145
- if item:
146
- for path, image in item.items():
147
- file_path = output_path / path
148
- file_path.parent.mkdir(parents=True, exist_ok=True)
149
- image.save(file_path)
150
140
  ```
151
141
 
152
142
  </details>
@@ -174,25 +164,37 @@ retriever_config = {
174
164
  "api_key": "api_key", # your api_key
175
165
  }
176
166
 
177
- mllm_chat_bot_config = {
178
- "module_name": "chat_bot",
179
- "model_name": "PP-DocBee",
180
- "base_url": "http://127.0.0.1:8080/", # your local mllm service url
181
- "api_type": "openai",
182
- "api_key": "api_key", # your api_key
183
- }
184
-
185
- pipeline = PPChatOCRv4Doc()
167
+ pipeline = PPChatOCRv4Doc(
168
+ use_doc_orientation_classify=False,
169
+ use_doc_unwarping=False
170
+ )
186
171
 
187
172
  visual_predict_res = pipeline.visual_predict(
188
173
  input="https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/vehicle_certificate-1.png",
189
- use_doc_orientation_classify=False,
190
- use_doc_unwarping=False,
191
174
  use_common_ocr=True,
192
175
  use_seal_recognition=True,
193
176
  use_table_recognition=True,
194
177
  )
195
178
 
179
+ mllm_predict_info = None
180
+ use_mllm = False
181
+ # 如果使用多模态大模型,需要启动本地 mllm 服务,可以参考文档:https://github.com/PaddlePaddle/PaddleX/blob/release/3.0/docs/pipeline_usage/tutorials/vlm_pipelines/doc_understanding.md 进行部署,并更新 mllm_chat_bot_config 配置。
182
+ if use_mllm:
183
+ mllm_chat_bot_config = {
184
+ "module_name": "chat_bot",
185
+ "model_name": "PP-DocBee",
186
+ "base_url": "http://127.0.0.1:8080/", # your local mllm service url
187
+ "api_type": "openai",
188
+ "api_key": "api_key", # your api_key
189
+ }
190
+
191
+ mllm_predict_res = pipeline.mllm_pred(
192
+ input="https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/vehicle_certificate-1.png",
193
+ key_list=["驾驶室准乘人数"],
194
+ mllm_chat_bot_config=mllm_chat_bot_config,
195
+ )
196
+ mllm_predict_info = mllm_predict_res["mllm_res"]
197
+
196
198
  visual_info_list = []
197
199
  for res in visual_predict_res:
198
200
  visual_info_list.append(res["visual_info"])
@@ -201,12 +203,6 @@ for res in visual_predict_res:
201
203
  vector_info = pipeline.build_vector(
202
204
  visual_info_list, flag_save_bytes_vector=True, retriever_config=retriever_config
203
205
  )
204
- mllm_predict_res = pipeline.mllm_pred(
205
- input="vehicle_certificate-1.png",
206
- key_list=["驾驶室准乘人数"],
207
- mllm_chat_bot_config=mllm_chat_bot_config,
208
- )
209
- mllm_predict_info = mllm_predict_res["mllm_res"]
210
206
  chat_result = pipeline.chat(
211
207
  key_list=["驾驶室准乘人数"],
212
208
  visual_info=visual_info_list,
@@ -10,8 +10,9 @@
10
10
 
11
11
  [![stars](https://img.shields.io/github/stars/PaddlePaddle/PaddleOCR?color=ccf)](https://github.com/PaddlePaddle/PaddleOCR)
12
12
  [![Downloads](https://img.shields.io/pypi/dm/paddleocr)](https://pypi.org/project/PaddleOCR/)
13
- ![python](https://img.shields.io/badge/python-3.8+-aff.svg)
13
+ ![python](https://img.shields.io/badge/python-3.8~3.12-aff.svg)
14
14
  ![os](https://img.shields.io/badge/os-linux%2C%20win%2C%20mac-pink.svg)
15
+ ![hardware](https://img.shields.io/badge/hardware-cpu%2C%20gpu%2C%20xpu%2C%20npu-yellow.svg)
15
16
 
16
17
  [![Website](https://img.shields.io/badge/Website-PaddleOCR-blue?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmmRkdj0AAAAASUVORK5CYII=)](https://www.paddleocr.ai/)
17
18
  [![AI Studio](https://img.shields.io/badge/PP_OCRv5-AI_Studio-green)](https://aistudio.baidu.com/community/app/91660/webUI)
@@ -23,14 +24,14 @@
23
24
  ## 🚀 Introduction
24
25
  Since its initial release, PaddleOCR has gained widespread acclaim across academia, industry, and research communities, thanks to its cutting-edge algorithms and proven performance in real-world applications. It’s already powering popular open-source projects like Umi-OCR, OmniParser, MinerU, and RAGFlow, making it the go-to OCR toolkit for developers worldwide.
25
26
 
26
- On May 20, 2025, the PaddlePaddle team unveiled PaddleOCR 3.0, fully compatible with the official release of the **PaddlePaddle 3.0** framework. This update further **boosts text-recognition accuracy**, adds support for **multiple text-type recognition** and **handwriting recognition**, and meets the growing demand from large-model applications for **high-precision parsing of complex documents**. When combined with the **ERNIE 4.5T**, it significantly enhances key-information extraction accuracy. PaddleOCR 3.0 also introduces support for domestic hardware platforms such as **KUNLUNXIN** and **Ascend**.
27
+ On May 20, 2025, the PaddlePaddle team unveiled PaddleOCR 3.0, fully compatible with the official release of the **PaddlePaddle 3.0** framework. This update further **boosts text-recognition accuracy**, adds support for **multiple text-type recognition** and **handwriting recognition**, and meets the growing demand from large-model applications for **high-precision parsing of complex documents**. When combined with the **ERNIE 4.5T**, it significantly enhances key-information extraction accuracy. PaddleOCR 3.0 also introduces support for domestic hardware platforms such as **KUNLUNXIN** and **Ascend**. For the complete usage documentation, please refer to the [PaddleOCR 3.0 Documentation](https://paddlepaddle.github.io/PaddleOCR/latest/en/index.html).
27
28
 
28
- Three Major New Features in PaddleOCR 3.0
29
- - Universal-Scene Text Recognition Model [PP-OCRv5](./docs/version3.x/algorithm/PP-OCRv5/PP-OCRv5.en.md): A single model that handles five different text types plus complex handwriting. Overall recognition accuracy has increased by 13 percentage points over the previous generation.
29
+ Three Major New Features in PaddleOCR 3.0:
30
+ - Universal-Scene Text Recognition Model [PP-OCRv5](./docs/version3.x/algorithm/PP-OCRv5/PP-OCRv5.en.md): A single model that handles five different text types plus complex handwriting. Overall recognition accuracy has increased by 13 percentage points over the previous generation. [Online Demo](https://aistudio.baidu.com/community/app/91660/webUI)
30
31
 
31
- - General Document-Parsing Solution [PP-StructureV3](./docs/version3.x/algorithm/PP-StructureV3/PP-StructureV3.en.md): Delivers high-precision parsing of multi-layout, multi-scene PDFs, outperforming many open- and closed-source solutions on public benchmarks.
32
+ - General Document-Parsing Solution [PP-StructureV3](./docs/version3.x/algorithm/PP-StructureV3/PP-StructureV3.en.md): Delivers high-precision parsing of multi-layout, multi-scene PDFs, outperforming many open- and closed-source solutions on public benchmarks. [Online Demo](https://aistudio.baidu.com/community/app/518494/webUI)
32
33
 
33
- - Intelligent Document-Understanding Solution [PP-ChatOCRv4](./docs/version3.x/algorithm/PP-ChatOCRv4/PP-ChatOCRv4.en.md): Natively powered by the WenXin large model 4.5T, achieving 15 percentage points higher accuracy than its predecessor.
34
+ - Intelligent Document-Understanding Solution [PP-ChatOCRv4](./docs/version3.x/algorithm/PP-ChatOCRv4/PP-ChatOCRv4.en.md): Natively powered by the WenXin large model 4.5T, achieving 15 percentage points higher accuracy than its predecessor. [Online Demo](https://aistudio.baidu.com/community/app/518493/webUI)
34
35
 
35
36
  In addition to providing an outstanding model library, PaddleOCR 3.0 also offers user-friendly tools covering model training, inference, and service deployment, so developers can rapidly bring AI applications to production.
36
37
  <div align="center">
@@ -42,6 +43,16 @@ In addition to providing an outstanding model library, PaddleOCR 3.0 also offers
42
43
 
43
44
 
44
45
  ## 📣 Recent updates
46
+
47
+ #### **🔥🔥 2025.06.05: Release of PaddleOCR 3.0.1, includes:**
48
+
49
+ - **Optimisation of certain models and model configurations:**
50
+ - Updated the default model configuration for PP-OCRv5, changing both detection and recognition from mobile to server models. To improve default performance in most scenarios, the parameter `limit_side_len` in the configuration has been changed from 736 to 64.
51
+ - Added a new text line orientation classification model `PP-LCNet_x1_0_textline_ori` with an accuracy of 99.42%. The default text line orientation classifier for OCR, PP-StructureV3, and PP-ChatOCRv4 pipelines has been updated to this model.
52
+ - Optimised the text line orientation classification model `PP-LCNet_x0_25_textline_ori`, improving accuracy by 3.3 percentage points to a current accuracy of 98.85%.
53
+
54
+ - **Optimizations and fixes for some issues in version 3.0.0, [details](https://paddlepaddle.github.io/PaddleOCR/latest/en/update/update.html)**
55
+
45
56
  🔥🔥2025.05.20: Official Release of **PaddleOCR v3.0**, including:
46
57
  - **PP-OCRv5**: High-Accuracy Text Recognition Model for All Scenarios - Instant Text from Images/PDFs.
47
58
  1. 🌐 Single-model support for **five** text types - Seamlessly process **Simplified Chinese, Traditional Chinese, Simplified Chinese Pinyin, English** and **Japanse** within a single model.
@@ -92,13 +103,13 @@ pip install paddleocr
92
103
  ### 3. Run inference by CLI
93
104
  ```bash
94
105
  # Run PP-OCRv5 inference
95
- paddleocr ocr -i https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/general_ocr_002.png
106
+ paddleocr ocr -i https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/general_ocr_002.png --use_doc_orientation_classify False --use_doc_unwarping False --use_textline_orientation False
96
107
 
97
108
  # Run PP-StructureV3 inference
98
- paddleocr PP-StructureV3 -i https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/pp_structure_v3_demo.png
109
+ paddleocr pp_structurev3 -i https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/pp_structure_v3_demo.png --use_doc_orientation_classify False --use_doc_unwarping False
99
110
 
100
111
  # Get the Qianfan API Key at first, and then run PP-ChatOCRv4 inference
101
- paddleocr pp_chatocrv4_doc -i https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/vehicle_certificate-1.png -k 驾驶室准乘人数 --qianfan_api_key your_api_key
112
+ paddleocr pp_chatocrv4_doc -i https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/vehicle_certificate-1.png -k 驾驶室准乘人数 --qianfan_api_key your_api_key --use_doc_orientation_classify False --use_doc_unwarping False
102
113
 
103
114
  # Get more information about "paddleocr ocr"
104
115
  paddleocr ocr --help
@@ -107,13 +118,15 @@ paddleocr ocr --help
107
118
  ### 4. Run inference by API
108
119
  **4.1 PP-OCRv5 Example**
109
120
  ```python
110
- from paddleocr import PaddleOCR
111
-
112
121
  # Initialize PaddleOCR instance
113
- ocr = PaddleOCR()
122
+ ocr = PaddleOCR(
123
+ use_doc_orientation_classify=False,
124
+ use_doc_unwarping=False,
125
+ use_textline_orientation=False)
114
126
 
115
127
  # Run OCR inference on a sample image
116
- result = ocr.predict("https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/general_ocr_002.png")
128
+ result = ocr.predict(
129
+ input="https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/general_ocr_002.png")
117
130
 
118
131
  # Visualize the results and save the JSON results
119
132
  for res in result:
@@ -132,41 +145,17 @@ from paddleocr import PPStructureV3
132
145
  pipeline = PPStructureV3()
133
146
 
134
147
  # For Image
135
- output = pipeline.predict("https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/pp_structure_v3_demo.png")
148
+ output = pipeline.predict(
149
+ input="https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/pp_structure_v3_demo.png",
150
+ use_doc_orientation_classify=False,
151
+ use_doc_unwarping=False
152
+ )
136
153
 
137
154
  # Visualize the results and save the JSON results
138
155
  for res in output:
139
156
  res.print()
140
- res.save_to_json(save_path="output")
141
- res.save_to_markdown(save_path="output")
142
- # For PDF File
143
- input_file = "./your_pdf_file.pdf"
144
- output_path = Path("./output")
145
-
146
- output = pipeline.predict(input_file)
147
-
148
- markdown_list = []
149
- markdown_images = []
150
-
151
- for res in output:
152
- md_info = res.markdown
153
- markdown_list.append(md_info)
154
- markdown_images.append(md_info.get("markdown_images", {}))
155
-
156
- markdown_texts = pipeline.concatenate_markdown_pages(markdown_list)
157
-
158
- mkd_file_path = output_path / f"{Path(input_file).stem}.md"
159
- mkd_file_path.parent.mkdir(parents=True, exist_ok=True)
160
-
161
- with open(mkd_file_path, "w", encoding="utf-8") as f:
162
- f.write(markdown_texts)
163
-
164
- for item in markdown_images:
165
- if item:
166
- for path, image in item.items():
167
- file_path = output_path / path
168
- file_path.parent.mkdir(parents=True, exist_ok=True)
169
- image.save(file_path)
157
+ res.save_to_json(save_path="output")
158
+ res.save_to_markdown(save_path="output")
170
159
  ```
171
160
 
172
161
  </details>
@@ -193,25 +182,37 @@ retriever_config = {
193
182
  "api_key": "api_key", # your api_key
194
183
  }
195
184
 
196
- mllm_chat_bot_config = {
197
- "module_name": "chat_bot",
198
- "model_name": "PP-DocBee",
199
- "base_url": "http://127.0.0.1:8080/", # your local mllm service url
200
- "api_type": "openai",
201
- "api_key": "api_key", # your api_key
202
- }
203
-
204
- pipeline = PPChatOCRv4Doc()
185
+ pipeline = PPChatOCRv4Doc(
186
+ use_doc_orientation_classify=False,
187
+ use_doc_unwarping=False
188
+ )
205
189
 
206
190
  visual_predict_res = pipeline.visual_predict(
207
191
  input="https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/vehicle_certificate-1.png",
208
- use_doc_orientation_classify=False,
209
- use_doc_unwarping=False,
210
192
  use_common_ocr=True,
211
193
  use_seal_recognition=True,
212
194
  use_table_recognition=True,
213
195
  )
214
196
 
197
+ mllm_predict_info = None
198
+ use_mllm = False
199
+ # If a multimodal large model is used, the local mllm service needs to be started. You can refer to the documentation: https://github.com/PaddlePaddle/PaddleX/blob/release/3.0/docs/pipeline_usage/tutorials/vlm_pipelines/doc_understanding.m d performs deployment and updates the mllm_chat_bot_config configuration.
200
+ if use_mllm:
201
+ mllm_chat_bot_config = {
202
+ "module_name": "chat_bot",
203
+ "model_name": "PP-DocBee",
204
+ "base_url": "http://127.0.0.1:8080/", # your local mllm service url
205
+ "api_type": "openai",
206
+ "api_key": "api_key", # your api_key
207
+ }
208
+
209
+ mllm_predict_res = pipeline.mllm_pred(
210
+ input="https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/vehicle_certificate-1.png",
211
+ key_list=["驾驶室准乘人数"],
212
+ mllm_chat_bot_config=mllm_chat_bot_config,
213
+ )
214
+ mllm_predict_info = mllm_predict_res["mllm_res"]
215
+
215
216
  visual_info_list = []
216
217
  for res in visual_predict_res:
217
218
  visual_info_list.append(res["visual_info"])
@@ -220,12 +221,6 @@ for res in visual_predict_res:
220
221
  vector_info = pipeline.build_vector(
221
222
  visual_info_list, flag_save_bytes_vector=True, retriever_config=retriever_config
222
223
  )
223
- mllm_predict_res = pipeline.mllm_pred(
224
- input="vehicle_certificate-1.png",
225
- key_list=["驾驶室准乘人数"],
226
- mllm_chat_bot_config=mllm_chat_bot_config,
227
- )
228
- mllm_predict_info = mllm_predict_res["mllm_res"]
229
224
  chat_result = pipeline.chat(
230
225
  key_list=["驾驶室准乘人数"],
231
226
  visual_info=visual_info_list,
@@ -97,14 +97,16 @@ def _register_install_hpi_deps_command(subparsers):
97
97
  subparser.set_defaults(executor=_install_hpi_deps)
98
98
 
99
99
 
100
- def _parse_args():
100
+ def _get_parser():
101
101
  parser = argparse.ArgumentParser(prog="paddleocr")
102
- parser.add_argument("--version", action="version", version=f"%(prog)s {version}")
102
+ parser.add_argument(
103
+ "-v", "--version", action="version", version=f"%(prog)s {version}"
104
+ )
103
105
  subparsers = parser.add_subparsers(dest="subcommand")
104
106
  _register_pipelines(subparsers)
105
107
  _register_models(subparsers)
106
108
  _register_install_hpi_deps_command(subparsers)
107
- return parser.parse_args()
109
+ return parser
108
110
 
109
111
 
110
112
  def _execute(args):
@@ -114,5 +116,9 @@ def _execute(args):
114
116
  def main():
115
117
  logger.setLevel(logging.INFO)
116
118
  warnings.filterwarnings("default", category=CLIDeprecationWarning)
117
- args = _parse_args()
119
+ parser = _get_parser()
120
+ args = parser.parse_args()
121
+ if args.subcommand is None:
122
+ parser.print_usage(sys.stderr)
123
+ sys.exit(2)
118
124
  _execute(args)