{"id":15041078,"url":"https://github.com/frotms/paddleocr2pytorch","last_synced_at":"2025-10-08T09:58:42.671Z","repository":{"id":37391331,"uuid":"325578665","full_name":"frotms/PaddleOCR2Pytorch","owner":"frotms","description":"PaddleOCR inference in PyTorch. Converted from [PaddleOCR](https://github.com/PaddlePaddle/PaddleOCR)","archived":false,"fork":false,"pushed_at":"2024-08-27T11:48:34.000Z","size":71494,"stargazers_count":956,"open_issues_count":79,"forks_count":183,"subscribers_count":17,"default_branch":"main","last_synced_at":"2025-05-23T11:26:38.540Z","etag":null,"topics":["crnn","db","multilingual-models","ocr","paddleocr","paddlepaddle","pytorch","pytorchocr"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/frotms.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-12-30T15:02:11.000Z","updated_at":"2025-05-23T02:02:05.000Z","dependencies_parsed_at":"2024-09-25T01:43:30.897Z","dependency_job_id":null,"html_url":"https://github.com/frotms/PaddleOCR2Pytorch","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/frotms/PaddleOCR2Pytorch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frotms%2FPaddleOCR2Pytorch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frotms%2FPaddleOCR2Pytorch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frotms%2FPaddleOCR2Pytorch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frotms%2FPaddleOCR2Pytorch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/frotms","download_url":"https://codeload.github.com/frotms/PaddleOCR2Pytorch/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frotms%2FPaddleOCR2Pytorch/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278924143,"owners_count":26069400,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["crnn","db","multilingual-models","ocr","paddleocr","paddlepaddle","pytorch","pytorchocr"],"created_at":"2024-09-24T20:45:30.203Z","updated_at":"2025-10-08T09:58:42.666Z","avatar_url":"https://github.com/frotms.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [PaddleOCR2Pytorch](https://github.com/frotms/PaddleOCR2Pytorch)\n\n简体中文 | [English](README_en.md)\n\n## 简介\n**”白嫖“**[PaddleOCR](https://github.com/PaddlePaddle/PaddleOCR)。\n\n本项目旨在：\n\n- 学习PaddleOCR\n- 让PaddleOCR训练的模型在pytorch上使用\n- 为paddle转pytorch提供参考\n\n## 注意\n\n`PytorchOCR`由`\u003e= PaddleOCRv2.0+`动态图版本移植。\n\n**近期更新**\n\n- 2025.05.25 **[PP-OCRv5](https://github.com/PaddlePaddle/PaddleOCR/blob/main/docs/version3.x/algorithm/PP-OCRv5/PP-OCRv5.md)**: 全场景高精度文字识别\n  1. 🌐 单模型支持**五种**文字类型(**简体中文**、**繁体中文**、**中文拼音**、**英文**和**日文**)。\n  2. ✍️ 支持复杂**手写体**识别：复杂连笔、非规范字迹识别性能显著提升。\n  3. 🎯 整体识别精度提升 - 多种应用场景达到 SOTA 精度, 相比上一版本PP-OCRv4，识别精度**提升13个百分点**！\n\n- 2024.02.20 [PP-OCRv4](./doc/doc_ch/PP-OCRv4_introduction.md)，提供mobile和server两种模型\n  - PP-OCRv4-mobile：速度可比情况下，中文场景效果相比于PP-OCRv3再提升4.5%，英文场景提升10%，80语种多语言模型平均识别准确率提升8%以上\n  - PP-OCRv4-server：发布了目前精度最高的OCR模型，中英文场景上检测模型精度提升4.9%， 识别模型精度提升2%\n- 2023.04.16 公式识别[CAN](https://github.com/PaddlePaddle/PaddleOCR/blob/release/2.6/doc/doc_ch/algorithm_rec_can.md)\n- 2023.04.07 文本超分[Text Telescope](https://github.com/PaddlePaddle/PaddleOCR/blob/release/2.6/doc/doc_ch/algorithm_sr_telescope.md)\n- 2022.10.17 文本识别：[ViTSTR](https://github.com/PaddlePaddle/PaddleOCR/blob/release/2.6/doc/doc_ch/algorithm_rec_vitstr.md)\n- 2022.10.07 文本检测：[DB++](https://github.com/PaddlePaddle/PaddleOCR/blob/release/2.6/doc/doc_ch/algorithm_det_db.md)\n- 2022.07.24 文本检测算法(FCENET)\n- 2022.07.16 文本识别算法(SVTR)\n- 2022.06.19 文本识别算法(SAR)\n- 2022.05.29 [PP-OCRv3](https://github.com/PaddlePaddle/PaddleOCR/blob/release/2.5/doc/doc_ch/ppocr_introduction.md#pp-ocrv3)，速度可比情况下，中文场景效果相比于PP-OCRv2再提升5%，英文场景提升11%，80语种多语言模型平均识别准确率提升5%以上\n- 2022.05.14 PP-OCRv3文本检测模型\n- 2022.04.17 1种文本识别算法(NRTR)\n- 2022.03.20 1种文本检测算法(PSENet)\n- 2021.09.11 PP-OCRv2，CPU推理速度相比于PP-OCR server提升220%；效果相比于PP-OCR mobile 提升7%\n- 2021.06.01 更新SRN\n- 2021.04.25 更新AAAI 2021论文端到端识别算法PGNet\n- 2021.04.24 更新RARE\n- 2021.04.12 更新STARNET\n- 2021.04.08 更新DB, SAST, EAST, ROSETTA, CRNN\n- 2021.04.03 更新多语言识别模型，目前支持语种超过27种，[多语言模型下载](./doc/doc_ch/models_list.md)，包括中文简体、中文繁体、英文、法文、德文、韩文、日文、意大利文、西班牙文、葡萄牙文、俄罗斯文、阿拉伯文等，后续计划可以参考[多语言研发计划](https://github.com/PaddlePaddle/PaddleOCR/issues/1048)\n- 2021.01.10 白嫖中英文通用OCR模型\n\n## 特性\n\n高质量推理模型，准确的识别效果\n\n- 超轻量PP-OCR系列：检测+ 方向分类器+ 识别\n- 超轻量ptocr_mobile移动端系列\n- 通用ptocr_server系列\n- 支持中英文数字组合识别、竖排文本识别、长文本识别\n- 支持多语言识别：韩语、日语、德语、法语等\n\n\u003ca name=\"模型下载\"\u003e\u003c/a\u003e\n\n## [模型列表](./doc/doc_ch/models_list.md)（更新中）\n\nPyTorch模型下载链接：https://pan.baidu.com/s/1r1DELT8BlgxeOP2RqREJEg 提取码：6clx\n\nPaddleOCR模型百度网盘链接：https://pan.baidu.com/s/1getAprT2l_JqwhjwML0g9g 提取码：lmv7 \n\n更多模型下载（包括多语言），可以参考[PT-OCR系列模型下载](./doc/doc_ch/models_list.md)\n\n## 文档教程\n- [快速安装](./doc/doc_ch/installation.md)\n- [模型预测](./doc/doc_ch/inference.md)\n- [Pipline](#Pipline)\n- [效果展示](#效果展示)\n- [参考文献](./doc/doc_ch/reference.md)\n- [FAQ](https://github.com/PaddlePaddle/PaddleOCR/blob/release/2.0/doc/doc_en/FAQ_en.md)\n- [参考](#参考)\n\n## TODO\n\n- [ ] PP-OCRv5：[文档图像方向分类模块PP-LCNet_x1_0_doc_ori](https://paddlepaddle.github.io/PaddleOCR/latest/version3.x/module_usage/doc_img_orientation_classification.html)，[文本图像矫正模块UVDoc](https://paddlepaddle.github.io/PaddleOCR/latest/version3.x/module_usage/text_image_unwarping.html)，[文本行方向分类模块PP-LCNet_x0_25_textline_ori](https://paddlepaddle.github.io/PaddleOCR/latest/version3.x/module_usage/text_line_orientation_classification.html)\n- [ ] [通用文档解析方案](https://paddlepaddle.github.io/PaddleOCR/latest/version3.x/pipeline_usage/PP-StructureV3.html)-[PP-StructureV3](https://github.com/PaddlePaddle/PaddleOCR/blob/main/docs/version3.x/algorithm/PP-StructureV3/PP-StructureV3.md)：支持多场景、多版式 PDF 高精度解析，在公开评测集中**领先众多开源和闭源方案**。\n- [ ] [智能文档理解方案](https://paddlepaddle.github.io/PaddleOCR/latest/version3.x/pipeline_usage/PP-ChatOCRv4.html)-[PP-ChatOCRv4](https://github.com/PaddlePaddle/PaddleOCR/blob/main/docs/version3.x/algorithm/PP-ChatOCRv4/PP-ChatOCRv4.md)：原生支持文心大模型4.5 Turbo，精度相比上一代**提升15个百分点**。\n- [ ] 前沿算法：文本检测 [DRRG](https://github.com/PaddlePaddle/PaddleOCR/blob/release/2.6/doc/doc_ch/algorithm_det_drrg.md)，文本识别 [RFL](https://github.com/PaddlePaddle/PaddleOCR/blob/release/2.6/doc/doc_ch/algorithm_rec_rfl.md)\n- [ ] 文本识别：[ABINet](https://github.com/PaddlePaddle/PaddleOCR/blob/release/2.6/doc/doc_ch/algorithm_rec_abinet.md), [VisionLAN](https://github.com/PaddlePaddle/PaddleOCR/blob/release/2.6/doc/doc_ch/algorithm_rec_visionlan.md), [SPIN](https://github.com/PaddlePaddle/PaddleOCR/blob/release/2.6/doc/doc_ch/algorithm_rec_spin.md), [RobustScanner](https://github.com/PaddlePaddle/PaddleOCR/blob/release/2.6/doc/doc_ch/algorithm_rec_robustscanner.md)\n- [ ] 表格识别：[TableMaster](https://github.com/PaddlePaddle/PaddleOCR/blob/release/2.6/doc/doc_ch/algorithm_table_master.md)\n- [ ] [PP-Structurev2](./ppstructure/README_ch.md)，系统功能性能全面升级，适配中文场景，新增支持[版面复原](./ppstructure/recovery/README_ch.md)，支持**一行命令完成PDF转Word**\n- [ ] [版面分析](./ppstructure/layout/README_ch.md)模型优化：模型存储减少95%，速度提升11倍，平均CPU耗时仅需41ms\n- [ ] [表格识别](https://github.com/PaddlePaddle/PaddleOCR/blob/release/2.6/ppstructure/table/README_ch.md)模型优化：设计3大优化策略，预测耗时不变情况下，模型精度提升6%\n- [ ] [关键信息抽取](https://github.com/PaddlePaddle/PaddleOCR/blob/release/2.6/ppstructure/kie/README_ch.md)模型优化：设计视觉无关模型结构，语义实体识别精度提升2.8%，关系抽取精度提升9.1%\n- [ ] 文本识别算法([SEED](https://github.com/PaddlePaddle/PaddleOCR/blob/release/2.6/doc/doc_ch/algorithm_rec_seed.md))\n- [ ] 文档结构化算法[关键信息提取](https://github.com/PaddlePaddle/PaddleOCR/blob/release/2.4/ppstructure/docs/kie.md)算法(SDMGR)\n- [ ] 3种[DocVQA](https://github.com/PaddlePaddle/PaddleOCR/tree/release/2.4/ppstructure/vqa)算法(LayoutLM、LayoutLMv2，LayoutXLM)\n- [ ] 文档结构分析[PP-Structure](https://github.com/PaddlePaddle/PaddleOCR/blob/release/2.2/ppstructure/README_ch.md)工具包，支持版面分析与表格识别（含Excel导出）\n\n\u003ca name=\"Pipline\"\u003e\u003c/a\u003e\n\n## PP-OCRv2 Pipline\n\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"./doc/ppocrv2_framework.jpg\" width=\"800\"\u003e\n\u003c/div\u003e\n\n\n\n[1] PP-OCR是一个实用的超轻量OCR系统。主要由DB文本检测、检测框矫正和CRNN文本识别三部分组成。该系统从骨干网络选择和调整、预测头部的设计、数据增强、学习率变换策略、正则化参数选择、预训练模型使用以及模型自动裁剪量化8个方面，采用19个有效策略，对各个模块的模型进行效果调优和瘦身(如绿框所示)，最终得到整体大小为3.5M的超轻量中英文OCR和2.8M的英文数字OCR。更多细节请参考PP-OCR技术方案 \u003chttps://arxiv.org/abs/2009.09941\u003e\n\n[2] PP-OCRv2在PP-OCR的基础上，进一步在5个方面重点优化，检测模型采用CML协同互学习知识蒸馏策略和CopyPaste数据增广策略；识别模型采用LCNet轻量级骨干网络、UDML 改进知识蒸馏策略和Enhanced CTC loss损失函数改进（如上图红框所示），进一步在推理速度和预测效果上取得明显提升。更多细节请参考PP-OCRv2[技术报告](https://arxiv.org/abs/2109.03144)。\n\n\u003ca name=\"效果展示\"\u003e\u003c/a\u003e\n\n## 效果展示\n- 中文模型\n\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"./doc/imgs_results/ch_ptocr_mobile_v2.0/11.jpg\" width=\"800\"\u003e\n    \u003cimg src=\"./doc/imgs_results/ch_ptocr_mobile_v2.0/00015504.jpg\" width=\"800\"\u003e\n    \u003cimg src=\"./doc/imgs_results/ch_ptocr_mobile_v2.0/00056221.jpg\" width=\"800\"\u003e\n    \u003cimg src=\"./doc/imgs_results/ch_ptocr_mobile_v2.0/1.jpg\" width=\"800\"\u003e\n\u003c/div\u003e\n\n\n- 英文模型\n\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"./doc/imgs_results/ch_ptocr_mobile_v2.0/img_12.jpg\" width=\"800\"\u003e\n\u003c/div\u003e\n\n\n- 其他语言模型\n\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"./doc/imgs_results/french_0.jpg\" width=\"800\"\u003e\n    \u003cimg src=\"./doc/imgs_results/korean.jpg\" width=\"800\"\u003e\n\u003c/div\u003e\n\u003ca name=\"参考\"\u003e\u003c/a\u003e\n\n## 参考\n\n- [https://github.com/PaddlePaddle/PaddleOCR](https://github.com/PaddlePaddle/PaddleOCR)\n- [https://github.com/WenmuZhou/PytorchOCR](https://github.com/WenmuZhou/PytorchOCR)\n- [Paddle](https://github.com/PaddlePaddle)\n- [Pytorch](https://pytorch.org/)\n- [https://github.com/frotms/image_classification_pytorch](https://github.com/frotms/image_classification_pytorch)\n- [https://github.com/PaddlePaddle/PaddleOCR/blob/release/2.7/doc/doc_ch/models_list.md](https://github.com/PaddlePaddle/PaddleOCR/blob/release/2.7/doc/doc_ch/models_list.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrotms%2Fpaddleocr2pytorch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffrotms%2Fpaddleocr2pytorch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrotms%2Fpaddleocr2pytorch/lists"}