diff --git a/README.md b/README.md index 88c1dc18fa95d96a32fb68b50520d41dfd1b8935..867e3cbcbffe1a7981409d26ef58793acea28522 100644 --- a/README.md +++ b/README.md @@ -1,109 +1,109 @@ -[English](README_en.md) | 简体中文 - -## 简介 -PaddleOCR旨在打造一套丰富、领先、且实用的OCR工具库,助力使用者训练出更好的模型,并应用落地。 - -**近期更新** -- 2020.9.19 更新超轻量压缩ppocr_mobile_slim系列模型,整体模型3.5M(详见[PP-OCR Pipline](#PP-OCR)),适合在移动端部署使用。[模型下载](#模型下载) -- 2020.9.17 更新超轻量ppocr_mobile系列和通用ppocr_server系列中英文ocr模型,媲美商业效果。[模型下载](#模型下载) -- 2020.8.26 更新OCR相关的84个常见问题及解答,具体参考[FAQ](./doc/doc_ch/FAQ.md) -- 2020.8.24 支持通过whl包安装使用PaddleOCR,具体参考[Paddleocr Package使用说明](./doc/doc_ch/whl.md) -- 2020.8.21 更新8月18日B站直播课回放和PPT,课节2,易学易用的OCR工具大礼包,[获取地址](https://aistudio.baidu.com/aistudio/education/group/info/1519) -- [More](./doc/doc_ch/update.md) - - -## 特性 - -- PPOCR系列高质量预训练模型,媲美商业效果 - - 超轻量ppocr_mobile移动端系列:检测(2.6M)+方向分类器(0.9M)+ 识别(4.6M)= 8.1M - - 通用ppocr_server系列:检测(47.2M)+方向分类器(0.9M)+ 识别(107M)= 155.1M - - 超轻量压缩ppocr_mobile_slim系列:检测(1.4M)+方向分类器(0.5M)+ 识别(1.6M)= 3.5M -- 支持中英文数字组合识别、竖排文本识别、长文本识别 -- 支持多语言识别:韩语、日语、德语、法语 -- 支持用户自定义训练,提供丰富的预测推理部署方案 -- 支持PIP快速安装使用 -- 可运行于Linux、Windows、MacOS等多种系统 - -## 效果展示 +English | [简体中文](README_ch.md) + +## Introduction +PaddleOCR aims to create rich, leading, and practical OCR tools that help users train better models and apply them into practice. + +**Recent updates** +- 2020.9.22 Update the PP-OCR technical article, https://arxiv.org/abs/2009.09941 +- 2020.9.19 Update the ultra lightweight compressed ppocr_mobile_slim series models, the overall model size is 3.5M (see [PP-OCR Pipline](#PP-OCR-Pipline)), suitable for mobile deployment. [Model Downloads](#Supported-Chinese-model-list) +- 2020.9.17 Update the ultra lightweight ppocr_mobile series and general ppocr_server series Chinese and English ocr models, which are comparable to commercial effects. [Model Downloads](#Supported-Chinese-model-list) +- 2020.8.24 Support the use of PaddleOCR through whl package installation,pelease refer [PaddleOCR Package](./doc/doc_en/whl_en.md) +- 2020.8.21 Update the replay and PPT of the live lesson at Bilibili on August 18, lesson 2, easy to learn and use OCR tool spree. [Get Address](https://aistudio.baidu.com/aistudio/education/group/info/1519) +- [more](./doc/doc_en/update_en.md) + +## Features +- PPOCR series of high-quality pre-trained models, comparable to commercial effects + - Ultra lightweight ppocr_mobile series models: detection (2.6M) + direction classifier (0.9M) + recognition (4.6M) = 8.1M + - General ppocr_server series models: detection (47.2M) + direction classifier (0.9M) + recognition (107M) = 155.1M + - Ultra lightweight compression ppocr_mobile_slim series models: detection (1.4M) + direction classifier (0.5M) + recognition (1.6M) = 3.5M +- Support Chinese, English, and digit recognition, vertical text recognition, and long text recognition +- Support multi-language recognition: Korean, Japanese, German, French +- Support user-defined training, provides rich predictive inference deployment solutions +- Support PIP installation, easy to use +- Support Linux, Windows, MacOS and other systems + +## Visualization
-上图是通用ppocr_server模型效果展示,更多效果图请见[效果展示页面](./doc/doc_ch/visualization.md)。 +The above pictures are the visualizations of the general ppocr_server model. For more effect pictures, please see [More visualizations](./doc/doc_en/visualization_en.md). + +## Quick Experience -## 快速体验 -- PC端:超轻量级中文OCR在线体验地址:https://www.paddlepaddle.org.cn/hub/scene/ocr +You can also quickly experience the ultra-lightweight OCR : [Online Experience](https://www.paddlepaddle.org.cn/hub/scene/ocr) -- 移动端:[安装包DEMO下载地址](https://ai.baidu.com/easyedge/app/openSource?from=paddlelite)(基于EasyEdge和Paddle-Lite, 支持iOS和Android系统),Android手机也可以直接扫描下面二维码安装体验。 +Mobile DEMO experience (based on EasyEdge and Paddle-Lite, supports iOS and Android systems): [Sign in to the website to obtain the QR code for installing the App](https://ai.baidu.com/easyedge/app/openSource?from=paddlelite) + Also, you can scan the QR code below to install the App (**Android support only**)
-- 代码体验:从[快速安装](./doc/doc_ch/installation.md) 开始 - - -## PP-OCR 1.1系列模型列表(9月17日更新) - -| 模型简介 | 模型名称 |推荐场景 | 检测模型 | 方向分类器 | 识别模型 | | -| ------------ | --------------- | ----------------|---- | ---------- | -------- | ---- | -| 中英文超轻量OCR模型(8.1M) | ch_ppocr_mobile_v1.1_xx |移动端&服务器端|[推理模型](https://paddleocr.bj.bcebos.com/20-09-22/mobile/det/ch_ppocr_mobile_v1.1_det_infer.tar) / [预训练模型](https://paddleocr.bj.bcebos.com/20-09-22/mobile/det/ch_ppocr_mobile_v1.1_det_train.tar)|[推理模型](https://paddleocr.bj.bcebos.com/20-09-22/cls/ch_ppocr_mobile-v1.1.cls_infer.tar) / [预训练模型](https://paddleocr.bj.bcebos.com/20-09-22/cls/ch_ppocr_mobile-v1.1.cls_train.tar) |[推理模型](https://paddleocr.bj.bcebos.com/20-09-22/mobile/rec/ch_ppocr_mobile_v1.1_rec_infer.tar) / [预训练模型](https://paddleocr.bj.bcebos.com/20-09-22/mobile/rec/ch_ppocr_mobile_v1.1_rec_pre.tar) | | -| 中英文通用OCR模型(155.1M) |ch_ppocr_server_v1.1_xx|服务器端 |[预测模型](https://paddleocr.bj.bcebos.com/20-09-22/server/det/ch_ppocr_server_v1.1_det_infer.tar) / [预训练模型](https://paddleocr.bj.bcebos.com/20-09-22/server/det/ch_ppocr_server_v1.1_det_train.tar) |[推理模型](https://paddleocr.bj.bcebos.com/20-09-22/cls/ch_ppocr_mobile-v1.1.cls_infer.tar) / [预训练模型](https://paddleocr.bj.bcebos.com/20-09-22/cls/ch_ppocr_mobile-v1.1.cls_train.tar) |[推理模型](https://paddleocr.bj.bcebos.com/20-09-22/server/rec/ch_ppocr_server_v1.1_rec_infer.tar) / [预训练模型](https://paddleocr.bj.bcebos.com/20-09-22/server/rec/ch_ppocr_server_v1.1_rec_pre.tar) | | -| 中英文超轻量压缩OCR模型 | ch_ppocr_mobile_slim_v1.1_xx| 移动端 |[推理模型](https://paddleocr.bj.bcebos.com/20-09-22/mobile-slim/det/ch_ppocr_mobile_v1.1_det_prune_infer.tar) / [slim模型](https://paddleocr.bj.bcebos.com/20-09-22/mobile-slim/det/ch_ppocr_mobile_v1.1_det_prune_opt.nb) |[推理模型](https://paddleocr.bj.bcebos.com/20-09-22/mobile-slim/rec/ch_ppocr_mobile_v1.1_rec_quant_infer.tar) / [slim模型](https://paddleocr.bj.bcebos.com/20-09-22/mobile-slim/rec/ch_ppocr_mobile_v1.1_rec_quant_opt.nb)|[推理模型](https://paddleocr.bj.bcebos.com/20-09-22/cls/ch_ppocr_mobile_v1.1_cls_quant_infer.tar) / [slim模型](https://paddleocr.bj.bcebos.com/20-09-22/cls/ch_ppocr_mobile_cls_quant_opt.nb)| | || - -更多模型下载(包括多语言),可以参考[PP-OCR v1.1 系列模型下载](./doc/doc_ch/models_list.md) - -## 文档教程 -- [快速安装](./doc/doc_ch/installation.md) -- [中文OCR模型快速使用](./doc/doc_ch/quickstart.md) -- [代码组织结构](./doc/doc_ch/tree.md) -- 算法介绍 - - [文本检测](./doc/doc_ch/algorithm_overview.md) - - [文本识别](./doc/doc_ch/algorithm_overview.md) - - [PP-OCR Pipline](#PP-OCR) -- 模型训练/评估 - - [文本检测](./doc/doc_ch/detection.md) - - [文本识别](./doc/doc_ch/recognition.md) - - [yml参数配置文件介绍](./doc/doc_ch/config.md) -- 预测部署 - - [基于pip安装whl包快速推理](./doc/doc_ch/whl.md) - - [基于Python脚本预测引擎推理](./doc/doc_ch/inference.md) - - [基于C++预测引擎推理](./deploy/cpp_infer/readme.md) - - [服务化部署](./deploy/hubserving/readme.md) - - [端侧部署](./deploy/lite/readme.md) - - [模型量化](./deploy/slim/quantization/README.md) - - [模型裁剪](./deploy/slim/prune/README_ch.md) - - [Benchmark](./doc/doc_ch/benchmark.md) -- 数据集 - - [通用中英文OCR数据集](./doc/doc_ch/datasets.md) - - [手写中文OCR数据集](./doc/doc_ch/handwritten_datasets.md) - - [垂类多语言OCR数据集](./doc/doc_ch/vertical_and_multilingual_datasets.md) - - [常用数据标注工具](./doc/doc_ch/data_annotation.md) - - [常用数据合成工具](./doc/doc_ch/data_synthesis.md) -- [效果展示](#效果展示) -- FAQ - - [【精选】OCR精选10个问题](./doc/doc_ch/FAQ.md) - - [【理论篇】OCR通用21个问题](./doc/doc_ch/FAQ.md) - - [【实战篇】PaddleOCR实战53个问题](./doc/doc_ch/FAQ.md) -- [技术交流群](#欢迎加入PaddleOCR技术交流群) -- [参考文献](./doc/doc_ch/reference.md) -- [许可证书](#许可证书) -- [贡献代码](#贡献代码) - - +- [**OCR Quick Start**](./doc/doc_en/quickstart_en.md) + + + +## PP-OCR 1.1 series model list(Update on Sep 17) + +| Model introduction | Model name | Recommended scene | Detection model | Direction classifier | Recognition model | +| ------------------------------------------------------------ | ---------------------------- | ----------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| Chinese and English ultra-lightweight OCR model (8.1M) | ch_ppocr_mobile_v1.1_xx | Mobile & server | [inference model](https://paddleocr.bj.bcebos.com/20-09-22/mobile/det/ch_ppocr_mobile_v1.1_det_infer.tar) / [pre-trained model](https://paddleocr.bj.bcebos.com/20-09-22/mobile/det/ch_ppocr_mobile_v1.1_det_train.tar) | [inference model](https://paddleocr.bj.bcebos.com/20-09-22/cls/ch_ppocr_mobile_v1.1_cls_infer.tar) / [pre-trained model](https://paddleocr.bj.bcebos.com/20-09-22/cls/ch_ppocr_mobile_v1.1_cls_train.tar) | [inference model](https://paddleocr.bj.bcebos.com/20-09-22/mobile/rec/ch_ppocr_mobile_v1.1_rec_infer.tar) / [pre-trained model](https://paddleocr.bj.bcebos.com/20-09-22/mobile/rec/ch_ppocr_mobile_v1.1_rec_pre.tar) | +| Chinese and English general OCR model (155.1M) | ch_ppocr_server_v1.1_xx | Server | [inference model](https://paddleocr.bj.bcebos.com/20-09-22/server/det/ch_ppocr_server_v1.1_det_infer.tar) / [pre-trained model](https://paddleocr.bj.bcebos.com/20-09-22/server/det/ch_ppocr_server_v1.1_det_train.tar) | [inference model](https://paddleocr.bj.bcebos.com/20-09-22/cls/ch_ppocr_mobile_v1.1_cls_infer.tar) / [pre-trained model](https://paddleocr.bj.bcebos.com/20-09-22/cls/ch_ppocr_mobile_v1.1_cls_train.tar) | [inference model](https://paddleocr.bj.bcebos.com/20-09-22/server/rec/ch_ppocr_server_v1.1_rec_infer.tar) / [pre-trained model](https://paddleocr.bj.bcebos.com/20-09-22/server/rec/ch_ppocr_server_v1.1_rec_pre.tar) | +| Chinese and English ultra-lightweight compressed OCR model (3.5M) | ch_ppocr_mobile_slim_v1.1_xx | Mobile | [inference model](https://paddleocr.bj.bcebos.com/20-09-22/mobile-slim/det/ch_ppocr_mobile_v1.1_det_prune_infer.tar) / [slim model](https://paddleocr.bj.bcebos.com/20-09-22/mobile-slim/det/ch_ppocr_mobile_v1.1_det_prune_opt.nb) | [inference model](https://paddleocr.bj.bcebos.com/20-09-22/cls/ch_ppocr_mobile_v1.1_cls_quant_infer.tar) / [slim model](https://paddleocr.bj.bcebos.com/20-09-22/cls/ch_ppocr_mobile_cls_quant_opt.nb) | [inference model](https://paddleocr.bj.bcebos.com/20-09-22/mobile-slim/rec/ch_ppocr_mobile_v1.1_rec_quant_infer.tar) / [slim model](https://paddleocr.bj.bcebos.com/20-09-22/mobile-slim/rec/ch_ppocr_mobile_v1.1_rec_quant_opt.nb) | + +For more model downloads (including multiple languages), please refer to [PP-OCR v1.1 series model downloads](./doc/doc_en/models_list_en.md) + + +## Tutorials +- [Installation](./doc/doc_en/installation_en.md) +- [Quick Start](./doc/doc_en/quickstart_en.md) +- [Code Structure](./doc/doc_en/tree_en.md) +- Algorithm introduction + - [Text Detection Algorithm](./doc/doc_en/algorithm_overview_en.md) + - [Text Recognition Algorithm](./doc/doc_en/algorithm_overview_en.md) + - [PP-OCR Pipline](#PP-OCR-Pipline) +- Model training/evaluation + - [Text Detection](./doc/doc_en/detection_en.md) + - [Text Recognition](./doc/doc_en/recognition_en.md) + - [Direction Classification](./doc/doc_en/angle_class_en.md) + - [Yml Configuration](./doc/doc_en/config_en.md) +- Inference and Deployment + - [Quick inference based on pip](./doc/doc_en/whl_en.md) + - [Python Inference](./doc/doc_en/inference_en.md) + - [C++ Inference](./deploy/cpp_infer/readme_en.md) + - [Serving](./deploy/hubserving/readme_en.md) + - [Mobile](./deploy/lite/readme_en.md) + - [Model Quantization](./deploy/slim/quantization/README_en.md) + - [Model Compression](./deploy/slim/prune/README_en.md) + - [Benchmark](./doc/doc_en/benchmark_en.md) +- Datasets + - [General OCR Datasets(Chinese/English)](./doc/doc_en/datasets_en.md) + - [HandWritten_OCR_Datasets(Chinese)](./doc/doc_en/handwritten_datasets_en.md) + - [Various OCR Datasets(multilingual)](./doc/doc_en/vertical_and_multilingual_datasets_en.md) + - [Data Annotation Tools](./doc/doc_en/data_annotation_en.md) + - [Data Synthesis Tools](./doc/doc_en/data_synthesis_en.md) +- [Visualization](#Visualization) +- [FAQ](./doc/doc_en/FAQ_en.md) +- [Community](#Community) +- [References](./doc/doc_en/reference_en.md) +- [License](#LICENSE) +- [Contribution](#CONTRIBUTION) + + + ## PP-OCR Pipline +
-PP-OCR是一个实用的超轻量OCR系统。主要由DB文本检测、检测框矫正和CRNN文本识别三部分组成。该系统从骨干网络选择和调整、预测头部的设计、数据增强、学习率变换策略、正则化参数选择、预训练模型使用以及模型自动裁剪量化8个方面,采用19个有效策略,对各个模块的模型进行效果调优和瘦身,最终得到整体大小为3.5M的超轻量中英文OCR和2M的英文数字OCR。更多细节请参考PP-OCR技术文章(Arxiv文章链接生成中)。 +PP-OCR is a practical ultra-lightweight OCR system. It is mainly composed of three parts: DB text detection, detection frame correction and CRNN text recognition. The system adopts 19 effective strategies from 8 aspects including backbone network selection and adjustment, prediction head design, data augmentation, learning rate transformation strategy, regularization parameter selection, pre-training model use, and automatic model tailoring and quantization to optimize and slim down the models of each module. The final results are an ultra-lightweight Chinese and English OCR model with an overall size of 3.5M and a 2.8M English digital OCR model. For more details, please refer to the PP-OCR technical article (https://arxiv.org/abs/2009.09941). - - -## 效果展示 [more](./doc/doc_ch/visualization.md) +## Visualization [more](./doc/doc_en/visualization_en.md)
@@ -114,30 +114,26 @@ PP-OCR是一个实用的超轻量OCR系统。主要由DB文本检测、检测框
- - - - - -## 欢迎加入PaddleOCR技术交流群 -请扫描下面二维码,完成问卷填写,获取加群二维码和OCR方向的炼丹秘籍 + +## Community +Scan the QR code below with your Wechat and completing the questionnaire, you can access to offical technical exchange group.
- -## 许可证书 -本项目的发布受Apache 2.0 license许可认证。 - - -## 贡献代码 -我们非常欢迎你为PaddleOCR贡献代码,也十分感谢你的反馈。 - -- 非常感谢 [Khanh Tran](https://github.com/xxxpsyduck) 和 [Karl Horky](https://github.com/karlhorky) 贡献修改英文文档 -- 非常感谢 [zhangxin](https://github.com/ZhangXinNan)([Blog](https://blog.csdn.net/sdlypyzq)) 贡献新的可视化方式、添加.gitgnore、处理手动设置PYTHONPATH环境变量的问题 -- 非常感谢 [lyl120117](https://github.com/lyl120117) 贡献打印网络结构的代码 -- 非常感谢 [xiangyubo](https://github.com/xiangyubo) 贡献手写中文OCR数据集 -- 非常感谢 [authorfu](https://github.com/authorfu) 贡献Android和[xiadeye](https://github.com/xiadeye) 贡献IOS的demo代码 -- 非常感谢 [BeyondYourself](https://github.com/BeyondYourself) 给PaddleOCR提了很多非常棒的建议,并简化了PaddleOCR的部分代码风格。 -- 非常感谢 [tangmq](https://gitee.com/tangmq) 给PaddleOCR增加Docker化部署服务,支持快速发布可调用的Restful API服务。 + +## License +This project is released under Apache 2.0 license + + +## Contribution +We welcome all the contributions to PaddleOCR and appreciate for your feedback very much. + +- Many thanks to [Khanh Tran](https://github.com/xxxpsyduck) and [Karl Horky](https://github.com/karlhorky) for contributing and revising the English documentation. +- Many thanks to [zhangxin](https://github.com/ZhangXinNan) for contributing the new visualize function、add .gitgnore and discard set PYTHONPATH manually. +- Many thanks to [lyl120117](https://github.com/lyl120117) for contributing the code for printing the network structure. +- Thanks [xiangyubo](https://github.com/xiangyubo) for contributing the handwritten Chinese OCR datasets. +- Thanks [authorfu](https://github.com/authorfu) for contributing Android demo and [xiadeye](https://github.com/xiadeye) contributing iOS demo, respectively. +- Thanks [BeyondYourself](https://github.com/BeyondYourself) for contributing many great suggestions and simplifying part of the code style. +- Thanks [tangmq](https://gitee.com/tangmq) for contributing Dockerized deployment services to PaddleOCR and supporting the rapid release of callable Restful API services. diff --git a/README_ch.md b/README_ch.md new file mode 100644 index 0000000000000000000000000000000000000000..58b1acb982d2b880a949a4592026f6923a6bd343 --- /dev/null +++ b/README_ch.md @@ -0,0 +1,141 @@ +[English](README.md) | 简体中文 + +## 简介 +PaddleOCR旨在打造一套丰富、领先、且实用的OCR工具库,助力使用者训练出更好的模型,并应用落地。 + +**近期更新** +- 2020.9.22 更新PP-OCR技术文章,https://arxiv.org/abs/2009.09941 +- 2020.9.19 更新超轻量压缩ppocr_mobile_slim系列模型,整体模型3.5M(详见[PP-OCR Pipline](#PP-OCR)),适合在移动端部署使用。[模型下载](#模型下载) +- 2020.9.17 更新超轻量ppocr_mobile系列和通用ppocr_server系列中英文ocr模型,媲美商业效果。[模型下载](#模型下载) +- 2020.8.26 更新OCR相关的84个常见问题及解答,具体参考[FAQ](./doc/doc_ch/FAQ.md) +- 2020.8.24 支持通过whl包安装使用PaddleOCR,具体参考[Paddleocr Package使用说明](./doc/doc_ch/whl.md) +- 2020.8.21 更新8月18日B站直播课回放和PPT,课节2,易学易用的OCR工具大礼包,[获取地址](https://aistudio.baidu.com/aistudio/education/group/info/1519) +- [More](./doc/doc_ch/update.md) + + +## 特性 + +- PPOCR系列高质量预训练模型,准确的识别效果 + - 超轻量ppocr_mobile移动端系列:检测(2.6M)+方向分类器(0.9M)+ 识别(4.6M)= 8.1M + - 通用ppocr_server系列:检测(47.2M)+方向分类器(0.9M)+ 识别(107M)= 155.1M + - 超轻量压缩ppocr_mobile_slim系列:检测(1.4M)+方向分类器(0.5M)+ 识别(1.6M)= 3.5M +- 支持中英文数字组合识别、竖排文本识别、长文本识别 +- 支持多语言识别:韩语、日语、德语、法语 +- 支持用户自定义训练,提供丰富的预测推理部署方案 +- 支持PIP快速安装使用 +- 可运行于Linux、Windows、MacOS等多种系统 + +## 效果展示 + +
+ + +
+ +上图是通用ppocr_server模型效果展示,更多效果图请见[效果展示页面](./doc/doc_ch/visualization.md)。 + +## 快速体验 +- PC端:超轻量级中文OCR在线体验地址:https://www.paddlepaddle.org.cn/hub/scene/ocr + +- 移动端:[安装包DEMO下载地址](https://ai.baidu.com/easyedge/app/openSource?from=paddlelite)(基于EasyEdge和Paddle-Lite, 支持iOS和Android系统),Android手机也可以直接扫描下面二维码安装体验。 + + +
+ +
+ +- 代码体验:从[快速安装](./doc/doc_ch/installation.md) 开始 + + +## PP-OCR 1.1系列模型列表(9月17日更新) + +| 模型简介 | 模型名称 |推荐场景 | 检测模型 | 方向分类器 | 识别模型 | +| ------------ | --------------- | ----------------|---- | ---------- | -------- | +| 中英文超轻量OCR模型(8.1M) | ch_ppocr_mobile_v1.1_xx |移动端&服务器端|[推理模型](https://paddleocr.bj.bcebos.com/20-09-22/mobile/det/ch_ppocr_mobile_v1.1_det_infer.tar) / [预训练模型](https://paddleocr.bj.bcebos.com/20-09-22/mobile/det/ch_ppocr_mobile_v1.1_det_train.tar)|[推理模型](https://paddleocr.bj.bcebos.com/20-09-22/cls/ch_ppocr_mobile_v1.1_cls_infer.tar) / [预训练模型](https://paddleocr.bj.bcebos.com/20-09-22/cls/ch_ppocr_mobile_v1.1_cls_train.tar) |[推理模型](https://paddleocr.bj.bcebos.com/20-09-22/mobile/rec/ch_ppocr_mobile_v1.1_rec_infer.tar) / [预训练模型](https://paddleocr.bj.bcebos.com/20-09-22/mobile/rec/ch_ppocr_mobile_v1.1_rec_pre.tar) | +| 中英文通用OCR模型(155.1M) |ch_ppocr_server_v1.1_xx|服务器端 |[推理模型](https://paddleocr.bj.bcebos.com/20-09-22/server/det/ch_ppocr_server_v1.1_det_infer.tar) / [预训练模型](https://paddleocr.bj.bcebos.com/20-09-22/server/det/ch_ppocr_server_v1.1_det_train.tar) |[推理模型](https://paddleocr.bj.bcebos.com/20-09-22/cls/ch_ppocr_mobile_v1.1_cls_infer.tar) / [预训练模型](https://paddleocr.bj.bcebos.com/20-09-22/cls/ch_ppocr_mobile_v1.1_cls_train.tar) |[推理模型](https://paddleocr.bj.bcebos.com/20-09-22/server/rec/ch_ppocr_server_v1.1_rec_infer.tar) / [预训练模型](https://paddleocr.bj.bcebos.com/20-09-22/server/rec/ch_ppocr_server_v1.1_rec_pre.tar) | +| 中英文超轻量压缩OCR模型(3.5M) | ch_ppocr_mobile_slim_v1.1_xx| 移动端 |[推理模型](https://paddleocr.bj.bcebos.com/20-09-22/mobile-slim/det/ch_ppocr_mobile_v1.1_det_prune_infer.tar) / [slim模型](https://paddleocr.bj.bcebos.com/20-09-22/mobile-slim/det/ch_ppocr_mobile_v1.1_det_prune_opt.nb) |[推理模型](https://paddleocr.bj.bcebos.com/20-09-22/cls/ch_ppocr_mobile_v1.1_cls_quant_infer.tar) / [slim模型](https://paddleocr.bj.bcebos.com/20-09-22/cls/ch_ppocr_mobile_cls_quant_opt.nb)| [推理模型](https://paddleocr.bj.bcebos.com/20-09-22/mobile-slim/rec/ch_ppocr_mobile_v1.1_rec_quant_infer.tar) / [slim模型](https://paddleocr.bj.bcebos.com/20-09-22/mobile-slim/rec/ch_ppocr_mobile_v1.1_rec_quant_opt.nb)| + +更多模型下载(包括多语言),可以参考[PP-OCR v1.1 系列模型下载](./doc/doc_ch/models_list.md) + +## 文档教程 +- [快速安装](./doc/doc_ch/installation.md) +- [中文OCR模型快速使用](./doc/doc_ch/quickstart.md) +- [代码组织结构](./doc/doc_ch/tree.md) +- 算法介绍 + - [文本检测](./doc/doc_ch/algorithm_overview.md) + - [文本识别](./doc/doc_ch/algorithm_overview.md) + - [PP-OCR Pipline](#PP-OCR) +- 模型训练/评估 + - [文本检测](./doc/doc_ch/detection.md) + - [文本识别](./doc/doc_ch/recognition.md) + - [方向分类器](./doc/doc_ch/angle_class.md) + - [yml参数配置文件介绍](./doc/doc_ch/config.md) +- 预测部署 + - [基于pip安装whl包快速推理](./doc/doc_ch/whl.md) + - [基于Python脚本预测引擎推理](./doc/doc_ch/inference.md) + - [基于C++预测引擎推理](./deploy/cpp_infer/readme.md) + - [服务化部署](./deploy/hubserving/readme.md) + - [端侧部署](./deploy/lite/readme.md) + - [模型量化](./deploy/slim/quantization/README.md) + - [模型裁剪](./deploy/slim/prune/README.md) + - [Benchmark](./doc/doc_ch/benchmark.md) +- 数据集 + - [通用中英文OCR数据集](./doc/doc_ch/datasets.md) + - [手写中文OCR数据集](./doc/doc_ch/handwritten_datasets.md) + - [垂类多语言OCR数据集](./doc/doc_ch/vertical_and_multilingual_datasets.md) + - [常用数据标注工具](./doc/doc_ch/data_annotation.md) + - [常用数据合成工具](./doc/doc_ch/data_synthesis.md) +- [效果展示](#效果展示) +- FAQ + - [【精选】OCR精选10个问题](./doc/doc_ch/FAQ.md) + - [【理论篇】OCR通用21个问题](./doc/doc_ch/FAQ.md) + - [【实战篇】PaddleOCR实战53个问题](./doc/doc_ch/FAQ.md) +- [技术交流群](#欢迎加入PaddleOCR技术交流群) +- [参考文献](./doc/doc_ch/reference.md) +- [许可证书](#许可证书) +- [贡献代码](#贡献代码) + + +## PP-OCR Pipline +
+ +
+ +PP-OCR是一个实用的超轻量OCR系统。主要由DB文本检测、检测框矫正和CRNN文本识别三部分组成。该系统从骨干网络选择和调整、预测头部的设计、数据增强、学习率变换策略、正则化参数选择、预训练模型使用以及模型自动裁剪量化8个方面,采用19个有效策略,对各个模块的模型进行效果调优和瘦身,最终得到整体大小为3.5M的超轻量中英文OCR和2.8M的英文数字OCR。更多细节请参考PP-OCR技术方案 https://arxiv.org/abs/2009.09941 。 + + +## 效果展示 [more](./doc/doc_ch/visualization.md) + +
+ + + + + + +
+ + + +## 欢迎加入PaddleOCR技术交流群 +请扫描下面二维码,完成问卷填写,获取加群二维码和OCR方向的炼丹秘籍 + +
+ +
+ + +## 许可证书 +本项目的发布受Apache 2.0 license许可认证。 + + +## 贡献代码 +我们非常欢迎你为PaddleOCR贡献代码,也十分感谢你的反馈。 + +- 非常感谢 [Khanh Tran](https://github.com/xxxpsyduck) 和 [Karl Horky](https://github.com/karlhorky) 贡献修改英文文档 +- 非常感谢 [zhangxin](https://github.com/ZhangXinNan)([Blog](https://blog.csdn.net/sdlypyzq)) 贡献新的可视化方式、添加.gitgnore、处理手动设置PYTHONPATH环境变量的问题 +- 非常感谢 [lyl120117](https://github.com/lyl120117) 贡献打印网络结构的代码 +- 非常感谢 [xiangyubo](https://github.com/xiangyubo) 贡献手写中文OCR数据集 +- 非常感谢 [authorfu](https://github.com/authorfu) 贡献Android和[xiadeye](https://github.com/xiadeye) 贡献IOS的demo代码 +- 非常感谢 [BeyondYourself](https://github.com/BeyondYourself) 给PaddleOCR提了很多非常棒的建议,并简化了PaddleOCR的部分代码风格。 +- 非常感谢 [tangmq](https://gitee.com/tangmq) 给PaddleOCR增加Docker化部署服务,支持快速发布可调用的Restful API服务。 diff --git a/README_en.md b/README_en.md deleted file mode 100644 index 0d9a4f6cf5193864b1f1879db6d5b09f948814f3..0000000000000000000000000000000000000000 --- a/README_en.md +++ /dev/null @@ -1,226 +0,0 @@ -English | [简体中文](README.md) - -## Introduction -PaddleOCR aims to create rich, leading, and practical OCR tools that help users train better models and apply them into practice. - -**Recent updates** -- 2020.8.24 Support the use of PaddleOCR through whl package installation,pelease refer [PaddleOCR Package](https://github.com/PaddlePaddle/PaddleOCR/blob/develop/doc/doc_en/whl_en.md) -- 2020.8.16, Release text detection algorithm [SAST](https://arxiv.org/abs/1908.05498) and text recognition algorithm [SRN](https://arxiv.org/abs/2003.12294) -- 2020.7.23, Release the playback and PPT of live class on BiliBili station, PaddleOCR Introduction, [address](https://aistudio.baidu.com/aistudio/course/introduce/1519) -- 2020.7.15, Add mobile App demo , support both iOS and Android ( based on easyedge and Paddle Lite) -- 2020.7.15, Improve the deployment ability, add the C + + inference , serving deployment. In addition, the benchmarks of the ultra-lightweight OCR model are provided. -- 2020.7.15, Add several related datasets, data annotation and synthesis tools. -- [more](./doc/doc_en/update_en.md) - -## Features -- Ultra-lightweight OCR model, total model size is only 8.6M - - Single model supports Chinese/English numbers combination recognition, vertical text recognition, long text recognition - - Detection model DB (4.1M) + recognition model CRNN (4.5M) -- Various text detection algorithms: EAST, DB -- Various text recognition algorithms: Rosetta, CRNN, STAR-Net, RARE -- Support Linux, Windows, macOS and other systems. - -## Visualization - -![](doc/imgs_results/11.jpg) - -![](doc/imgs_results/img_10.jpg) - -[More visualization](./doc/doc_en/visualization_en.md) - -You can also quickly experience the ultra-lightweight OCR : [Online Experience](https://www.paddlepaddle.org.cn/hub/scene/ocr) - -Mobile DEMO experience (based on EasyEdge and Paddle-Lite, supports iOS and Android systems): [Sign in to the website to obtain the QR code for installing the App](https://ai.baidu.com/easyedge/app/openSource?from=paddlelite) - - Also, you can scan the QR code below to install the App (**Android support only**) - -
- -
- -- [**OCR Quick Start**](./doc/doc_en/quickstart_en.md) - - - -### Supported Models: - -|Model Name|Description |Detection Model link|Recognition Model link| Support for space Recognition Model link| -|-|-|-|-|-| -|db_crnn_mobile|ultra-lightweight OCR model|[inference model](https://paddleocr.bj.bcebos.com/ch_models/ch_det_mv3_db_infer.tar) / [pre-trained model](https://paddleocr.bj.bcebos.com/ch_models/ch_det_mv3_db.tar)|[inference model](https://paddleocr.bj.bcebos.com/ch_models/ch_rec_mv3_crnn_infer.tar) / [pre-trained model](https://paddleocr.bj.bcebos.com/ch_models/ch_rec_mv3_crnn.tar)|[inference model](https://paddleocr.bj.bcebos.com/ch_models/ch_rec_mv3_crnn_enhance_infer.tar) / [pre-train model](https://paddleocr.bj.bcebos.com/ch_models/ch_rec_mv3_crnn_enhance.tar) -|db_crnn_server|General OCR model|[inference model](https://paddleocr.bj.bcebos.com/ch_models/ch_det_r50_vd_db_infer.tar) / [pre-trained model](https://paddleocr.bj.bcebos.com/ch_models/ch_det_r50_vd_db.tar)|[inference model](https://paddleocr.bj.bcebos.com/ch_models/ch_rec_r34_vd_crnn_infer.tar) / [pre-trained model](https://paddleocr.bj.bcebos.com/ch_models/ch_rec_r34_vd_crnn.tar)|[inference model](https://paddleocr.bj.bcebos.com/ch_models/ch_rec_r34_vd_crnn_enhance_infer.tar) / [pre-train model](https://paddleocr.bj.bcebos.com/ch_models/ch_rec_r34_vd_crnn_enhance.tar) - - -## Tutorials -- [Installation](./doc/doc_en/installation_en.md) -- [Quick Start](./doc/doc_en/quickstart_en.md) -- Algorithm introduction - - [Text Detection Algorithm](#TEXTDETECTIONALGORITHM) - - [Text Recognition Algorithm](#TEXTRECOGNITIONALGORITHM) -- Model training/evaluation - - [Text Detection](./doc/doc_en/detection_en.md) - - [Text Recognition](./doc/doc_en/recognition_en.md) - - [Yml Configuration](./doc/doc_en/config_en.md) - - [Tricks](./doc/doc_en/tricks_en.md) -- Deployment - - [Python Inference](./doc/doc_en/inference_en.md) - - [C++ Inference](./deploy/cpp_infer/readme_en.md) - - [Serving](./deploy/hubserving/readme_en.md) - - [Mobile](./deploy/lite/readme_en.md) - - Model Quantization and Compression (coming soon) - - [Benchmark](./doc/doc_en/benchmark_en.md) -- Datasets - - [General OCR Datasets(Chinese/English)](./doc/doc_en/datasets_en.md) - - [HandWritten_OCR_Datasets(Chinese)](./doc/doc_en/handwritten_datasets_en.md) - - [Various OCR Datasets(multilingual)](./doc/doc_en/vertical_and_multilingual_datasets_en.md) - - [Data Annotation Tools](./doc/doc_en/data_annotation_en.md) - - [Data Synthesis Tools](./doc/doc_en/data_synthesis_en.md) -- [FAQ](#FAQ) -- Visualization - - [Ultra-lightweight Chinese/English OCR Visualization](#UCOCRVIS) - - [General Chinese/English OCR Visualization](#GeOCRVIS) - - [Chinese/English OCR Visualization (Support Space Recognition )](#SpaceOCRVIS) -- [Community](#Community) -- [References](./doc/doc_en/reference_en.md) -- [License](#LICENSE) -- [Contribution](#CONTRIBUTION) - - -## Text Detection Algorithm - -PaddleOCR open source text detection algorithms list: -- [x] EAST([paper](https://arxiv.org/abs/1704.03155)) -- [x] DB([paper](https://arxiv.org/abs/1911.08947)) -- [x] SAST([paper](https://arxiv.org/abs/1908.05498))(Baidu Self-Research) - -On the ICDAR2015 dataset, the text detection result is as follows: - -|Model|Backbone|precision|recall|Hmean|Download link| -|-|-|-|-|-|-| -|EAST|ResNet50_vd|88.18%|85.51%|86.82%|[Download link](https://paddleocr.bj.bcebos.com/det_r50_vd_east.tar)| -|EAST|MobileNetV3|81.67%|79.83%|80.74%|[Download link](https://paddleocr.bj.bcebos.com/det_mv3_east.tar)| -|DB|ResNet50_vd|83.79%|80.65%|82.19%|[Download link](https://paddleocr.bj.bcebos.com/det_r50_vd_db.tar)| -|DB|MobileNetV3|75.92%|73.18%|74.53%|[Download link](https://paddleocr.bj.bcebos.com/det_mv3_db.tar)| -|SAST|ResNet50_vd|92.18%|82.96%|87.33%|[Download link](https://paddleocr.bj.bcebos.com/SAST/sast_r50_vd_icdar2015.tar)| - -On Total-Text dataset, the text detection result is as follows: - -|Model|Backbone|precision|recall|Hmean|Download link| -|-|-|-|-|-|-| -|SAST|ResNet50_vd|88.74%|79.80%|84.03%|[Download link](https://paddleocr.bj.bcebos.com/SAST/sast_r50_vd_total_text.tar)| - -**Note:** Additional data, like icdar2013, icdar2017, COCO-Text, ArT, was added to the model training of SAST. Download English public dataset in organized format used by PaddleOCR from [Baidu Drive](https://pan.baidu.com/s/12cPnZcVuV1zn5DOd4mqjVw) (download code: 2bpi). - -For use of [LSVT](https://github.com/PaddlePaddle/PaddleOCR/blob/develop/doc/doc_en/datasets_en.md#1-icdar2019-lsvt) street view dataset with a total of 3w training data,the related configuration and pre-trained models for text detection task are as follows: -|Model|Backbone|Configuration file|Pre-trained model| -|-|-|-|-| -|ultra-lightweight OCR model|MobileNetV3|det_mv3_db.yml|[Download link](https://paddleocr.bj.bcebos.com/ch_models/ch_det_mv3_db.tar)| -|General OCR model|ResNet50_vd|det_r50_vd_db.yml|[Download link](https://paddleocr.bj.bcebos.com/ch_models/ch_det_r50_vd_db.tar)| - -* Note: For the training and evaluation of the above DB model, post-processing parameters box_thresh=0.6 and unclip_ratio=1.5 need to be set. If using different datasets and different models for training, these two parameters can be adjusted for better result. - -For the training guide and use of PaddleOCR text detection algorithms, please refer to the document [Text detection model training/evaluation/prediction](./doc/doc_en/detection_en.md) - - -## Text Recognition Algorithm - -PaddleOCR open-source text recognition algorithms list: -- [x] CRNN([paper](https://arxiv.org/abs/1507.05717)) -- [x] Rosetta([paper](https://arxiv.org/abs/1910.05085)) -- [x] STAR-Net([paper](http://www.bmva.org/bmvc/2016/papers/paper043/index.html)) -- [x] RARE([paper](https://arxiv.org/abs/1603.03915v1)) -- [x] SRN([paper](https://arxiv.org/abs/2003.12294))(Baidu Self-Research) - -Refer to [DTRB](https://arxiv.org/abs/1904.01906), the training and evaluation result of these above text recognition (using MJSynth and SynthText for training, evaluate on IIIT, SVT, IC03, IC13, IC15, SVTP, CUTE) is as follow: - -|Model|Backbone|Avg Accuracy|Module combination|Download link| -|-|-|-|-|-| -|Rosetta|Resnet34_vd|80.24%|rec_r34_vd_none_none_ctc|[Download link](https://paddleocr.bj.bcebos.com/rec_r34_vd_none_none_ctc.tar)| -|Rosetta|MobileNetV3|78.16%|rec_mv3_none_none_ctc|[Download link](https://paddleocr.bj.bcebos.com/rec_mv3_none_none_ctc.tar)| -|CRNN|Resnet34_vd|82.20%|rec_r34_vd_none_bilstm_ctc|[Download link](https://paddleocr.bj.bcebos.com/rec_r34_vd_none_bilstm_ctc.tar)| -|CRNN|MobileNetV3|79.37%|rec_mv3_none_bilstm_ctc|[Download link](https://paddleocr.bj.bcebos.com/rec_mv3_none_bilstm_ctc.tar)| -|STAR-Net|Resnet34_vd|83.93%|rec_r34_vd_tps_bilstm_ctc|[Download link](https://paddleocr.bj.bcebos.com/rec_r34_vd_tps_bilstm_ctc.tar)| -|STAR-Net|MobileNetV3|81.56%|rec_mv3_tps_bilstm_ctc|[Download link](https://paddleocr.bj.bcebos.com/rec_mv3_tps_bilstm_ctc.tar)| -|RARE|Resnet34_vd|84.90%|rec_r34_vd_tps_bilstm_attn|[Download link](https://paddleocr.bj.bcebos.com/rec_r34_vd_tps_bilstm_attn.tar)| -|RARE|MobileNetV3|83.32%|rec_mv3_tps_bilstm_attn|[Download link](https://paddleocr.bj.bcebos.com/rec_mv3_tps_bilstm_attn.tar)| -|SRN|Resnet50_vd_fpn|88.33%|rec_r50fpn_vd_none_srn|[Download link](https://paddleocr.bj.bcebos.com/SRN/rec_r50fpn_vd_none_srn.tar)| - -**Note:** SRN model uses data expansion method to expand the two training sets mentioned above, and the expanded data can be downloaded from [Baidu Drive](https://pan.baidu.com/s/1-HSZ-ZVdqBF2HaBZ5pRAKA) (download code: y3ry). - -The average accuracy of the two-stage training in the original paper is 89.74%, and that of one stage training in paddleocr is 88.33%. Both pre-trained weights can be downloaded [here](https://paddleocr.bj.bcebos.com/SRN/rec_r50fpn_vd_none_srn.tar). - -We use [LSVT](https://github.com/PaddlePaddle/PaddleOCR/blob/develop/doc/doc_en/datasets_en.md#1-icdar2019-lsvt) dataset and cropout 30w training data from original photos by using position groundtruth and make some calibration needed. In addition, based on the LSVT corpus, 500w synthetic data is generated to train the model. The related configuration and pre-trained models are as follows: - -|Model|Backbone|Configuration file|Pre-trained model| -|-|-|-|-| -|ultra-lightweight OCR model|MobileNetV3|rec_chinese_lite_train.yml|[Download link](https://paddleocr.bj.bcebos.com/ch_models/ch_rec_mv3_crnn.tar)|[inference model](https://paddleocr.bj.bcebos.com/ch_models/ch_rec_mv3_crnn_enhance_infer.tar) & [pre-trained model](https://paddleocr.bj.bcebos.com/ch_models/ch_rec_mv3_crnn_enhance.tar)| -|General OCR model|Resnet34_vd|rec_chinese_common_train.yml|[Download link](https://paddleocr.bj.bcebos.com/ch_models/ch_rec_r34_vd_crnn.tar)|[inference model](https://paddleocr.bj.bcebos.com/ch_models/ch_rec_r34_vd_crnn_enhance_infer.tar) & [pre-trained model](https://paddleocr.bj.bcebos.com/ch_models/ch_rec_r34_vd_crnn_enhance.tar)| - -Please refer to the document for training guide and use of PaddleOCR text recognition algorithms [Text recognition model training/evaluation/prediction](./doc/doc_en/recognition_en.md) - -## Visualization - - -### 1.Ultra-lightweight Chinese/English OCR Visualization [more](./doc/doc_en/visualization_en.md) - -
- -
- - -### 2. General Chinese/English OCR Visualization [more](./doc/doc_en/visualization_en.md) - -
- -
- - -### 3.Chinese/English OCR Visualization (Space_support) [more](./doc/doc_en/visualization_en.md) - -
- -
- - - -## FAQ -1. Error when using attention-based recognition model: KeyError: 'predict' - - The inference of recognition model based on attention loss is still being debugged. For Chinese text recognition, it is recommended to choose the recognition model based on CTC loss first. In practice, it is also found that the recognition model based on attention loss is not as effective as the one based on CTC loss. - -2. About inference speed - - When there are a lot of texts in the picture, the prediction time will increase. You can use `--rec_batch_num` to set a smaller prediction batch size. The default value is 30, which can be changed to 10 or other values. - -3. Service deployment and mobile deployment - - It is expected that the service deployment based on Serving and the mobile deployment based on Paddle Lite will be released successively in mid-to-late June. Stay tuned for more updates. - -4. Release time of self-developed algorithm - - Baidu Self-developed algorithms such as SAST, SRN and end2end PSL will be released in June or July. Please be patient. - -[more](./doc/doc_en/FAQ_en.md) - - -## Community -Scan the QR code below with your wechat and completing the questionnaire, you can access to offical technical exchange group. - -
- -
- - -## License -This project is released under Apache 2.0 license - - -## Contribution -We welcome all the contributions to PaddleOCR and appreciate for your feedback very much. - -- Many thanks to [Khanh Tran](https://github.com/xxxpsyduck) and [Karl Horky](https://github.com/karlhorky) for contributing and revising the English documentation. -- Many thanks to [zhangxin](https://github.com/ZhangXinNan) for contributing the new visualize function、add .gitgnore and discard set PYTHONPATH manually. -- Many thanks to [lyl120117](https://github.com/lyl120117) for contributing the code for printing the network structure. -- Thanks [xiangyubo](https://github.com/xiangyubo) for contributing the handwritten Chinese OCR datasets. -- Thanks [authorfu](https://github.com/authorfu) for contributing Android demo and [xiadeye](https://github.com/xiadeye) contributing iOS demo, respectively. -- Thanks [BeyondYourself](https://github.com/BeyondYourself) for contributing many great suggestions and simplifying part of the code style. -- Thanks [tangmq](https://gitee.com/tangmq) for contributing Dockerized deployment services to PaddleOCR and supporting the rapid release of callable Restful API services. diff --git a/configs/det/det_mv3_db.yml b/configs/det/det_mv3_db.yml index 5f67ca1db758069bb6d19276339895302604fd62..91a8e86f8bba440df83c1d9f7da0e6523d5907bb 100755 --- a/configs/det/det_mv3_db.yml +++ b/configs/det/det_mv3_db.yml @@ -24,7 +24,6 @@ Backbone: function: ppocr.modeling.backbones.det_mobilenet_v3,MobileNetV3 scale: 0.5 model_name: large - disable_se: true Head: function: ppocr.modeling.heads.det_db_head,DBHead diff --git a/configs/det/det_mv3_db_v1.1.yml b/configs/det/det_mv3_db_v1.1.yml new file mode 100755 index 0000000000000000000000000000000000000000..afc11aa01dc329d095abac6d61a48cf604ee2aa2 --- /dev/null +++ b/configs/det/det_mv3_db_v1.1.yml @@ -0,0 +1,59 @@ +Global: + algorithm: DB + use_gpu: true + epoch_num: 1200 + log_smooth_window: 20 + print_batch_step: 2 + save_model_dir: ./output/det_db/ + save_epoch_step: 200 + # evaluation is run every 5000 iterations after the 4000th iteration + eval_batch_step: [4000, 5000] + train_batch_size_per_card: 16 + test_batch_size_per_card: 16 + image_shape: [3, 640, 640] + reader_yml: ./configs/det/det_db_icdar15_reader.yml + pretrain_weights: ./pretrain_models/MobileNetV3_large_x0_5_pretrained/ + checkpoints: + save_res_path: ./output/det_db/predicts_db.txt + save_inference_dir: + +Architecture: + function: ppocr.modeling.architectures.det_model,DetModel + +Backbone: + function: ppocr.modeling.backbones.det_mobilenet_v3,MobileNetV3 + scale: 0.5 + model_name: large + disable_se: true + +Head: + function: ppocr.modeling.heads.det_db_head,DBHead + model_name: large + k: 50 + inner_channels: 96 + out_channels: 2 + +Loss: + function: ppocr.modeling.losses.det_db_loss,DBLoss + balance_loss: true + main_loss_type: DiceLoss + alpha: 5 + beta: 10 + ohem_ratio: 3 + +Optimizer: + function: ppocr.optimizer,AdamDecay + base_lr: 0.001 + beta1: 0.9 + beta2: 0.999 + decay: + function: cosine_decay_warmup + step_each_epoch: 16 + total_epoch: 1200 + +PostProcess: + function: ppocr.postprocess.db_postprocess,DBPostProcess + thresh: 0.3 + box_thresh: 0.6 + max_candidates: 1000 + unclip_ratio: 1.5 diff --git a/configs/det/det_r18_vd_db_v1.1.yml b/configs/det/det_r18_vd_db_v1.1.yml new file mode 100755 index 0000000000000000000000000000000000000000..aa6dc0ee01c7e218ac6b3815c7ebacf886507e14 --- /dev/null +++ b/configs/det/det_r18_vd_db_v1.1.yml @@ -0,0 +1,57 @@ +Global: + algorithm: DB + use_gpu: true + epoch_num: 1200 + log_smooth_window: 20 + print_batch_step: 2 + save_model_dir: ./output/det_r_18_vd_db/ + save_epoch_step: 200 + eval_batch_step: [3000, 2000] + train_batch_size_per_card: 8 + test_batch_size_per_card: 1 + image_shape: [3, 640, 640] + reader_yml: ./configs/det/det_db_icdar15_reader.yml + pretrain_weights: ./pretrain_models/ResNet18_vd_pretrained/ + save_res_path: ./output/det_r18_vd_db/predicts_db.txt + checkpoints: + save_inference_dir: + +Architecture: + function: ppocr.modeling.architectures.det_model,DetModel + +Backbone: + function: ppocr.modeling.backbones.det_resnet_vd,ResNet + layers: 18 + +Head: + function: ppocr.modeling.heads.det_db_head,DBHead + model_name: large + k: 50 + inner_channels: 256 + out_channels: 2 + +Loss: + function: ppocr.modeling.losses.det_db_loss,DBLoss + balance_loss: true + main_loss_type: DiceLoss + alpha: 5 + beta: 10 + ohem_ratio: 3 + +Optimizer: + function: ppocr.optimizer,AdamDecay + base_lr: 0.001 + beta1: 0.9 + beta2: 0.999 + decay: + function: cosine_decay_warmup + step_each_epoch: 32 + total_epoch: 1200 + +PostProcess: + function: ppocr.postprocess.db_postprocess,DBPostProcess + thresh: 0.3 + box_thresh: 0.6 + max_candidates: 1000 + unclip_ratio: 1.5 + diff --git a/configs/rec/ch_ppocr_v1.1/rec_chinese_common_train_v1.1.yml b/configs/rec/ch_ppocr_v1.1/rec_chinese_common_train_v1.1.yml new file mode 100644 index 0000000000000000000000000000000000000000..8a84c635d32cce44daf405a8d48bcb0547b13acd --- /dev/null +++ b/configs/rec/ch_ppocr_v1.1/rec_chinese_common_train_v1.1.yml @@ -0,0 +1,52 @@ +Global: + algorithm: CRNN + use_gpu: true + epoch_num: 500 + log_smooth_window: 20 + print_batch_step: 10 + save_model_dir: ./output/rec_CRNN + save_epoch_step: 3 + eval_batch_step: 2000 + train_batch_size_per_card: 128 + test_batch_size_per_card: 128 + image_shape: [3, 32, 320] + max_text_length: 25 + character_type: ch + character_dict_path: ./ppocr/utils/ppocr_keys_v1.txt + loss_type: ctc + distort: true + use_space_char: true + reader_yml: ./configs/rec/rec_chinese_reader.yml + pretrain_weights: + checkpoints: + save_inference_dir: + infer_img: + +Architecture: + function: ppocr.modeling.architectures.rec_model,RecModel + +Backbone: + function: ppocr.modeling.backbones.rec_resnet_vd,ResNet + layers: 34 + +Head: + function: ppocr.modeling.heads.rec_ctc_head,CTCPredict + encoder_type: rnn + fc_decay: 0.00004 + SeqRNN: + hidden_size: 256 + +Loss: + function: ppocr.modeling.losses.rec_ctc_loss,CTCLoss + +Optimizer: + function: ppocr.optimizer,AdamDecay + base_lr: 0.0005 + l2_decay: 0.00004 + beta1: 0.9 + beta2: 0.999 + decay: + function: cosine_decay_warmup + step_each_epoch: 254 + total_epoch: 500 + warmup_minibatch: 1000 diff --git a/configs/rec/ch_ppocr_v1.1/rec_chinese_lite_train_v1.1.yml b/configs/rec/ch_ppocr_v1.1/rec_chinese_lite_train_v1.1.yml new file mode 100755 index 0000000000000000000000000000000000000000..89333f89ad9a6af4dd744daa8972ce35f805113a --- /dev/null +++ b/configs/rec/ch_ppocr_v1.1/rec_chinese_lite_train_v1.1.yml @@ -0,0 +1,54 @@ +Global: + algorithm: CRNN + use_gpu: true + epoch_num: 500 + log_smooth_window: 20 + print_batch_step: 10 + save_model_dir: ./output/rec_CRNN + save_epoch_step: 3 + eval_batch_step: 2000 + train_batch_size_per_card: 256 + test_batch_size_per_card: 256 + image_shape: [3, 32, 320] + max_text_length: 25 + character_type: ch + character_dict_path: ./ppocr/utils/ppocr_keys_v1.txt + loss_type: ctc + distort: true + use_space_char: true + reader_yml: ./configs/rec/rec_chinese_reader.yml + pretrain_weights: + checkpoints: + save_inference_dir: + infer_img: + +Architecture: + function: ppocr.modeling.architectures.rec_model,RecModel + +Backbone: + function: ppocr.modeling.backbones.rec_mobilenet_v3,MobileNetV3 + scale: 0.5 + model_name: small + small_stride: [1, 2, 2, 2] + +Head: + function: ppocr.modeling.heads.rec_ctc_head,CTCPredict + encoder_type: rnn + fc_decay: 0.00001 + SeqRNN: + hidden_size: 48 + +Loss: + function: ppocr.modeling.losses.rec_ctc_loss,CTCLoss + +Optimizer: + function: ppocr.optimizer,AdamDecay + base_lr: 0.0005 + l2_decay: 0.00001 + beta1: 0.9 + beta2: 0.999 + decay: + function: cosine_decay_warmup + step_each_epoch: 254 + total_epoch: 500 + warmup_minibatch: 1000 diff --git a/deploy/hubserving/ocr_rec/params.py b/deploy/hubserving/ocr_rec/params.py index 58a8bc119e2a54ad78446bd616eeb7a9089a6084..4c7666cf670a158f9365f9f05f81fef9bf40d44c 100644 --- a/deploy/hubserving/ocr_rec/params.py +++ b/deploy/hubserving/ocr_rec/params.py @@ -38,6 +38,14 @@ def read_params(): cfg.rec_char_dict_path = "./ppocr/utils/ppocr_keys_v1.txt" cfg.use_space_char = True + #params for text classifier + cfg.use_angle_cls = True + cfg.cls_model_dir = "./inference/ch_ppocr_mobile_v1.1_cls_infer/" + cfg.cls_image_shape = "3, 48, 192" + cfg.label_list = ['0', '180'] + cfg.cls_batch_num = 30 + cfg.cls_thresh = 0.9 + cfg.use_zero_copy_run = False return cfg diff --git a/deploy/hubserving/ocr_system/params.py b/deploy/hubserving/ocr_system/params.py index d83fe692dca7c94c7225a1aa26e782765e665bdd..da96c9cf59a9d17cb0631cdb3aa5a22b49ebf71b 100644 --- a/deploy/hubserving/ocr_system/params.py +++ b/deploy/hubserving/ocr_system/params.py @@ -39,11 +39,12 @@ def read_params(): cfg.use_space_char = True #params for text classifier - cfg.use_angle_cls = False - cfg.cls_model_dir = "./inference/ch_ppocr_mobile-v1.1.cls_infer/" + cfg.use_angle_cls = True + cfg.cls_model_dir = "./inference/ch_ppocr_mobile_v1.1_cls_infer/" cfg.cls_image_shape = "3, 48, 192" cfg.label_list = ['0', '180'] cfg.cls_batch_num = 30 + cfg.cls_thresh = 0.9 cfg.use_zero_copy_run = False diff --git a/deploy/hubserving/readme.md b/deploy/hubserving/readme.md index 5d29b432ba3d4c098872431c9b5fde13f553eee0..c7068d91b42f1e809190c0e44bc6ac97443c9348 100644 --- a/deploy/hubserving/readme.md +++ b/deploy/hubserving/readme.md @@ -38,8 +38,12 @@ SET PYTHONPATH=. ``` ### 2. 下载推理模型 -安装服务模块前,需要准备推理模型并放到正确路径。默认使用的是v1.1版的超轻量模型,默认检测模型路径为: -`./inference/ch_ppocr_mobile_v1.1_det_infer/`,识别模型路径为:`./inference/ch_ppocr_mobile_v1.1_rec_infer/`。 +安装服务模块前,需要准备推理模型并放到正确路径。默认使用的是v1.1版的超轻量模型,默认模型路径为: +``` +检测模型:./inference/ch_ppocr_mobile_v1.1_det_infer/ +识别模型:./inference/ch_ppocr_mobile_v1.1_rec_infer/ +方向分类器:./inference/ch_ppocr_mobile_v1.1_cls_infer/ +``` **模型路径可在`params.py`中查看和修改。** 更多模型可以从PaddleOCR提供的[模型库](../../doc/doc_ch/models_list.md)下载,也可以替换成自己训练转换好的模型。 @@ -173,7 +177,7 @@ hub serving start -c deploy/hubserving/ocr_system/config.json ```hub serving stop --port/-p XXXX``` - 2、 到相应的`module.py`和`params.py`等文件中根据实际需求修改代码。 -例如,如果需要替换部署服务所用模型,则需要到`params.py`中修改模型路径参数`det_model_dir`和`rec_model_dir`,当然,同时可能还需要修改其他相关参数,请根据实际情况修改调试。 **强烈建议修改后先直接运行`module.py`调试,能正确运行预测后再启动服务测试。** +例如,如果需要替换部署服务所用模型,则需要到`params.py`中修改模型路径参数`det_model_dir`和`rec_model_dir`,如果需要关闭文本方向分类器,则将参数`use_angle_cls`置为`False`,当然,同时可能还需要修改其他相关参数,请根据实际情况修改调试。 **强烈建议修改后先直接运行`module.py`调试,能正确运行预测后再启动服务测试。** - 3、 卸载旧服务包 ```hub uninstall ocr_system``` diff --git a/deploy/hubserving/readme_en.md b/deploy/hubserving/readme_en.md index efef1cda6dd5a91d6ad2f7db27061418fa24e105..48b519ae24199d3778dcf2d2a1dea785aa0503a4 100644 --- a/deploy/hubserving/readme_en.md +++ b/deploy/hubserving/readme_en.md @@ -39,7 +39,12 @@ SET PYTHONPATH=. ``` ### 2. Download inference model -Before installing the service module, you need to prepare the inference model and put it in the correct path. By default, the ultra lightweight model of v1.1 is used, and the default detection model path is: `./inference/ch_ppocr_mobile_v1.1_det_infer/`, the default recognition model path is: `./inference/ch_ppocr_mobile_v1.1_rec_infer/`. +Before installing the service module, you need to prepare the inference model and put it in the correct path. By default, the ultra lightweight model of v1.1 is used, and the default model path is: +``` +detection model: ./inference/ch_ppocr_mobile_v1.1_det_infer/ +recognition model: ./inference/ch_ppocr_mobile_v1.1_rec_infer/ +text direction classifier: ./inference/ch_ppocr_mobile_v1.1_cls_infer/ +``` **The model path can be found and modified in `params.py`.** More models provided by PaddleOCR can be obtained from the [model library](../../doc/doc_en/models_list_en.md). You can also use models trained by yourself. @@ -180,7 +185,7 @@ If you need to modify the service logic, the following steps are generally requi hub serving stop --port/-p XXXX ``` - 2. Modify the code in the corresponding files, like `module.py` and `params.py`, according to the actual needs. -For example, if you need to replace the model used by the deployed service, you need to modify model path parameters `det_model_dir` and `rec_model_dir` in `params.py`. Of course, other related parameters may need to be modified at the same time. Please modify and debug according to the actual situation. It is suggested to run `module.py` directly for debugging after modification before starting the service test. +For example, if you need to replace the model used by the deployed service, you need to modify model path parameters `det_model_dir` and `rec_model_dir` in `params.py`. If you want to turn off the text direction classifier, set the parameter `use_angle_cls` to `False`. Of course, other related parameters may need to be modified at the same time. Please modify and debug according to the actual situation. It is suggested to run `module.py` directly for debugging after modification before starting the service test. - 3. Uninstall old service module ```shell hub uninstall ocr_system diff --git a/deploy/lite/ocr_db_crnn.cc b/deploy/lite/ocr_db_crnn.cc index 07bec2c6f8fc02936b6c69d472984735c7b541cb..2786d15ad0581bf10f9e8de4b06f94cc5d4027aa 100644 --- a/deploy/lite/ocr_db_crnn.cc +++ b/deploy/lite/ocr_db_crnn.cc @@ -290,7 +290,7 @@ RunDetModel(std::shared_ptr predictor, cv::Mat img, cv::Mat bit_map; cv::threshold(cbuf_map, bit_map, threshold, maxvalue, cv::THRESH_BINARY); cv::Mat dilation_map; - cv::Mat dila_ele = cv::getStructuringElement(cv::MORPH_RECT, cv::Size(2,2)); + cv::Mat dila_ele = cv::getStructuringElement(cv::MORPH_RECT, cv::Size(2, 2)); cv::dilate(bit_map, dilation_map, dila_ele); auto boxes = BoxesFromBitmap(pred_map, dilation_map, Config); @@ -366,7 +366,8 @@ std::map LoadConfigTxt(std::string config_path) { int main(int argc, char **argv) { if (argc < 5) { std::cerr << "[ERROR] usage: " << argv[0] - << " det_model_file rec_model_file image_path\n"; + << " det_model_file cls_model_file rec_model_file image_path " + "charactor_dict\n"; exit(1); } std::string det_model_file = argv[1]; diff --git a/deploy/lite/readme.md b/deploy/lite/readme.md index 219cc83fe4487400e886e47e46cb30275ba72c14..93f38e057258edad0ac5dd3bbbb7b3789011cefb 100644 --- a/deploy/lite/readme.md +++ b/deploy/lite/readme.md @@ -15,10 +15,9 @@ Paddle Lite是飞桨轻量化推理引擎,为手机、IOT端提供高效推理 交叉编译环境用于编译 Paddle Lite 和 PaddleOCR 的C++ demo。 支持多种开发环境,不同开发环境的编译流程请参考对应文档。 -1. [Docker](https://paddle-lite.readthedocs.io/zh/latest/user_guides/source_compile.html#docker) -2. [Linux](https://paddle-lite.readthedocs.io/zh/latest/user_guides/source_compile.html#android) -3. [MAC OS](https://paddle-lite.readthedocs.io/zh/latest/user_guides/source_compile.html#id13) -4. [Windows](https://paddle-lite.readthedocs.io/zh/latest/demo_guides/x86.html#id4) +1. [Docker](https://paddle-lite.readthedocs.io/zh/latest/source_compile/compile_env.html#docker) +2. [Linux](https://paddle-lite.readthedocs.io/zh/latest/source_compile/compile_env.html#linux) +3. [MAC OS](https://paddle-lite.readthedocs.io/zh/latest/source_compile/compile_env.html#mac-os) ### 1.2 准备预测库 @@ -28,15 +27,15 @@ Paddle Lite是飞桨轻量化推理引擎,为手机、IOT端提供高效推理 |-|-| |Android|[arm7](https://paddlelite-data.bj.bcebos.com/Release/2.6.1/Android/inference_lite_lib.android.armv7.gcc.c++_static.with_extra.CV_ON.tar.gz) / [arm8](https://paddlelite-data.bj.bcebos.com/Release/2.6.1/Android/inference_lite_lib.android.armv8.gcc.c++_static.with_extra.CV_ON.tar.gz)| |IOS|[arm7](https://paddlelite-data.bj.bcebos.com/Release/2.6.1/iOS/inference_lite_lib.ios.armv7.with_extra.CV_ON.tar.gz) / [arm8](https://paddlelite-data.bj.bcebos.com/Release/2.6.1/iOS/inference_lite_lib.ios64.armv8.with_extra.CV_ON.tar.gz)| - |x86(Linux)|[预测库](https://paddlelite-data.bj.bcebos.com/Release/2.6.1/X86/Linux/inference_lite_lib.x86.linux.tar.gz)| - 注:如果是从下Paddle-Lite[官网文档](https://paddle-lite.readthedocs.io/zh/latest/user_guides/release_lib.html#android-toolchain-gcc)下载的预测库, - 注意选择`with_extra=ON,with_cv=ON`的下载链接。 + 注:1. 如果是从下Paddle-Lite[官网文档](https://paddle-lite.readthedocs.io/zh/latest/user_guides/release_lib.html#android-toolchain-gcc)下载的预测库, + 注意选择`with_extra=ON,with_cv=ON`的下载链接。2. 如果使用量化的模型部署在端侧,建议使用Paddle-Lite develop分支编译预测库。 -- 2. 编译Paddle-Lite得到预测库,Paddle-Lite的编译方式如下: +- 2. [建议]编译Paddle-Lite得到预测库,Paddle-Lite的编译方式如下: ``` git clone https://github.com/PaddlePaddle/Paddle-Lite.git cd Paddle-Lite +# 务必使用develop分支编译预测库 git checkout develop ./lite/tools/build_android.sh --arch=armv8 --with_cv=ON --with_extra=ON ``` @@ -82,9 +81,12 @@ Paddle-Lite 提供了多种策略来自动优化原始的模型,其中包括 下述表格中提供了优化好的超轻量中文模型: -|模型简介|检测模型|识别模型|Paddle-Lite版本| -|-|-|-|-| -|超轻量级中文OCR opt优化模型|[下载地址](https://paddleocr.bj.bcebos.com/deploy/lite/ch_det_mv3_db_opt.nb)|[下载地址](https://paddleocr.bj.bcebos.com/deploy/lite/ch_rec_mv3_crnn_opt.nb)|develop| +|模型版本|模型简介|模型大小|检测模型|文本方向分类模型|识别模型|Paddle-Lite版本| +|-|-|-|-|-|-|-| +|V1.1|超轻量中文OCR 移动端模型|3.5M|[下载地址](https://paddleocr.bj.bcebos.com/20-09-22/mobile-slim/det/ch_ppocr_mobile_v1.1_det_prune_opt.nb)|[下载地址](https://paddleocr.bj.bcebos.com/20-09-22/cls/ch_ppocr_mobile_cls_quant_opt.nb)|[下载地址](https://paddleocr.bj.bcebos.com/20-09-22/mobile-slim/rec/ch_ppocr_mobile_v1.1_rec_quant_opt.nb)|develop| +|V1.0|轻量级中文OCR 移动端模型|8.6M|[下载地址](https://paddleocr.bj.bcebos.com/deploy/lite/ch_det_mv3_db_opt.nb)|---|[下载地址](https://paddleocr.bj.bcebos.com/deploy/lite/ch_rec_mv3_crnn_opt.nb)|develop| + +注意:V1.1 3.0M 轻量模型是使用PaddleSlim优化后的,需要配合Paddle-Lite最新预测库使用。 如果直接使用上述表格中的模型进行部署,可略过下述步骤,直接阅读 [2.2节](#2.2与手机联调)。 @@ -121,18 +123,27 @@ cd build.opt/lite/api/ 下面以PaddleOCR的超轻量中文模型为例,介绍使用编译好的opt文件完成inference模型到Paddle-Lite优化模型的转换。 ``` -# 下载PaddleOCR的超轻量文inference模型,并解压 +# 【推荐】 下载PaddleOCR V1.1版本的中英文 inference模型,V1.1比1.0效果更好,模型更小 +wget https://paddleocr.bj.bcebos.com/20-09-22/mobile-slim/det/ch_ppocr_mobile_v1.1_det_prune_infer.tar && tar xf ch_ppocr_mobile_v1.1_det_prune_infer.tar +wget https://paddleocr.bj.bcebos.com/20-09-22/mobile-slim/rec/ch_ppocr_mobile_v1.1_rec_quant_infer.tar && tar xf ch_ppocr_mobile_v1.1_rec_quant_infer.tar +# 转换V1.1检测模型 +./opt --model_file=./ch_ppocr_mobile_v1.1_det_prune_infer/model --param_file=./ch_ppocr_mobile_v1.1_det_prune_infer/params --optimize_out=./ch_ppocr_mobile_v1.1_det_prune_opt --valid_targets=arm +# 转换V1.1识别模型 +./opt --model_file=./ch_ppocr_mobile_v1.1_rec_quant_infer/model --param_file=./ch_ppocr_mobile_v1.1_rec_quant_infer/params --optimize_out=./ch_ppocr_mobile_v1.1_rec_quant_opt --valid_targets=arm + + +# 或下载使用PaddleOCR的V1.0超轻量中英文 inference模型,解压并转换为移动端支持的模型 wget https://paddleocr.bj.bcebos.com/ch_models/ch_det_mv3_db_infer.tar && tar xf ch_det_mv3_db_infer.tar wget https://paddleocr.bj.bcebos.com/ch_models/ch_rec_mv3_crnn_infer.tar && tar xf ch_rec_mv3_crnn_infer.tar - -# 转换检测模型 +# 转换V1.0检测模型 ./opt --model_file=./ch_det_mv3_db/model --param_file=./ch_det_mv3_db/params --optimize_out_type=naive_buffer --optimize_out=./ch_det_mv3_db_opt --valid_targets=arm - -# 转换识别模型 +# 转换V1.0识别模型 ./opt --model_file=./ch_rec_mv3_crnn/model --param_file=./ch_rec_mv3_crnn/params --optimize_out_type=naive_buffer --optimize_out=./ch_rec_mv3_crnn_opt --valid_targets=arm ``` -转换成功后,当前目录下会多出`ch_det_mv3_db_opt.nb`, `ch_rec_mv3_crnn_opt.nb`结尾的文件,即是转换成功的模型文件。 +# 转换V1.1检测模型 + +转换成功后,当前目录下会多出`.nb`结尾的文件,即是转换成功的模型文件。 注意:使用paddle-lite部署时,需要使用opt工具优化后的模型。 opt 转换的输入模型是paddle保存的inference模型 @@ -182,15 +193,16 @@ wget https://paddleocr.bj.bcebos.com/ch_models/ch_rec_mv3_crnn_infer.tar && tar ``` 准备测试图像,以`PaddleOCR/doc/imgs/11.jpg`为例,将测试的图像复制到`demo/cxx/ocr/debug/`文件夹下。 - 准备lite opt工具优化后的模型文件,`ch_det_mv3_db_opt.nb,ch_rec_mv3_crnn_opt.nb`,放置在`demo/cxx/ocr/debug/`文件夹下。 + 准备lite opt工具优化后的模型文件,比如使用`ch_ppocr_mobile_v1.1_det_prune_opt.nb,ch_ppocr_mobile_v1.1_rec_quant_opt.nb, ch_ppocr_mobile_cls_quant_opt.nb`,模型文件放置在`demo/cxx/ocr/debug/`文件夹下。 执行完成后,ocr文件夹下将有如下文件格式: ``` demo/cxx/ocr/ |-- debug/ -| |--ch_det_mv3_db_opt.nb 优化后的检测模型文件 -| |--ch_rec_mv3_crnn_opt.nb 优化后的识别模型文件 +| |--ch_ppocr_mobile_v1.1_det_prune_opt.nb 优化后的检测模型文件 +| |--ch_ppocr_mobile_v1.1_rec_quant_opt.nb 优化后的识别模型文件 +| |--ch_ppocr_mobile_cls_quant_opt.nb 优化后的文字方向分类器模型文件 | |--11.jpg 待测试图像 | |--ppocr_keys_v1.txt 字典文件 | |--libpaddle_light_api_shared.so C++预测库文件 @@ -221,7 +233,7 @@ demo/cxx/ocr/ adb shell cd /data/local/tmp/debug export LD_LIBRARY_PATH=/data/local/tmp/debug:$LD_LIBRARY_PATH - ./ocr_db_crnn ch_det_mv3_db_opt.nb ch_rec_mv3_crnn_opt.nb ./11.jpg ppocr_keys_v1.txt + ./ocr_db_crnn ch_ppocr_mobile_v1.1_det_prune_opt.nb ch_ppocr_mobile_v1.1_rec_quant_opt.nb ch_ppocr_mobile_cls_quant_opt.nb ./11.jpg ppocr_keys_v1.txt ``` 如果对代码做了修改,则需要重新编译并push到手机上。 diff --git a/deploy/lite/readme_en.md b/deploy/lite/readme_en.md index bf2f4b2212bf4d362fe2127da66127ab05766668..a62f0478843fb28b21404f282d981daf7a0c294f 100644 --- a/deploy/lite/readme_en.md +++ b/deploy/lite/readme_en.md @@ -14,10 +14,9 @@ deployment solutions for end-side deployment issues. - Mobile phone (arm7 or arm8) ## 2. Build PaddleLite library -[build for Docker](https://paddle-lite.readthedocs.io/zh/latest/user_guides/source_compile.html#docker) -[build for Linux](https://paddle-lite.readthedocs.io/zh/latest/user_guides/source_compile.html#android) -[build for MAC OS](https://paddle-lite.readthedocs.io/zh/latest/user_guides/source_compile.html#id13) -[build for windows](https://paddle-lite.readthedocs.io/zh/latest/demo_guides/x86.html#id4) +1. [Docker](https://paddle-lite.readthedocs.io/zh/latest/source_compile/compile_env.html#docker) +2. [Linux](https://paddle-lite.readthedocs.io/zh/latest/source_compile/compile_env.html#linux) +3. [MAC OS](https://paddle-lite.readthedocs.io/zh/latest/source_compile/compile_env.html#mac-os) ## 3. Download prebuild library for android and ios @@ -25,7 +24,8 @@ deployment solutions for end-side deployment issues. |-|-| |Android|[arm7](https://paddlelite-data.bj.bcebos.com/Release/2.6.1/Android/inference_lite_lib.android.armv7.gcc.c++_static.with_extra.CV_ON.tar.gz) / [arm8](https://paddlelite-data.bj.bcebos.com/Release/2.6.1/Android/inference_lite_lib.android.armv8.gcc.c++_static.with_extra.CV_ON.tar.gz)| |IOS|[arm7](https://paddlelite-data.bj.bcebos.com/Release/2.6.1/iOS/inference_lite_lib.ios.armv7.with_extra.CV_ON.tar.gz) / [arm8](https://paddlelite-data.bj.bcebos.com/Release/2.6.1/iOS/inference_lite_lib.ios64.armv8.with_extra.CV_ON.tar.gz)| -|x86(Linux)|[预测库](https://paddlelite-data.bj.bcebos.com/Release/2.6.1/X86/Linux/inference_lite_lib.x86.linux.tar.gz)| + +note: It is recommended to build prebuild library using [Paddle-Lite](https://github.com/PaddlePaddle/Paddle-Lite) develop branch if developer wants to deploy the [quantitative](https://github.com/PaddlePaddle/PaddleOCR/blob/develop/deploy/slim/quantization/README_en.md) model to mobile phone. The structure of the prediction library is as follows: @@ -64,9 +64,10 @@ Paddle Lite provides a variety of strategies to automatically optimize the origi If you use PaddleOCR 8.6M OCR model to deploy, you can directly download the optimized model. -|Introduction|Detection model|Recognition model|Paddle Lite branch | -|-|-|-|-| -|lightweight Chinese OCR optimized model|[Download](https://paddleocr.bj.bcebos.com/deploy/lite/ch_det_mv3_db_opt.nb)|[Download](https://paddleocr.bj.bcebos.com/deploy/lite/ch_rec_mv3_crnn_opt.nb)|develop| +|Version|Introduction|Model size|Detection model|Text Direction model|Recognition model|Paddle Lite branch | +|-|-|-|-|-|-| +|V1.1|extra-lightweight chinese OCR optimized model|3.5M|[Download](https://paddleocr.bj.bcebos.com/20-09-22/mobile-slim/det/ch_ppocr_mobile_v1.1_det_prune_opt.nb)|[Download](https://paddleocr.bj.bcebos.com/20-09-22/cls/ch_ppocr_mobile_cls_quant_opt.nb)|[Download](https://paddleocr.bj.bcebos.com/20-09-22/mobile-slim/rec/ch_ppocr_mobile_v1.1_rec_quant_opt.nb)|develop| +|V1.0|lightweight Chinese OCR optimized model|8.6M|[Download](https://paddleocr.bj.bcebos.com/deploy/lite/ch_det_mv3_db_opt.nb)|---|[Download](https://paddleocr.bj.bcebos.com/deploy/lite/ch_rec_mv3_crnn_opt.nb)|develop| If the model to be deployed is not in the above table, you need to follow the steps below to obtain the optimized model. @@ -85,6 +86,14 @@ The `opt` can optimize the inference model saved by paddle.io.save_inference_mod The usage of opt is as follows: ``` +# 【Recommend】V1.1 is better than V1.0. steps for convert V1.1 model to nb file are as follows +wget https://paddleocr.bj.bcebos.com/20-09-22/mobile-slim/det/ch_ppocr_mobile_v1.1_det_prune_infer.tar && tar xf ch_ppocr_mobile_v1.1_det_prune_infer.tar +wget https://paddleocr.bj.bcebos.com/20-09-22/mobile-slim/rec/ch_ppocr_mobile_v1.1_rec_quant_infer.tar && tar xf ch_ppocr_mobile_v1.1_rec_quant_infer.tar + +./opt --model_file=./ch_ppocr_mobile_v1.1_det_prune_infer/model --param_file=./ch_ppocr_mobile_v1.1_det_prune_infer/params --optimize_out=./ch_ppocr_mobile_v1.1_det_prune_opt --valid_targets=arm +./opt --model_file=./ch_ppocr_mobile_v1.1_rec_quant_infer/model --param_file=./ch_ppocr_mobile_v1.1_rec_quant_infer/params --optimize_out=./ch_ppocr_mobile_v1.1_rec_quant_opt --valid_targets=arm + +# or use V1.0 model wget https://paddleocr.bj.bcebos.com/ch_models/ch_det_mv3_db_infer.tar && tar xf ch_det_mv3_db_infer.tar wget https://paddleocr.bj.bcebos.com/ch_models/ch_rec_mv3_crnn_infer.tar && tar xf ch_rec_mv3_crnn_infer.tar @@ -93,8 +102,7 @@ wget https://paddleocr.bj.bcebos.com/ch_models/ch_rec_mv3_crnn_infer.tar && tar ``` -When the above code command is completed, there will be two more files `ch_det_mv3_db_opt.nb`, -`ch_rec_mv3_crnn_opt.nb` in the current directory, which is the converted model file. +When the above code command is completed, there will be two more files `.nb` in the current directory, which is the converted model file. ## 5. Run optimized model on Phone @@ -153,8 +161,9 @@ The structure of the OCR demo is as follows after the above command is executed: ``` demo/cxx/ocr/ |-- debug/ -| |--ch_det_mv3_db_opt.nb Detection model -| |--ch_rec_mv3_crnn_opt.nb Recognition model +| |--ch_ppocr_mobile_v1.1_det_prune_opt.nb Detection model +| |--ch_ppocr_mobile_v1.1_rec_quant_opt.nb Recognition model +| |--ch_ppocr_mobile_cls_quant_opt.nb Text direction classification model | |--11.jpg Image for OCR | |--ppocr_keys_v1.txt Dictionary file | |--libpaddle_light_api_shared.so C++ .so file @@ -180,7 +189,7 @@ adb shell cd /data/local/tmp/debug export LD_LIBRARY_PATH=/data/local/tmp/debug:$LD_LIBRARY_PATH # run model -./ocr_db_crnn ch_det_mv3_db_opt.nb ch_rec_mv3_crnn_opt.nb ./11.jpg ppocr_keys_v1.txt + ./ocr_db_crnn ch_ppocr_mobile_v1.1_det_prune_opt.nb ch_ppocr_mobile_v1.1_rec_quant_opt.nb ch_ppocr_mobile_cls_quant_opt.nb ./11.jpg ppocr_keys_v1.txt ``` The outputs are as follows: diff --git a/deploy/slim/prune/README.md b/deploy/slim/prune/README.md new file mode 100644 index 0000000000000000000000000000000000000000..bff1b78e6b583592fb699ba46c6a3740a63dae75 --- /dev/null +++ b/deploy/slim/prune/README.md @@ -0,0 +1,75 @@ + +## 介绍 + +复杂的模型有利于提高模型的性能,但也导致模型中存在一定冗余,模型裁剪通过移出网络模型中的子模型来减少这种冗余,达到减少模型计算复杂度,提高模型推理性能的目的。 +本教程将介绍如何使用飞桨模型压缩库PaddleSlim做PaddleOCR模型的压缩。 +[PaddleSlim](https://github.com/PaddlePaddle/PaddleSlim)集成了模型剪枝、量化(包括量化训练和离线量化)、蒸馏和神经网络搜索等多种业界常用且领先的模型压缩功能,如果您感兴趣,可以关注并了解。 + + +在开始本教程之前,建议先了解: +1. [PaddleOCR模型的训练方法](../../../doc/doc_ch/quickstart.md) +2. [分类模型裁剪教程](https://paddlepaddle.github.io/PaddleSlim/tutorials/pruning_tutorial/) +3. [PaddleSlim 裁剪压缩API](https://paddlepaddle.github.io/PaddleSlim/api/prune_api/) + + +## 快速开始 + +模型裁剪主要包括五个步骤: +1. 安装 PaddleSlim +2. 准备训练好的模型 +3. 敏感度分析、训练 +4. 模型裁剪训练 +5. 导出模型、预测部署 + +### 1. 安装PaddleSlim + +```bash +git clone https://github.com/PaddlePaddle/PaddleSlim.git +cd Paddleslim +python setup.py install +``` + +### 2. 获取预训练模型 +模型裁剪需要加载事先训练好的模型,PaddleOCR也提供了一系列模型[../../../doc/doc_ch/models_list.md],开发者可根据需要自行选择模型或使用自己的模型。 + +### 3. 敏感度分析训练 + +加载预训练模型后,通过对现有模型的每个网络层进行敏感度分析,得到敏感度文件:sensitivities_0.data,可以通过PaddleSlim提供的[接口](https://github.com/PaddlePaddle/PaddleSlim/blob/develop/paddleslim/prune/sensitive.py#L221)加载文件,获得各网络层在不同裁剪比例下的精度损失。从而了解各网络层冗余度,决定每个网络层的裁剪比例。 +敏感度分析的具体细节见:[敏感度分析](https://github.com/PaddlePaddle/PaddleSlim/blob/develop/docs/zh_cn/tutorials/image_classification_sensitivity_analysis_tutorial.md) +敏感度文件内容格式: + sensitivities_0.data(Dict){ + 'layer_weight_name_0': sens_of_each_ratio(Dict){'pruning_ratio_0': acc_loss, 'pruning_ratio_1': acc_loss} + 'layer_weight_name_1': sens_of_each_ratio(Dict){'pruning_ratio_0': acc_loss, 'pruning_ratio_1': acc_loss} + } + + 例子: + { + 'conv10_expand_weights': {0.1: 0.006509952684312718, 0.2: 0.01827734339798862, 0.3: 0.014528405644659832, 0.6: 0.06536008804270439, 0.8: 0.11798612250664964, 0.7: 0.12391408417493704, 0.4: 0.030615754498018757, 0.5: 0.047105205602406594} + 'conv10_linear_weights': {0.1: 0.05113190831455035, 0.2: 0.07705573833558801, 0.3: 0.12096721757739311, 0.6: 0.5135061352930738, 0.8: 0.7908166677143281, 0.7: 0.7272187676899062, 0.4: 0.1819252083008504, 0.5: 0.3728054727792405} + } +加载敏感度文件后会返回一个字典,字典中的keys为网络模型参数模型的名字,values为一个字典,里面保存了相应网络层的裁剪敏感度信息。例如在例子中,conv10_expand_weights所对应的网络层在裁掉10%的卷积核后模型性能相较原模型会下降0.65%,详细信息可见[PaddleSlim](https://github.com/PaddlePaddle/PaddleSlim/blob/develop/docs/zh_cn/algo/algo.md#2-%E5%8D%B7%E7%A7%AF%E6%A0%B8%E5%89%AA%E8%A3%81%E5%8E%9F%E7%90%86) + +进入PaddleOCR根目录,通过以下命令对模型进行敏感度分析训练: +```bash +python deploy/slim/prune/sensitivity_anal.py -c configs/det/det_mv3_db.yml -o Global.pretrain_weights="your trained model" Global.test_batch_size_per_card=1 +``` + +### 4. 模型裁剪训练 +裁剪时通过之前的敏感度分析文件决定每个网络层的裁剪比例。在具体实现时,为了尽可能多的保留从图像中提取的低阶特征,我们跳过了backbone中靠近输入的4个卷积层。同样,为了减少由于裁剪导致的模型性能损失,我们通过之前敏感度分析所获得的敏感度表,人工挑选出了一些冗余较少,对裁剪较为敏感的[网络层](https://github.com/PaddlePaddle/PaddleOCR/blob/develop/deploy/slim/prune/pruning_and_finetune.py#L41)(指在较低的裁剪比例下就导致很高性能损失的网络层),并在之后的裁剪过程中选择避开这些网络层。裁剪过后finetune的过程沿用OCR检测模型原始的训练策略。 + +```bash +python deploy/slim/prune/pruning_and_finetune.py -c configs/det/det_mv3_db.yml -o Global.pretrain_weights=./deploy/slim/prune/pretrain_models/det_mv3_db/best_accuracy Global.test_batch_size_per_card=1 +``` +通过对比可以发现,经过裁剪训练保存的模型更小。 + +### 5. 导出模型、预测部署 + +在得到裁剪训练保存的模型后,我们可以将其导出为inference_model: +```bash +python deploy/slim/prune/export_prune_model.py -c configs/det/det_mv3_db.yml -o Global.pretrain_weights=./output/det_db/best_accuracy Global.test_batch_size_per_card=1 Global.save_inference_dir=inference_model +``` + +inference model的预测和部署参考: +1. [inference model python端预测](../../../doc/doc_ch/inference.md) +2. [inference model C++预测](../../cpp_infer/readme.md) +3. [inference model在移动端部署](../../lite/readme.md) diff --git a/deploy/slim/prune/README_ch.md b/deploy/slim/prune/README_ch.md deleted file mode 100644 index fbd9921da91a61e796e1f35c5dfce6531e83bd45..0000000000000000000000000000000000000000 --- a/deploy/slim/prune/README_ch.md +++ /dev/null @@ -1,180 +0,0 @@ -\> 运行示例前请先安装develop版本PaddleSlim - - - -# 模型裁剪压缩教程 - -压缩结果: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
序号任务模型压缩策略[3][4]精度(自建中文数据集)耗时[1](ms)整体耗时[2](ms)加速比整体模型大小(M)压缩比例下载链接
0检测MobileNetV3_DB61.7224375-8.6-
识别MobileNetV3_CRNN62.09.52
1检测SlimTextDetPACT量化训练62.11953488%2.867.82%
识别SlimTextRecPACT量化训练61.488.6
2检测SlimTextDet_quat_pruning剪裁+PACT量化训练60.8614228830%2.867.82%
识别SlimTextRecPACT量化训练61.488.6
3检测SlimTextDet_pruning剪裁61.5713829527%2.966.28%
识别SlimTextRecPACT量化训练61.488.6
- - -## 概述 - -复杂的模型有利于提高模型的性能,但也导致模型中存在一定冗余,模型裁剪通过移出网络模型中的子模型来减少这种冗余,达到减少模型计算复杂度,提高模型推理性能的目的。 - -该示例使用PaddleSlim提供的[裁剪压缩API](https://paddlepaddle.github.io/PaddleSlim/api/prune_api/)对OCR模型进行压缩。 - -在阅读该示例前,建议您先了解以下内容: - - - -\- [OCR模型的常规训练方法](https://github.com/PaddlePaddle/PaddleOCR/blob/develop/doc/doc_ch/detection.md) - -\- [PaddleSlim使用文档](https://paddlepaddle.github.io/PaddleSlim/) - - - -## 安装PaddleSlim - -```bash - -git clone https://github.com/PaddlePaddle/PaddleSlim.git - -cd Paddleslim - -python setup.py install - -``` - - -## 获取预训练模型 -[检测预训练模型下载地址]() - - -## 敏感度分析训练 - 加载预训练模型后,通过对现有模型的每个网络层进行敏感度分析,了解各网络层冗余度,从而决定每个网络层的裁剪比例。敏感度分析的具体细节见:[敏感度分析](https://github.com/PaddlePaddle/PaddleSlim/blob/develop/docs/zh_cn/tutorials/image_classification_sensitivity_analysis_tutorial.md) - -进入PaddleOCR根目录,通过以下命令对模型进行敏感度分析: - -```bash - -python deploy/slim/prune/sensitivity_anal.py -c configs/det/det_mv3_db.yml -o Global.pretrain_weights=./deploy/slim/prune/pretrain_models/det_mv3_db/best_accuracy Global.test_batch_size_per_card=1 - -``` - - - -## 裁剪模型与fine-tune - 裁剪时通过之前的敏感度分析文件决定每个网络层的裁剪比例。在具体实现时,为了尽可能多的保留从图像中提取的低阶特征,我们跳过了backbone中靠近输入的4个卷积层。同样,为了减少由于裁剪导致的模型性能损失,我们通过之前敏感度分析所获得的敏感度表,挑选出了一些冗余较少,对裁剪较为敏感的[网络层](https://github.com/PaddlePaddle/PaddleOCR/blob/develop/deploy/slim/prune/pruning_and_finetune.py#L41),并在之后的裁剪过程中选择避开这些网络层。裁剪过后finetune的过程沿用OCR检测模型原始的训练策略。 - -```bash - -python deploy/slim/prune/pruning_and_finetune.py -c configs/det/det_mv3_db.yml -o Global.pretrain_weights=./deploy/slim/prune/pretrain_models/det_mv3_db/best_accuracy Global.test_batch_size_per_card=1 - -``` - - - - - -## 导出模型 - -在得到裁剪训练保存的模型后,我们可以将其导出为inference_model,用于预测部署: - -```bash - -python deploy/slim/prune/export_prune_model.py -c configs/det/det_mv3_db.yml -o Global.pretrain_weights=./output/det_db/best_accuracy Global.test_batch_size_per_card=1 Global.save_inference_dir=inference_model - -``` diff --git a/deploy/slim/prune/README_en.md b/deploy/slim/prune/README_en.md index d854c10707bc26d0273a26c335eef68e8633e74b..7adbd86c6145a6854e19cca62b9f995e07cb6b13 100644 --- a/deploy/slim/prune/README_en.md +++ b/deploy/slim/prune/README_en.md @@ -1,152 +1,55 @@ -\> PaddleSlim develop version should be installed before runing this example. - - - -# Model compress tutorial (Pruning) - -Compress results: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IDTaskModelCompress Strategy[3][4]Criterion(Chinese dataset)Inference Time[1](ms)Inference Time(Total model)[2](ms)Acceleration RatioModel Size(MB)Commpress RatioDownload Link
0DetectionMobileNetV3_DBNone61.7224375-8.6-
RecognitionMobileNetV3_CRNNNone62.09.52
1DetectionSlimTextDetPACT Quant Aware Training62.11953488%2.867.82%
RecognitionSlimTextRecPACT Quant Aware Training61.488.6
2DetectionSlimTextDet_quat_pruningPruning+PACT Quant Aware Training60.8614228830%2.867.82%
RecognitionSlimTextRecPPACT Quant Aware Training61.488.6
3DetectionSlimTextDet_pruningPruning61.5713829527%2.966.28%
RecognitionSlimTextRecPACT Quant Aware Training61.488.6
- - -## Overview + +## Introduction Generally, a more complex model would achive better performance in the task, but it also leads to some redundancy in the model. Model Pruning is a technique that reduces this redundancy by removing the sub-models in the neural network model, so as to reduce model calculation complexity and improve model inference performance. This example uses PaddleSlim provided[APIs of Pruning](https://paddlepaddle.github.io/PaddleSlim/api/prune_api/) to compress the OCR model. +[PaddleSlim](https://github.com/PaddlePaddle/PaddleSlim), an open source library which integrates model pruning, quantization (including quantization training and offline quantization), distillation, neural network architecture search, and many other commonly used and leading model compression technique in the industry. -It is recommended that you could understand following pages before reading this example,: - - - -\- [The training strategy of OCR model](https://github.com/PaddlePaddle/PaddleOCR/blob/develop/doc/doc_ch/detection.md) - -\- [PaddleSlim Document](https://paddlepaddle.github.io/PaddleSlim/) +It is recommended that you could understand following pages before reading this example: +1. [PaddleOCR training methods](../../../doc/doc_ch/quickstart.md) +2. [The demo of prune](https://paddlepaddle.github.io/PaddleSlim/tutorials/pruning_tutorial/) +3. [PaddleSlim prune API](https://paddlepaddle.github.io/PaddleSlim/api/prune_api/) +## Quick start +Five steps for OCR model prune: +1. Install PaddleSlim +2. Prepare the trained model +3. Sensitivity analysis and training +4. Model tailoring training +5. Export model, predict deployment -## Install PaddleSlim +### 1. Install PaddleSlim ```bash - git clone https://github.com/PaddlePaddle/PaddleSlim.git - cd Paddleslim - python setup.py install - ``` -## Download Pretrain Model +### 2. Download Pretrain Model +Model prune needs to load pre-trained models. +PaddleOCR also provides a series of (models)[../../../doc/doc_en/models_list_en.md]. Developers can choose their own models or use their own models according to their needs. -[Download link of Detection pretrain model]() +### 3. Pruning sensitivity analysis -## Pruning sensitivity analysis + After the pre-training model is loaded, sensitivity analysis is performed on each network layer of the model to understand the redundancy of each network layer, and save a sensitivity file which named: sensitivities_0.data. After that, user could load the sensitivity file via the [methods provided by PaddleSlim](https://github.com/PaddlePaddle/PaddleSlim/blob/develop/paddleslim/prune/sensitive.py#L221) and determining the pruning ratio of each network layer automatically. For specific details of sensitivity analysis, see:[Sensitivity analysis](https://github.com/PaddlePaddle/PaddleSlim/blob/develop/docs/zh_cn/tutorials/image_classification_sensitivity_analysis_tutorial.md) + The data format of sensitivity file: + sensitivities_0.data(Dict){ + 'layer_weight_name_0': sens_of_each_ratio(Dict){'pruning_ratio_0': acc_loss, 'pruning_ratio_1': acc_loss} + 'layer_weight_name_1': sens_of_each_ratio(Dict){'pruning_ratio_0': acc_loss, 'pruning_ratio_1': acc_loss} + } + + example: + { + 'conv10_expand_weights': {0.1: 0.006509952684312718, 0.2: 0.01827734339798862, 0.3: 0.014528405644659832, 0.6: 0.06536008804270439, 0.8: 0.11798612250664964, 0.7: 0.12391408417493704, 0.4: 0.030615754498018757, 0.5: 0.047105205602406594} + 'conv10_linear_weights': {0.1: 0.05113190831455035, 0.2: 0.07705573833558801, 0.3: 0.12096721757739311, 0.6: 0.5135061352930738, 0.8: 0.7908166677143281, 0.7: 0.7272187676899062, 0.4: 0.1819252083008504, 0.5: 0.3728054727792405} + } + The function would return a dict after loading the sensitivity file. The keys of the dict are name of parameters in each layer. And the value of key is the information about pruning sensitivity of correspoding layer. In example, pruning 10% filter of the layer corresponding to conv10_expand_weights would lead to 0.65% degradation of model performance. The details could be seen at: [Sensitivity analysis](https://github.com/PaddlePaddle/PaddleSlim/blob/develop/docs/zh_cn/algo/algo.md#2-%E5%8D%B7%E7%A7%AF%E6%A0%B8%E5%89%AA%E8%A3%81%E5%8E%9F%E7%90%86) - After the pre-training model is loaded, sensitivity analysis is performed on each network layer of the model to understand the redundancy of each network layer, thereby determining the pruning ratio of each network layer. For specific details of sensitivity analysis, see:[Sensitivity analysis](https://github.com/PaddlePaddle/PaddleSlim/blob/develop/docs/zh_cn/tutorials/image_classification_sensitivity_analysis_tutorial.md) Enter the PaddleOCR root directory,perform sensitivity analysis on the model with the following command: @@ -158,7 +61,7 @@ python deploy/slim/prune/sensitivity_anal.py -c configs/det/det_mv3_db.yml -o Gl -## Model pruning and Fine-tune +### 4. Model pruning and Fine-tune When pruning, the previous sensitivity analysis file would determines the pruning ratio of each network layer. In the specific implementation, in order to retain as many low-level features extracted from the image as possible, we skipped the 4 convolutional layers close to the input in the backbone. Similarly, in order to reduce the model performance loss caused by pruning, we selected some of the less redundant and more sensitive [network layer](https://github.com/PaddlePaddle/PaddleOCR/blob/develop/deploy/slim/prune/pruning_and_finetune.py#L41) through the sensitivity table obtained from the previous sensitivity analysis.And choose to skip these network layers in the subsequent pruning process. After pruning, the model need a finetune process to recover the performance and the training strategy of finetune is similar to the strategy of training original OCR detection model. @@ -169,15 +72,14 @@ python deploy/slim/prune/pruning_and_finetune.py -c configs/det/det_mv3_db.yml - ``` +### 5. Export inference model and deploy it - - -## Export inference model - -After getting the model after pruning and finetuning we, can export it as inference_model for predictive deployment: - +We can export the pruned model as inference_model for deployment: ```bash - python deploy/slim/prune/export_prune_model.py -c configs/det/det_mv3_db.yml -o Global.pretrain_weights=./output/det_db/best_accuracy Global.test_batch_size_per_card=1 Global.save_inference_dir=inference_model - ``` + +Reference for prediction and deployment of inference model: +1. [inference model python prediction](../../../doc/doc_en/inference_en.md) +2. [inference model C++ prediction](../../cpp_infer/readme_en.md) +3. [Deployment of inference model on mobile](../../lite/readme_en.md) diff --git a/deploy/slim/quantization/README.md b/deploy/slim/quantization/README.md index d1aa3d71e5254cf6b5b2be7fdf6943903d42fafd..b35761c649ae5faf9e0db8663047419d991282fe 100755 --- a/deploy/slim/quantization/README.md +++ b/deploy/slim/quantization/README.md @@ -1,162 +1,61 @@ -> 运行示例前请先安装1.2.0或更高版本PaddleSlim - - -# 模型量化压缩教程 - -压缩结果: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
序号任务模型压缩策略精度(自建中文数据集)耗时(ms)整体耗时(ms)加速比整体模型大小(M)压缩比例下载链接
0检测MobileNetV3_DB61.7224375-8.6-
识别MobileNetV3_CRNN62.09.52
1检测SlimTextDetPACT量化训练62.11953488%2.867.82%
识别SlimTextRecPACT量化训练61.488.6
2检测SlimTextDet_quat_pruning剪裁+PACT量化训练60.8614228830%2.867.82%
识别SlimTextRecPACT量化训练61.488.6
3检测SlimTextDet_pruning剪裁61.5713829527%2.966.28%
识别SlimTextRecPACT量化训练61.488.6
- - - -## 概述 +## 介绍 复杂的模型有利于提高模型的性能,但也导致模型中存在一定冗余,模型量化将全精度缩减到定点数减少这种冗余,达到减少模型计算复杂度,提高模型推理性能的目的。 +模型量化可以在基本不损失模型的精度的情况下,将FP32精度的模型参数转换为Int8精度,减小模型参数大小并加速计算,使用量化后的模型在移动端等部署时更具备速度优势。 -该示例使用PaddleSlim提供的[量化压缩API](https://paddlepaddle.github.io/PaddleSlim/api/quantization_api/)对OCR模型进行压缩。 -在阅读该示例前,建议您先了解以下内容: +本教程将介绍如何使用飞桨模型压缩库PaddleSlim做PaddleOCR模型的压缩。 +PaddleSlim(项目链接:https://github.com/PaddlePaddle/PaddleSlim)集成了模型剪枝、量化(包括量化训练和离线量化)、蒸馏和神经网络搜索等多种业界常用且领先的模型压缩功能,如果您感兴趣,可以关注并了解。 -- [OCR模型的常规训练方法](https://github.com/PaddlePaddle/PaddleOCR/blob/develop/doc/doc_ch/detection.md) -- [PaddleSlim使用文档](https://paddleslim.readthedocs.io/zh_CN/latest/index.html) +在开始本教程之前,建议先了解[PaddleOCR模型的训练方法](../../../doc/doc_ch/quickstart.md)以及[PaddleSlim](https://paddleslim.readthedocs.io/zh_CN/latest/index.html) +## 快速开始 +量化多适用于轻量模型在移动端的部署,当训练出一个模型后,如果希望进一步的压缩模型大小并加速预测,可使用量化的方法压缩模型。 -## 安装PaddleSlim +模型量化主要包括五个步骤: +1. 安装 PaddleSlim +2. 准备训练好的模型 +3. 量化训练 +4. 导出量化推理模型 +5. 量化模型预测部署 + +### 1. 安装PaddleSlim ```bash git clone https://github.com/PaddlePaddle/PaddleSlim.git - cd Paddleslim - python setup.py install ``` +### 2. 准备训练好的模型 +PaddleOCR提供了一系列训练好的[模型](../../../doc/doc_ch/models_list.md),如果待量化的模型不在列表中,需要按照[常规训练](../../../doc/doc_ch/quickstart.md)方法得到训练好的模型。 -## 获取预训练模型 - -[识别预训练模型下载地址]() - -[检测预训练模型下载地址]() - +### 3. 量化训练 +量化训练包括离线量化训练和在线量化训练,在线量化训练效果更好,需加载预训练模型,在定义好量化策略后即可对模型进行量化。 -## 量化训练 -加载预训练模型后,在定义好量化策略后即可对模型进行量化。量化相关功能的使用具体细节见:[模型量化](https://paddleslim.readthedocs.io/zh_CN/latest/api_cn/quantization_api.html) - -进入PaddleOCR根目录,通过以下命令对模型进行量化: +量化训练的代码位于slim/quantization/quant/py 中,比如训练检测模型,训练指令如下: ```bash -python deploy/slim/quantization/quant.py -c configs/det/det_mv3_db.yml -o Global.pretrain_weights=det_mv3_db/best_accuracy Global.save_model_dir=./output/quant_model -``` - +python deploy/slim/quantization/quant.py -c configs/det/det_mv3_db.yml -o Global.pretrain_weights='your trained model' Global.save_model_dir=./output/quant_model +# 比如下载提供的训练模型 +wget https://paddleocr.bj.bcebos.com/20-09-22/mobile/det/ch_ppocr_mobile_v1.1_det_train.tar +tar xf ch_ppocr_mobile_v1.1_det_train.tar +python deploy/slim/quantization/quant.py -c configs/det/det_mv3_db.yml -o Global.pretrain_weights=./ch_ppocr_mobile_v1.1_det_train/best_accuracy Global.save_model_dir=./output/quant_model +``` +如果要训练识别模型的量化,修改配置文件和加载的模型参数即可。 -## 导出模型 +### 4. 导出模型 在得到量化训练保存的模型后,我们可以将其导出为inference_model,用于预测部署: ```bash python deploy/slim/quantization/export_model.py -c configs/det/det_mv3_db.yml -o Global.checkpoints=output/quant_model/best_accuracy Global.save_model_dir=./output/quant_inference_model ``` + +### 5. 量化模型部署 + +上述步骤导出的量化模型,参数精度仍然是FP32,但是参数的数值范围是int8,导出的模型可以通过PaddleLite的opt模型转换工具完成模型转换。 +量化模型部署的可参考 [移动端模型部署](../lite/readme.md) diff --git a/deploy/slim/quantization/README_en.md b/deploy/slim/quantization/README_en.md index 4b8a2b23a254b143cd230c81a7e433d251e10ff2..4f28a54245b08a0156a74d3316f9532bf40423fc 100755 --- a/deploy/slim/quantization/README_en.md +++ b/deploy/slim/quantization/README_en.md @@ -1,167 +1,68 @@ -\> PaddleSlim 1.2.0 or higher version should be installed before runing this example. - - - -# Model compress tutorial (Quantization) - -Compress results: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IDTaskModelCompress StrategyCriterion(Chinese dataset)Inference Time(ms)Inference Time(Total model)(ms)Acceleration RatioModel Size(MB)Commpress RatioDownload Link
0DetectionMobileNetV3_DBNone61.7224375-8.6-
RecognitionMobileNetV3_CRNNNone62.09.52
1DetectionSlimTextDetPACT Quant Aware Training62.11953488%2.867.82%
RecognitionSlimTextRecPACT Quant Aware Training61.488.6
2DetectionSlimTextDet_quat_pruningPruning+PACT Quant Aware Training60.8614228830%2.867.82%
RecognitionSlimTextRecPPACT Quant Aware Training61.488.6
3DetectionSlimTextDet_pruningPruning61.5713829527%2.966.28%
RecognitionSlimTextRecPACT Quant Aware Training61.488.6
- - - -## Overview - -Generally, a more complex model would achive better performance in the task, but it also leads to some redundancy in the model. Quantization is a technique that reduces this redundancyby reducing the full precision data to a fixed number, so as to reduce model calculation complexity and improve model inference performance. -This example uses PaddleSlim provided [APIs of Quantization](https://paddlepaddle.github.io/PaddleSlim/api/quantization_api/) to compress the OCR model. - -It is recommended that you could understand following pages before reading this example,: +## Introduction +Generally, a more complex model would achive better performance in the task, but it also leads to some redundancy in the model. +Quantization is a technique that reduces this redundancy by reducing the full precision data to a fixed number, +so as to reduce model calculation complexity and improve model inference performance. +This example uses PaddleSlim provided [APIs of Quantization](https://paddlepaddle.github.io/PaddleSlim/api/quantization_api/) to compress the OCR model. -- [The training strategy of OCR model](https://github.com/PaddlePaddle/PaddleOCR/blob/develop/doc/doc_ch/detection.md) - +It is recommended that you could understand following pages before reading this example: +- [The training strategy of OCR model](../../../doc/doc_en/quickstart_en.md) - [PaddleSlim Document](https://paddlepaddle.github.io/PaddleSlim/api/quantization_api/) +## Quick Start +Quantization is mostly suitable for the deployment of lightweight models on mobile terminals. +After training, if you want to further compress the model size and accelerate the prediction, you can use quantization methods to compress the model according to the following steps. +1. Install PaddleSlim +2. Prepare trained model +3. Quantization-Aware Training +4. Export inference model +5. Deploy quantization inference model -## Install PaddleSlim + +### 1. Install PaddleSlim ```bash git clone https://github.com/PaddlePaddle/PaddleSlim.git - cd Paddleslim - python setup.py install - ``` -## Download Pretrain Model +### 2. Download Pretrain Model +PaddleOCR provides a series of trained [models](../../../doc/doc_en/models_list_en.md). +If the model to be quantified is not in the list, you need to follow the [Regular Training](../../../doc/doc_en/quickstart_en.md) method to get the trained model. -[Download link of Detection pretrain model]() -[Download link of recognization pretrain model]() +### 3. Quant-Aware Training +Quantization training includes offline quantization training and online quantization training. +Online quantization training is more effective. It is necessary to load the pre-training model. +After the quantization strategy is defined, the model can be quantified. +The code for quantization training is located in `slim/quantization/quant/py`. For example, to train a detection model, the training instructions are as follows: +```bash +python deploy/slim/quantization/quant.py -c configs/det/det_mv3_db.yml -o Global.pretrain_weights='your trained model' Global.save_model_dir=./output/quant_model -## Quan-Aware Training - -After loading the pre training model, the model can be quantified after defining the quantization strategy. For specific details of quantization method, see:[Model Quantization](https://paddleslim.readthedocs.io/zh_CN/latest/api_cn/quantization_api.html) - -Enter the PaddleOCR root directory,perform model quantization with the following command: +# download provided model +wget https://paddleocr.bj.bcebos.com/20-09-22/mobile/det/ch_ppocr_mobile_v1.1_det_train.tar +tar xf ch_ppocr_mobile_v1.1_det_train.tar +python deploy/slim/quantization/quant.py -c configs/det/det_mv3_db.yml -o Global.pretrain_weights=./ch_ppocr_mobile_v1.1_det_train/best_accuracy Global.save_model_dir=./output/quant_model -```bash -python deploy/slim/prune/sensitivity_anal.py -c configs/det/det_mv3_db.yml -o Global.pretrain_weights=./deploy/slim/prune/pretrain_models/det_mv3_db/best_accuracy Global.test_batch_size_per_card=1 ``` - -## Export inference model +### 4. Export inference model After getting the model after pruning and finetuning we, can export it as inference_model for predictive deployment: ```bash python deploy/slim/quantization/export_model.py -c configs/det/det_mv3_db.yml -o Global.checkpoints=output/quant_model/best_accuracy Global.save_model_dir=./output/quant_inference_model ``` + +### 5. Deploy +The numerical range of the quantized model parameters derived from the above steps is still FP32, but the numerical range of the parameters is int8. +The derived model can be converted through the `opt tool` of PaddleLite. + +For quantitative model deployment, please refer to [Mobile terminal model deployment](../lite/readme_en.md) diff --git a/doc/PPOCR.pdf b/doc/PPOCR.pdf new file mode 100644 index 0000000000000000000000000000000000000000..219621ddb58a96b4b85ef4d74f05dd517c2eb630 Binary files /dev/null and b/doc/PPOCR.pdf differ diff --git a/doc/doc_ch/algorithm_overview.md b/doc/doc_ch/algorithm_overview.md index 9c2499f3d11a82c5246ace8dc96eef6dcc32e857..c4a3b3255f7367aec672387272d47b64a02658ee 100644 --- a/doc/doc_ch/algorithm_overview.md +++ b/doc/doc_ch/algorithm_overview.md @@ -1,5 +1,7 @@ ## 算法介绍 +本文给出了PaddleOCR已支持的文本检测算法和文本识别算法列表,以及每个算法在**英文公开数据集**上的模型和指标,主要用于算法简介和算法性能对比,更多包括中文在内的其他数据集上的模型请参考[PP-OCR v1.1 系列模型下载](./models_list.md)。 + - [1.文本检测算法](#文本检测算法) - [2.文本识别算法](#文本识别算法) @@ -29,18 +31,9 @@ PaddleOCR开源的文本检测算法列表: **说明:** SAST模型训练额外加入了icdar2013、icdar2017、COCO-Text、ArT等公开数据集进行调优。PaddleOCR用到的经过整理格式的英文公开数据集下载:[百度云地址](https://pan.baidu.com/s/12cPnZcVuV1zn5DOd4mqjVw) (提取码: 2bpi) - -使用[LSVT](./datasets.md#1icdar2019-lsvt)街景数据集共3w张数据,训练中文检测模型的相关配置和预训练文件如下: - -|模型|骨干网络|配置文件|预训练模型| -|-|-|-|-| -|超轻量中文模型|MobileNetV3|det_mv3_db.yml|[下载链接](https://paddleocr.bj.bcebos.com/ch_models/ch_det_mv3_db.tar)| -|通用中文OCR模型|ResNet50_vd|det_r50_vd_db.yml|[下载链接](https://paddleocr.bj.bcebos.com/ch_models/ch_det_r50_vd_db.tar)| - -* 注: 上述DB模型的训练和评估,需设置后处理参数box_thresh=0.6,unclip_ratio=1.5,使用不同数据集、不同模型训练,可调整这两个参数进行优化 - PaddleOCR文本检测算法的训练和使用请参考文档教程中[模型训练/评估中的文本检测部分](./detection.md)。 + ### 2.文本识别算法 @@ -68,11 +61,4 @@ PaddleOCR开源的文本识别算法列表: **说明:** SRN模型使用了数据扰动方法对上述提到对两个训练集进行增广,增广后的数据可以在[百度网盘](https://pan.baidu.com/s/1-HSZ-ZVdqBF2HaBZ5pRAKA)上下载,提取码: y3ry。 原始论文使用两阶段训练平均精度为89.74%,PaddleOCR中使用one-stage训练,平均精度为88.33%。两种预训练权重均在[下载链接](https://paddleocr.bj.bcebos.com/SRN/rec_r50fpn_vd_none_srn.tar)中。 -使用[LSVT](./datasets.md#1icdar2019-lsvt)街景数据集根据真值将图crop出来30w数据,进行位置校准。此外基于LSVT语料生成500w合成数据训练中文模型,相关配置和预训练文件如下: - -|模型|骨干网络|配置文件|预训练模型| -|-|-|-|-| -|超轻量中文模型|MobileNetV3|rec_chinese_lite_train.yml|[下载链接](https://paddleocr.bj.bcebos.com/ch_models/ch_rec_mv3_crnn.tar)| -|通用中文OCR模型|Resnet34_vd|rec_chinese_common_train.yml|[下载链接](https://paddleocr.bj.bcebos.com/ch_models/ch_rec_r34_vd_crnn.tar)| - PaddleOCR文本识别算法的训练和使用请参考文档教程中[模型训练/评估中的文本识别部分](./recognition.md)。 diff --git a/doc/doc_ch/config.md b/doc/doc_ch/config.md index fe8db9c893cf0e6190111de5fe7627d2fe52a4fd..f9c664d4ea38e2e52dc76bfb5b63d9a515b106a7 100644 --- a/doc/doc_ch/config.md +++ b/doc/doc_ch/config.md @@ -10,7 +10,7 @@ ## 配置文件 Global 参数介绍 -以 `rec_chinese_lite_train.yml` 为例 +以 `rec_chinese_lite_train_v1.1.yml ` 为例 | 字段 | 用途 | 默认值 | 备注 | @@ -32,6 +32,7 @@ | loss_type | 设置 loss 类型 | ctc | 支持两种loss: ctc / attention | | distort | 设置是否使用数据增强 | false | 设置为true时,将在训练时随机进行扰动,支持的扰动操作可阅读[img_tools.py](https://github.com/PaddlePaddle/PaddleOCR/blob/develop/ppocr/data/rec/img_tools.py) | | use_space_char | 设置是否识别空格 | false | 仅在 character_type=ch 时支持空格 | +| label_list | 设置方向分类器支持的角度 | ['0','180'] | 仅在方向分类器中生效 | | average_window | ModelAverage优化器中的窗口长度计算比例 | 0.15 | 目前仅应用与SRN | | max_average_window | 平均值计算窗口长度的最大值 | 15625 | 推荐设置为一轮训练中mini-batchs的数目| | min_average_window | 平均值计算窗口长度的最小值 | 10000 | \ | diff --git a/doc/doc_ch/detection.md b/doc/doc_ch/detection.md index c2b62edbee7ae855cd32b03cc0019027fb05f669..3945b7f0b996a18cfdb943c3ec68ce43fa53e6f3 100644 --- a/doc/doc_ch/detection.md +++ b/doc/doc_ch/detection.md @@ -44,13 +44,15 @@ json.dumps编码前的图像标注信息是包含多个字典的list,字典中 ## 快速启动训练 -首先下载模型backbone的pretrain model,PaddleOCR的检测模型目前支持两种backbone,分别是MobileNetV3、ResNet50_vd, +首先下载模型backbone的pretrain model,PaddleOCR的检测模型目前支持两种backbone,分别是MobileNetV3、ResNet_vd系列, 您可以根据需求使用[PaddleClas](https://github.com/PaddlePaddle/PaddleClas/tree/master/ppcls/modeling/architectures)中的模型更换backbone。 ```shell cd PaddleOCR/ # 下载MobileNetV3的预训练模型 wget -P ./pretrain_models/ https://paddle-imagenet-models-name.bj.bcebos.com/MobileNetV3_large_x0_5_pretrained.tar -# 下载ResNet50的预训练模型 +# 或,下载ResNet18_vd的预训练模型 +wget -P ./pretrain_models/ https://paddle-imagenet-models-name.bj.bcebos.com/ResNet18_vd_pretrained.tar +# 或,下载ResNet50_vd的预训练模型 wget -P ./pretrain_models/ https://paddle-imagenet-models-name.bj.bcebos.com/ResNet50_vd_ssld_pretrained.tar # 解压预训练模型文件,以MobileNetV3为例 @@ -72,24 +74,24 @@ tar -xf ./pretrain_models/MobileNetV3_large_x0_5_pretrained.tar ./pretrain_model ```shell # 训练 mv3_db 模型,并将训练日志保存为 tain_det.log -python3 tools/train.py -c configs/det/det_mv3_db.yml \ +python3 tools/train.py -c configs/det/det_mv3_db_v1.1.yml \ -o Global.pretrain_weights=./pretrain_models/MobileNetV3_large_x0_5_pretrained/ \ 2>&1 | tee train_det.log ``` -上述指令中,通过-c 选择训练使用configs/det/det_db_mv3.yml配置文件。 +上述指令中,通过-c 选择训练使用configs/det/det_db_mv3_v1.1.yml配置文件。 有关配置文件的详细解释,请参考[链接](./config.md)。 您也可以通过-o参数在不需要修改yml文件的情况下,改变训练的参数,比如,调整训练的学习率为0.0001 ```shell -python3 tools/train.py -c configs/det/det_mv3_db.yml -o Optimizer.base_lr=0.0001 +python3 tools/train.py -c configs/det/det_mv3_db_v1.1.yml -o Optimizer.base_lr=0.0001 ``` #### 断点训练 如果训练程序中断,如果希望加载训练中断的模型从而恢复训练,可以通过指定Global.checkpoints指定要加载的模型路径: ```shell -python3 tools/train.py -c configs/det/det_mv3_db.yml -o Global.checkpoints=./your/trained/model +python3 tools/train.py -c configs/det/det_mv3_db_v1.1.yml -o Global.checkpoints=./your/trained/model ``` **注意**:`Global.checkpoints`的优先级高于`Global.pretrain_weights`的优先级,即同时指定两个参数时,优先加载`Global.checkpoints`指定的模型,如果`Global.checkpoints`指定的模型路径有误,会加载`Global.pretrain_weights`指定的模型。 @@ -98,17 +100,17 @@ python3 tools/train.py -c configs/det/det_mv3_db.yml -o Global.checkpoints=./you PaddleOCR计算三个OCR检测相关的指标,分别是:Precision、Recall、Hmean。 -运行如下代码,根据配置文件`det_db_mv3.yml`中`save_res_path`指定的测试集检测结果文件,计算评估指标。 +运行如下代码,根据配置文件`det_db_mv3_v1.1.yml`中`save_res_path`指定的测试集检测结果文件,计算评估指标。 评估时设置后处理参数`box_thresh=0.6`,`unclip_ratio=1.5`,使用不同数据集、不同模型训练,可调整这两个参数进行优化 ```shell -python3 tools/eval.py -c configs/det/det_mv3_db.yml -o Global.checkpoints="{path/to/weights}/best_accuracy" PostProcess.box_thresh=0.6 PostProcess.unclip_ratio=1.5 +python3 tools/eval.py -c configs/det/det_mv3_db_v1.1.yml -o Global.checkpoints="{path/to/weights}/best_accuracy" PostProcess.box_thresh=0.6 PostProcess.unclip_ratio=1.5 ``` 训练中模型参数默认保存在`Global.save_model_dir`目录下。在评估指标时,需要设置`Global.checkpoints`指向保存的参数文件。 比如: ```shell -python3 tools/eval.py -c configs/det/det_mv3_db.yml -o Global.checkpoints="./output/det_db/best_accuracy" PostProcess.box_thresh=0.6 PostProcess.unclip_ratio=1.5 +python3 tools/eval.py -c configs/det/det_mv3_db_v1.1.yml -o Global.checkpoints="./output/det_db/best_accuracy" PostProcess.box_thresh=0.6 PostProcess.unclip_ratio=1.5 ``` * 注:`box_thresh`、`unclip_ratio`是DB后处理所需要的参数,在评估EAST模型时不需要设置 @@ -117,16 +119,16 @@ python3 tools/eval.py -c configs/det/det_mv3_db.yml -o Global.checkpoints="./ou 测试单张图像的检测效果 ```shell -python3 tools/infer_det.py -c configs/det/det_mv3_db.yml -o TestReader.infer_img="./doc/imgs_en/img_10.jpg" Global.checkpoints="./output/det_db/best_accuracy" +python3 tools/infer_det.py -c configs/det/det_mv3_db_v1.1.yml -o TestReader.infer_img="./doc/imgs_en/img_10.jpg" Global.checkpoints="./output/det_db/best_accuracy" ``` 测试DB模型时,调整后处理阈值, ```shell -python3 tools/infer_det.py -c configs/det/det_mv3_db.yml -o TestReader.infer_img="./doc/imgs_en/img_10.jpg" Global.checkpoints="./output/det_db/best_accuracy" PostProcess.box_thresh=0.6 PostProcess.unclip_ratio=1.5 +python3 tools/infer_det.py -c configs/det/det_mv3_db_v1.1.yml -o TestReader.infer_img="./doc/imgs_en/img_10.jpg" Global.checkpoints="./output/det_db/best_accuracy" PostProcess.box_thresh=0.6 PostProcess.unclip_ratio=1.5 ``` 测试文件夹下所有图像的检测效果 ```shell -python3 tools/infer_det.py -c configs/det/det_mv3_db.yml -o TestReader.infer_img="./doc/imgs_en/" Global.checkpoints="./output/det_db/best_accuracy" +python3 tools/infer_det.py -c configs/det/det_mv3_db_v1.1.yml -o TestReader.infer_img="./doc/imgs_en/" Global.checkpoints="./output/det_db/best_accuracy" ``` diff --git a/doc/doc_ch/inference.md b/doc/doc_ch/inference.md index 709a07515c316cdfd60b74f0b090d4baeeb290a7..c775de57b8538089f5ac9288dd825e044a183693 100644 --- a/doc/doc_ch/inference.md +++ b/doc/doc_ch/inference.md @@ -3,7 +3,7 @@ inference 模型(`fluid.io.save_inference_model`保存的模型) 一般是模型训练完成后保存的固化模型,多用于预测部署。训练过程中保存的模型是checkpoints模型,保存的是模型的参数,多用于恢复训练等。 -与checkpoints模型相比,inference 模型会额外保存模型的结构信息,在预测部署、加速推理上性能优越,灵活方便,适合与实际系统集成。更详细的介绍请参考文档[分类预测框架](https://paddleclas.readthedocs.io/zh_CN/latest/extension/paddle_inference.html). +与checkpoints模型相比,inference 模型会额外保存模型的结构信息,在预测部署、加速推理上性能优越,灵活方便,适合与实际系统集成。更详细的介绍请参考文档[分类预测框架](https://github.com/PaddlePaddle/PaddleClas/blob/master/docs/zh_CN/extension/paddle_inference.md). 接下来首先介绍如何将训练的模型转换成inference模型,然后将依次介绍文本检测、文本识别以及两者串联基于预测引擎推理。 @@ -23,8 +23,9 @@ inference 模型(`fluid.io.save_inference_model`保存的模型) - [1. 超轻量中文识别模型推理](#超轻量中文识别模型推理) - [2. 基于CTC损失的识别模型推理](#基于CTC损失的识别模型推理) - [3. 基于Attention损失的识别模型推理](#基于Attention损失的识别模型推理) - - [4. 自定义文本识别字典的推理](#自定义文本识别字典的推理) - - [5. 多语言模型的推理](#多语言模型的推理) + - [4. 基于SRN损失的识别模型推理](#基于SRN损失的识别模型推理) + - [5. 自定义文本识别字典的推理](#自定义文本识别字典的推理) + - [6. 多语言模型的推理](#多语言模型的推理) - [四、方向分类模型推理](#方向识别模型推理) - [1. 方向分类模型推理](#方向分类模型推理) @@ -41,7 +42,7 @@ inference 模型(`fluid.io.save_inference_model`保存的模型) 下载超轻量级中文检测模型: ``` -wget -P ./ch_lite/ https://paddleocr.bj.bcebos.com/ch_models/ch_det_mv3_db.tar && tar xf ./ch_lite/ch_det_mv3_db.tar -C ./ch_lite/ +wget -P ./ch_lite/ https://paddleocr.bj.bcebos.com/20-09-22/mobile/det/ch_ppocr_mobile_v1.1_det_train.tar && tar xf ./ch_lite/ch_ppocr_mobile_v1.1_det_train.tar -C ./ch_lite/ ``` 上述模型是以MobileNetV3为backbone训练的DB算法,将训练好的模型转换成inference模型只需要运行如下命令: ``` @@ -50,7 +51,7 @@ wget -P ./ch_lite/ https://paddleocr.bj.bcebos.com/ch_models/ch_det_mv3_db.tar & # Global.checkpoints参数设置待转换的训练模型地址,不用添加文件后缀.pdmodel,.pdopt或.pdparams。 # Global.save_inference_dir参数设置转换的模型将保存的地址。 -python3 tools/export_model.py -c configs/det/det_mv3_db.yml -o Global.checkpoints=./ch_lite/det_mv3_db/best_accuracy Global.save_inference_dir=./inference/det_db/ +python3 tools/export_model.py -c configs/det/det_mv3_db_v1.1.yml -o Global.checkpoints=./ch_lite/ch_ppocr_mobile_v1.1_det_train/best_accuracy Global.save_inference_dir=./inference/det_db/ ``` 转inference模型时,使用的配置文件和训练时使用的配置文件相同。另外,还需要设置配置文件中的`Global.checkpoints`、`Global.save_inference_dir`参数。 其中`Global.checkpoints`指向训练中保存的模型参数文件,`Global.save_inference_dir`是生成的inference模型要保存的目录。 @@ -66,7 +67,7 @@ inference/det_db/ 下载超轻量中文识别模型: ``` -wget -P ./ch_lite/ https://paddleocr.bj.bcebos.com/ch_models/ch_rec_mv3_crnn.tar && tar xf ./ch_lite/ch_rec_mv3_crnn.tar -C ./ch_lite/ +wget -P ./ch_lite/ https://paddleocr.bj.bcebos.com/20-09-22/mobile/rec/ch_ppocr_mobile_v1.1_rec_train.tar && tar xf ch_ppocr_mobile_v1.1_rec_train.tar -C ./ch_lite/ ``` 识别模型转inference模型与检测的方式相同,如下: @@ -76,7 +77,7 @@ wget -P ./ch_lite/ https://paddleocr.bj.bcebos.com/ch_models/ch_rec_mv3_crnn.tar # Global.checkpoints参数设置待转换的训练模型地址,不用添加文件后缀.pdmodel,.pdopt或.pdparams。 # Global.save_inference_dir参数设置转换的模型将保存的地址。 -python3 tools/export_model.py -c configs/rec/rec_chinese_lite_train.yml -o Global.checkpoints=./ch_lite/rec_mv3_crnn/best_accuracy \ +python3 tools/export_model.py -c configs/rec/ch_ppocr_v1.1/rec_chinese_lite_train_v1.1.yml -o Global.checkpoints=./ch_lite/ch_ppocr_mobile_v1.1_rec_train/best_accuracy \ Global.save_inference_dir=./inference/rec_crnn/ ``` @@ -297,9 +298,21 @@ Predicts of ./doc/imgs_words_en/word_336.png:['super', 0.9999555] self.character_str = "0123456789abcdefghijklmnopqrstuvwxyz" dict_character = list(self.character_str) ``` + +### 4. 基于SRN损失的识别模型推理 + +基于SRN损失的识别模型,需要额外设置识别算法参数 --rec_algorithm="SRN"。 同时需要保证预测shape与训练时一致,如: --rec_image_shape="1, 64, 256" + +``` +python3 tools/infer/predict_rec.py --image_dir="./doc/imgs_words_en/word_336.png" \ + --rec_model_dir="./inference/srn/" \ + --rec_image_shape="1, 64, 256" \ + --rec_char_type="en" \ + --rec_algorithm="SRN" +``` -### 4. 自定义文本识别字典的推理 +### 5. 自定义文本识别字典的推理 如果训练时修改了文本的字典,在使用inference模型预测时,需要通过`--rec_char_dict_path`指定使用的字典路径 ``` @@ -307,7 +320,7 @@ python3 tools/infer/predict_rec.py --image_dir="./doc/imgs_words_en/word_336.png ``` -### 5. 多语言模型的推理 +### 6. 多语言模型的推理 如果您需要预测的是其他语言模型,在使用inference模型预测时,需要通过`--rec_char_dict_path`指定使用的字典路径, 同时为了得到正确的可视化结果, 需要通过 `--vis_font_path` 指定可视化的字体路径,`doc/` 路径下有默认提供的小语种字体,例如韩文识别: @@ -351,9 +364,17 @@ Predicts of ./doc/imgs_words/ch/word_4.jpg:['0', 0.9999963] 在执行预测时,需要通过参数`image_dir`指定单张图像或者图像集合的路径、参数`det_model_dir`,`cls_model_dir`和`rec_model_dir`分别指定检测,方向分类和识别的inference模型路径。参数`use_angle_cls`用于控制是否启用方向分类模型。可视化识别结果默认保存到 ./inference_results 文件夹里面。 ``` -python3 tools/infer/predict_system.py --image_dir="./doc/imgs/2.jpg" --det_model_dir="./inference/det_db/" --cls_model_dir="./inference/cls/" --rec_model_dir="./inference/rec_crnn/" --use_angle_cls true +# 使用方向分类器 +python3 tools/infer/predict_system.py --image_dir="./doc/imgs/2.jpg" --det_model_dir="./inference/det_db/" --cls_model_dir="./inference/cls/" --rec_model_dir="./inference/rec_crnn/" --use_angle_cls=true + +# 不使用方向分类器 +python3 tools/infer/predict_system.py --image_dir="./doc/imgs/2.jpg" --det_model_dir="./inference/det_db/" --rec_model_dir="./inference/rec_crnn/" --use_angle_cls=false ``` + + + + 执行命令后,识别结果图像如下: ![](../imgs_results/2.jpg) diff --git a/doc/doc_ch/installation.md b/doc/doc_ch/installation.md index 381d1a9e8522c40fc4a2784024ee20537e6f11ba..d4b0a67f3cbdcb7d4f3efa6ea44ff881f7598a38 100644 --- a/doc/doc_ch/installation.md +++ b/doc/doc_ch/installation.md @@ -2,7 +2,7 @@ 经测试PaddleOCR可在glibc 2.23上运行,您也可以测试其他glibc版本或安装glic 2.23 PaddleOCR 工作环境 -- PaddlePaddle 1.7+ +- PaddlePaddle 1.8+ ,推荐使用 PaddlePaddle 2.0.0.beta - python3.7 - glibc 2.23 - cuDNN 7.6+ (GPU) @@ -47,19 +47,16 @@ docker images hub.baidubce.com/paddlepaddle/paddle latest-gpu-cuda9.0-cudnn7-dev f56310dcc829 ``` -**2. 安装PaddlePaddle Fluid v1.7** +**2. 安装PaddlePaddle Fluid v2.0** ``` pip3 install --upgrade pip -如果您的机器安装的是CUDA9,请运行以下命令安装 -python3 -m pip install paddlepaddle-gpu==1.7.2.post97 -i https://pypi.tuna.tsinghua.edu.cn/simple - -如果您的机器安装的是CUDA10,请运行以下命令安装 -python3 -m pip install paddlepaddle-gpu==1.7.2.post107 -i https://pypi.tuna.tsinghua.edu.cn/simple +如果您的机器安装的是CUDA9或CUDA10,请运行以下命令安装 +python3 -m pip install paddlepaddle-gpu==2.0.0b0 -i https://mirror.baidu.com/pypi/simple 如果您的机器是CPU,请运行以下命令安装 -python3 -m pip install paddlepaddle==1.7.2 -i https://pypi.tuna.tsinghua.edu.cn/simple +python3 -m pip install paddlepaddle==2.0.0b0 -i https://mirror.baidu.com/pypi/simple 更多的版本需求,请参照[安装文档](https://www.paddlepaddle.org.cn/install/quick)中的说明进行操作。 ``` diff --git a/doc/doc_ch/models_list.md b/doc/doc_ch/models_list.md index cf389bdc48cdf976abe0302cb9de09776d34e4ed..56dfd403a9394ffe2a91273de389716a80be5346 100644 --- a/doc/doc_ch/models_list.md +++ b/doc/doc_ch/models_list.md @@ -18,11 +18,11 @@ PaddleOCR提供的可下载模型包括`推理模型`、`训练模型`、`预训 ### 一、文本检测模型 -|模型名称|模型简介|推理模型大小|下载地址| -|-|-|-|-| -|ch_ppocr_mobile_slim_v1.1_det|slim裁剪版超轻量模型,支持中英文、多语种文本检测|1.4M|[推理模型](https://paddleocr.bj.bcebos.com/20-09-22/mobile-slim/det/ch_ppocr_mobile_v1.1_det_prune_infer.tar) / [slim模型](https://paddleocr.bj.bcebos.com/20-09-22/mobile-slim/det/ch_ppocr_mobile_v1.1_det_prune_opt.nb)| -|ch_ppocr_mobile_v1.1_det|原始超轻量模型,支持中英文、多语种文本检测|2.6M|[推理模型](https://paddleocr.bj.bcebos.com/20-09-22/mobile/det/ch_ppocr_mobile_v1.1_det_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/20-09-22/mobile/det/ch_ppocr_mobile_v1.1_det_train.tar)| -|ch_ppocr_server_v1.1_det|通用模型,支持中英文、多语种文本检测,比超轻量模型更大,但效果更好|47.2M|[推理模型](https://paddleocr.bj.bcebos.com/20-09-22/server/det/ch_ppocr_server_v1.1_det_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/20-09-22/server/det/ch_ppocr_server_v1.1_det_train.tar)| +|模型名称|模型简介|配置文件|推理模型大小|下载地址| +|-|-|-|-|-| +|ch_ppocr_mobile_slim_v1.1_det|slim裁剪版超轻量模型,支持中英文、多语种文本检测|[det_mv3_db_v1.1.yml](../../configs/det/det_mv3_db_v1.1.yml)|1.4M|[推理模型](https://paddleocr.bj.bcebos.com/20-09-22/mobile-slim/det/ch_ppocr_mobile_v1.1_det_prune_infer.tar) / [slim模型](https://paddleocr.bj.bcebos.com/20-09-22/mobile-slim/det/ch_ppocr_mobile_v1.1_det_prune_opt.nb)| +|ch_ppocr_mobile_v1.1_det|原始超轻量模型,支持中英文、多语种文本检测|[det_mv3_db_v1.1.yml](../../configs/det/det_mv3_db_v1.1.yml)|2.6M|[推理模型](https://paddleocr.bj.bcebos.com/20-09-22/mobile/det/ch_ppocr_mobile_v1.1_det_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/20-09-22/mobile/det/ch_ppocr_mobile_v1.1_det_train.tar)| +|ch_ppocr_server_v1.1_det|通用模型,支持中英文、多语种文本检测,比超轻量模型更大,但效果更好|[det_r18_vd_db_v1.1.yml](../../configs/det/det_r18_vd_db_v1.1.yml)|47.2M|[推理模型](https://paddleocr.bj.bcebos.com/20-09-22/server/det/ch_ppocr_server_v1.1_det_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/20-09-22/server/det/ch_ppocr_server_v1.1_det_train.tar)| @@ -30,42 +30,42 @@ PaddleOCR提供的可下载模型包括`推理模型`、`训练模型`、`预训 #### 1. 中文识别模型 -|模型名称|模型简介|推理模型大小|下载地址| -|-|-|-|-| -|ch_ppocr_mobile_slim_v1.1_rec|slim裁剪量化版超轻量模型,支持中英文、数字识别|1.6M|[推理模型](https://paddleocr.bj.bcebos.com/20-09-22/mobile-slim/rec/ch_ppocr_mobile_v1.1_rec_quant_infer.tar) / [slim模型](https://paddleocr.bj.bcebos.com/20-09-22/mobile-slim/rec/ch_ppocr_mobile_v1.1_rec_quant_opt.nb)| -|ch_ppocr_mobile_v1.1_rec|原始超轻量模型,支持中英文、数字识别|4.6M|[推理模型](https://paddleocr.bj.bcebos.com/20-09-22/mobile/rec/ch_ppocr_mobile_v1.1_rec_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/20-09-22/mobile/rec/ch_ppocr_mobile_v1.1_rec_train.tar) / [预训练模型](https://paddleocr.bj.bcebos.com/20-09-22/mobile/rec/ch_ppocr_mobile_v1.1_rec_pre.tar)| -|ch_ppocr_server_v1.1_rec|通用模型,支持中英文、数字识别|105M|[推理模型](https://paddleocr.bj.bcebos.com/20-09-22/server/rec/ch_ppocr_server_v1.1_rec_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/20-09-22/server/rec/ch_ppocr_server_v1.1_rec_train.tar) / [预训练模型](https://paddleocr.bj.bcebos.com/20-09-22/server/rec/ch_ppocr_server_v1.1_rec_pre.tar)| +|模型名称|模型简介|配置文件|推理模型大小|下载地址| +|-|-|-|-|-| +|ch_ppocr_mobile_slim_v1.1_rec|slim裁剪量化版超轻量模型,支持中英文、数字识别|[rec_chinese_lite_train_v1.1.yml](../../configs/rec/ch_ppocr_v1.1/rec_chinese_lite_train_v1.1.yml)|1.6M|[推理模型](https://paddleocr.bj.bcebos.com/20-09-22/mobile-slim/rec/ch_ppocr_mobile_v1.1_rec_quant_infer.tar) / [slim模型](https://paddleocr.bj.bcebos.com/20-09-22/mobile-slim/rec/ch_ppocr_mobile_v1.1_rec_quant_opt.nb) | +|ch_ppocr_mobile_v1.1_rec|原始超轻量模型,支持中英文、数字识别|[rec_chinese_lite_train_v1.1.yml](../../configs/rec/ch_ppocr_v1.1/rec_chinese_lite_train_v1.1.yml)|4.6M|[推理模型](https://paddleocr.bj.bcebos.com/20-09-22/mobile/rec/ch_ppocr_mobile_v1.1_rec_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/20-09-22/mobile/rec/ch_ppocr_mobile_v1.1_rec_train.tar) / [预训练模型](https://paddleocr.bj.bcebos.com/20-09-22/mobile/rec/ch_ppocr_mobile_v1.1_rec_pre.tar) | +|ch_ppocr_server_v1.1_rec|通用模型,支持中英文、数字识别|[rec_chinese_common_train_v1.1.yml](../../configs/rec/ch_ppocr_v1.1/rec_chinese_common_train_v1.1.yml)|105M|[推理模型](https://paddleocr.bj.bcebos.com/20-09-22/server/rec/ch_ppocr_server_v1.1_rec_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/20-09-22/server/rec/ch_ppocr_server_v1.1_rec_train.tar) / [预训练模型](https://paddleocr.bj.bcebos.com/20-09-22/server/rec/ch_ppocr_server_v1.1_rec_pre.tar) | **说明:** `训练模型`是基于预训练模型在真实数据与竖排合成文本数据上finetune得到的模型,在真实应用场景中有着更好的表现,`预训练模型`则是直接基于全量真实数据与合成数据训练得到,更适合用于在自己的数据集上finetune。 #### 2. 英文识别模型 -|模型名称|模型简介|推理模型大小|下载地址| -|-|-|-|-| -|en_ppocr_mobile_slim_v1.1_rec|slim裁剪量化版超轻量模型,支持英文、数字识别|0.9M|[推理模型](https://paddleocr.bj.bcebos.com/20-09-22/mobile-slim/en/en_ppocr_mobile_v1.1_rec_quant_infer.tar) / [slim模型](https://paddleocr.bj.bcebos.com/20-09-22/mobile-slim/en/en_ppocr_mobile_v1.1_rec_quant_opt.nb)| -|en_ppocr_mobile_v1.1_rec|原始超轻量模型,支持英文、数字识别|2.0M|[推理模型](https://paddleocr.bj.bcebos.com/20-09-22/mobile/en/en_ppocr_mobile_v1.1_rec_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/20-09-22/mobile/en/en_ppocr_mobile_v1.1_rec_train.tar)| +|模型名称|模型简介|配置文件|推理模型大小|下载地址| +|-|-|-|-|-| +|en_ppocr_mobile_slim_v1.1_rec|slim裁剪量化版超轻量模型,支持英文、数字识别|[rec_en_lite_train.yml](../../configs/rec/multi_languages/rec_en_lite_train.yml)|0.9M|[推理模型](https://paddleocr.bj.bcebos.com/20-09-22/mobile-slim/en/en_ppocr_mobile_v1.1_rec_quant_infer.tar) / [slim模型](https://paddleocr.bj.bcebos.com/20-09-22/mobile-slim/en/en_ppocr_mobile_v1.1_rec_quant_opt.nb) | +|en_ppocr_mobile_v1.1_rec|原始超轻量模型,支持英文、数字识别|[rec_en_lite_train.yml](../../configs/rec/multi_languages/rec_en_lite_train.yml)|2.0M|[推理模型](https://paddleocr.bj.bcebos.com/20-09-22/mobile/en/en_ppocr_mobile_v1.1_rec_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/20-09-22/mobile/en/en_ppocr_mobile_v1.1_rec_train.tar) | #### 3. 多语言识别模型(更多语言持续更新中...) -|模型名称|模型简介|推理模型大小|下载地址| -|-|-|-|-| -| french_ppocr_mobile_v1.1_rec |法文识别|2.1M|[推理模型](https://paddleocr.bj.bcebos.com/20-09-22/mobile/fr/french_ppocr_mobile_v1.1_rec_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/20-09-22/mobile/fr/french_ppocr_mobile_v1.1_rec_train.tar)| -| german_ppocr_mobile_v1.1_rec |德文识别|2.1M|[推理模型](https://paddleocr.bj.bcebos.com/20-09-22/mobile/ge/german_ppocr_mobile_v1.1_rec_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/20-09-22/mobile/ge/german_ppocr_mobile_v1.1_rec_train.tar)| -| korean_ppocr_mobile_v1.1_rec |韩文识别|3.4M|[推理模型](https://paddleocr.bj.bcebos.com/20-09-22/mobile/kr/korean_ppocr_mobile_v1.1_rec_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/20-09-22/mobile/kr/korean_ppocr_mobile_v1.1_rec_train.tar)| -| japan_ppocr_mobile_v1.1_rec |日文识别|3.7M|[推理模型](https://paddleocr.bj.bcebos.com/20-09-22/mobile/jp/japan_ppocr_mobile_v1.1_rec_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/20-09-22/mobile/jp/japan_ppocr_mobile_v1.1_rec_train.tar)| +|模型名称|模型简介|配置文件|推理模型大小|下载地址| +|-|-|-|-|-| +| french_ppocr_mobile_v1.1_rec |法文识别|[rec_french_lite_train.yml](../../configs/rec/multi_languages/rec_french_lite_train.yml)|2.1M|[推理模型](https://paddleocr.bj.bcebos.com/20-09-22/mobile/fr/french_ppocr_mobile_v1.1_rec_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/20-09-22/mobile/fr/french_ppocr_mobile_v1.1_rec_train.tar) | +| german_ppocr_mobile_v1.1_rec |德文识别|[rec_ger_lite_train.yml](../../configs/rec/multi_languages/rec_ger_lite_train.yml)|2.1M|[推理模型](https://paddleocr.bj.bcebos.com/20-09-22/mobile/ge/german_ppocr_mobile_v1.1_rec_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/20-09-22/mobile/ge/german_ppocr_mobile_v1.1_rec_train.tar) | +| korean_ppocr_mobile_v1.1_rec |韩文识别|[rec_korean_lite_train.yml](../../configs/rec/multi_languages/rec_korean_lite_train.yml)|3.4M|[推理模型](https://paddleocr.bj.bcebos.com/20-09-22/mobile/kr/korean_ppocr_mobile_v1.1_rec_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/20-09-22/mobile/kr/korean_ppocr_mobile_v1.1_rec_train.tar) | +| japan_ppocr_mobile_v1.1_rec |日文识别|[rec_japan_lite_train.yml](../../configs/rec/multi_languages/rec_japan_lite_train.yml)|3.7M|[推理模型](https://paddleocr.bj.bcebos.com/20-09-22/mobile/jp/japan_ppocr_mobile_v1.1_rec_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/20-09-22/mobile/jp/japan_ppocr_mobile_v1.1_rec_train.tar) | ### 三、文本方向分类模型 -|模型名称|模型简介|推理模型大小|下载地址| -|-|-|-|-| -|ch_ppocr_mobile_v1.1_cls_quant|slim量化版模型|0.5M|[推理模型](https://paddleocr.bj.bcebos.com/20-09-22/cls/ch_ppocr_mobile_v1.1_cls_quant_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/20-09-22/cls/ch_ppocr_mobile_v1.1_cls_quant_train.tar) / [slim模型]()| -|ch_ppocr_mobile_v1.1_cls|原始模型|850kb|[推理模型](https://paddleocr.bj.bcebos.com/20-09-22/cls/ch_ppocr_mobile_v1.1_cls_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/20-09-22/cls/ch_ppocr_mobile_v1.1_cls_train.tar)| +|模型名称|模型简介|配置文件|推理模型大小|下载地址| +|-|-|-|-|-| +|ch_ppocr_mobile_v1.1_cls_quant|slim量化版模型|[cls_mv3.yml](../../configs/cls/cls_mv3.yml)|0.5M|[推理模型](https://paddleocr.bj.bcebos.com/20-09-22/cls/ch_ppocr_mobile_v1.1_cls_quant_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/20-09-22/cls/ch_ppocr_mobile_v1.1_cls_quant_train.tar) / [slim模型](https://paddleocr.bj.bcebos.com/20-09-22/cls/ch_ppocr_mobile_cls_quant_opt.nb) | +|ch_ppocr_mobile_v1.1_cls|原始模型|[cls_mv3.yml](../../configs/cls/cls_mv3.yml)|850kb|[推理模型](https://paddleocr.bj.bcebos.com/20-09-22/cls/ch_ppocr_mobile_v1.1_cls_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/20-09-22/cls/ch_ppocr_mobile_v1.1_cls_train.tar) | ## OCR模型列表(V1.0,7月16日更新) |模型名称|模型简介|检测模型地址|识别模型地址|支持空格的识别模型地址| |-|-|-|-|-| -|chinese_db_crnn_mobile|8.6M超轻量级中文OCR模型|[推理模型](https://paddleocr.bj.bcebos.com/ch_models/ch_det_mv3_db_infer.tar) / [预训练模型](https://paddleocr.bj.bcebos.com/ch_models/ch_det_mv3_db.tar)|[推理模型](https://paddleocr.bj.bcebos.com/ch_models/ch_rec_mv3_crnn_infer.tar) / [预训练模型](https://paddleocr.bj.bcebos.com/ch_models/ch_rec_mv3_crnn.tar)|[推理模型](https://paddleocr.bj.bcebos.com/ch_models/ch_rec_mv3_crnn_enhance_infer.tar) / [预训练模型](https://paddleocr.bj.bcebos.com/ch_models/ch_rec_mv3_crnn_enhance.tar) -|chinese_db_crnn_server|通用中文OCR模型|[推理模型](https://paddleocr.bj.bcebos.com/ch_models/ch_det_r50_vd_db_infer.tar) / [预训练模型](https://paddleocr.bj.bcebos.com/ch_models/ch_det_r50_vd_db.tar)|[推理模型](https://paddleocr.bj.bcebos.com/ch_models/ch_rec_r34_vd_crnn_infer.tar) / [预训练模型](https://paddleocr.bj.bcebos.com/ch_models/ch_rec_r34_vd_crnn.tar)|[推理模型](https://paddleocr.bj.bcebos.com/ch_models/ch_rec_r34_vd_crnn_enhance_infer.tar) / [预训练模型](https://paddleocr.bj.bcebos.com/ch_models/ch_rec_r34_vd_crnn_enhance.tar) +|chinese_db_crnn_mobile|8.6M超轻量级中文OCR模型|[推理模型](https://paddleocr.bj.bcebos.com/ch_models/ch_det_mv3_db_infer.tar) / [预训练模型](https://paddleocr.bj.bcebos.com/ch_models/ch_det_mv3_db.tar) |[推理模型](https://paddleocr.bj.bcebos.com/ch_models/ch_rec_mv3_crnn_infer.tar) / [预训练模型](https://paddleocr.bj.bcebos.com/ch_models/ch_rec_mv3_crnn.tar) |[推理模型](https://paddleocr.bj.bcebos.com/ch_models/ch_rec_mv3_crnn_enhance_infer.tar) / [预训练模型](https://paddleocr.bj.bcebos.com/ch_models/ch_rec_mv3_crnn_enhance.tar) +|chinese_db_crnn_server|通用中文OCR模型|[推理模型](https://paddleocr.bj.bcebos.com/ch_models/ch_det_r50_vd_db_infer.tar) / [预训练模型](https://paddleocr.bj.bcebos.com/ch_models/ch_det_r50_vd_db.tar) |[推理模型](https://paddleocr.bj.bcebos.com/ch_models/ch_rec_r34_vd_crnn_infer.tar) / [预训练模型](https://paddleocr.bj.bcebos.com/ch_models/ch_rec_r34_vd_crnn.tar) |[推理模型](https://paddleocr.bj.bcebos.com/ch_models/ch_rec_r34_vd_crnn_enhance_infer.tar) / [预训练模型](https://paddleocr.bj.bcebos.com/ch_models/ch_rec_r34_vd_crnn_enhance.tar) diff --git a/doc/doc_ch/quickstart.md b/doc/doc_ch/quickstart.md index 701b50ed36fc69a6285550e6f53f6f3a09a1a63d..f411e8faa810c9272635bec7e9fb05351f37f743 100644 --- a/doc/doc_ch/quickstart.md +++ b/doc/doc_ch/quickstart.md @@ -9,12 +9,15 @@ ## 2.inference模型下载 -|模型名称|模型简介|检测模型地址|识别模型地址|支持空格的识别模型地址| -|-|-|-|-|-| -|chinese_db_crnn_mobile|超轻量级中文OCR模型|[inference模型](https://paddleocr.bj.bcebos.com/ch_models/ch_det_mv3_db_infer.tar) / [预训练模型](https://paddleocr.bj.bcebos.com/ch_models/ch_det_mv3_db.tar)|[inference模型](https://paddleocr.bj.bcebos.com/ch_models/ch_rec_mv3_crnn_infer.tar) / [预训练模型](https://paddleocr.bj.bcebos.com/ch_models/ch_rec_mv3_crnn.tar)|[inference模型](https://paddleocr.bj.bcebos.com/ch_models/ch_rec_mv3_crnn_enhance_infer.tar) / [预训练模型](https://paddleocr.bj.bcebos.com/ch_models/ch_rec_mv3_crnn_enhance.tar) -|chinese_db_crnn_server|通用中文OCR模型|[inference模型](https://paddleocr.bj.bcebos.com/ch_models/ch_det_r50_vd_db_infer.tar) / [预训练模型](https://paddleocr.bj.bcebos.com/ch_models/ch_det_r50_vd_db.tar)|[inference模型](https://paddleocr.bj.bcebos.com/ch_models/ch_rec_r34_vd_crnn_infer.tar) / [预训练模型](https://paddleocr.bj.bcebos.com/ch_models/ch_rec_r34_vd_crnn.tar)|[inference模型](https://paddleocr.bj.bcebos.com/ch_models/ch_rec_r34_vd_crnn_enhance_infer.tar) / [预训练模型](https://paddleocr.bj.bcebos.com/ch_models/ch_rec_r34_vd_crnn_enhance.tar) +* 移动端和服务器端的检测与识别模型如下,更多模型下载(包括多语言),可以参考[PP-OCR v1.1 系列模型下载](./doc_ch/models_list.md) -*windows 环境下如果没有安装wget,下载模型时可将链接复制到浏览器中下载,并解压放置在相应目录下* +| 模型简介 | 模型名称 |推荐场景 | 检测模型 | 方向分类器 | 识别模型 | +| ------------ | --------------- | ----------------|---- | ---------- | -------- | +| 中英文超轻量OCR模型(8.1M) | ch_ppocr_mobile_v1.1_xx |移动端&服务器端|[推理模型](https://paddleocr.bj.bcebos.com/20-09-22/mobile/det/ch_ppocr_mobile_v1.1_det_infer.tar) / [预训练模型](https://paddleocr.bj.bcebos.com/20-09-22/mobile/det/ch_ppocr_mobile_v1.1_det_train.tar)|[推理模型](https://paddleocr.bj.bcebos.com/20-09-22/cls/ch_ppocr_mobile_v1.1_cls_infer.tar) / [预训练模型](https://paddleocr.bj.bcebos.com/20-09-22/cls/ch_ppocr_mobile_v1.1_cls_train.tar) |[推理模型](https://paddleocr.bj.bcebos.com/20-09-22/mobile/rec/ch_ppocr_mobile_v1.1_rec_infer.tar) / [预训练模型](https://paddleocr.bj.bcebos.com/20-09-22/mobile/rec/ch_ppocr_mobile_v1.1_rec_pre.tar) | +| 中英文通用OCR模型(155.1M) |ch_ppocr_server_v1.1_xx|服务器端 |[推理模型](https://paddleocr.bj.bcebos.com/20-09-22/server/det/ch_ppocr_server_v1.1_det_infer.tar) / [预训练模型](https://paddleocr.bj.bcebos.com/20-09-22/server/det/ch_ppocr_server_v1.1_det_train.tar) |[推理模型](https://paddleocr.bj.bcebos.com/20-09-22/cls/ch_ppocr_mobile_v1.1_cls_infer.tar) / [预训练模型](https://paddleocr.bj.bcebos.com/20-09-22/cls/ch_ppocr_mobile_v1.1_cls_train.tar) |[推理模型](https://paddleocr.bj.bcebos.com/20-09-22/server/rec/ch_ppocr_server_v1.1_rec_infer.tar) / [预训练模型](https://paddleocr.bj.bcebos.com/20-09-22/server/rec/ch_ppocr_server_v1.1_rec_pre.tar) | + + +* windows 环境下如果没有安装wget,下载模型时可将链接复制到浏览器中下载,并解压放置在相应目录下 复制上表中的检测和识别的`inference模型`下载地址,并解压 @@ -24,6 +27,8 @@ mkdir inference && cd inference wget {url/of/detection/inference_model} && tar xf {name/of/detection/inference_model/package} # 下载识别模型并解压 wget {url/of/recognition/inference_model} && tar xf {name/of/recognition/inference_model/package} +# 下载方向分类器模型并解压 +wget {url/of/classification/inference_model} && tar xf {name/of/classification/inference_model/package} cd .. ``` @@ -32,9 +37,11 @@ cd .. ``` mkdir inference && cd inference # 下载超轻量级中文OCR模型的检测模型并解压 -wget https://paddleocr.bj.bcebos.com/ch_models/ch_det_mv3_db_infer.tar && tar xf ch_det_mv3_db_infer.tar +wget https://paddleocr.bj.bcebos.com/20-09-22/mobile/det/ch_ppocr_mobile_v1.1_det_infer.tar && tar xf ch_ppocr_mobile_v1.1_det_infer.tar # 下载超轻量级中文OCR模型的识别模型并解压 -wget https://paddleocr.bj.bcebos.com/ch_models/ch_rec_mv3_crnn_infer.tar && tar xf ch_rec_mv3_crnn_infer.tar +wget https://paddleocr.bj.bcebos.com/20-09-22/mobile/rec/ch_ppocr_mobile_v1.1_rec_infer.tar && tar xf ch_ppocr_mobile_v1.1_rec_infer.tar +# 下载超轻量级中文OCR模型的文本方向分类器模型并解压 +wget https://paddleocr.bj.bcebos.com/20-09-22/cls/ch_ppocr_mobile_v1.1_cls_infer.tar && tar xf ch_ppocr_mobile_v1.1_cls_infer.tar cd .. ``` @@ -42,10 +49,13 @@ cd .. ``` |-inference - |-ch_rec_mv3_crnn + |-ch_ppocr_mobile_v1.1_det_infer + |- model + |- params + |-ch_ppocr_mobile_v1.1_rec_infer |- model |- params - |-ch_det_mv3_db + |-ch_ppocr_mobile-v1.1_cls_infer |- model |- params ... @@ -53,42 +63,37 @@ cd .. ## 3.单张图像或者图像集合预测 -以下代码实现了文本检测、识别串联推理,在执行预测时,需要通过参数image_dir指定单张图像或者图像集合的路径、参数det_model_dir指定检测inference模型的路径和参数rec_model_dir指定识别inference模型的路径。可视化识别结果默认保存到 ./inference_results 文件夹里面。 +以下代码实现了文本检测、识别串联推理,在执行预测时,需要通过参数image_dir指定单张图像或者图像集合的路径、参数`det_model_dir`指定检测inference模型的路径、参数`rec_model_dir`指定识别inference模型的路径、参数`use_angle_cls`指定是否使用方向分类器、参数`cls_model_dir`指定方向分类器inference模型的路径、参数`use_space_char`指定是否预测空格字符。可视化识别结果默认保存到`./inference_results`文件夹里面。 ```bash # 预测image_dir指定的单张图像 -python3 tools/infer/predict_system.py --image_dir="./doc/imgs/11.jpg" --det_model_dir="./inference/ch_det_mv3_db/" --rec_model_dir="./inference/ch_rec_mv3_crnn/" +python3 tools/infer/predict_system.py --image_dir="./doc/imgs/11.jpg" --det_model_dir="./inference/ch_ppocr_mobile_v1.1_det_infer/" --rec_model_dir="./inference/ch_ppocr_mobile_v1.1_rec_infer/" --cls_model_dir="./inference/ch_ppocr_mobile_v1.1_cls_infer/" --use_angle_cls=True --use_space_char=True # 预测image_dir指定的图像集合 -python3 tools/infer/predict_system.py --image_dir="./doc/imgs/" --det_model_dir="./inference/ch_det_mv3_db/" --rec_model_dir="./inference/ch_rec_mv3_crnn/" +python3 tools/infer/predict_system.py --image_dir="./doc/imgs/" --det_model_dir="./inference/ch_ppocr_mobile_v1.1_det_infer/" --rec_model_dir="./inference/ch_ppocr_mobile_v1.1_rec_infer/" --cls_model_dir="./inference/ch_ppocr_mobile_v1.1_cls_infer/" --use_angle_cls=True --use_space_char=True # 如果想使用CPU进行预测,需设置use_gpu参数为False -python3 tools/infer/predict_system.py --image_dir="./doc/imgs/11.jpg" --det_model_dir="./inference/ch_det_mv3_db/" --rec_model_dir="./inference/ch_rec_mv3_crnn/" --use_gpu=False +python3 tools/infer/predict_system.py --image_dir="./doc/imgs/11.jpg" --det_model_dir="./inference/ch_ppocr_mobile_v1.1_det_infer/" --rec_model_dir="./inference/ch_ppocr_mobile_v1.1_rec_infer/" --cls_model_dir="./inference/ch_ppocr_mobile_v1.1_cls_infer/" --use_angle_cls=True --use_space_char=True --use_gpu=False ``` - 通用中文OCR模型 请按照上述步骤下载相应的模型,并且更新相关的参数,示例如下: -``` + +```bash # 预测image_dir指定的单张图像 -python3 tools/infer/predict_system.py --image_dir="./doc/imgs/11.jpg" --det_model_dir="./inference/ch_det_r50_vd_db/" --rec_model_dir="./inference/ch_rec_r34_vd_crnn/" +python3 tools/infer/predict_system.py --image_dir="./doc/imgs/11.jpg" --det_model_dir="./inference/ch_ppocr_server_v1.1_det_infer/" --rec_model_dir="./inference/ch_ppocr_server_v1.1_rec_infer/" --cls_model_dir="./inference/ch_ppocr_mobile_v1.1_cls_infer/" --use_angle_cls=True --use_space_char=True ``` -- 支持空格的通用中文OCR模型 +* 注意: + - 如果希望使用不支持空格的识别模型,在预测的时候需要注意:请将代码更新到最新版本,并添加参数 `--use_space_char=False`。 + - 如果不希望使用方向分类器,在预测的时候需要注意:请将代码更新到最新版本,并添加参数 `--use_angle_cls=False`。 -请按照上述步骤下载相应的模型,并且更新相关的参数,示例如下: - -*注意:请将代码更新到最新版本,并添加参数 `--use_space_char=True` * - -``` -# 预测image_dir指定的单张图像 -python3 tools/infer/predict_system.py --image_dir="./doc/imgs_en/img_12.jpg" --det_model_dir="./inference/ch_det_r50_vd_db/" --rec_model_dir="./inference/ch_rec_r34_vd_crnn_enhance/" --use_space_char=True -``` 更多的文本检测、识别串联推理使用方式请参考文档教程中[基于Python预测引擎推理](./inference.md)。 此外,文档教程中也提供了中文OCR模型的其他预测部署方式: - [基于C++预测引擎推理](../../deploy/cpp_infer/readme.md) -- [服务部署](./serving.md) +- [服务部署](../../deploy/pdserving/readme.md) - [端侧部署](../../deploy/lite/readme.md) diff --git a/doc/doc_ch/recognition.md b/doc/doc_ch/recognition.md index c8955f7fe1c7022cf68155be330fad307c68fe43..918050ccda2c6203bef0f147483df0bd752d6eb5 100644 --- a/doc/doc_ch/recognition.md +++ b/doc/doc_ch/recognition.md @@ -1,5 +1,24 @@ ## 文字识别 + +- [一、数据准备](#数据准备) + - [数据下载](#数据下载) + - [自定义数据集](#自定义数据集) + - [字典](#字典) + - [支持空格](#支持空格) + +- [二、启动训练](#文本检测模型推理) + - [1. 数据增强](#数据增强) + - [2. 训练](#训练) + - [3. 小语种](#小语种) + +- [三、评估](#评估) + +- [四、预测](#预测) + - [1. 训练引擎预测](#训练引擎预测) + + + ### 数据准备 @@ -13,16 +32,18 @@ PaddleOCR 支持两种数据格式: `lmdb` 用于训练公开数据,调试算 ln -sf /train_data/dataset ``` - + * 数据下载 若您本地没有数据集,可以在官网下载 [icdar2015](http://rrc.cvc.uab.es/?ch=4&com=downloads) 数据,用于快速验证。也可以参考[DTRB](https://github.com/clovaai/deep-text-recognition-benchmark#download-lmdb-dataset-for-traininig-and-evaluation-from-here),下载 benchmark 所需的lmdb格式数据集。 如果希望复现SRN的论文指标,需要下载离线[增广数据](https://pan.baidu.com/s/1-HSZ-ZVdqBF2HaBZ5pRAKA),提取码: y3ry。增广数据是由MJSynth和SynthText做旋转和扰动得到的。数据下载完成后请解压到 {your_path}/PaddleOCR/train_data/data_lmdb_release/training/ 路径下。 -* 使用自己数据集: + +* 使用自己数据集 若您希望使用自己的数据进行训练,请参考下文组织您的数据。 + - 训练集 首先请将训练图片放入同一个文件夹(train_images),并用一个txt文件(rec_gt_train.txt)记录图片路径和标签。 @@ -77,7 +98,7 @@ python gen_label.py --mode="rec" --input_path="{path/of/origin/label}" --output_ |- word_003.jpg | ... ``` - + - 字典 最后需要提供一个字典({word_dict_name}.txt),使模型在训练时,可以将所有出现的字符映射为字典的索引。 @@ -96,21 +117,36 @@ n word_dict.txt 每行有一个单字,将字符与数字索引映射在一起,“and” 将被映射成 [2 5 1] `ppocr/utils/ppocr_keys_v1.txt` 是一个包含6623个字符的中文字典, + `ppocr/utils/ic15_dict.txt` 是一个包含36个字符的英文字典, + +`ppocr/utils/french_dict.txt` 是一个包含118个字符的法文字典 + +`ppocr/utils/japan_dict.txt` 是一个包含4399个字符的法文字典 + +`ppocr/utils/korean_dict.txt` 是一个包含3636个字符的法文字典 + +`ppocr/utils/german_dict.txt` 是一个包含131个字符的法文字典 + + 您可以按需使用。 +目前的多语言模型仍处在demo阶段,会持续优化模型并补充语种,**非常欢迎您为我们提供其他语言的字典和字体**, +如您愿意可将字典文件提交至 [utils](../../ppocr/utils) ,我们会在Repo中感谢您。 + - 自定义字典 如需自定义dic文件,请在 `configs/rec/rec_icdar15_train.yml` 中添加 `character_dict_path` 字段, 指向您的字典路径。 并将 `character_type` 设置为 `ch`。 + - 添加空格类别 如果希望支持识别"空格"类别, 请将yml文件中的 `use_space_char` 字段设置为 `true`。 **注意:`use_space_char` 仅在 `character_type=ch` 时生效** - + ### 启动训练 PaddleOCR提供了训练脚本、评估脚本和预测脚本,本节将以 CRNN 识别模型为例: @@ -131,14 +167,12 @@ tar -xf rec_mv3_none_bilstm_ctc.tar && rm -rf rec_mv3_none_bilstm_ctc.tar *如果您安装的是cpu版本,请将配置文件中的 `use_gpu` 字段修改为false* ``` -# 设置PYTHONPATH路径 -export PYTHONPATH=$PYTHONPATH:. # GPU训练 支持单卡,多卡训练,通过CUDA_VISIBLE_DEVICES指定卡号 export CUDA_VISIBLE_DEVICES=0,1,2,3 # 训练icdar15英文数据 并将训练日志保存为 tain_rec.log python3 tools/train.py -c configs/rec/rec_icdar15_train.yml 2>&1 | tee train_rec.log ``` - + - 数据增强 PaddleOCR提供了多种数据增强方式,如果您希望在训练时加入扰动,请在配置文件中设置 `distort: true`。 @@ -149,6 +183,7 @@ PaddleOCR提供了多种数据增强方式,如果您希望在训练时加入 *由于OpenCV的兼容性问题,扰动操作暂时只支持Linux* + - 训练 PaddleOCR支持训练和评估交替进行, 可以在 `configs/rec/rec_icdar15_train.yml` 中修改 `eval_batch_step` 设置评估频率,默认每500个iter评估一次。评估过程中默认将最佳acc模型,保存为 `output/rec_CRNN/best_accuracy` 。 @@ -160,7 +195,10 @@ PaddleOCR支持训练和评估交替进行, 可以在 `configs/rec/rec_icdar15_t | 配置文件 | 算法名称 | backbone | trans | seq | pred | | :--------: | :-------: | :-------: | :-------: | :-----: | :-----: | +| [rec_chinese_lite_train_v1.1.yml](../../configs/rec/ch_ppocr_v1.1/rec_chinese_lite_train_v1.1.yml) | CRNN | Mobilenet_v3 small 0.5 | None | BiLSTM | ctc | +| [rec_chinese_common_train_v1.1.yml](../../configs/rec/ch_ppocr_v1.1/rec_chinese_common_train_v1.1.yml) | CRNN | ResNet34_vd | None | BiLSTM | ctc | | rec_chinese_lite_train.yml | CRNN | Mobilenet_v3 small 0.5 | None | BiLSTM | ctc | +| rec_chinese_common_train.yml | CRNN | ResNet34_vd | None | BiLSTM | ctc | | rec_icdar15_train.yml | CRNN | Mobilenet_v3 large 0.5 | None | BiLSTM | ctc | | rec_mv3_none_bilstm_ctc.yml | CRNN | Mobilenet_v3 large 0.5 | None | BiLSTM | ctc | | rec_mv3_none_none_ctc.yml | Rosetta | Mobilenet_v3 large 0.5 | None | None | ctc | @@ -172,7 +210,7 @@ PaddleOCR支持训练和评估交替进行, 可以在 `configs/rec/rec_icdar15_t | rec_r34_vd_tps_bilstm_ctc.yml | STARNet | Resnet34_vd | tps | BiLSTM | ctc | | rec_r50fpn_vd_none_srn.yml | SRN | Resnet50_fpn_vd | None | rnn | srn | -训练中文数据,推荐使用`rec_chinese_lite_train.yml`,如您希望尝试其他算法在中文数据集上的效果,请参考下列说明修改配置文件: +训练中文数据,推荐使用[rec_chinese_lite_train_v1.1.yml](../../configs/rec/ch_ppocr_v1.1/rec_chinese_lite_train_v1.1.yml),如您希望尝试其他算法在中文数据集上的效果,请参考下列说明修改配置文件: 以 `rec_mv3_none_none_ctc.yml` 为例: ``` @@ -208,20 +246,54 @@ Optimizer: ``` **注意,预测/评估时的配置文件请务必与训练一致。** + - 小语种 PaddleOCR也提供了多语言的, `configs/rec/multi_languages` 路径下的提供了多语言的配置文件,目前PaddleOCR支持的多语言算法有: -| 配置文件 | 算法名称 | backbone | trans | seq | pred | language | -| :--------: | :-------: | :-------: | :-------: | :-----: | :-----: | :-----: | -| rec_en_lite_train.yml | CRNN | Mobilenet_v3 small 0.5 | None | BiLSTM | ctc | 英语 | -| rec_french_lite_train.yml | CRNN | Mobilenet_v3 small 0.5 | None | BiLSTM | ctc | 法语 | -| rec_ger_lite_train.yml | CRNN | Mobilenet_v3 small 0.5 | None | BiLSTM | ctc | 德语 | -| rec_japan_lite_train.yml | CRNN | Mobilenet_v3 small 0.5 | None | BiLSTM | ctc | 日语 | -| rec_korean_lite_train.yml | CRNN | Mobilenet_v3 small 0.5 | None | BiLSTM | ctc | 韩语 | +| 配置文件 | 算法名称 | backbone | trans | seq | pred | language | +| :--------: | :-------: | :-------: | :-------: | :-----: | :-----: | :-----: | +| rec_en_lite_train.yml | CRNN | Mobilenet_v3 small 0.5 | None | BiLSTM | ctc | 英语 | +| rec_french_lite_train.yml | CRNN | Mobilenet_v3 small 0.5 | None | BiLSTM | ctc | 法语 | +| rec_ger_lite_train.yml | CRNN | Mobilenet_v3 small 0.5 | None | BiLSTM | ctc | 德语 | +| rec_japan_lite_train.yml | CRNN | Mobilenet_v3 small 0.5 | None | BiLSTM | ctc | 日语 | +| rec_korean_lite_train.yml | CRNN | Mobilenet_v3 small 0.5 | None | BiLSTM | ctc | 韩语 | + + +多语言模型训练方式与中文模型一致,训练数据集均为100w的合成数据,少量的字体可以在 [百度网盘](https://pan.baidu.com/s/1bS_u207Rm7YbY33wOECKDA) 上下载,提取码:frgi。 -多语言模型训练方式与中文模型一致,训练数据集均为100w的合成数据,少量的字体和测试数据可以在[百度网盘]()上下载。 +如您希望在现有模型效果的基础上调优,请参考下列说明修改配置文件: +以 `rec_french_lite_train` 为例: +``` +Global: + ... + # 添加自定义字典,如修改字典请将路径指向新字典 + character_dict_path: ./ppocr/utils/french_dict.txt + # 训练时添加数据增强 + distort: true + # 识别空格 + use_space_char: true + ... + # 修改reader类型 + reader_yml: ./configs/rec/multi_languages/rec_french_reader.yml + ... +... +``` + +同时需要修改数据读取文件 `rec_french_reader.yml`: + +``` +TrainReader: + ... + # 修改训练数据存放的目录名 + img_set_dir: ./train_data + # 修改 label 文件名称 + label_file_path: ./train_data/french_train.txt + +... +``` + ### 评估 评估数据集可以通过 `configs/rec/rec_icdar15_reader.yml` 修改EvalReader中的 `label_file_path` 设置。 @@ -233,8 +305,10 @@ export CUDA_VISIBLE_DEVICES=0 python3 tools/eval.py -c configs/rec/rec_icdar15_train.yml -o Global.checkpoints={path/to/weights}/best_accuracy ``` + ### 预测 + * 训练引擎的预测 使用 PaddleOCR 训练好的模型,可以通过以下脚本进行快速预测。 @@ -258,12 +332,12 @@ infer_img: doc/imgs_words/en/word_1.png word : joint ``` -预测使用的配置文件必须与训练一致,如您通过 `python3 tools/train.py -c configs/rec/rec_chinese_lite_train.yml` 完成了中文模型的训练, +预测使用的配置文件必须与训练一致,如您通过 `python3 tools/train.py -c configs/rec/ch_ppocr_v1.1/rec_chinese_lite_train_v1.1.yml` 完成了中文模型的训练, 您可以使用如下命令进行中文模型预测。 ``` # 预测中文结果 -python3 tools/infer_rec.py -c configs/rec/rec_chinese_lite_train.yml -o Global.checkpoints={path/to/weights}/best_accuracy Global.infer_img=doc/imgs_words/ch/word_1.jpg +python3 tools/infer_rec.py -c configs/rec/ch_ppocr_v1.1/rec_chinese_lite_train_v1.1.yml -o Global.checkpoints={path/to/weights}/best_accuracy Global.infer_img=doc/imgs_words/ch/word_1.jpg ``` 预测图片: diff --git a/doc/doc_ch/update.md b/doc/doc_ch/update.md index 017cd9473849fa8a6fbdef434e6876cc835717e9..091aa0bc0a107ae26c946dcb1279e6bcefd8210f 100644 --- a/doc/doc_ch/update.md +++ b/doc/doc_ch/update.md @@ -1,4 +1,5 @@ # 更新 +- 2020.9.22 更新PP-OCR技术文章,https://arxiv.org/abs/2009.09941 - 2020.9.19 更新超轻量压缩ppocr_mobile_slim系列模型,整体模型3.5M(详见[PP-OCR Pipline](#PP-OCR)),适合在移动端部署使用。[模型下载](#模型下载) - 2020.9.17 更新超轻量ppocr_mobile系列和通用ppocr_server系列中英文ocr模型,媲美商业效果。[模型下载](#模型下载) - 2020.8.26 更新OCR相关的84个常见问题及解答,具体参考[FAQ](./doc/doc_ch/FAQ.md) diff --git a/doc/doc_ch/visualization.md b/doc/doc_ch/visualization.md index fca075914feb6afd159c5ea6355d3c7bb6842233..cae846816cfdc40ac075ad83b9e5aafca2c3eaf7 100644 --- a/doc/doc_ch/visualization.md +++ b/doc/doc_ch/visualization.md @@ -1,19 +1,15 @@ # 效果展示 -- PP-OCR 1.1系列模型效果 - - [通用ppocr_server_1.1效果展示](#通用ppocr_server_1.1效果展示) - - [通用ppocr_mobile_1.1效果展示(待补充)]() -- PP-OCR 1.0系列模型效果 - - [超轻量ppocr_mobile_1.0效果展示](#超轻量ppocr_mobile_1.0效果展示) - - [通用ppocr_server_1.0效果展示](#通用ppocr_server_1.0效果展示) ## 通用ppocr_server_1.1效果展示
+ +
diff --git a/doc/doc_ch/whl.md b/doc/doc_ch/whl.md index 46796ce64a60f12db9bbfbdd7b16ff77238c1831..1b04a9a8a967f39516db0c0f1be3e3842a87278b 100644 --- a/doc/doc_ch/whl.md +++ b/doc/doc_ch/whl.md @@ -11,8 +11,8 @@ pip install paddleocr 本地构建并安装 ```bash -python setup.py bdist_wheel -pip install dist/paddleocr-x.x.x-py3-none-any.whl # x.x.x是paddleocr的版本号 +python3 setup.py bdist_wheel +pip3 install dist/paddleocr-x.x.x-py3-none-any.whl # x.x.x是paddleocr的版本号 ``` ### 1. 代码使用 @@ -20,7 +20,7 @@ pip install dist/paddleocr-x.x.x-py3-none-any.whl # x.x.x是paddleocr的版本 ```python from paddleocr import PaddleOCR, draw_ocr # Paddleocr目前支持中英文、英文、法语、德语、韩语、日语,可以通过修改lang参数进行切换 -# 参数依次为`zh`, `en`, `french`, `german`, `korean`, `japan`。 +# 参数依次为`ch`, `en`, `french`, `german`, `korean`, `japan`。 ocr = PaddleOCR(use_angle_cls=True, lang="ch") # need to run only once to download and load model into memory img_path = 'PaddleOCR/doc/imgs/11.jpg' result = ocr.ocr(img_path, cls=True) @@ -280,7 +280,7 @@ paddleocr --image_dir PaddleOCR/doc/imgs/11.jpg --det_model_dir {your_det_model_ | rec_algorithm | 使用的识别算法类型 | CRNN | | rec_model_dir | 识别模型所在文件夹。传参方式有两种,1. None: 自动下载内置模型到 `~/.paddleocr/rec`;2.自己转换好的inference模型路径,模型路径下必须包含model和params文件 | None | | rec_image_shape | 识别算法的输入图片尺寸 | "3,32,320" | -| rec_char_type | 识别算法的字符类型,中文(ch)或英文(en) | ch | +| rec_char_type | 识别算法的字符类型,中英文(ch)、英文(en)、法语(french)、德语(german)、韩语(korean)、日语(japan) | ch | | rec_batch_num | 进行识别时,同时前向的图片数 | 30 | | max_text_length | 识别算法能识别的最大文字长度 | 25 | | rec_char_dict_path | 识别模型字典路径,当rec_model_dir使用方式2传参时需要修改为自己的字典路径 | ./ppocr/utils/ppocr_keys_v1.txt | diff --git a/doc/doc_en/algorithm_overview_en.md b/doc/doc_en/algorithm_overview_en.md new file mode 100644 index 0000000000000000000000000000000000000000..2e21fd621971e062384a9323e79a8cf4498d7495 --- /dev/null +++ b/doc/doc_en/algorithm_overview_en.md @@ -0,0 +1,66 @@ + +## Algorithm introduction + +This tutorial lists the text detection algorithms and text recognition algorithms supported by PaddleOCR, as well as the models and metrics of each algorithm on **English public datasets**. It is mainly used for algorithm introduction and algorithm performance comparison. For more models on other datasets including Chinese, please refer to [PP-OCR v1.1 models list](./models_list_en.md). + + +- [1. Text Detection Algorithm](#TEXTDETECTIONALGORITHM) +- [2. Text Recognition Algorithm](#TEXTRECOGNITIONALGORITHM) + + +### 1. Text Detection Algorithm + +PaddleOCR open source text detection algorithms list: +- [x] EAST([paper](https://arxiv.org/abs/1704.03155)) +- [x] DB([paper](https://arxiv.org/abs/1911.08947)) +- [x] SAST([paper](https://arxiv.org/abs/1908.05498))(Baidu Self-Research) + +On the ICDAR2015 dataset, the text detection result is as follows: + +|Model|Backbone|precision|recall|Hmean|Download link| +|-|-|-|-|-|-| +|EAST|ResNet50_vd|88.18%|85.51%|86.82%|[Download link](https://paddleocr.bj.bcebos.com/det_r50_vd_east.tar)| +|EAST|MobileNetV3|81.67%|79.83%|80.74%|[Download link](https://paddleocr.bj.bcebos.com/det_mv3_east.tar)| +|DB|ResNet50_vd|83.79%|80.65%|82.19%|[Download link](https://paddleocr.bj.bcebos.com/det_r50_vd_db.tar)| +|DB|MobileNetV3|75.92%|73.18%|74.53%|[Download link](https://paddleocr.bj.bcebos.com/det_mv3_db.tar)| +|SAST|ResNet50_vd|92.18%|82.96%|87.33%|[Download link](https://paddleocr.bj.bcebos.com/SAST/sast_r50_vd_icdar2015.tar)| + +On Total-Text dataset, the text detection result is as follows: + +|Model|Backbone|precision|recall|Hmean|Download link| +|-|-|-|-|-|-| +|SAST|ResNet50_vd|88.74%|79.80%|84.03%|[Download link](https://paddleocr.bj.bcebos.com/SAST/sast_r50_vd_total_text.tar)| + +**Note:** Additional data, like icdar2013, icdar2017, COCO-Text, ArT, was added to the model training of SAST. Download English public dataset in organized format used by PaddleOCR from [Baidu Drive](https://pan.baidu.com/s/12cPnZcVuV1zn5DOd4mqjVw) (download code: 2bpi). + +For the training guide and use of PaddleOCR text detection algorithms, please refer to the document [Text detection model training/evaluation/prediction](./doc/doc_en/detection_en.md) + + +### 2. Text Recognition Algorithm + +PaddleOCR open-source text recognition algorithms list: +- [x] CRNN([paper](https://arxiv.org/abs/1507.05717)) +- [x] Rosetta([paper](https://arxiv.org/abs/1910.05085)) +- [x] STAR-Net([paper](http://www.bmva.org/bmvc/2016/papers/paper043/index.html)) +- [x] RARE([paper](https://arxiv.org/abs/1603.03915v1)) +- [x] SRN([paper](https://arxiv.org/abs/2003.12294))(Baidu Self-Research) + +Refer to [DTRB](https://arxiv.org/abs/1904.01906), the training and evaluation result of these above text recognition (using MJSynth and SynthText for training, evaluate on IIIT, SVT, IC03, IC13, IC15, SVTP, CUTE) is as follow: + +|Model|Backbone|Avg Accuracy|Module combination|Download link| +|-|-|-|-|-| +|Rosetta|Resnet34_vd|80.24%|rec_r34_vd_none_none_ctc|[Download link](https://paddleocr.bj.bcebos.com/rec_r34_vd_none_none_ctc.tar)| +|Rosetta|MobileNetV3|78.16%|rec_mv3_none_none_ctc|[Download link](https://paddleocr.bj.bcebos.com/rec_mv3_none_none_ctc.tar)| +|CRNN|Resnet34_vd|82.20%|rec_r34_vd_none_bilstm_ctc|[Download link](https://paddleocr.bj.bcebos.com/rec_r34_vd_none_bilstm_ctc.tar)| +|CRNN|MobileNetV3|79.37%|rec_mv3_none_bilstm_ctc|[Download link](https://paddleocr.bj.bcebos.com/rec_mv3_none_bilstm_ctc.tar)| +|STAR-Net|Resnet34_vd|83.93%|rec_r34_vd_tps_bilstm_ctc|[Download link](https://paddleocr.bj.bcebos.com/rec_r34_vd_tps_bilstm_ctc.tar)| +|STAR-Net|MobileNetV3|81.56%|rec_mv3_tps_bilstm_ctc|[Download link](https://paddleocr.bj.bcebos.com/rec_mv3_tps_bilstm_ctc.tar)| +|RARE|Resnet34_vd|84.90%|rec_r34_vd_tps_bilstm_attn|[Download link](https://paddleocr.bj.bcebos.com/rec_r34_vd_tps_bilstm_attn.tar)| +|RARE|MobileNetV3|83.32%|rec_mv3_tps_bilstm_attn|[Download link](https://paddleocr.bj.bcebos.com/rec_mv3_tps_bilstm_attn.tar)| +|SRN|Resnet50_vd_fpn|88.33%|rec_r50fpn_vd_none_srn|[Download link](https://paddleocr.bj.bcebos.com/SRN/rec_r50fpn_vd_none_srn.tar)| + +**Note:** SRN model uses data expansion method to expand the two training sets mentioned above, and the expanded data can be downloaded from [Baidu Drive](https://pan.baidu.com/s/1-HSZ-ZVdqBF2HaBZ5pRAKA) (download code: y3ry). + +The average accuracy of the two-stage training in the original paper is 89.74%, and that of one stage training in paddleocr is 88.33%. Both pre-trained weights can be downloaded [here](https://paddleocr.bj.bcebos.com/SRN/rec_r50fpn_vd_none_srn.tar). + +Please refer to the document for training guide and use of PaddleOCR text recognition algorithms [Text recognition model training/evaluation/prediction](./doc/doc_en/recognition_en.md) diff --git a/doc/doc_en/config_en.md b/doc/doc_en/config_en.md index b54def895f0758df7cdbd089253d6acd712d2b8e..722da6620fd03912c48a47679e7c13a23f15752e 100644 --- a/doc/doc_en/config_en.md +++ b/doc/doc_en/config_en.md @@ -10,7 +10,7 @@ The following list can be viewed via `--help` ## INTRODUCTION TO GLOBAL PARAMETERS OF CONFIGURATION FILE -Take `rec_chinese_lite_train.yml` as an example +Take `rec_chinese_lite_train_v1.1.yml` as an example | Parameter | Use | Default | Note | @@ -32,6 +32,7 @@ Take `rec_chinese_lite_train.yml` as an example | loss_type | Set loss type | ctc | Supports two types of loss: ctc / attention | | distort | Set use distort | false | Support distort type ,read [img_tools.py](https://github.com/PaddlePaddle/PaddleOCR/blob/develop/ppocr/data/rec/img_tools.py) | | use_space_char | Wether to recognize space | false | Only support in character_type=ch mode | + label_list | Set the angle supported by the direction classifier | ['0','180'] | Only valid in the direction classifier | | reader_yml | Set the reader configuration file | ./configs/rec/rec_icdar15_reader.yml | \ | | pretrain_weights | Load pre-trained model path | ./pretrain_models/CRNN/best_accuracy | \ | | checkpoints | Load saved model path | None | Used to load saved parameters to continue training after interruption | diff --git a/doc/doc_en/detection_en.md b/doc/doc_en/detection_en.md index 401d7a9ad479716a6d6694ca1f432a2c934def88..96928364486c3aa122806ad5144681dfde785556 100644 --- a/doc/doc_en/detection_en.md +++ b/doc/doc_en/detection_en.md @@ -38,12 +38,14 @@ If you want to train PaddleOCR on other datasets, please build the annotation fi ## TRAINING -First download the pretrained model. The detection model of PaddleOCR currently supports two backbones, namely MobileNetV3 and ResNet50_vd. You can use the model in [PaddleClas](https://github.com/PaddlePaddle/PaddleClas/tree/master/ppcls/modeling/architectures) to replace backbone according to your needs. +First download the pretrained model. The detection model of PaddleOCR currently supports 3 backbones, namely MobileNetV3, ResNet18_vd and ResNet50_vd. You can use the model in [PaddleClas](https://github.com/PaddlePaddle/PaddleClas/tree/master/ppcls/modeling/architectures) to replace backbone according to your needs. ```shell cd PaddleOCR/ # Download the pre-trained model of MobileNetV3 wget -P ./pretrain_models/ https://paddle-imagenet-models-name.bj.bcebos.com/MobileNetV3_large_x0_5_pretrained.tar -# Download the pre-trained model of ResNet50 +# or, download the pre-trained model of ResNet18_vd +wget -P ./pretrain_models/ https://paddle-imagenet-models-name.bj.bcebos.com/ResNet18_vd_pretrained.tar +# or, download the pre-trained model of ResNet50_vd wget -P ./pretrain_models/ https://paddle-imagenet-models-name.bj.bcebos.com/ResNet50_vd_ssld_pretrained.tar # decompressing the pre-training model file, take MobileNetV3 as an example @@ -62,7 +64,7 @@ tar -xf ./pretrain_models/MobileNetV3_large_x0_5_pretrained.tar ./pretrain_model #### START TRAINING *If CPU version installed, please set the parameter `use_gpu` to `false` in the configuration.* ```shell -python3 tools/train.py -c configs/det/det_mv3_db.yml 2>&1 | tee train_det.log +python3 tools/train.py -c configs/det/det_mv3_db_v1.1.yml 2>&1 | tee train_det.log ``` In the above instruction, use `-c` to select the training to use the `configs/det/det_db_mv3.yml` configuration file. @@ -70,7 +72,7 @@ For a detailed explanation of the configuration file, please refer to [config](. You can also use `-o` to change the training parameters without modifying the yml file. For example, adjust the training learning rate to 0.0001 ```shell -python3 tools/train.py -c configs/det/det_mv3_db.yml -o Optimizer.base_lr=0.0001 +python3 tools/train.py -c configs/det/det_mv3_db_v1.1.yml -o Optimizer.base_lr=0.0001 ``` #### load trained model and continue training @@ -78,7 +80,7 @@ If you expect to load trained model and continue the training again, you can spe For example: ```shell -python3 tools/train.py -c configs/det/det_mv3_db.yml -o Global.checkpoints=./your/trained/model +python3 tools/train.py -c configs/det/det_mv3_db_v1.1.yml -o Global.checkpoints=./your/trained/model ``` **Note**: The priority of `Global.checkpoints` is higher than that of `Global.pretrain_weights`, that is, when two parameters are specified at the same time, the model specified by `Global.checkpoints` will be loaded first. If the model path specified by `Global.checkpoints` is wrong, the one specified by `Global.pretrain_weights` will be loaded. @@ -88,18 +90,18 @@ python3 tools/train.py -c configs/det/det_mv3_db.yml -o Global.checkpoints=./you PaddleOCR calculates three indicators for evaluating performance of OCR detection task: Precision, Recall, and Hmean. -Run the following code to calculate the evaluation indicators. The result will be saved in the test result file specified by `save_res_path` in the configuration file `det_db_mv3.yml` +Run the following code to calculate the evaluation indicators. The result will be saved in the test result file specified by `save_res_path` in the configuration file `det_db_mv3_v1.1.yml` When evaluating, set post-processing parameters `box_thresh=0.6`, `unclip_ratio=1.5`. If you use different datasets, different models for training, these two parameters should be adjusted for better result. ```shell -python3 tools/eval.py -c configs/det/det_mv3_db.yml -o Global.checkpoints="{path/to/weights}/best_accuracy" PostProcess.box_thresh=0.6 PostProcess.unclip_ratio=1.5 +python3 tools/eval.py -c configs/det/det_mv3_db_v1.1.yml -o Global.checkpoints="{path/to/weights}/best_accuracy" PostProcess.box_thresh=0.6 PostProcess.unclip_ratio=1.5 ``` The model parameters during training are saved in the `Global.save_model_dir` directory by default. When evaluating indicators, you need to set `Global.checkpoints` to point to the saved parameter file. Such as: ```shell -python3 tools/eval.py -c configs/det/det_mv3_db.yml -o Global.checkpoints="./output/det_db/best_accuracy" PostProcess.box_thresh=0.6 PostProcess.unclip_ratio=1.5 +python3 tools/eval.py -c configs/det/det_mv3_db_v1.1.yml -o Global.checkpoints="./output/det_db/best_accuracy" PostProcess.box_thresh=0.6 PostProcess.unclip_ratio=1.5 ``` * Note: `box_thresh` and `unclip_ratio` are parameters required for DB post-processing, and not need to be set when evaluating the EAST model. @@ -108,16 +110,16 @@ python3 tools/eval.py -c configs/det/det_mv3_db.yml -o Global.checkpoints="./ou Test the detection result on a single image: ```shell -python3 tools/infer_det.py -c configs/det/det_mv3_db.yml -o TestReader.infer_img="./doc/imgs_en/img_10.jpg" Global.checkpoints="./output/det_db/best_accuracy" +python3 tools/infer_det.py -c configs/det/det_mv3_db_v1.1.yml -o TestReader.infer_img="./doc/imgs_en/img_10.jpg" Global.checkpoints="./output/det_db/best_accuracy" ``` When testing the DB model, adjust the post-processing threshold: ```shell -python3 tools/infer_det.py -c configs/det/det_mv3_db.yml -o TestReader.infer_img="./doc/imgs_en/img_10.jpg" Global.checkpoints="./output/det_db/best_accuracy" PostProcess.box_thresh=0.6 PostProcess.unclip_ratio=1.5 +python3 tools/infer_det.py -c configs/det/det_mv3_db_v1.1.yml -o TestReader.infer_img="./doc/imgs_en/img_10.jpg" Global.checkpoints="./output/det_db/best_accuracy" PostProcess.box_thresh=0.6 PostProcess.unclip_ratio=1.5 ``` Test the detection result on all images in the folder: ```shell -python3 tools/infer_det.py -c configs/det/det_mv3_db.yml -o TestReader.infer_img="./doc/imgs_en/" Global.checkpoints="./output/det_db/best_accuracy" +python3 tools/infer_det.py -c configs/det/det_mv3_db_v1.1.yml -o TestReader.infer_img="./doc/imgs_en/" Global.checkpoints="./output/det_db/best_accuracy" ``` diff --git a/doc/doc_en/inference_en.md b/doc/doc_en/inference_en.md index db064f03e565b4fa3de3409d4a17459c636eae70..868d579369a7d78a419b978895f4244ae00acc7d 100644 --- a/doc/doc_en/inference_en.md +++ b/doc/doc_en/inference_en.md @@ -5,7 +5,7 @@ The inference model (the model saved by `fluid.io.save_inference_model`) is gene The model saved during the training process is the checkpoints model, which saves the parameters of the model and is mostly used to resume training. -Compared with the checkpoints model, the inference model will additionally save the structural information of the model. It has superior performance in predicting in deployment and accelerating inferencing, is flexible and convenient, and is suitable for integration with actual systems. For more details, please refer to the document [Classification Framework](https://paddleclas.readthedocs.io/zh_CN/latest/extension/paddle_inference.html). +Compared with the checkpoints model, the inference model will additionally save the structural information of the model. It has superior performance in predicting in deployment and accelerating inferencing, is flexible and convenient, and is suitable for integration with actual systems. For more details, please refer to the document [Classification Framework](https://github.com/PaddlePaddle/PaddleClas/blob/master/docs/zh_CN/extension/paddle_inference.md). Next, we first introduce how to convert a trained model into an inference model, and then we will introduce text detection, text recognition, and the concatenation of them based on inference model. @@ -20,13 +20,16 @@ Next, we first introduce how to convert a trained model into an inference model, - [2. DB TEXT DETECTION MODEL INFERENCE](#DB_DETECTION) - [3. EAST TEXT DETECTION MODEL INFERENCE](#EAST_DETECTION) - [4. SAST TEXT DETECTION MODEL INFERENCE](#SAST_DETECTION) + - [5. Multilingual model inference](#Multilingual model inference) - [TEXT RECOGNITION MODEL INFERENCE](#RECOGNITION_MODEL_INFERENCE) - [1. LIGHTWEIGHT CHINESE MODEL](#LIGHTWEIGHT_RECOGNITION) - [2. CTC-BASED TEXT RECOGNITION MODEL INFERENCE](#CTC-BASED_RECOGNITION) - [3. ATTENTION-BASED TEXT RECOGNITION MODEL INFERENCE](#ATTENTION-BASED_RECOGNITION) - - [4. TEXT RECOGNITION MODEL INFERENCE USING CUSTOM CHARACTERS DICTIONARY](#USING_CUSTOM_CHARACTERS) - + - [4. SRN-BASED TEXT RECOGNITION MODEL INFERENCE](#SRN-BASED_RECOGNITION) + - [5. TEXT RECOGNITION MODEL INFERENCE USING CUSTOM CHARACTERS DICTIONARY](#USING_CUSTOM_CHARACTERS) + - [6. MULTILINGUAL MODEL INFERENCE](MULTILINGUAL_MODEL_INFERENCE) + - [ANGLE CLASSIFICATION MODEL INFERENCE](#ANGLE_CLASS_MODEL_INFERENCE) - [1. ANGLE CLASSIFICATION MODEL INFERENCE](#ANGLE_CLASS_MODEL_INFERENCE) @@ -41,8 +44,9 @@ Next, we first introduce how to convert a trained model into an inference model, Download the lightweight Chinese detection model: ``` -wget -P ./ch_lite/ https://paddleocr.bj.bcebos.com/ch_models/ch_det_mv3_db.tar && tar xf ./ch_lite/ch_det_mv3_db.tar -C ./ch_lite/ +wget -P ./ch_lite/ https://paddleocr.bj.bcebos.com/20-09-22/mobile/det/ch_ppocr_mobile_v1.1_det_train.tar && tar xf ./ch_lite/ch_ppocr_mobile_v1.1_det_train.tar -C ./ch_lite/ ``` + The above model is a DB algorithm trained with MobileNetV3 as the backbone. To convert the trained model into an inference model, just run the following command: ``` # -c Set the training algorithm yml configuration file @@ -50,9 +54,9 @@ The above model is a DB algorithm trained with MobileNetV3 as the backbone. To c # Global.checkpoints parameter Set the training model address to be converted without adding the file suffix .pdmodel, .pdopt or .pdparams. # Global.save_inference_dir Set the address where the converted model will be saved. -python3 tools/export_model.py -c configs/det/det_mv3_db.yml -o Global.checkpoints=./ch_lite/det_mv3_db/best_accuracy \ - Global.save_inference_dir=./inference/det_db/ +python3 tools/export_model.py -c configs/det/det_mv3_db_v1.1.yml -o Global.checkpoints=./ch_lite/ch_ppocr_mobile_v1.1_det_train/best_accuracy Global.save_inference_dir=./inference/det_db/ ``` + When converting to an inference model, the configuration file used is the same as the configuration file used during training. In addition, you also need to set the `Global.checkpoints` and `Global.save_inference_dir` parameters in the configuration file. `Global.checkpoints` points to the model parameter file saved during training, and `Global.save_inference_dir` is the directory where the generated inference model is saved. After the conversion is successful, there are two files in the `save_inference_dir` directory: @@ -67,7 +71,7 @@ inference/det_db/ Download the lightweight Chinese recognition model: ``` -wget -P ./ch_lite/ https://paddleocr.bj.bcebos.com/ch_models/ch_rec_mv3_crnn.tar && tar xf ./ch_lite/ch_rec_mv3_crnn.tar -C ./ch_lite/ +wget -P ./ch_lite/ https://paddleocr.bj.bcebos.com/20-09-22/mobile/rec/ch_ppocr_mobile_v1.1_rec_train.tar && tar xf ch_ppocr_mobile_v1.1_rec_train.tar -C ./ch_lite/ ``` The recognition model is converted to the inference model in the same way as the detection, as follows: @@ -77,8 +81,7 @@ The recognition model is converted to the inference model in the same way as the # Global.checkpoints parameter Set the training model address to be converted without adding the file suffix .pdmodel, .pdopt or .pdparams. # Global.save_inference_dir Set the address where the converted model will be saved. -python3 tools/export_model.py -c configs/rec/rec_chinese_lite_train.yml -o Global.checkpoints=./ch_lite/rec_mv3_crnn/best_accuracy \ - Global.save_inference_dir=./inference/rec_crnn/ +python3 tools/export_model.py -c configs/rec/ch_ppocr_v1.1/rec_chinese_lite_train_v1.1.yml -o Global.checkpoints=./ch_lite/ch_ppocr_mobile_v1.1_rec_train/best_accuracy \ ``` If you have a model trained on your own dataset with a different dictionary file, please make sure that you modify the `character_dict_path` in the configuration file to your dictionary file path. @@ -298,14 +301,46 @@ self.character_str = "0123456789abcdefghijklmnopqrstuvwxyz" dict_character = list(self.character_str) ``` + +### 4. SRN-BASED TEXT RECOGNITION MODEL INFERENCE + +The recognition model based on SRN requires additional setting of the recognition algorithm parameter --rec_algorithm="SRN". +At the same time, it is necessary to ensure that the predicted shape is consistent with the training, such as: --rec_image_shape="1, 64, 256" + +``` +python3 tools/infer/predict_rec.py --image_dir="./doc/imgs_words_en/word_336.png" \ + --rec_model_dir="./inference/srn/" \ + --rec_image_shape="1, 64, 256" \ + --rec_char_type="en" \ + --rec_algorithm="SRN" +``` + + -### 4. TEXT RECOGNITION MODEL INFERENCE USING CUSTOM CHARACTERS DICTIONARY +### 5. TEXT RECOGNITION MODEL INFERENCE USING CUSTOM CHARACTERS DICTIONARY If the chars dictionary is modified during training, you need to specify the new dictionary path by setting the parameter `rec_char_dict_path` when using your inference model to predict. ``` python3 tools/infer/predict_rec.py --image_dir="./doc/imgs_words_en/word_336.png" --rec_model_dir="./your inference model" --rec_image_shape="3, 32, 100" --rec_char_type="en" --rec_char_dict_path="your text dict path" ``` + +### 6. MULTILINGAUL MODEL INFERENCE +If you need to predict other language models, when using inference model prediction, you need to specify the dictionary path used by `--rec_char_dict_path`. At the same time, in order to get the correct visualization results, +You need to specify the visual font path through `--vis_font_path`. There are small language fonts provided by default under the `doc/` path, such as Korean recognition: + +``` +python3 tools/infer/predict_rec.py --image_dir="./doc/imgs_words/korean/1.jpg" --rec_model_dir="./your inference model" --rec_char_type="korean" --rec_char_dict_path="ppocr/ utils/korean_dict.txt" --vis_font_path="doc/korean.ttf" +``` +![](../imgs_words/korean/1.jpg) + +After executing the command, the prediction result of the above figure is: + +``` text +2020-09-19 16:15:05,076-INFO: index: [205 206 38 39] +2020-09-19 16:15:05,077-INFO: word : 바탕으로 +2020-09-19 16:15:05,077-INFO: score: 0.9171358942985535 +``` ## ANGLE CLASSIFICATION MODEL INFERENCE @@ -338,7 +373,11 @@ Predicts of ./doc/imgs_words/ch/word_4.jpg:['0', 0.9999963] When performing prediction, you need to specify the path of a single image or a folder of images through the parameter `image_dir`, the parameter `det_model_dir` specifies the path to detect the inference model, the parameter `cls_model_dir` specifies the path to angle classification inference model and the parameter `rec_model_dir` specifies the path to identify the inference model. The parameter `use_angle_cls` is used to control whether to enable the angle classification model.The visualized recognition results are saved to the `./inference_results` folder by default. ``` -python3 tools/infer/predict_system.py --image_dir="./doc/imgs/2.jpg" --det_model_dir="./inference/det_db/" --cls_model_dir="./inference/cls/" --rec_model_dir="./inference/rec_crnn/" --use_angle_cls true +# use direction classifier +python3 tools/infer/predict_system.py --image_dir="./doc/imgs/2.jpg" --det_model_dir="./inference/det_db/" --cls_model_dir="./inference/cls/" --rec_model_dir="./inference/rec_crnn/" --use_angle_cls=true + +# not use use direction classifier +python3 tools/infer/predict_system.py --image_dir="./doc/imgs/2.jpg" --det_model_dir="./inference/det_db/" --rec_model_dir="./inference/rec_crnn/" ``` After executing the command, the recognition result image is as follows: diff --git a/doc/doc_en/installation_en.md b/doc/doc_en/installation_en.md index b62d9b298dcb6f1757cb1a522565fb4c19484d6d..7608e12d979e9f26d58a8f0504d3740e9cf67014 100644 --- a/doc/doc_en/installation_en.md +++ b/doc/doc_en/installation_en.md @@ -3,7 +3,7 @@ After testing, paddleocr can run on glibc 2.23. You can also test other glibc versions or install glic 2.23 for the best compatibility. PaddleOCR working environment: -- PaddlePaddle1.7 +- PaddlePaddle1.8+, Recommend PaddlePaddle 2.0.0.beta - python3.7 - glibc 2.23 @@ -49,18 +49,15 @@ docker images hub.baidubce.com/paddlepaddle/paddle latest-gpu-cuda9.0-cudnn7-dev f56310dcc829 ``` -**2. Install PaddlePaddle Fluid v1.7 (the higher version is not supported yet, the adaptation work is in progress)** +**2. Install PaddlePaddle Fluid v2.0 ** ``` pip3 install --upgrade pip -# If you have cuda9 installed on your machine, please run the following command to install -python3 -m pip install paddlepaddle-gpu==1.7.2.post97 -i https://pypi.tuna.tsinghua.edu.cn/simple - -# If you have cuda10 installed on your machine, please run the following command to install -python3 -m pip install paddlepaddle-gpu==1.7.2.post107 -i https://pypi.tuna.tsinghua.edu.cn/simple +# If you have cuda9 or cuda10 installed on your machine, please run the following command to install +python3 -m pip install paddlepaddle-gpu==2.0.0b0 -i https://mirror.baidu.com/pypi/simple # If you only have cpu on your machine, please run the following command to install -python3 -m pip install paddlepaddle==1.7.2 -i https://pypi.tuna.tsinghua.edu.cn/simple +python3 -m pip install paddlepaddle==2.0.0b0 -i https://mirror.baidu.com/pypi/simple ``` For more software version requirements, please refer to the instructions in [Installation Document](https://www.paddlepaddle.org.cn/install/quick) for operation. diff --git a/doc/doc_en/models_list_en.md b/doc/doc_en/models_list_en.md index 71878ac32bc116448de6d74888bbce59dbb0bb05..3017ed85d9f978241a38ddca0610311c268436e1 100644 --- a/doc/doc_en/models_list_en.md +++ b/doc/doc_en/models_list_en.md @@ -18,11 +18,11 @@ The downloadable models provided by PaddleOCR include `inference model`, `traine ### 1. Text Detection Model -|model name|description|model size|download| -|-|-|-|-| -|ch_ppocr_mobile_slim_v1.1_det|Slim pruned lightweight model, supporting Chinese, English, multilingual text detection|1.4M|[inference model](https://paddleocr.bj.bcebos.com/20-09-22/mobile-slim/det/ch_ppocr_mobile_v1.1_det_prune_infer.tar) / [slim model](https://paddleocr.bj.bcebos.com/20-09-22/mobile-slim/det/ch_ppocr_mobile_v1.1_det_prune_opt.nb)| -|ch_ppocr_mobile_v1.1_det|Original lightweight model, supporting Chinese, English, multilingual text detection|2.6M|[inference model](https://paddleocr.bj.bcebos.com/20-09-22/mobile/det/ch_ppocr_mobile_v1.1_det_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/20-09-22/mobile/det/ch_ppocr_mobile_v1.1_det_train.tar)| -|ch_ppocr_server_v1.1_det|General model, which is larger than the lightweight model, but achieved better performance|47.2M|[inference model](https://paddleocr.bj.bcebos.com/20-09-22/server/det/ch_ppocr_server_v1.1_det_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/20-09-22/server/det/ch_ppocr_server_v1.1_det_train.tar)| +|model name|description|config|model size|download| +|-|-|-|-|-| +|ch_ppocr_mobile_slim_v1.1_det|Slim pruned lightweight model, supporting Chinese, English, multilingual text detection|[det_mv3_db_v1.1.yml](../../configs/det/det_mv3_db_v1.1.yml)|1.4M|[inference model](https://paddleocr.bj.bcebos.com/20-09-22/mobile-slim/det/ch_ppocr_mobile_v1.1_det_prune_infer.tar) / [slim model](https://paddleocr.bj.bcebos.com/20-09-22/mobile-slim/det/ch_ppocr_mobile_v1.1_det_prune_opt.nb)| +|ch_ppocr_mobile_v1.1_det|Original lightweight model, supporting Chinese, English, multilingual text detection|[det_mv3_db_v1.1.yml](../../configs/det/det_mv3_db_v1.1.yml)|2.6M|[inference model](https://paddleocr.bj.bcebos.com/20-09-22/mobile/det/ch_ppocr_mobile_v1.1_det_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/20-09-22/mobile/det/ch_ppocr_mobile_v1.1_det_train.tar)| +|ch_ppocr_server_v1.1_det|General model, which is larger than the lightweight model, but achieved better performance|[det_r18_vd_db_v1.1.yml](../../configs/det/det_r18_vd_db_v1.1.yml)|47.2M|[inference model](https://paddleocr.bj.bcebos.com/20-09-22/server/det/ch_ppocr_server_v1.1_det_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/20-09-22/server/det/ch_ppocr_server_v1.1_det_train.tar)| @@ -30,41 +30,41 @@ The downloadable models provided by PaddleOCR include `inference model`, `traine #### Chinese Recognition Model -|model name|description|model size|download| -|-|-|-|-| -|ch_ppocr_mobile_slim_v1.1_rec|Slim pruned and quantized lightweight model, supporting Chinese, English and number recognition|1.6M|[inference model](https://paddleocr.bj.bcebos.com/20-09-22/mobile-slim/rec/ch_ppocr_mobile_v1.1_rec_quant_infer.tar) / [slim model](https://paddleocr.bj.bcebos.com/20-09-22/mobile-slim/rec/ch_ppocr_mobile_v1.1_rec_quant_opt.nb)| -|ch_ppocr_mobile_v1.1_rec|Original lightweight model, supporting Chinese, English and number recognition|4.6M|[inference model](https://paddleocr.bj.bcebos.com/20-09-22/mobile/rec/ch_ppocr_mobile_v1.1_rec_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/20-09-22/mobile/rec/ch_ppocr_mobile_v1.1_rec_train.tar) / [pre-trained model](https://paddleocr.bj.bcebos.com/20-09-22/mobile/rec/ch_ppocr_mobile_v1.1_rec_pre.tar)| -|ch_ppocr_server_v1.1_rec|General model, supporting Chinese, English and number recognition|105M|[inference model](https://paddleocr.bj.bcebos.com/20-09-22/server/rec/ch_ppocr_server_v1.1_rec_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/20-09-22/server/rec/ch_ppocr_server_v1.1_rec_train.tar) / [pre-trained model](https://paddleocr.bj.bcebos.com/20-09-22/server/rec/ch_ppocr_server_v1.1_rec_pre.tar)| +|model name|description|config|model size|download| +|-|-|-|-|-| +|ch_ppocr_mobile_slim_v1.1_rec|Slim pruned and quantized lightweight model, supporting Chinese, English and number recognition|[rec_chinese_lite_train_v1.1.yml](../../configs/rec/ch_ppocr_v1.1/rec_chinese_lite_train_v1.1.yml)|1.6M|[inference model](https://paddleocr.bj.bcebos.com/20-09-22/mobile-slim/rec/ch_ppocr_mobile_v1.1_rec_quant_infer.tar) / [slim model](https://paddleocr.bj.bcebos.com/20-09-22/mobile-slim/rec/ch_ppocr_mobile_v1.1_rec_quant_opt.nb) | +|ch_ppocr_mobile_v1.1_rec|Original lightweight model, supporting Chinese, English and number recognition|[rec_chinese_lite_train_v1.1.yml](../../configs/rec/ch_ppocr_v1.1/rec_chinese_lite_train_v1.1.yml)|4.6M|[inference model](https://paddleocr.bj.bcebos.com/20-09-22/mobile/rec/ch_ppocr_mobile_v1.1_rec_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/20-09-22/mobile/rec/ch_ppocr_mobile_v1.1_rec_train.tar) / [pre-trained model](https://paddleocr.bj.bcebos.com/20-09-22/mobile/rec/ch_ppocr_mobile_v1.1_rec_pre.tar) | +|ch_ppocr_server_v1.1_rec|General model, supporting Chinese, English and number recognition|[rec_chinese_common_train_v1.1.yml](../../configs/rec/ch_ppocr_v1.1/rec_chinese_common_train_v1.1.yml)|105M|[inference model](https://paddleocr.bj.bcebos.com/20-09-22/server/rec/ch_ppocr_server_v1.1_rec_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/20-09-22/server/rec/ch_ppocr_server_v1.1_rec_train.tar) / [pre-trained model](https://paddleocr.bj.bcebos.com/20-09-22/server/rec/ch_ppocr_server_v1.1_rec_pre.tar) | **Note:** The `trained model` is finetuned on the `pre-trained model` with real data and synthsized vertical text data, which achieved better performance in real scene. The `pre-trained model` is directly trained on the full amount of real data and synthsized data, which is more suitable for finetune on your own dataset. #### English Recognition Model -|model name|description|model size|download| -|-|-|-|-| -|en_ppocr_mobile_slim_v1.1_rec|Slim pruned and quantized lightweight model, supporting English and number recognition|0.9M|[inference model](https://paddleocr.bj.bcebos.com/20-09-22/mobile-slim/en/en_ppocr_mobile_v1.1_rec_quant_infer.tar) / [slim model](https://paddleocr.bj.bcebos.com/20-09-22/mobile-slim/en/en_ppocr_mobile_v1.1_rec_quant_opt.nb)| -|en_ppocr_mobile_v1.1_rec|Original lightweight model, supporting English and number recognition|2.0M|[inference model](https://paddleocr.bj.bcebos.com/20-09-22/mobile/en/en_ppocr_mobile_v1.1_rec_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/20-09-22/mobile/en/en_ppocr_mobile_v1.1_rec_train.tar)| +|model name|description|config|model size|download| +|-|-|-|-|-| +|en_ppocr_mobile_slim_v1.1_rec|Slim pruned and quantized lightweight model, supporting English and number recognition|[rec_en_lite_train.yml](../../configs/rec/multi_languages/rec_en_lite_train.yml)|0.9M|[inference model](https://paddleocr.bj.bcebos.com/20-09-22/mobile-slim/en/en_ppocr_mobile_v1.1_rec_quant_infer.tar) / [slim model](https://paddleocr.bj.bcebos.com/20-09-22/mobile-slim/en/en_ppocr_mobile_v1.1_rec_quant_opt.nb) | +|en_ppocr_mobile_v1.1_rec|Original lightweight model, supporting English and number recognition|[rec_en_lite_train.yml](../../configs/rec/multi_languages/rec_en_lite_train.yml)|2.0M|[inference model](https://paddleocr.bj.bcebos.com/20-09-22/mobile/en/en_ppocr_mobile_v1.1_rec_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/20-09-22/mobile/en/en_ppocr_mobile_v1.1_rec_train.tar) | #### Multilingual Recognition Model(Updating...) -|model name|description|model size|download| -|-|-|-|-| -| french_ppocr_mobile_v1.1_rec |Lightweight model for French recognition|2.1M|[inference model](https://paddleocr.bj.bcebos.com/20-09-22/mobile/fr/french_ppocr_mobile_v1.1_rec_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/20-09-22/mobile/fr/french_ppocr_mobile_v1.1_rec_train.tar)| -| german_ppocr_mobile_v1.1_rec |German model for French recognition|2.1M|[inference model](https://paddleocr.bj.bcebos.com/20-09-22/mobile/ge/german_ppocr_mobile_v1.1_rec_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/20-09-22/mobile/ge/german_ppocr_mobile_v1.1_rec_train.tar)| -| korean_ppocr_mobile_v1.1_rec |Lightweight model for Korean recognition|3.4M|[inference model](https://paddleocr.bj.bcebos.com/20-09-22/mobile/kr/korean_ppocr_mobile_v1.1_rec_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/20-09-22/mobile/kr/korean_ppocr_mobile_v1.1_rec_train.tar)| -| japan_ppocr_mobile_v1.1_rec |Lightweight model for Japanese recognition|3.7M|[inference model](https://paddleocr.bj.bcebos.com/20-09-22/mobile/jp/japan_ppocr_mobile_v1.1_rec_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/20-09-22/mobile/jp/japan_ppocr_mobile_v1.1_rec_train.tar)| +|model name|description|config|model size|download| +|-|-|-|-|-| +| french_ppocr_mobile_v1.1_rec |Lightweight model for French recognition|[rec_french_lite_train.yml](../../configs/rec/multi_languages/rec_french_lite_train.yml)|2.1M|[inference model](https://paddleocr.bj.bcebos.com/20-09-22/mobile/fr/french_ppocr_mobile_v1.1_rec_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/20-09-22/mobile/fr/french_ppocr_mobile_v1.1_rec_train.tar) | +| german_ppocr_mobile_v1.1_rec |German model for French recognition|[rec_ger_lite_train.yml](../../configs/rec/multi_languages/rec_ger_lite_train.yml)|2.1M|[inference model](https://paddleocr.bj.bcebos.com/20-09-22/mobile/ge/german_ppocr_mobile_v1.1_rec_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/20-09-22/mobile/ge/german_ppocr_mobile_v1.1_rec_train.tar) | +| korean_ppocr_mobile_v1.1_rec |Lightweight model for Korean recognition|[rec_korean_lite_train.yml](../../configs/rec/multi_languages/rec_korean_lite_train.yml)|3.4M|[inference model](https://paddleocr.bj.bcebos.com/20-09-22/mobile/kr/korean_ppocr_mobile_v1.1_rec_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/20-09-22/mobile/kr/korean_ppocr_mobile_v1.1_rec_train.tar) | +| japan_ppocr_mobile_v1.1_rec |Lightweight model for Japanese recognition|[rec_japan_lite_train.yml](../../configs/rec/multi_languages/rec_japan_lite_train.yml)|3.7M|[inference model](https://paddleocr.bj.bcebos.com/20-09-22/mobile/jp/japan_ppocr_mobile_v1.1_rec_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/20-09-22/mobile/jp/japan_ppocr_mobile_v1.1_rec_train.tar) | ### 3. Text Angle Classification Model -|model name|description|model size|download| -|-|-|-|-| -|ch_ppocr_mobile_v1.1_cls_quant|Slim quantized model|0.5M|[inference model](https://paddleocr.bj.bcebos.com/20-09-22/cls/ch_ppocr_mobile_v1.1_cls_quant_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/20-09-22/cls/ch_ppocr_mobile_v1.1_cls_quant_train.tar) / [slim model]()| -|ch_ppocr_mobile_v1.1_cls|Original model|850kb|[inference model](https://paddleocr.bj.bcebos.com/20-09-22/cls/ch_ppocr_mobile_v1.1_cls_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/20-09-22/cls/ch_ppocr_mobile_v1.1_cls_train.tar)| +|model name|description|config|model size|download| +|-|-|-|-|-| +|ch_ppocr_mobile_v1.1_cls_quant|Slim quantized model|[cls_mv3.yml](../../configs/cls/cls_mv3.yml)|0.5M|[inference model](https://paddleocr.bj.bcebos.com/20-09-22/cls/ch_ppocr_mobile_v1.1_cls_quant_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/20-09-22/cls/ch_ppocr_mobile_v1.1_cls_quant_train.tar) / [slim model](https://paddleocr.bj.bcebos.com/20-09-22/cls/ch_ppocr_mobile_cls_quant_opt.nb) | +|ch_ppocr_mobile_v1.1_cls|Original model|[cls_mv3.yml](../../configs/cls/cls_mv3.yml)|850kb|[inference model](https://paddleocr.bj.bcebos.com/20-09-22/cls/ch_ppocr_mobile_v1.1_cls_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/20-09-22/cls/ch_ppocr_mobile_v1.1_cls_train.tar) | ## OCR model list(V1.0, updated on 7.16) |model name|description|detection model|recognition model|recognition model supporting space recognition| |-|-|-|-|-| -|chinese_db_crnn_mobile|8.6M lightweight OCR model|[inference model](https://paddleocr.bj.bcebos.com/ch_models/ch_det_mv3_db_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/ch_models/ch_det_mv3_db.tar)|[inference model](https://paddleocr.bj.bcebos.com/ch_models/ch_rec_mv3_crnn_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/ch_models/ch_rec_mv3_crnn.tar)|[inference model](https://paddleocr.bj.bcebos.com/ch_models/ch_rec_mv3_crnn_enhance_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/ch_models/ch_rec_mv3_crnn_enhance.tar) -|chinese_db_crnn_server|General OCR model|[inference model](https://paddleocr.bj.bcebos.com/ch_models/ch_det_r50_vd_db_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/ch_models/ch_det_r50_vd_db.tar)|[inference model](https://paddleocr.bj.bcebos.com/ch_models/ch_rec_r34_vd_crnn_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/ch_models/ch_rec_r34_vd_crnn.tar)|[inference model](https://paddleocr.bj.bcebos.com/ch_models/ch_rec_r34_vd_crnn_enhance_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/ch_models/ch_rec_r34_vd_crnn_enhance.tar) +|chinese_db_crnn_mobile|8.6M lightweight OCR model|[inference model](https://paddleocr.bj.bcebos.com/ch_models/ch_det_mv3_db_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/ch_models/ch_det_mv3_db.tar) | [inference model](https://paddleocr.bj.bcebos.com/ch_models/ch_rec_mv3_crnn_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/ch_models/ch_rec_mv3_crnn.tar) |[inference model](https://paddleocr.bj.bcebos.com/ch_models/ch_rec_mv3_crnn_enhance_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/ch_models/ch_rec_mv3_crnn_enhance.tar) +|chinese_db_crnn_server|General OCR model|[inference model](https://paddleocr.bj.bcebos.com/ch_models/ch_det_r50_vd_db_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/ch_models/ch_det_r50_vd_db.tar) | [inference model](https://paddleocr.bj.bcebos.com/ch_models/ch_rec_r34_vd_crnn_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/ch_models/ch_rec_r34_vd_crnn.tar) |[inference model](https://paddleocr.bj.bcebos.com/ch_models/ch_rec_r34_vd_crnn_enhance_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/ch_models/ch_rec_r34_vd_crnn_enhance.tar) diff --git a/doc/doc_en/quickstart_en.md b/doc/doc_en/quickstart_en.md index d1fa1683fcfea14be477c910fb2a8dc7709c5d36..b7c1f6dfd4c401827f468169711d9b0a8a499133 100644 --- a/doc/doc_en/quickstart_en.md +++ b/doc/doc_en/quickstart_en.md @@ -5,16 +5,19 @@ Please refer to [quick installation](./installation_en.md) to configure the PaddleOCR operating environment. -*Note: Support the use of PaddleOCR through whl package installation,pelease refer [PaddleOCR Package](https://github.com/PaddlePaddle/PaddleOCR/blob/develop/doc/doc_en/whl_en.md)。* +* Note: Support the use of PaddleOCR through whl package installation,pelease refer [PaddleOCR Package](https://github.com/PaddlePaddle/PaddleOCR/blob/develop/doc/doc_en/whl_en.md). ## 2.inference models -| Name | Introduction | Detection model | Recognition model | Recognition model with space support | -|-|-|-|-|-| -|chinese_db_crnn_mobile| Ultra-lightweight Chinese OCR model |[inference model](https://paddleocr.bj.bcebos.com/ch_models/ch_det_mv3_db_infer.tar) / [pretrained model](https://paddleocr.bj.bcebos.com/ch_models/ch_det_mv3_db.tar)|[inference model](https://paddleocr.bj.bcebos.com/ch_models/ch_rec_mv3_crnn_infer.tar) / [pretrained model](https://paddleocr.bj.bcebos.com/ch_models/ch_rec_mv3_crnn.tar)|[inference model](https://paddleocr.bj.bcebos.com/ch_models/ch_rec_mv3_crnn_enhance_infer.tar) / [pretrained model](https://paddleocr.bj.bcebos.com/ch_models/ch_rec_mv3_crnn_enhance.tar) -|chinese_db_crnn_server| Universal Chinese OCR model |[inference model](https://paddleocr.bj.bcebos.com/ch_models/ch_det_r50_vd_db_infer.tar) / [pretrained model](https://paddleocr.bj.bcebos.com/ch_models/ch_det_r50_vd_db.tar)|[inference model](https://paddleocr.bj.bcebos.com/ch_models/ch_rec_r34_vd_crnn_infer.tar) / [pretrained model](https://paddleocr.bj.bcebos.com/ch_models/ch_rec_r34_vd_crnn.tar)|[inference model](https://paddleocr.bj.bcebos.com/ch_models/ch_rec_r34_vd_crnn_enhance_infer.tar) / [pretrained model](https://paddleocr.bj.bcebos.com/ch_models/ch_rec_r34_vd_crnn_enhance.tar) +The detection and recognition models on the mobile and server sides are as follows. For more models (including multiple languages), please refer to [PP-OCR v1.1 series model list](./doc_ch/models_list.md) -* If wget is not installed in the windows environment, you can copy the link to the browser to download when downloading the model, and uncompress it and place it in the corresponding directory. + +| Model introduction | Model name | Recommended scene | Detection model | Direction Classifier | Recognition model | +| ------------ | --------------- | ----------------|---- | ---------- | -------- | +| Ultra-lightweight Chinese OCR model(8.1M) | ch_ppocr_mobile_v1.1_xx |Mobile-side/Server-side|[inference model](https://paddleocr.bj.bcebos.com/20-09-22/mobile/det/ch_ppocr_mobile_v1.1_det_infer.tar) / [pretrained model](https://paddleocr.bj.bcebos.com/20-09-22/mobile/det/ch_ppocr_mobile_v1.1_det_train.tar)|[inference model](https://paddleocr.bj.bcebos.com/20-09-22/cls/ch_ppocr_mobile_v1.1_cls_infer.tar) / [pretrained model](https://paddleocr.bj.bcebos.com/20-09-22/cls/ch_ppocr_mobile_v1.1_cls_train.tar) |[inference model](https://paddleocr.bj.bcebos.com/20-09-22/mobile/rec/ch_ppocr_mobile_v1.1_rec_infer.tar) / [pretrained model](https://paddleocr.bj.bcebos.com/20-09-22/mobile/rec/ch_ppocr_mobile_v1.1_rec_pre.tar) | +| Universal Chinese OCR model(155.1M) |ch_ppocr_server_v1.1_xx|Server-side |[inference model](https://paddleocr.bj.bcebos.com/20-09-22/server/det/ch_ppocr_server_v1.1_det_infer.tar) / [pretrained model](https://paddleocr.bj.bcebos.com/20-09-22/server/det/ch_ppocr_server_v1.1_det_train.tar) |[inference model](https://paddleocr.bj.bcebos.com/20-09-22/cls/ch_ppocr_mobile_v1.1_cls_infer.tar) / [pretrained model](https://paddleocr.bj.bcebos.com/20-09-22/cls/ch_ppocr_mobile_v1.1_cls_train.tar) |[inference model](https://paddleocr.bj.bcebos.com/20-09-22/server/rec/ch_ppocr_server_v1.1_rec_infer.tar) / [pretrained model](https://paddleocr.bj.bcebos.com/20-09-22/server/rec/ch_ppocr_server_v1.1_rec_pre.tar) | + +* If `wget` is not installed in the windows environment, you can copy the link to the browser to download when downloading the model, then uncompress it and place it in the corresponding directory. Copy the download address of the `inference model` for detection and recognition in the table above, and uncompress them. @@ -24,6 +27,8 @@ mkdir inference && cd inference wget {url/of/detection/inference_model} && tar xf {name/of/detection/inference_model/package} # Download the recognition model and unzip wget {url/of/recognition/inference_model} && tar xf {name/of/recognition/inference_model/package} +# Download the direction classifier model and unzip +wget {url/of/classification/inference_model} && tar xf {name/of/classification/inference_model/package} cd .. ``` @@ -32,9 +37,11 @@ Take the ultra-lightweight model as an example: ``` mkdir inference && cd inference # Download the detection model of the ultra-lightweight Chinese OCR model and uncompress it -wget https://paddleocr.bj.bcebos.com/ch_models/ch_det_mv3_db_infer.tar && tar xf ch_det_mv3_db_infer.tar +wget https://paddleocr.bj.bcebos.com/20-09-22/mobile/det/ch_ppocr_mobile_v1.1_det_infer.tar && tar xf ch_ppocr_mobile_v1.1_det_infer.tar # Download the recognition model of the ultra-lightweight Chinese OCR model and uncompress it -wget https://paddleocr.bj.bcebos.com/ch_models/ch_rec_mv3_crnn_infer.tar && tar xf ch_rec_mv3_crnn_infer.tar +wget https://paddleocr.bj.bcebos.com/20-09-22/mobile/rec/ch_ppocr_mobile_v1.1_rec_infer.tar && tar xf ch_ppocr_mobile_v1.1_rec_infer.tar +# Download the direction classifier model of the ultra-lightweight Chinese OCR model and uncompress it +wget https://paddleocr.bj.bcebos.com/20-09-22/cls/ch_ppocr_mobile_v1.1_cls_infer.tar && tar xf ch_ppocr_mobile_v1.1_cls_infer.tar cd .. ``` @@ -42,10 +49,13 @@ After decompression, the file structure should be as follows: ``` |-inference - |-ch_rec_mv3_crnn + |-ch_ppocr_mobile_v1.1_det_infer + |- model + |- params + |-ch_ppocr_mobile_v1.1_rec_infer |- model |- params - |-ch_det_mv3_db + |-ch_ppocr_mobile_v1.1_cls_infer |- model |- params ... @@ -53,20 +63,20 @@ After decompression, the file structure should be as follows: ## 3. Single image or image set prediction -* The following code implements text detection and recognition process. When performing prediction, you need to specify the path of a single image or image set through the parameter `image_dir`, the parameter `det_model_dir` specifies the path to detect the inference model, and the parameter `rec_model_dir` specifies the path to identify the inference model. The visual results are saved to the `./inference_results` folder by default. +* The following code implements text detection and recognition process. When performing prediction, you need to specify the path of a single image or image set through the parameter `image_dir`, the parameter `det_model_dir` specifies the path to detect the inference model, the parameter `rec_model_dir` specifies the path to identify the inference model, the parameter `use_angle_cls` specifies whether to use the direction classifier, the parameter `cls_model_dir` specifies the path to identify the direction classifier model, the parameter `use_space_char` specifies whether to predict the space char. The visual results are saved to the `./inference_results` folder by default. ```bash # Predict a single image specified by image_dir -python3 tools/infer/predict_system.py --image_dir="./doc/imgs/11.jpg" --det_model_dir="./inference/ch_det_mv3_db/" --rec_model_dir="./inference/ch_rec_mv3_crnn/" +python3 tools/infer/predict_system.py --image_dir="./doc/imgs/11.jpg" --det_model_dir="./inference/ch_ppocr_mobile_v1.1_det_infer/" --rec_model_dir="./inference/ch_ppocr_mobile_v1.1_rec_infer/" --cls_model_dir="./inference/ch_ppocr_mobile_v1.1_cls_infer/" --use_angle_cls=True --use_space_char=True # Predict imageset specified by image_dir -python3 tools/infer/predict_system.py --image_dir="./doc/imgs/" --det_model_dir="./inference/ch_det_mv3_db/" --rec_model_dir="./inference/ch_rec_mv3_crnn/" +python3 tools/infer/predict_system.py --image_dir="./doc/imgs/" --det_model_dir="./inference/ch_ppocr_mobile_v1.1_det_infer/" --rec_model_dir="./inference/ch_ppocr_mobile_v1.1_rec_infer/" --cls_model_dir="./inference/ch_ppocr_mobile_v1.1_cls_infer/" --use_angle_cls=True --use_space_char=True # If you want to use the CPU for prediction, you need to set the use_gpu parameter to False -python3 tools/infer/predict_system.py --image_dir="./doc/imgs/11.jpg" --det_model_dir="./inference/ch_det_mv3_db/" --rec_model_dir="./inference/ch_rec_mv3_crnn/" --use_gpu=False +python3 tools/infer/predict_system.py --image_dir="./doc/imgs/11.jpg" --det_model_dir="./inference/ch_ppocr_mobile_v1.1_det_infer/" --rec_model_dir="./inference/ch_ppocr_mobile_v1.1_rec_infer/" --cls_model_dir="./inference/ch_ppocr_mobile_v1.1_cls_infer/" --use_angle_cls=True --use_space_char=True --use_gpu=False ``` - Universal Chinese OCR model @@ -75,25 +85,18 @@ Please follow the above steps to download the corresponding models and update th ``` # Predict a single image specified by image_dir -python3 tools/infer/predict_system.py --image_dir="./doc/imgs/11.jpg" --det_model_dir="./inference/ch_det_r50_vd_db/" --rec_model_dir="./inference/ch_rec_r34_vd_crnn/" +python3 tools/infer/predict_system.py --image_dir="./doc/imgs/11.jpg" --det_model_dir="./inference/ch_ppocr_server_v1.1_det_infer/" --rec_model_dir="./inference/ch_ppocr_server_v1.1_rec_infer/" --cls_model_dir="./inference/ch_ppocr_mobile_v1.1_cls_infer/" --use_angle_cls=True --use_space_char=True ``` -- Universal Chinese OCR model with the support of space - -Please follow the above steps to download the corresponding models and update the relevant parameters, The example is as follows. +* Note + - If you want to use the recognition model which does not support space char recognition, please update the source code to the latest version and add parameters `--use_space_char=False`. + - If you do not want to use direction classifier, please update the source code to the latest version and add parameters `--use_angle_cls=False`. -* Note: Please update the source code to the latest version and add parameters `--use_space_char=True` - -``` -# Predict a single image specified by image_dir -python3 tools/infer/predict_system.py --image_dir="./doc/imgs_en/img_12.jpg" --det_model_dir="./inference/ch_det_r50_vd_db/" --rec_model_dir="./inference/ch_rec_r34_vd_crnn_enhance/" --use_space_char=True -``` - For more text detection and recognition tandem reasoning, please refer to the document tutorial : [Inference with Python inference engine](./inference_en.md)。 In addition, the tutorial also provides other deployment methods for the Chinese OCR model: - [Server-side C++ inference](../../deploy/cpp_infer/readme_en.md) -- [Service deployment](./serving_en.md) +- [Service deployment](../../deploy/pdserving/readme_en.md) - [End-to-end deployment](../../deploy/lite/readme_en.md) diff --git a/doc/doc_en/recognition_en.md b/doc/doc_en/recognition_en.md index 088138bade20beddc5be7d9cc5bbe7e38b0982d0..61d829b8b5cb917ac8ba135f4588d73ac89a2f8c 100644 --- a/doc/doc_en/recognition_en.md +++ b/doc/doc_en/recognition_en.md @@ -1,5 +1,22 @@ ## TEXT RECOGNITION +- [DATA PREPARATION](#DATA_PREPARATION) + - [Dataset Download](#Dataset_download) + - [Costom Dataset](#Costom_Dataset) + - [Dictionary](#Dictionary) + - [Add Space Category](#Add_space_category) + +- [TRAINING](#TRAINING) + - [Data Augmentation](#Data_Augmentation) + - [Training](#Training) + - [Multi-language](#Multi_language) + +- [EVALUATION](#EVALUATION) + +- [PREDICTION](#PREDICTION) + - [Training engine prediction](#Training_engine_prediction) + + ### DATA PREPARATION @@ -13,13 +30,14 @@ The default storage path for training data is `PaddleOCR/train_data`, if you alr ln -sf /train_data/dataset ``` - + * Dataset download If you do not have a dataset locally, you can download it on the official website [icdar2015](http://rrc.cvc.uab.es/?ch=4&com=downloads). Also refer to [DTRB](https://github.com/clovaai/deep-text-recognition-benchmark#download-lmdb-dataset-for-traininig-and-evaluation-from-here),download the lmdb format dataset required for benchmark If you want to reproduce the paper indicators of SRN, you need to download offline [augmented data](https://pan.baidu.com/s/1-HSZ-ZVdqBF2HaBZ5pRAKA), extraction code: y3ry. The augmented data is obtained by rotation and perturbation of mjsynth and synthtext. Please unzip the data to {your_path}/PaddleOCR/train_data/data_lmdb_Release/training/path. + * Use your own dataset: If you want to use your own data for training, please refer to the following to organize your data. @@ -72,7 +90,7 @@ Similar to the training set, the test set also needs to be provided a folder con |- word_003.jpg | ... ``` - + - Dictionary Finally, a dictionary ({word_dict_name}.txt) needs to be provided so that when the model is trained, all the characters that appear can be mapped to the dictionary index. @@ -92,9 +110,21 @@ In `word_dict.txt`, there is a single word in each line, which maps characters a `ppocr/utils/ppocr_keys_v1.txt` is a Chinese dictionary with 6623 characters. -`ppocr/utils/ic15_dict.txt` is an English dictionary with 36 characters. +`ppocr/utils/ic15_dict.txt` is an English dictionary with 63 characters + +`ppocr/utils/french_dict.txt` is a French dictionary with 118 characters + +`ppocr/utils/japan_dict.txt` is a French dictionary with 4399 characters + +`ppocr/utils/korean_dict.txt` is a French dictionary with 3636 characters + +`ppocr/utils/german_dict.txt` is a French dictionary with 131 characters + +You can use it on demand. + +The current multi-language model is still in the demo stage and will continue to optimize the model and add languages. **You are very welcome to provide us with dictionaries and fonts in other languages**, +If you like, you can submit the dictionary file to [utils](../../ppocr/utils) and we will thank you in the Repo. -You can use them if needed. To customize the dict file, please modify the `character_dict_path` field in `configs/rec/rec_icdar15_train.yml` and set `character_type` to `ch`. @@ -102,12 +132,14 @@ To customize the dict file, please modify the `character_dict_path` field in `co If you need to customize dic file, please add character_dict_path field in configs/rec/rec_icdar15_train.yml to point to your dictionary path. And set character_type to ch. + - Add space category If you want to support the recognition of the `space` category, please set the `use_space_char` field in the yml file to `true`. **Note: use_space_char only takes effect when character_type=ch** + ### TRAINING PaddleOCR provides training scripts, evaluation scripts, and prediction scripts. In this section, the CRNN recognition model will be used as an example: @@ -126,14 +158,12 @@ tar -xf rec_mv3_none_bilstm_ctc.tar && rm -rf rec_mv3_none_bilstm_ctc.tar Start training: ``` -# Set PYTHONPATH path -export PYTHONPATH=$PYTHONPATH:. # GPU training Support single card and multi-card training, specify the card number through CUDA_VISIBLE_DEVICES export CUDA_VISIBLE_DEVICES=0,1,2,3 # Training icdar15 English data and saving the log as train_rec.log python3 tools/train.py -c configs/rec/rec_icdar15_train.yml 2>&1 | tee train_rec.log ``` - + - Data Augmentation PaddleOCR provides a variety of data augmentation methods. If you want to add disturbance during training, please set `distort: true` in the configuration file. @@ -142,7 +172,7 @@ The default perturbation methods are: cvtColor, blur, jitter, Gasuss noise, rand Each disturbance method is selected with a 50% probability during the training process. For specific code implementation, please refer to: [img_tools.py](https://github.com/PaddlePaddle/PaddleOCR/blob/develop/ppocr/data/rec/img_tools.py) - + - Training PaddleOCR supports alternating training and evaluation. You can modify `eval_batch_step` in `configs/rec/rec_icdar15_train.yml` to set the evaluation frequency. By default, it is evaluated every 500 iter and the best acc model is saved under `output/rec_CRNN/best_accuracy` during the evaluation process. @@ -154,7 +184,10 @@ If the evaluation set is large, the test will be time-consuming. It is recommend | Configuration file | Algorithm | backbone | trans | seq | pred | | :--------: | :-------: | :-------: | :-------: | :-----: | :-----: | +| [rec_chinese_lite_train_v1.1.yml](../../configs/rec/ch_ppocr_v1.1/rec_chinese_lite_train_v1.1.yml) | CRNN | Mobilenet_v3 small 0.5 | None | BiLSTM | ctc | +| [rec_chinese_common_train_v1.1.yml](../../configs/rec/ch_ppocr_v1.1/rec_chinese_common_train_v1.1.yml) | CRNN | ResNet34_vd | None | BiLSTM | ctc | | rec_chinese_lite_train.yml | CRNN | Mobilenet_v3 small 0.5 | None | BiLSTM | ctc | +| rec_chinese_common_train.yml | CRNN | ResNet34_vd | None | BiLSTM | ctc | | rec_icdar15_train.yml | CRNN | Mobilenet_v3 large 0.5 | None | BiLSTM | ctc | | rec_mv3_none_bilstm_ctc.yml | CRNN | Mobilenet_v3 large 0.5 | None | BiLSTM | ctc | | rec_mv3_none_none_ctc.yml | Rosetta | Mobilenet_v3 large 0.5 | None | None | ctc | @@ -165,7 +198,8 @@ If the evaluation set is large, the test will be time-consuming. It is recommend | rec_r34_vd_tps_bilstm_attn.yml | RARE | Resnet34_vd | tps | BiLSTM | attention | | rec_r34_vd_tps_bilstm_ctc.yml | STARNet | Resnet34_vd | tps | BiLSTM | ctc | -For training Chinese data, it is recommended to use `rec_chinese_lite_train.yml`. If you want to try the result of other algorithms on the Chinese data set, please refer to the following instructions to modify the configuration file: +For training Chinese data, it is recommended to use +训练中文数据,推荐使用[rec_chinese_lite_train_v1.1.yml](../../configs/rec/ch_ppocr_v1.1/rec_chinese_lite_train_v1.1.yml). If you want to try the result of other algorithms on the Chinese data set, please refer to the following instructions to modify the configuration file: co Take `rec_mv3_none_none_ctc.yml` as an example: ``` @@ -201,8 +235,43 @@ Optimizer: ``` **Note that the configuration file for prediction/evaluation must be consistent with the training.** + +- Multi-language + +PaddleOCR also provides multi-language. The configuration file in `configs/rec/multi_languages` provides multi-language configuration files. Currently, the multi-language algorithms supported by PaddleOCR are: +| Configuration file | Algorithm name | backbone | trans | seq | pred | language | +| :--------: | :-------: | :-------: | :-------: | :-----: | :-----: | :-----: | +| rec_en_lite_train.yml | CRNN | Mobilenet_v3 small 0.5 | None | BiLSTM | ctc | English | +| rec_french_lite_train.yml | CRNN | Mobilenet_v3 small 0.5 | None | BiLSTM | ctc | French | +| rec_ger_lite_train.yml | CRNN | Mobilenet_v3 small 0.5 | None | BiLSTM | ctc | German | +| rec_japan_lite_train.yml | CRNN | Mobilenet_v3 small 0.5 | None | BiLSTM | ctc | Japanese | +| rec_korean_lite_train.yml | CRNN | Mobilenet_v3 small 0.5 | None | BiLSTM | ctc | Korean | + +The multi-language model training method is the same as the Chinese model. The training data set is 100w synthetic data. A small amount of fonts and test data can be downloaded on [Baidu Netdisk](https://pan.baidu.com/s/1bS_u207Rm7YbY33wOECKDA),Extraction code:frgi. + +If you want to finetune on the basis of the existing model effect, please refer to the following instructions to modify the configuration file: + +Take `rec_french_lite_train` as an example: + +``` +Global: + ... + # Add a custom dictionary, if you modify the dictionary + # please point the path to the new dictionary + character_dict_path: ./ppocr/utils/french_dict.txt + # Add data augmentation during training + distort: true + # Identify spaces + use_space_char: true + ... + # Modify reader type + reader_yml: ./configs/rec/multi_languages/rec_french_reader.yml + ... +... +``` + ### EVALUATION The evaluation data set can be modified via `configs/rec/rec_icdar15_reader.yml` setting of `label_file_path` in EvalReader. @@ -210,11 +279,13 @@ The evaluation data set can be modified via `configs/rec/rec_icdar15_reader.yml` ``` export CUDA_VISIBLE_DEVICES=0 # GPU evaluation, Global.checkpoints is the weight to be tested -python3 tools/eval.py -c configs/rec/rec_chinese_lite_train.yml -o Global.checkpoints={path/to/weights}/best_accuracy +python3 tools/eval.py -c configs/rec/rec_icdar15_reader.yml -o Global.checkpoints={path/to/weights}/best_accuracy ``` + ### PREDICTION + * Training engine prediction Using the model trained by paddleocr, you can quickly get prediction through the following script. @@ -223,7 +294,7 @@ The default prediction picture is stored in `infer_img`, and the weight is speci ``` # Predict English results -python3 tools/infer_rec.py -c configs/rec/rec_chinese_lite_train.yml -o Global.checkpoints={path/to/weights}/best_accuracy TestReader.infer_img=doc/imgs_words/en/word_1.jpg +python3 tools/infer_rec.py -c configs/rec/ch_ppocr_v1.1/rec_chinese_lite_train_v1.1.yml -o Global.checkpoints={path/to/weights}/best_accuracy TestReader.infer_img=doc/imgs_words/en/word_1.jpg ``` Input image: @@ -238,11 +309,11 @@ infer_img: doc/imgs_words/en/word_1.png word : joint ``` -The configuration file used for prediction must be consistent with the training. For example, you completed the training of the Chinese model with `python3 tools/train.py -c configs/rec/rec_chinese_lite_train.yml`, you can use the following command to predict the Chinese model: +The configuration file used for prediction must be consistent with the training. For example, you completed the training of the Chinese model with `python3 tools/train.py -c configs/rec/ch_ppocr_v1.1/rec_chinese_lite_train_v1.1.yml`, you can use the following command to predict the Chinese model: ``` # Predict Chinese results -python3 tools/infer_rec.py -c configs/rec/rec_chinese_lite_train.yml -o Global.checkpoints={path/to/weights}/best_accuracy TestReader.infer_img=doc/imgs_words/ch/word_1.jpg +python3 tools/infer_rec.py -c configs/rec/ch_ppocr_v1.1/rec_chinese_lite_train_v1.1.yml -o Global.checkpoints={path/to/weights}/best_accuracy TestReader.infer_img=doc/imgs_words/ch/word_1.jpg ``` Input image: diff --git a/doc/doc_en/tree_en.md b/doc/doc_en/tree_en.md new file mode 100644 index 0000000000000000000000000000000000000000..5919013bc60395f7e5dbcea19596f91406610f58 --- /dev/null +++ b/doc/doc_en/tree_en.md @@ -0,0 +1,208 @@ +# Overall directory structure + +The overall directory structure of PaddleOCR is introduced as follows: + +``` +PaddleOCR +├── configs // configuration file, you can select model structure and modify hyperparameters through yml file +│ ├── cls // Related configuration files of direction classifier +│ │ ├── cls_mv3.yml // training configuration related, including backbone network, head, loss, optimizer +│ │ └── cls_reader.yml // Data reading related, data reading method, data storage path +│ ├── det // Detection related configuration files +│ │ ├── det_db_icdar15_reader.yml // data read +│ │ ├── det_mv3_db.yml // training configuration +│ │ ... +│ └── rec // Identify related configuration files +│ ├── rec_benchmark_reader.yml // LMDB format data reading related +│ ├── rec_chinese_common_train.yml // General Chinese training configuration +│ ├── rec_icdar15_reader.yml // simple data reading related, including data reading function, data path, label file +│ ... +├── deploy // deployment related +│ ├── android_demo // android_demo +│ │ ... +│ ├── cpp_infer // C++ infer +│ │ ├── CMakeLists.txt // Cmake file +│ │ ├── docs // documentation +│ │ │ └── windows_vs2019_build.md +│ │ ├── include +│ │ │ ├── clipper.h // clipper library +│ │ │ ├── config.h // infer configuration +│ │ │ ├── ocr_cls.h // direction classifier +│ │ │ ├── ocr_det.h // text detection +│ │ │ ├── ocr_rec.h // text recognition +│ │ │ ├── postprocess_op.h // postprocess after detection +│ │ │ ├── preprocess_op.h // preprocess detection +│ │ │ └── utility.h // tools +│ │ ├── readme.md // documentation +│ │ ├── ... +│ │ ├── src // source file +│ │ │ ├── clipper.cpp +│ │ │ ├── config.cpp +│ │ │ ├── main.cpp +│ │ │ ├── ocr_cls.cpp +│ │ │ ├── ocr_det.cpp +│ │ │ ├── ocr_rec.cpp +│ │ │ ├── postprocess_op.cpp +│ │ │ ├── preprocess_op.cpp +│ │ │ └── utility.cpp +│ │ └── tools // compile and execute script +│ │ ├── build.sh // compile script +│ │ ├── config.txt // configuration file +│ │ └── run.sh // Test startup script +│ ├── docker +│ │ └── hubserving +│ │ ├── cpu +│ │ │ └── Dockerfile +│ │ ├── gpu +│ │ │ └── Dockerfile +│ │ ├── README_cn.md +│ │ ├── README.md +│ │ └── sample_request.txt +│ ├── hubserving // hubserving +│ │ ├── ocr_det // text detection +│ │ │ ├── config.json // serving configuration +│ │ │ ├── __init__.py +│ │ │ ├── module.py // prediction model +│ │ │ └── params.py // prediction parameters +│ │ ├── ocr_rec // text recognition +│ │ │ ├── config.json +│ │ │ ├── __init__.py +│ │ │ ├── module.py +│ │ │ └── params.py +│ │ └── ocr_system // system forecast +│ │ ├── config.json +│ │ ├── __init__.py +│ │ ├── module.py +│ │ └── params.py +│ ├── imgs // prediction picture +│ │ ├── cpp_infer_pred_12.png +│ │ └── demo.png +│ ├── ios_demo // ios demo +│ │ ... +│ ├── lite // lite deployment +│ │ ├── cls_process.cc // direction classifier data processing +│ │ ├── cls_process.h +│ │ ├── config.txt // check configuration parameters +│ │ ├── crnn_process.cc // crnn data processing +│ │ ├── crnn_process.h +│ │ ├── db_post_process.cc // db data processing +│ │ ├── db_post_process.h +│ │ ├── Makefile // compile file +│ │ ├── ocr_db_crnn.cc // series prediction +│ │ ├── prepare.sh // data preparation +│ │ ├── readme.md // documentation +│ │ ... +│ ├── pdserving // pdserving deployment +│ │ ├── det_local_server.py // fast detection version, easy deployment and fast prediction +│ │ ├── det_web_server.py // Full version of detection, high stability and distributed deployment +│ │ ├── ocr_local_server.py // detection + identification quick version +│ │ ├── ocr_web_client.py // client +│ │ ├── ocr_web_server.py // detection + identification full version +│ │ ├── readme.md // documentation +│ │ ├── rec_local_server.py // recognize quick version +│ │ └── rec_web_server.py // Identify the full version +│ └── slim +│ └── quantization // quantization related +│ ├── export_model.py // export model +│ ├── quant.py // quantization +│ └── README.md // Documentation +├── doc // Documentation tutorial +│ ... +├── paddleocr.py +├── ppocr // network core code +│ ├── data // data processing +│ │ ├── cls // direction classifier +│ │ │ ├── dataset_traversal.py // Data transmission, define data reader, read data and form batch +│ │ │ └── randaugment.py // Random data augmentation operation +│ │ ├── det // detection +│ │ │ ├── data_augment.py // data augmentation operation +│ │ │ ├── dataset_traversal.py // Data transmission, define data reader, read data and form batch +│ │ │ ├── db_process.py // db data processing +│ │ │ ├── east_process.py // east data processing +│ │ │ ├── make_border_map.py // Generate boundary map +│ │ │ ├── make_shrink_map.py // Generate shrink map +│ │ │ ├── random_crop_data.py // random crop +│ │ │ └── sast_process.py // sast data processing +│ │ ├── reader_main.py // main function of data reader +│ │ └── rec // recognation +│ │ ├── dataset_traversal.py // Data transmission, define data reader, including LMDB_Reader and Simple_Reader +│ │ └── img_tools.py // Data processing related, including data normalization and disturbance +│ ├── __init__.py +│ ├── modeling // networking related +│ │ ├── architectures // Model architecture, which defines the various modules required by the model +│ │ │ ├── cls_model.py // direction classifier +│ │ │ ├── det_model.py // detection +│ │ │ └── rec_model.py // recognition +│ │ ├── backbones // backbone network +│ │ │ ├── det_mobilenet_v3.py // detect mobilenet_v3 +│ │ │ ├── det_resnet_vd.py +│ │ │ ├── det_resnet_vd_sast.py +│ │ │ ├── rec_mobilenet_v3.py // recognize mobilenet_v3 +│ │ │ ├── rec_resnet_fpn.py +│ │ │ └── rec_resnet_vd.py +│ │ ├── common_functions.py // common functions +│ │ ├── heads +│ │ │ ├── cls_head.py // class header +│ │ │ ├── det_db_head.py // db detection head +│ │ │ ├── det_east_head.py // east detection head +│ │ │ ├── det_sast_head.py // sast detection head +│ │ │ ├── rec_attention_head.py // recognition attention +│ │ │ ├── rec_ctc_head.py // recognition ctc +│ │ │ ├── rec_seq_encoder.py // recognition sequence code +│ │ │ ├── rec_srn_all_head.py // srn related +│ │ │ └── self_attention // srn attention +│ │ │ └── model.py +│ │ ├── losses // loss function +│ │ │ ├── cls_loss.py // Directional classifier loss function +│ │ │ ├── det_basic_loss.py // detect basic loss +│ │ │ ├── det_db_loss.py // DB loss +│ │ │ ├── det_east_loss.py // EAST loss +│ │ │ ├── det_sast_loss.py // SAST loss +│ │ │ ├── rec_attention_loss.py // attention loss +│ │ │ ├── rec_ctc_loss.py // ctc loss +│ │ │ └── rec_srn_loss.py // srn loss +│ │ └── stns // Spatial transformation network +│ │ └── tps.py // TPS conversion +│ ├── optimizer.py // optimizer +│ ├── postprocess // post-processing +│ │ ├── db_postprocess.py // DB postprocess +│ │ ├── east_postprocess.py // East postprocess +│ │ ├── lanms // lanms related +│ │ │ ... +│ │ ├── locality_aware_nms.py // nms +│ │ └── sast_postprocess.py // sast post-processing +│ └── utils // tools +│ ├── character.py // Character processing, including text encoding and decoding, and calculation of prediction accuracy +│ ├── check.py // parameter loading check +│ ├── ic15_dict.txt // English number dictionary, case sensitive +│ ├── ppocr_keys_v1.txt // Chinese dictionary, used to train Chinese models +│ ├── save_load.py // model save and load function +│ ├── stats.py // Statistics +│ └── utility.py // Tool functions, including related check tools such as whether the input parameters are legal +├── README_en.md // documentation +├── README.md +├── requirments.txt // installation dependencies +├── setup.py // whl package packaging script +└── tools // start tool + ├── eval.py // evaluation function + ├── eval_utils // evaluation tools + │ ├── eval_cls_utils.py // category related + │ ├── eval_det_iou.py // detect iou related + │ ├── eval_det_utils.py // detection related + │ ├── eval_rec_utils.py // recognition related + │ └── __init__.py + ├── export_model.py // export infer model + ├── infer // Forecast based on prediction engine + │ ├── predict_cls.py + │ ├── predict_det.py + │ ├── predict_rec.py + │ ├── predict_system.py + │ └── utility.py + ├── infer_cls.py // Predict classification based on training engine + ├── infer_det.py // Predictive detection based on training engine + ├── infer_rec.py // Predictive recognition based on training engine + ├── program.py // overall process + ├── test_hubserving.py + └── train.py // start training + +``` diff --git a/doc/doc_en/update_en.md b/doc/doc_en/update_en.md index ca050370989ba3cded8c7211b7ab297ebe239c5f..a8f75f6a8049fe5a4ac966178fd3096e646db9db 100644 --- a/doc/doc_en/update_en.md +++ b/doc/doc_en/update_en.md @@ -1,4 +1,5 @@ # RECENT UPDATES +- 2020.9.22 Update the PP-OCR technical article, https://arxiv.org/abs/2009.09941 - 2020.8.24 Support the use of PaddleOCR through whl package installation,pelease refer [PaddleOCR Package](https://github.com/PaddlePaddle/PaddleOCR/blob/develop/doc/doc_en/whl_en.md) - 2020.8.16 Release text detection algorithm [SAST](https://arxiv.org/abs/1908.05498) and text recognition algorithm [SRN](https://arxiv.org/abs/2003.12294) - 2020.7.23, Release the playback and PPT of live class on BiliBili station, PaddleOCR Introduction, [address](https://aistudio.baidu.com/aistudio/course/introduce/1519) diff --git a/doc/doc_en/visualization_en.md b/doc/doc_en/visualization_en.md index 698db3f2d8ae31dd14829f7a1dfbd13f174f3e23..6696cf935c0f343bc3bca71003aecc22c6d98e0d 100644 --- a/doc/doc_en/visualization_en.md +++ b/doc/doc_en/visualization_en.md @@ -1,25 +1,23 @@ # Visualization -- [Chinese/English OCR Visualization (Space_support )](#Space_support) -- [Ultra-lightweight Chinese/English OCR Visualization](#Ultra-lightweight) -- [General Chinese/English OCR Visualization](#General) + +## ppocr_server_1.1 - - -## Chinese/English OCR Visualization (Space_support ) - -### Ultra-lightweight Model
- + + + + + + + +
-### General OCR Model -
- -
- -## Ultra-lightweight Chinese/English OCR Visualization + + +## ppocr_mobile_1.0
@@ -29,32 +27,17 @@
-
- -
- -
- -
-
-
- -
-
-
- -
- -## General Chinese/English OCR Visualization + +## ppocr_server_1.0
@@ -68,4 +51,3 @@
- diff --git a/doc/doc_en/whl_en.md b/doc/doc_en/whl_en.md index 4049d9dcb2d52eb5f610d5f02017a9d2d4f14f47..ffbced346f7a3f661f382b5f2d826c20fef2c012 100644 --- a/doc/doc_en/whl_en.md +++ b/doc/doc_en/whl_en.md @@ -9,8 +9,8 @@ pip install paddleocr build own whl package and install ```bash -python setup.py bdist_wheel -pip install dist/paddleocr-x.x.x-py3-none-any.whl # x.x.x is the version of paddleocr +python3 setup.py bdist_wheel +pip3 install dist/paddleocr-x.x.x-py3-none-any.whl # x.x.x is the version of paddleocr ``` ### 1. Use by code @@ -18,7 +18,7 @@ pip install dist/paddleocr-x.x.x-py3-none-any.whl # x.x.x is the version of padd ```python from paddleocr import PaddleOCR,draw_ocr # Paddleocr supports Chinese, English, French, German, Korean and Japanese. -# You can set the parameter `lang` as `zh`, `en`, `french`, `german`, `korean`, `japan` +# You can set the parameter `lang` as `ch`, `en`, `french`, `german`, `korean`, `japan` # to switch the language model in order. ocr = PaddleOCR(use_angle_cls=True, lang='en') # need to run only once to download and load model into memory img_path = 'PaddleOCR/doc/imgs_en/img_12.jpg' @@ -302,7 +302,7 @@ paddleocr --image_dir PaddleOCR/doc/imgs/11.jpg --det_model_dir {your_det_model_ | cls_batch_num | When performing classification, the batchsize of forward images | 30 | | enable_mkldnn | Whether to enable mkldnn | FALSE | | use_zero_copy_run | Whether to forward by zero_copy_run | FALSE | -| lang | The support language, now only chinese(ch) and english(en) are supported | ch | +| lang | The support language, now only Chinese(ch)、English(en)、French(french)、German(german)、Korean(korean)、Japanese(japan) are supported | ch | | det | Enable detction when `ppocr.ocr` func exec | TRUE | | rec | Enable recognition when `ppocr.ocr` func exec | TRUE | | cls | Enable classification when `ppocr.ocr` func exec | FALSE | diff --git a/ppocr/data/rec/dataset_traversal.py b/ppocr/data/rec/dataset_traversal.py index 84f325b9b880d6289a4d60f7ebff39d962fdb5a1..02aa13baa92261ef9dbf888c2d479925aacb0be6 100755 --- a/ppocr/data/rec/dataset_traversal.py +++ b/ppocr/data/rec/dataset_traversal.py @@ -127,6 +127,7 @@ class LMDBReader(object): img=img, image_shape=self.image_shape, num_heads=self.num_heads, + char_ops=self.char_ops, max_text_length=self.max_text_length) else: norm_img = process_image( diff --git a/ppocr/utils/japan_dict.txt b/ppocr/utils/japan_dict.txt index ddcc89f7c3ef011274862b1d573d079b76129ff2..339d4b89e5159a346636641a0814874faa59754a 100644 --- a/ppocr/utils/japan_dict.txt +++ b/ppocr/utils/japan_dict.txt @@ -1,4399 +1,4399 @@ -誰 +! +" +# +$ +% +& +' +( +) +* ++ +, +- +. +/ +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 +© +° +² +´ +½ +Á +Ä +Å +Ç +È +É +Í +Ó +Ö +× +Ü +ß +à +á +â +ã +ä +å +æ +ç +è +é +ê +ë +í +ð +ñ +ò +ó +ô +õ +ö +ø +ú +û +ü +ý +ā +ă +ą +ć +Č +č +đ +ē +ė +ę +ğ +ī +ı +Ł +ł +ń +ň +ō +ř +Ş +ş +Š +š +ţ +ū +ż +Ž +ž +Ș +ș +ț +Δ +α +λ +μ +φ +Г +О +а +в +л +о +р +с +т +я +ồ +​ +— +― +’ +“ +” +… +℃ +→ +∇ +− +■ +☆ +  +、 +。 +々 +〆 +〈 +〉 +「 +」 +『 +』 +〔 +〕 +〜 +ぁ +あ +ぃ +い +う +ぇ +え +ぉ +お +か が -一 -番 -に -着 +き +ぎ く -か -私 -は -分 -り -ま +ぐ +け +げ +こ +ご +さ +ざ +し +じ +す +ず せ -ん -。 -多 -の -動 -物 -人 -間 -よ +ぜ +そ +ぞ +た +だ +ち +ぢ っ +つ +づ て -滅 -ぼ -さ -れ -た -テ -ニ -ス -部 -員 で -す -エ -ミ -幸 -そ -う -見 -え -こ -事 -実 -を -心 -留 -め -お -い -下 -彼 -女 -ち -世 -話 -し -る -達 -国 -際 -な と -思 -約 -束 -破 -べ -き -あ -道 -路 -横 -切 -車 -注 -意 -生 -甲 -斐 -父 -外 -へ -行 -承 -知 -弁 -当 -食 -ょ -小 -説 -1 -つ -も -読 ど -ら -、 -母 -親 -少 -似 -卑 -屈 -奴 -曇 -日 -音 -楽 -好 -本 -ず -仕 -引 -受 -け -サ -ッ -カ -ー -以 -前 -今 -気 -混 +な +に +ぬ +ね +の +は ば -問 -題 -2 -時 -待 -ボ -ブ -友 -だ -ぞ -午 -後 -家 -来 -子 -供 -ろ -申 -告 -何 -夕 -済 +ぱ +ひ +び +ぴ +ふ +ぶ +ぷ +へ +べ +ぺ +ほ +ぼ +ぽ +ま み -雪 -降 -陰 -口 -言 -的 -年 -馬 -鹿 -ね -大 -変 -忙 -危 -険 -遅 -刻 -度 -学 -校 -入 -電 -々 -酒 -飲 む -顔 -奇 -妙 -聞 -自 -慢 -声 -ク -ラ -男 -数 -3 -0 -歴 -史 -試 -験 -計 -画 -反 -対 -づ -先 -渡 -連 -恐 -羽 -振 -ロ -ン -ド -合 -由 -舞 -靴 -向 -手 -紙 -週 -休 -釣 -ひ +め +も +ゃ +や +ゅ +ゆ +ょ +よ +ら +り +る +れ +ろ わ -? -頼 +ゑ +を +ん +ゝ +ゞ +ァ ア -メ -リ -婦 -結 -婚 -猫 -木 -登 -ぶ -ジ -ョ -駅 -方 -歩 -怒 -必 -要 -折 -返 -ケ -キ -召 -上 -成 -功 -努 -力 -選 -び -屋 -坂 -東 -京 -育 -月 -曜 -終 -買 -戦 -争 -起 -目 -覚 -病 -院 -元 -無 -セ -フ -阪 -や -格 -祝 -ゆ -十 -中 -八 -九 -勘 -定 -我 -ほ -叫 -耳 -通 -書 -帽 -5 -ル -朝 -君 -兄 -交 -故 -亡 -単 -純 -列 -止 -老 -全 -新 -忠 -尊 -重 -解 -決 -欲 -ざ -僕 -浮 -件 -裁 -持 +ィ イ -ギ -味 -夢 -ぎ -続 -ぜ -直 -接 -考 -頭 -別 -住 -辞 -役 -立 -明 -違 -指 -摘 -勇 -答 -適 -冷 -売 -旅 -疲 -辺 -鄙 -村 -訪 -水 -回 -両 -昨 -映 -空 -太 -陽 -輝 -正 -賛 -町 -案 -内 -助 -会 -次 -延 -期 -チ -ム -最 -価 -値 -タ -シ -歌 -他 -劣 -勉 -強 +ゥ +ウ ェ -喜 -伝 -職 -業 -関 -係 -誉 -犬 -近 -座 -転 -使 -妹 -建 -奥 -損 -野 -球 -緒 -繊 -細 -出 -教 -マ -駄 -石 -油 -不 -足 -震 -ト -同 -じ +エ +ォ +オ +カ ガ +キ +ギ +ク +グ +ケ +ゲ +コ +ゴ +サ +ザ +シ +ジ +ス +ズ +セ +ゼ +ソ +ゾ +タ +ダ +チ +ヂ +ッ ツ -発 -表 -然 -失 -敗 -滞 -在 +ヅ +テ +デ +ト +ド +ナ +ニ +ヌ +ネ +ノ +ハ バ -コ -吸 -平 -和 -泳 -寒 -秋 -社 -台 -短 -死 -情 -報 -民 -政 -府 -作 -帰 -宅 -順 -調 -真 -仮 -命 -用 -箱 -階 -運 -長 -ご -腕 -放 -乗 -利 -程 -腹 -悪 -念 -怖 -形 -抗 -議 -ゲ -面 -白 -記 -憶 -姉 -都 -劇 -残 -早 -信 -懸 -ャ -品 パ -初 -開 -理 -誤 -急 -ぐ -簡 -易 -英 -語 -娘 -寝 -赤 -ゃ -願 -障 -金 -支 -払 -冒 -論 -ぱ -確 ヒ -産 -火 -散 -守 -有 -名 -医 -者 -毎 -渋 -レ ビ -消 -服 -宿 -署 -齢 -ポ -突 -げ -良 -徒 -貧 -戻 -牛 -二 -夫 -脱 -暑 -湖 -深 -普 -段 -謝 -優 -甘 -ソ -非 -常 -場 -警 -察 -呼 -誘 -惑 -坊 -字 -可 -能 -料 -涙 -落 -量 -妻 -愛 -界 -温 -授 -船 -酔 -万 -仲 -付 -捜 -静 -若 -ダ -招 -追 -夜 -雨 -述 -山 -獲 -訳 -居 -異 -熱 -息 -点 -主 -質 -始 -花 -飾 -幼 -寂 -興 -プ -触 -活 -オ -青 -春 -尋 -盲 -燃 -傷 -科 -晩 -騒 -機 -限 -予 -想 -望 -代 -薬 -効 -「 -風 -共 -去 -ぬ -」 -孤 -独 -店 -径 -ュ -態 -銀 -認 -至 -驚 -美 -添 -光 ピ -ノ -伴 -奏 -嬉 -7 -除 -席 -吹 -創 -設 -市 -! -髪 -悔 -秘 -密 -高 -地 -丸 -悲 -極 -暇 -葉 -速 -走 -三 -企 -天 -茶 -働 -演 -8 -泣 -公 -園 -原 -因 -勝 -標 -進 +フ +ブ +プ ヘ -郵 -便 -局 -農 -遊 -到 -笑 -冬 -ィ -参 -加 -版 -暗 -絶 -誕 -6 -歳 -鍵 -絵 -栄 -将 -張 -過 -弾 -ふ -等 -具 -雇 -賞 -得 -絞 -取 -健 -康 -身 -頂 -客 -迎 -所 -夏 -海 -草 -ヨ -配 -古 -鳴 -庭 -探 -偶 -眠 -昼 -禁 -煙 -提 -閉 -飛 -魚 -捕 -断 -武 -装 -背 -街 -丘 -ホ -泊 -快 -求 -怠 -惰 -グ -欠 -片 -視 -特 -難 -締 -半 -壁 -困 -冗 -談 -族 -神 -戸 -遣 -状 -握 -第 -ザ -師 -倍 -級 -逆 -為 -化 -恩 -諸 -貸 -卒 -諦 -互 -依 -存 -円 -嫌 -紳 -士 -凍 -誇 -例 -迷 -否 -準 -備 -専 -晴 -満 -邪 -腰 -痛 -菜 -商 -離 -疑 -資 -送 -忘 -暖 -素 -敵 -窓 -色 -写 -途 -文 -防 -識 -4 -側 -叱 -裕 -福 -果 -移 -停 -百 -魔 -性 -郎 -感 -耐 -治 -恋 -敬 -様 -診 -橋 -安 -慰 -貴 -眺 -討 -処 -逃 -符 -許 -狂 -審 -軽 -率 -恵 -規 -則 -猶 -借 -歯 -録 -責 -任 -絡 -爆 -撃 -趣 -替 -芝 -捨 -抜 -費 -ペ -黙 -床 -個 -裏 -暮 -叔 ベ -尽 -迫 -材 -田 -舎 -没 -侮 -辱 -施 -歓 -援 -滑 -恥 -飯 -置 -徹 -廃 -机 -退 -拝 -詰 -ぁ -蝙 -蝠 -従 -王 -札 -幌 -氏 -随 -縁 -整 -頓 -ぽ -概 -六 -川 -岸 -博 -館 -図 -慣 -儀 -像 -緻 -昇 -土 -伏 -悩 -敷 -包 -囲 -善 -肉 -担 -偽 -呂 -盛 -噂 -希 -序 -焼 -狭 -掌 -苦 -避 -積 -港 -復 -荷 -御 -嘘 -徳 -ゴ -再 -粧 -卵 -繰 -習 -畑 -匹 -是 -星 -景 -余 -永 -久 -デ -盗 -ヤ -巨 -遠 -械 -愚 -洗 -濯 -珍 -溶 -込 -履 -昔 -千 -泥 -棒 -号 -乏 -偉 -継 -ウ -崩 -勤 -務 -術 -克 -聴 -権 -惚 -弟 -体 -飼 -軒 -犯 -課 -修 -四 -鮮 -汽 -鳥 -現 -旧 -塔 -冊 -五 -塩 -経 -批 -判 -簿 -棚 -才 -研 -究 -ぷ -類 -覆 -祈 -往 -妨 -柄 -財 -捧 -衛 -距 -闇 -著 -区 -隣 -相 -比 -頃 -就 -矛 -盾 -広 -掛 -典 -型 -制 -憎 -殺 -モ -嘆 -雄 -鼓 -負 -右 -窮 -法 -掃 -繕 -篠 -流 -章 -看 -杯 -植 -評 -枚 -叶 -抑 -滴 -斎 -森 -額 -蛮 -ナ -攻 -雅 -米 -雑 -編 -換 -構 -詳 -帳 -厳 -ワ -預 -室 -更 -銘 -与 -濃 -臭 -布 -衆 -撮 -舌 -容 -貌 -乳 -喫 -固 -巣 -懇 -奈 -群 -集 -皆 -影 -響 -ネ -悟 -弱 -ハ -嗅 -飽 -完 -了 -浴 -昆 -虫 -ヌ -乱 -描 -俺 -首 -嵐 -給 -低 -派 -衝 -団 -投 -函 -礼 -島 -委 -官 -周 -鋭 -宝 -契 -採 -致 -漏 -翻 -洋 -恒 -保 -証 -筆 -潜 -ォ -枯 -打 -憩 -護 -尾 -埋 -紹 -介 -城 -谷 -沈 -季 -節 -巻 -倒 -巡 -姿 -踏 -黒 -己 -沿 -ぇ -懐 -扮 -詩 -労 -左 -底 -占 -差 -架 -壊 -ゼ -欺 -検 -造 -寄 -庫 -眼 -鏡 -慮 -郊 -購 -営 -駐 -血 -模 -ズ -収 -越 -板 -癌 -飢 -井 -罵 -忍 -増 -賢 -涼 -荒 -踊 -些 -並 -省 -銃 -州 -症 -麻 -雀 -濡 -般 -展 -覧 -紅 -統 -領 -ぴ -松 -江 -c -d -講 -義 -熟 -扶 -養 -属 -9 -鹸 -遇 -寿 -司 -憂 -乾 -唱 -割 -皿 -拭 -貯 -箇 -殴 -鉛 -狙 -蒸 -雲 -椅 -未 -練 -卓 -ぺ -淑 -壇 -憲 -末 -沙 -汰 -操 -匙 -抱 -候 -鼻 -ヶ -蔑 -毛 -勢 -償 -浜 -激 -倹 -製 -宛 -ゅ -翌 -稿 -鞄 -届 -慌 -扱 -式 -組 -瓶 -渉 -句 -技 -陸 -器 -河 -衰 -納 -律 -罰 -譲 -旨 -補 -傘 -贈 -請 -駆 -腐 -ァ -線 -丁 -骨 -筋 -伺 -丈 -祖 -孫 -犠 -牲 -遭 -肌 -綺 -麗 -魂 -種 -減 -唯 -婆 -推 -薦 -訓 -曲 -睡 -頑 -s -f -勧 -印 -刷 -錠 -励 -胆 -糧 -績 -排 -剣 -岳 -涯 -競 -精 -敏 -衣 -赦 -志 -位 -胸 -堅 -販 -査 -税 -壷 -暴 -露 -益 -敢 -撒 -喧 -嘩 -蹴 -沢 -妊 -娠 -芸 -航 -催 -射 -超 -改 -戒 -n -a -泉 -奪 -零 -咲 -隠 -遺 -憾 -漱 -肥 -輩 -房 -寺 -奨 -脚 -汚 -煩 -弥 -怪 -免 -氷 -灯 -総 -ユ -戚 -掘 -維 -釈 -拾 -凝 -漫 -兵 -痔 -馳 -粋 -微 -訴 -浅 -緩 -崖 -覗 -塞 -虚 -北 -湘 -南 -賭 -腎 -臓 -仰 -仙 -筈 -砂 -糖 -干 -唾 -観 -娯 -臆 -門 -宇 -宙 -複 -毒 -奮 -患 -撲 -控 -液 -貫 -禄 -辛 -郷 -稼 -餓 -痙 -攣 -秀 -澄 -遂 -挨 -拶 -慈 -富 -豪 -溺 -県 -緑 -籠 -刑 -根 -脅 -誌 -訂 -揺 -築 -罪 -喋 -陥 -姫 -髭 -剃 -害 -疎 -銭 -墓 -賦 -押 -穴 -淡 -噛 -賃 -導 -域 -肩 -尻 -伯 -牧 -傾 -基 -又 -咳 -邦 -貨 -豊 -挑 -偏 -溜 -傲 -樹 -含 -滝 -魅 -嫉 -妬 -脇 -謎 -磨 -括 -佐 -猛 -烈 -玄 -吉 -執 -応 -及 -拒 -顎 -鬚 -既 -狐 -浣 -腸 -隅 -拡 -吠 -璧 -ヴ -顧 -睦 -湯 -幾 -輪 -七 -絹 -湿 -疹 -池 -袋 -灰 -摂 -即 -紛 -刈 -況 -染 -矢 -聖 -塗 -伸 -浪 -岩 -餌 -戴 -鎖 -宣 -測 -工 -被 -象 -痩 -搭 -妥 -協 -汗 -救 -跳 -裂 -林 -檎 -棲 -帝 -潮 -侵 -略 -柔 -票 -蝶 -肯 -筒 -呆 -沼 -厚 -宗 -梨 -軍 -蔵 -較 -羨 -粛 -痢 -愉 -儲 -癒 -鬱 -幹 -掴 -鎮 -縫 -炎 -示 -諾 -寛 -虜 -瀬 -鉄 -祭 -醜 -菓 -項 -岡 -胎 -拠 -択 -網 -拳 -党 -繁 -熊 -爪 -慎 -墜 -穏 -募 -縦 -伊 -藤 -胃 -惜 -芽 -誠 -薄 -嫁 -譜 -寮 -薔 -薇 -賜 -1 -2 -l -i -y -潔 -充 -据 -舟 -遮 -寸 -猿 -・ -抵 -暢 -錆 -脈 -挙 -瞬 -萎 -聡 -埠 -琵 -琶 -黄 -策 -宜 -梅 -各 -匂 -清 -撥 -載 -境 -吐 -怯 -唸 -却 -拍 -端 -吻 -惨 -剤 -甥 -核 -緊 -香 -層 -系 -躍 -嬢 -縛 -酸 -t -〆 -鱗 -堂 -算 -貢 -献 -威 -監 -督 -針 -襲 -銅 -姪 -幽 -霊 -癖 -綾 -扉 -雹 -崎 -条 -療 -封 -癇 -癪 -揮 -碁 -瓜 -泰 -嘲 -錯 -凡 -碗 -豚 -哀 -児 -童 -虐 -蕩 -刺 -波 -貰 -凪 -炭 -嚢 -索 -圧 -均 -帯 -u -o -峠 -西 -騙 -肘 -砕 -黍 -革 -棄 -俳 -秩 -如 -宵 -竜 -姓 -噴 -閑 -幅 -虎 -塀 -堪 -鈴 -双 -照 -淋 -葬 -悠 -蝿 -鳩 -獄 -晒 -j -仏 -某 -享 -尿 -慶 -裸 -丹 -( -) -杖 -逮 -徴 -災 -〔 -〕 -酷 -角 -炉 -僚 -揚 -馴 -珠 -霧 -詞 -潟 -陣 -鍋 -拘 -焦 -h -k -蜜 -蜂 -穂 -湾 -弄 -跡 -麓 -蔭 -讐 -弊 -董 -〜 -綴 -ゾ -膳 -称 -痒 -倉 -怨 -掻 -蓄 -茨 -摩 -厄 -陳 -詫 -贔 -屓 -桃 -赴 -墟 -湧 -逢 -隻 -― -伎 -潰 -鯔 -鑑 -鯨 -炊 -腑 -獣 -勿 -禎 -沖 -縄 -蕾 -股 -娩 -枝 -殆 -氾 -濫 -乞 -恨 -豆 -禿 -釧 -扇 -誓 -躊 -躇 -徐 -貿 -雷 -鋳 -飴 -洞 -窟 -粗 -鎌 -鈍 -刊 -狼 -煎 -幻 -旗 -狩 -耕 -範 -掲 -源 -漢 -枕 -嬌 -莫 -券 -崇 -隔 -袈 -裟 -里 -暫 -虹 -櫛 -硬 -此 -縮 -m -兆 -轢 -帆 -這 -央 -俗 -瞼 -頻 -需 -餐 -琴 -羊 -令 -薫 -勃 -朽 -虻 -賑 -刀 -籍 -漂 -煽 -斉 -株 -褒 -膝 -, -C -D -叩 -鶏 -N -A -S -糸 -. -挟 - -胡 -椒 -玩 -祉 -" -0 -— -併 -蛾 -ゥ -郡 -` -' -・ -9 -6 -8 -3 -- -拿 -爵 -准 -幕 -5 -~ -副 -鞭 -7 -兼 -: -á -ň -宮 -廷 -磁 -4 -ó -菌 -卿 -皇 -峰 -% -貝 -軟 -, -把 -携 -/ -析 -ž -盤 -斑 -輸 -託 -隊 -蓋 -『 -』 -彩 -& -詠 -篇 -騎 -_ -晋 -釜 -尚 -欧 -紀 -管 -渓 -韓 -李 -栽 -培 -尉 -骸 -ă -ş -剖 -翼 -亜 -羅 -奉 -畔 -拓 -環 -礁 -枢 -斜 -漕 -艇 -稀 -臣 -勲 -棘 -艦 -盟 -粒 -闘 -å -戯 -∇ -柵 -醸 -礎 -旬 -聘 -矮 -棟 -碑 -殿 -億 -! -惧 -抽 -迭 -% -  -垂 -還 -澤 -輔 -粉 -齊 -秦 -砲 -屯 -織 -胞 -諮 -殊 -媒 -嫡 -綱 -搬 -該 -透 -禽 -弦 -瞭 -坦 -浸 -韻 -竪 -墳 -隷 -撤 -哲 -叙 -é -庶 -紡 -禍 -肺 -婉 -$ -沃 -鬼 -棋 -揃 -楊 -綿 -訟 -遁 -妄 -玉 -軌 -榴 -蘇 -臨 -疇 -披 -顕 -圏 -Ș -融 -擦 -Č -č -埃 -曖 -昧 -旋 -瞳 -謡 -衡 -槍 -茎 -唐 -轄 -郴 -捉 -覇 -嘉 -陵 -嘴 -蔓 -嘱 -閲 -征 -謄 -胚 -陶 -浦 -勅 -芻 -疾 -昏 -; -耗 -践 -禅 -襟 -曹 -瞑 -ș -偵 -酬 -駿 -蔡 -諷 -瑁 -í -è -: -ø -呈 -笠 -岬 -洛 -聾 -唖 -溝 -堀 -雌 -牝 -仔 -尼 -庁 -穫 -妖 -曽 -= -= -嗜 -珊 -瑚 -軸 -# -紋 -劉 -璿 -胤 -墉 -彫 -盆 -饗 -宴 -挿 -蔽 -脳 -暦 -ä -õ -廊 -讃 -ë -促 -峻 -壌 -訛 -鉱 -姦 -唆 -舗 -迂 -ñ -弘 -昌 -舶 -箔 -冠 -溢 -鶴 -肛 -脊 -柱 -傑 -智 -彦 -朋 -昪 -靖 -姻 -哨 -尺 -冥 -​ -剪 -“ -” -L -P -- -瀕 -ö -津 -汐 -泌 -皮 -膚 -肢 -只 -鍮 -斧 -壮 -倫 -幣 -儒 -遷 -殻 -惹 -累 -ß -珪 -弛 -曝 -浙 -華 -柿 -哺 -ü -& -W -Z -X -I -薪 -E -M -ę -雰 -媚 -艶 -蹄 -拐 -ř -â -塊 -箋 -漠 -呪 -Ł -ą -ł -挽 -灌 -漑 -煉 -瓦 -G -μ -迅 -+ -猥 -褻 -頬 -逐 -廠 -ć -邸 -疼 -伐 -燥 -凌 -駕 -錐 -尖 -û -呉 -翔 -憤 -慨 -琥 -珀 -漸 -堆 -ā -亀 -肖 -T -R -à -枠 -桁 -剰 -匿 -秤 -厩 -褐 -Ž -đ -Ä -趙 -š -餃 -擁 -脆 -脂 -肪 -漿 -× -晶 -岐 -遍 -謙 -殉 -弓 -Ü -昭 -Å -* -澎 -擬 -債 -秒 -猟 -歪 -阻 -砦 -凸 -諜 -ı -… -腫 -晃 -也 -龍 -燕 -閣 -ê -眉 -牡 -旺 -ç -ō -恣 -疆 -坐 -孵 -搾 -傍 -■ -削 -唇 -釉 -凹 -囚 -魏 -腱 -謀 -ţ -堤 -# -笛 -靭 -V -B -崗 -О -с -т -р -о -в -Г -а -л -я -膜 -椎 -帥 -剛 -梢 -俊 -蟹 -腿 -牽 -粘 -葦 -ń -劾 -祥 -紺 -ヵ -芳 -須 -賀 -填 -殖 -痺 -浚 -渫 -H -F -ī -匯 -Š -寡 -閃 -É -疫 -庇 -而 -頁 -侯 -挺 -畳 -浄 -淘 -杭 -K -縞 -牙 -循 -髄 -Á -屑 -朴 -p -隆 -傭 -紫 -峡 -謬 -ã -膠 -瘍 -瞞 -鋸 -塁 -鋼 -雛 -弧 -ğ -桂 -½ -唄 -扁 -α -酵 -’ -; -肝 -Ö -孔 -彙 -φ -梁 -栖 -妃 -蛹 -勾 -欄 -茂 -漁 -晦 -遼 -寧 -吊 -刃 -彰 -之 -濁 -喪 -僧 -萬 -膣 -那 -蛍 -鍛 -麦 -腺 -ô -Ó -λ -尤 -z -Δ -ż -ò -℃ -肋 -臍 -丼 -´ -踵 -宏 -朱 -燻 -漬 -霜 -+ -巧 -鐘 -冶 -膿 -疱 -寓 -蚊 -匠 -檻 -桟 -洪 -后 -ū -楕 -垣 -孝 -e -r -O -耽 -© -鴨 -杉 -烏 -啓 -Ç -痴 -祀 -贅 -荘 -濾 -ú -瞰 -U -埼 -窒 -沸 -騰 -閾 -È -樽 -→ -陪 -Ş -酢 -ė -漆 -喰 -汎 -< -æ -乙 -² -倣 -− -葛 -墨 -腔 -坑 -緋 -稚 -潤 -侶 -喚 -踪 -穀 -膨 -畜 -陛 -巾 -鉢 -彗 -臼 -杵 -Í -罹 -狡 -猾 -凱 -塑 -頸 -梱 -矯 -竹 -焙 -窄 -剥 -捗 -憧 -袖 -ð -榮 -ț -閥 -窩 -沌 -抄 -遡 -> -鳳 -凰 -痕 -蛇 -矩 -罠 -詐 -ý -楼 -庵 -ē -° -賊 -ồ -爬 -柑 -橘 -曾 -郭 -措 -栗 -桐 -粥 -C -O -E -卯 -詮 -忌 - -倭 -禰 -菖 -蒲 -條 -祓 -幡 -A -B -L -G -T -M -S -u -( -) -a -. -W -i -V -b -c -f -e -N -K -R -U -D -g -P -醍 -醐 -F -Z -I -H -Q -y -o -t -J -ヂ -J -槙 -嵯 -峨 -畿 -塚 -Y -X -淀 -伽 -s -ヅ -餅 -蒡 -穣 -ゞ -絲 -p -鯖 -n -琳 -柳 -髷 -閤 -稲 -菊 -巌 -迦 -抹 -曳 -叡 -壺 -苑 -羌 -狗 -ヰ -醤 -ぉ -硝 -袴 -倶 -汁 -但 -杮 -葺 -煮 -爺 -夙 -桜 -亭 -ゑ -苗 -m -曼 -荼 -簪 -☆ -辻 -鑢 -ゝ -稗 -蹊 -貼 -獅 -廟 -阿 -陀 -蘭 -妓 -翠 -柚 -賓 -芦 -拉 -麺 -帷 -或 -槐 -屎 -j -惟 -撫 -瑞 -侍 -巴 -廉 -峯 -菩 -薩 -吽 -弖 -彌 -佛 -耨 -閇 -貞 -闍 -閦 -洲 -妾 -仁 -宕 -媛 -隧 -笥 -葵 -茜 -譚 -渥 -旭 -綬 -霰 -楓 -雁 -朗 -渕 -梓 -巫 -姐 -鉾 -囃 -藩 -藺 -鮎 -粟 -袷 -篤 -杏 -遵 -徽 -宍 -瓊 -堵 -猷 -馨 -與 -麿 -冨 -彷 -徨 -湊 -菅 -按 -渠 -龗 -鞍 -采 -琢 -枳 -詣 -祇 -稙 -祐 -毅 -冲 -坡 -阯 -堯 -庄 -掾 -牟 -豫 -尹 -弉 -牌 -鑒 -夷 -俘 -喬 -暁 -允 -亮 -緯 -繋 -偈 -誡 -諡 -瑠 -璃 -弼 -岑 -亥 -郁 -媞 -磯 -佳 -翁 -蹟 -揆 -槻 -嗣 -恭 -熈 -畝 -噌 -燈 -脩 -佩 -閻 -壱 -逸 -眷 -誼 -籌 -芋 -鰯 -璽 -旛 -鑰 -摺 -鉤 -淫 -祠 -凉 -牒 -款 -蟄 -丞 -鋒 -檗 -帖 -菟 -荻 -邨 -厨 -佑 -乃 -鷺 -屏 -柴 -於 -箒 -祷 -蓮 -鵜 -丑 -寅 -碓 -渦 -蔚 -鰻 -姥 -毘 -閏 -涌 -庸 -樂 -祚 -邵 -虞 -邇 -悦 -栃 -怡 -斯 -榎 -厭 -爾 -圓 -應 -吏 -并 -堰 -奄 -掩 -壕 -稔 -焔 -w -猴 -@ -薗 -諏 -窯 -甚 -麹 -竈 -无 -穢 -窠 -廻 -寇 -鈞 -菴 -鍍 -珉 -慕 -詢 -肇 -羲 -莽 -襖 -鴎 -錦 -紗 -胴 -輿 -玲 -畷 -窪 -徂 -徠 -對 -桶 -螺 -鈿 -麝 -巳 -卸 -寵 -狛 -裳 -剋 -喩 -樋 -噺 -藍 -婢 -梵 -樫 -鷲 -嶽 -憐 -宰 -塾 -蔬 -涅 -槃 -址 -耆 -穎 -糠 -鰭 -俣 -咒 -鼠 -裘 -筯 -繍 -宸 -翰 -魁 -隈 -匡 -熙 -翫 -畠 -瓢 -壽 -卉 -筐 -僑 -蝦 -蹉 -k -v -跋 -釐 -堕 -h -r -d -哩 -l -樓 -霞 -韶 -碩 -皓 -臥 -鷹 -淵 -篭 -收 -桑 -誅 -國 -竄 -煕 -苔 -晏 -韋 -芥 -墾 -闔 -梆 -拵 -舅 -鎧 -蛙 -播 -楯 -廓 -暹 -惠 -瑜 -鑁 -舘 -恂 -衞 -嶋 -駒 -箏 -悼 -橿 -梶 -箸 -烹 -喝 -稽 -餡 -鰹 -樺 -㈱ -兜 -竃 -炒 -盒 -茅 -萱 -嶺 -藉 -苅 -坤 -闥 -懲 -湛 -藁 -衙 -饉 -戈 -桓 -衫 -聚 -潅 -藷 -糟 -妍 -竿 -絃 -罷 -擾 -疏 -鈔 -銕 -亟 -瀧 -勒 -躰 -佶 -錬 -慧 -檀 -聨 -頴 -亘 -尭 -愿 -贋 -證 -撰 -附 -阜 -毫 -漉 -惣 -蘂 -爐 -賎 -祢 -刹 -叉 -饅 -茲 -菱 -筮 -澳 -纂 -楚 -辰 -詔 -遐 -蟻 -吾 -萩 -鞠 -謹 -叢 -伍 -卜 -吃 -桔 -梗 -砧 -敦 -仇 -宥 -飫 -粂 -廿 -鼎 -逕 -嬪 -箭 -恤 -杣 -舖 -汲 -竟 -邃 -糾 -邑 -哇 -〈 -〉 -圀 -盡 -儼 -椋 -籃 -芹 -滋 -蛤 -淳 -駝 -猪 -沂 -稜 -莵 -藏 -經 -筍 -茗 -侠 -凶 -蓆 -紐 -蕎 -魯 -朔 -澗 -藻 -甫 -琮 -鬘 -欣 -欽 -笙 -舜 -闕 -煇 -鈎 -騨 -蒔 -鰐 -埵 -幢 -鑽 -嵌 -楷 -榛 -錍 -鈷 -笈 -鐸 -磬 -碧 -熨 -斗 -翅 -襴 -鑚 -鵄 -吟 -垢 -掟 -卦 -筑 -茄 -葱 -竴 -廼 -玖 -珂 -跏 -蝉 -誄 -串 -沓 -游 -蕃 -蕪 -鍬 -粮 -諭 -盃 -葩 -迪 -圭 -廬 -諶 -德 -祕 -裃 -荊 -洒 -蟷 -螂 -腋 -袍 -髮 -禮 -趺 -堺 -嘗 -甞 -帛 -蝕 -芿 -讀 -褌 -坪 -簒 -鋤 -硯 -翺 -棺 -胝 -篩 -磐 -隋 -諫 -亨 -旦 -孚 -叟 -曉 -盈 -澪 -懿 -爲 -琦 -愔 -圃 -濱 -奘 -諺 -藪 -註 -蜘 -蛛 -鞏 -篷 -閨 -裡 -糊 -賁 -跨 -劫 -壬 -絁 -釘 -譬 -聯 -傳 -芒 -體 -髻 -悉 -荏 -綸 -柏 -珣 -撹 -芬 -裔 -焚 -廂 -饌 -嵩 -簾 -匣 -禊 -籤 -奠 -鯉 -幟 -脛 -巷 -楳 -胖 -庚 -浩 -諒 -溥 -丙 -楠 -冑 -班 -學 -麞 -緬 -肱 -砥 -縢 -耶 -舂 -靈 -砌 -樗 -暉 -蛸 -鞆 -芙 -蓉 -雙 -鴻 -臚 -褄 -濠 -奢 -槌 -紘 -框 -蓑 -甑 -忽 -淆 -艮 -樵 -竭 -羯 -牢 -櫃 -鸞 -拙 -椿 -榊 -肴 -萠 -綜 -鮭 -笹 -苞 -硫 -奸 -徭 -躯 -戟 -襷 -閘 -櫓 -嘯 -臂 -實 -椏 -潴 -藐 -麒 -麟 -烝 -杜 -籐 -槇 -曰 -筰 -懺 -縣 -褥 -輯 -蚕 -斬 -庖 -謌 -璞 -屍 -團 -哉 -畏 -塵 -什 -鳶 -鴉 -濤 -縒 -趾 -櫻 -麩 -曠 -愍 -彊 -驕 -姶 -兎 -鴫 -竺 -僊 -雫 -彭 -灘 -餝 -棗 -蔀 -侑 -弗 -婬 -牘 -訶 -衍 -錫 -惺 -熹 -顛 -呑 -粕 -楞 -咀 -詛 -釋 -瑋 -曄 -筧 -誾 -徧 -虔 -蒐 -酋 -會 -頌 -齋 -誦 -戎 -袿 -繹 -榱 -酥 -碕 -汪 -奔 -曙 -鶯 -囀 -裾 -楮 -歎 -嬬 -婿 -升 -晧 -娼 -祟 -楢 -蓬 -杢 -篁 -柯 -弐 -几 -渤 -憙 -蜀 -芭 -蕉 -恕 -谿 -樟 -訢 -蒋 -鉦 -鍾 -馗 -鞘 -殷 -臈 -檄 -滿 -憑 -埴 -劔 -寶 -鐵 -姨 -耀 -僭 -襄 -疋 -蘆 -靺 -鞨 -悌 -仍 -枡 -鱈 -籬 -芯 -酉 -姜 -陞 -睿 -逗 -頚 -迹 -掬 -巒 -槽 -滸 -魄 -錘 -饋 -椙 -彬 -狄 -躬 -瀋 -奎 -悍 -總 -瑛 -禧 -廣 -塘 -蓼 -兌 -碾 -桝 -瞿 -醒 -苧 -嶂 -韮 -薙 -皺 -莞 -膏 -贄 -咋 -啄 -鎚 -汀 -鏃 -龕 -衷 -諱 -駈 -笄 -酌 -觀 -礙 -杓 -决 -覲 -甕 -栴 -絅 -晟 -銑 -珈 -琲 -膩 -愷 -蕭 -戮 -租 -戔 -嗚 -盞 -鵞 -軾 -昉 -爽 -宋 -匝 -瑳 -逝 -蕨 -欅 -黌 -蒼 -鎗 -惇 -其 -攘 -杲 -斥 -傅 -鞁 -毬 -璋 -賈 -蹲 -踞 -黛 -鯛 -鉋 -姞 -葡 -萄 -訥 -輌 -閬 -鬯 -靜 -瑩 -孁 -洹 -闡 -盧 -猩 -岫 -套 -巖 -篳 -篥 -舩 -覺 -沅 -衒 -凞 -祺 -袱 -托 -蟇 -巽 -藹 -狸 -衾 -ぢ -蘊 -顗 -鮒 -遥 -邊 -箆 -簀 -雍 -筌 -漣 -筅 -鈦 -夾 -紵 -梧 -賣 -凋 -弔 -霖 -劭 -餉 -ぃ -篋 -諚 -朕 -茸 -栂 -佃 -柘 -蔦 -鍔 -逍 -綏 -碇 -逓 -鄭 -鏑 -簺 -棹 -卍 -痘 -闢 -籟 -饂 -飩 -澱 -汝 -邉 -儛 -暾 -屠 -祁 -砺 -俵 -蒙 -藝 -熾 -洽 -榜 -莱 -璵 -蕊 -髙 -鄰 -z -穆 -姚 -忻 -竝 -苡 -諟 -媓 -嫄 -忯 -鐙 -撞 -綽 -璨 -鑼 -苫 -煌 -皋 -當 -捺 -邁 -瞻 -舍 -[ -] -糜 -輦 -啼 -捻 -襠 -涛 -瀾 -娑 -諧 -毀 -簫 -溪 -煤 -賠 -奕 -蜷 -雉 -咫 -暲 -艘 -拏 -筏 -塙 -蜊 -隼 -纏 -叛 -彈 -枇 -杷 -柊 -畢 -逼 -桧 -鴛 -鴦 -蝋 -燭 -箪 -豹 -鋲 -蛭 -囉 -羂 -羈 -逞 -單 -蛎 -萍 -糞 -站 -騏 -鮫 -昂 -袒 +ペ +ホ +ボ +ポ +マ +ミ +ム +メ +モ +ャ +ヤ +ュ +ユ +ョ +ヨ +ラ +リ +ル +レ +ロ +ワ +ヰ +ン +ヴ +ヵ +ヶ +・ +ー +㈱ +一 +丁 +七 +万 +丈 +三 +上 +下 +不 +与 +丑 且 -鎬 -戊 -瓔 -珞 -俸 -檜 -萌 -萊 -俔 -潭 -鵬 -翡 -柾 -亦 -玅 -箕 -咸 -獏 -瞋 -聊 -礬 -孟 -氈 -銚 -葭 -橇 -籾 -澂 -匁 -嬾 -淇 -薮 -愈 -茹 -揖 -僮 -渾 -蜻 -蛉 -羹 -酪 -洸 -嶠 -癡 -畺 -謫 -琉 -瀑 -湫 -賤 -摸 -濟 -淄 -伶 -聲 -莬 -禖 -韜 -彝 -珎 -賄 -賂 -亙 -彎 -椀 +世 +丘 +丙 +丞 +両 +並 +中 +串 +丸 +丹 +主 +丼 丿 -舒 +乃 +久 +之 +乎 +乏 +乗 +乘 +乙 +九 +乞 +也 +乱 +乳 +乾 +亀 +了 +予 +争 +事 +二 +于 +互 +五 +井 +亘 +亙 +些 +亜 +亟 +亡 +交 +亥 +亦 +亨 +享 +京 +亭 +亮 +人 +什 +仁 +仇 +今 +介 +仍 +仏 +仔 +仕 +他 仗 -佚 +付 +仙 +代 +令 +以 +仮 +仰 +仲 +件 +任 +企 +伊 +伍 +伎 +伏 +伐 +休 +会 +伝 +伯 估 +伴 +伶 +伸 +伺 +似 +伽 +佃 +但 +位 +低 +住 +佐 +佑 +体 +何 +余 +佚 +佛 +作 +佩 +佳 +併 +佶 +使 +侈 +例 +侍 侏 +侑 侘 +供 +依 +侠 +価 +侮 +侯 +侵 +侶 +便 +係 +促 +俄 +俊 +俔 +俗 +俘 +保 +信 +俣 +俤 +修 俯 +俳 +俵 +俸 +俺 +倉 +個 +倍 +倒 +候 +借 +倣 +値 +倫 +倭 +倶 +倹 偃 -偕 +假 +偈 +偉 +偏 偐 +偕 +停 +健 +側 +偵 +偶 +偽 傀 +傅 +傍 +傑 +傘 +備 +催 +傭 +傲 +傳 +債 +傷 +傾 +僊 +働 +像 +僑 +僕 +僚 +僧 +僭 +僮 +儀 +億 +儇 +儒 +儛 +償 儡 -遜 +優 +儲 儺 +儼 兀 +允 +元 +兄 +充 +兆 +先 +光 +克 +兌 +免 +兎 +児 +党 +兜 +入 +全 +八 +公 +六 +共 +兵 +其 +具 +典 +兼 +内 +円 +冊 +再 +冑 +冒 +冗 +写 +冠 冤 -菫 +冥 +冨 +冬 +冲 +决 +冶 +冷 +准 +凉 +凋 +凌 +凍 +凛 +凝 +凞 +几 +凡 +処 +凪 +凰 +凱 +凶 +凸 +凹 +出 +函 +刀 +刃 +分 +切 +刈 +刊 刎 -畸 +刑 +列 +初 +判 +別 +利 +刪 +到 +制 +刷 +券 +刹 +刺 +刻 +剃 +則 +削 +剋 +前 +剖 +剛 +剣 +剤 +剥 +剪 +副 +剰 +割 +創 剽 -窃 -辨 -號 +劇 +劉 +劔 +力 +功 +加 +劣 +助 +努 +劫 +劭 +励 +労 +効 +劾 +勃 +勅 +勇 +勉 +勒 +動 +勘 +務 +勝 +募 +勢 +勤 +勧 +勲 +勺 +勾 +勿 +匁 +匂 +包 匏 +化 +北 +匙 +匝 +匠 +匡 +匣 +匯 +匲 +匹 +区 +医 +匿 +十 +千 +升 +午 +卉 +半 +卍 +卑 +卒 +卓 +協 +南 +単 +博 +卜 +占 +卦 +卯 +印 +危 +即 +却 +卵 +卸 +卿 +厄 +厚 +原 厠 +厨 +厩 +厭 +厳 +去 +参 +又 +叉 +及 +友 +双 +反 +収 +叔 +取 +受 +叙 +叛 +叟 +叡 +叢 +口 +古 +句 +叩 +只 +叫 +召 +可 +台 +叱 +史 +右 +叶 +号 +司 +吃 +各 +合 +吉 +吊 +同 +名 +后 +吏 +吐 +向 +君 吝 -嗇 +吟 +吠 +否 +含 +吸 +吹 +吻 +吽 +吾 +呂 +呆 +呈 +呉 +告 +呑 +周 +呪 +呰 +味 +呼 +命 +咀 咄 +咋 +和 +咒 +咫 +咲 +咳 +咸 +哀 +品 +哇 +哉 +員 +哨 +哩 哭 +哲 +哺 +唄 +唆 +唇 +唐 +唖 +唯 +唱 唳 +唸 +唾 +啄 +商 +問 +啓 +啼 +善 +喋 +喚 +喜 +喝 +喧 +喩 +喪 +喫 +喬 +單 +喰 +営 +嗅 +嗇 嗔 +嗚 +嗜 +嗣 +嘆 +嘉 +嘗 +嘘 +嘩 +嘯 +嘱 +嘲 +嘴 +噂 +噌 +噛 +器 +噴 +噺 嚆 -譯 -乘 +嚢 +囀 +囃 +囉 +囚 +四 +回 +因 +団 +困 +囲 +図 +固 +国 +圀 +圃 +國 +圏 +園 +圓 +團 圜 +土 +圧 +在 +圭 +地 +址 +坂 +均 +坊 +坐 +坑 +坡 +坤 +坦 +坪 +垂 +型 +垢 +垣 +埃 +埋 +城 埒 +埔 +域 +埠 +埴 +埵 +執 +培 +基 +埼 +堀 +堂 +堅 +堆 +堕 +堤 +堪 +堯 +堰 +報 +場 +堵 +堺 +塀 +塁 +塊 +塑 +塔 +塗 +塘 +塙 +塚 +塞 +塩 +填 +塵 +塾 +境 +墉 +墓 +増 +墜 +墟 +墨 +墳 +墺 +墻 +墾 +壁 +壇 +壊 +壌 +壕 +士 +壬 +壮 +声 +壱 +売 +壷 壹 +壺 +壽 +変 +夏 +夕 +外 +夙 +多 +夜 +夢 夥 +大 +天 +太 +夫 夬 夭 +央 +失 +夷 +夾 +奄 +奇 +奈 +奉 +奎 +奏 +契 +奔 +奕 +套 +奘 +奠 +奢 +奥 +奨 +奪 +奮 +女 +奴 +奸 +好 +如 +妃 +妄 +妊 +妍 +妓 +妖 +妙 +妥 +妨 +妬 妲 -沆 +妹 +妻 +妾 +姉 +始 +姐 +姓 +委 +姚 +姜 +姞 +姥 +姦 +姨 +姪 +姫 +姶 +姻 +姿 +威 +娑 +娘 娟 +娠 +娩 +娯 +娼 +婆 +婉 +婚 +婢 +婦 +婬 +婿 +媄 +媒 +媓 +媚 +媛 +媞 媽 +嫁 +嫄 +嫉 +嫌 +嫐 嫗 +嫡 +嬉 +嬌 +嬢 +嬪 +嬬 +嬾 +孁 +子 +孔 +字 +存 +孚 +孝 +孟 +季 +孤 +学 +孫 +孵 +學 +宅 +宇 +守 +安 +宋 +完 +宍 +宏 +宕 +宗 +官 +宙 +定 +宛 +宜 +宝 +実 +客 +宣 +室 +宥 +宮 +宰 +害 +宴 +宵 +家 +宸 +容 +宿 +寂 +寄 +寅 +密 +寇 +富 +寒 +寓 +寔 +寛 +寝 +察 +寡 +實 +寧 +審 +寮 +寵 +寶 +寸 +寺 +対 +寿 +封 +専 +射 +将 +尉 +尊 +尋 +對 +導 +小 +少 +尖 +尚 +尤 +尪 +尭 +就 +尹 +尺 +尻 +尼 +尽 +尾 +尿 +局 +居 +屈 +届 +屋 +屍 +屎 +屏 +屑 +屓 +展 +属 +屠 +層 +履 +屯 +山 +岐 +岑 +岡 +岩 +岫 +岬 +岳 岷 +岸 +峠 +峡 +峨 +峯 +峰 +島 +峻 +崇 +崋 +崎 +崑 +崖 +崗 +崛 +崩 +嵌 +嵐 +嵩 +嵯 +嶂 +嶋 +嶠 +嶺 +嶼 +嶽 +巀 +巌 +巒 +巖 +川 +州 +巡 +巣 +工 +左 +巧 +巨 +巫 +差 +己 +巳 +巴 +巷 +巻 +巽 +巾 +市 +布 +帆 +希 +帖 帚 +帛 +帝 +帥 +師 +席 +帯 +帰 +帳 +帷 +常 +帽 幄 -幔 +幅 幇 -淨 -繼 +幌 +幔 +幕 +幟 +幡 +幢 +幣 +干 +平 +年 +并 +幸 +幹 +幻 +幼 +幽 +幾 +庁 +広 +庄 +庇 +床 +序 +底 +庖 +店 +庚 +府 +度 +座 +庫 +庭 +庵 +庶 +康 +庸 +廂 +廃 +廉 +廊 +廓 +廟 +廠 +廣 +廬 +延 +廷 +建 +廻 +廼 +廿 +弁 +弄 +弉 +弊 +弌 +式 +弐 +弓 +弔 +引 +弖 +弗 +弘 +弛 +弟 +弥 +弦 +弧 +弱 +張 +強 +弼 +弾 +彈 +彊 +彌 +彎 +当 +彗 +彙 +彝 +形 +彦 +彩 +彫 +彬 +彭 +彰 +影 +彷 +役 +彼 +往 +征 +徂 +径 +待 +律 +後 +徐 徑 +徒 +従 +得 +徠 +御 +徧 +徨 +復 +循 +徭 +微 +徳 +徴 +德 +徹 +徽 +心 +必 +忉 +忌 +忍 +志 +忘 +忙 +応 +忠 +快 +忯 +念 +忻 +忽 忿 +怒 +怖 +思 +怠 +怡 +急 +性 +怨 +怪 +怯 +恂 +恋 +恐 +恒 +恕 +恣 +恤 +恥 +恨 +恩 恬 +恭 +息 +恵 +悉 +悌 +悍 +悔 +悟 +悠 +患 +悦 +悩 +悪 +悲 +悼 +情 +惇 +惑 +惚 +惜 +惟 +惠 +惣 +惧 +惨 +惰 +想 +惹 +惺 +愈 +愉 +愍 +意 +愔 +愚 +愛 +感 +愷 +愿 +慈 +態 +慌 +慎 +慕 +慢 +慣 +慧 +慨 +慮 +慰 +慶 +憂 +憎 +憐 +憑 +憙 +憤 +憧 +憩 +憬 +憲 +憶 +憾 +懇 +應 +懌 +懐 +懲 +懸 +懺 懽 +懿 +戈 +戊 戌 +戎 +成 +我 +戒 +戔 +或 +戚 +戟 +戦 截 +戮 +戯 +戴 +戸 +戻 +房 +所 +扁 +扇 +扈 +扉 +手 +才 +打 +払 +托 +扮 +扱 +扶 +批 +承 +技 +抄 +把 +抑 +抓 +投 +抗 +折 +抜 +択 +披 +抱 +抵 +抹 +押 +抽 +担 拇 +拈 +拉 +拍 +拏 +拐 +拒 +拓 +拘 +拙 +招 +拝 +拠 +拡 +括 +拭 +拳 +拵 +拶 +拾 +拿 +持 挂 +指 +按 +挑 +挙 +挟 +挨 +振 +挺 +挽 +挿 +捉 +捕 +捗 +捜 +捧 +捨 +据 +捺 +捻 +掃 +掄 +授 +掌 +排 掖 +掘 +掛 +掟 +採 +探 掣 +接 +控 +推 +掩 +措 +掬 +掲 +掴 +掻 +掾 +揃 +揄 +揆 揉 +描 +提 +揖 +揚 +換 +握 +揮 +援 揶 -揄 +揺 +損 搦 +搬 +搭 +携 +搾 +摂 +摘 +摩 +摸 +摺 +撃 +撒 +撞 +撤 +撥 +撫 +播 +撮 +撰 +撲 +撹 +擁 +操 +擔 +擦 +擬 +擾 +攘 攝 +攣 +支 +收 +改 +攻 +放 +政 +故 +敏 +救 +敗 +教 +敢 +散 +敦 +敬 +数 +整 +敵 +敷 +斂 +文 +斉 +斎 +斐 +斑 +斗 +料 +斜 斟 +斤 +斥 +斧 +斬 +断 +斯 +新 +方 +於 +施 旁 +旅 +旋 +旌 +族 +旗 +旛 +无 旡 +既 +日 +旦 +旧 +旨 +早 +旬 +旭 +旺 旻 +昂 +昆 +昇 +昉 +昌 +明 +昏 +易 +昔 +星 +映 +春 +昧 +昨 +昪 +昭 +是 昵 +昼 +晁 +時 +晃 +晋 +晏 +晒 +晟 +晦 +晧 +晩 +普 +景 +晴 +晶 +智 +暁 +暇 暈 +暉 +暑 +暖 +暗 +暘 +暢 +暦 +暫 +暮 +暲 +暴 +暹 +暾 +曄 +曇 +曉 +曖 +曙 +曜 +曝 +曠 +曰 +曲 +曳 +更 +書 +曹 +曼 +曽 +曾 +替 +最 +會 +月 +有 +朋 +服 朏 +朔 +朕 +朗 +望 +朝 +期 朧 +木 +未 +末 +本 +札 +朱 +朴 +机 +朽 杁 +杉 +李 +杏 +材 +村 +杓 +杖 +杜 杞 +束 +条 +杢 +杣 +来 +杭 +杮 +杯 +東 +杲 +杵 +杷 +杼 +松 +板 枅 -矧 -梟 -梔 -梛 +枇 +析 +枓 +枕 +林 +枚 +果 +枝 +枠 +枡 +枢 +枯 +枳 +架 +柄 +柊 +柏 +某 +柑 +染 +柔 +柘 +柚 +柯 +柱 +柳 +柴 +柵 +査 +柾 +柿 +栂 +栃 +栄 +栖 +栗 +校 +株 +栲 +栴 +核 +根 +栻 +格 +栽 +桁 +桂 +桃 +框 +案 +桐 +桑 +桓 +桔 +桜 +桝 +桟 +桧 桴 +桶 桾 +梁 +梅 +梆 +梓 +梔 +梗 +梛 +條 +梟 +梢 +梧 +梨 +械 +梱 +梲 +梵 +梶 +棄 +棋 +棒 +棗 +棘 +棚 +棟 +棠 +森 +棲 +棹 +棺 +椀 +椅 +椋 +植 +椎 +椏 +椒 +椙 +検 椥 -楫 椹 +椿 +楊 +楓 +楕 +楚 +楞 +楠 楡 +楢 +楨 楪 +楫 +業 +楮 +楯 +楳 +極 +楷 +楼 +楽 +概 +榊 +榎 +榕 +榛 +榜 +榮 +榱 +榴 +槃 +槇 +槊 +構 +槌 +槍 +槐 +様 +槙 +槻 +槽 槿 +樂 +樋 +樓 +樗 +標 +樟 +模 +権 +横 +樫 +樵 +樹 +樺 +樽 +橇 +橋 +橘 +機 +橿 +檀 +檄 +檎 檐 +檗 +檜 檣 -檸 +檥 檬 +檮 +檸 +檻 +櫃 +櫓 +櫛 櫟 +櫨 +櫻 +欄 +欅 +欠 +次 +欣 +欧 +欲 +欺 +欽 +款 +歌 +歎 +歓 +止 +正 +此 +武 +歩 +歪 +歯 +歳 +歴 +死 +殆 +殉 +殊 +残 +殖 殯 -麾 +殴 +段 +殷 +殺 +殻 +殿 +毀 +毅 +母 +毎 +毒 +比 +毘 +毛 +毫 +毬 +氈 +氏 +民 +気 +水 +氷 +永 +氾 +汀 +汁 +求 +汎 +汐 +汗 +汚 +汝 +江 +池 +汪 +汰 +汲 +決 +汽 +沂 +沃 +沅 +沆 +沈 +沌 沐 +沓 +沖 +沙 +没 +沢 +沱 +河 +沸 +油 +治 +沼 沽 +沿 +況 +泉 +泊 +泌 +法 +泗 +泡 +波 +泣 +泥 +注 +泯 +泰 +泳 +洋 +洒 +洗 +洛 +洞 +津 +洩 +洪 +洲 +洸 +洹 +活 +洽 +派 +流 +浄 +浅 +浙 +浚 +浜 +浣 +浦 +浩 +浪 +浮 +浴 +海 +浸 +涅 +消 +涌 +涙 +涛 +涯 +液 涵 +涼 +淀 +淄 +淆 +淇 +淋 +淑 +淘 +淡 淤 +淨 +淫 +深 +淳 +淵 +混 +淹 +添 +清 +済 +渉 +渋 +渓 +渕 +渚 +減 +渟 +渠 +渡 +渤 +渥 +渦 +温 +渫 +測 +港 +游 +渾 +湊 +湖 +湘 +湛 +湧 +湫 +湯 +湾 +湿 +満 +源 +準 +溜 +溝 +溢 +溥 +溪 +溶 +溺 滄 -滕 +滅 +滋 滌 +滑 +滕 +滝 +滞 +滴 +滸 +滹 +滿 +漁 +漂 +漆 +漉 +漏 +漑 +演 +漕 +漠 +漢 +漣 +漫 +漬 +漱 +漸 +漿 +潅 +潔 +潙 +潜 +潟 +潤 +潭 +潮 +潰 +潴 澁 -眞 +澂 +澄 +澎 +澗 +澤 +澪 +澱 +澳 +激 +濁 +濃 +濟 +濠 +濡 +濤 +濫 +濯 +濱 +濾 +瀉 +瀋 +瀑 +瀕 +瀞 瀟 +瀧 +瀬 +瀾 +灌 灑 +灘 +火 +灯 +灰 +灸 +災 +炉 +炊 +炎 +炒 +炭 炮 +炷 +点 +為 +烈 +烏 烙 +烝 +烹 +焔 +焙 +焚 +無 +焦 +然 +焼 +煇 +煉 +煌 +煎 +煕 +煙 +煤 +煥 +照 +煩 煬 +煮 +煽 +熈 +熊 +熙 +熟 +熨 +熱 +熹 +熾 +燃 +燈 +燎 燔 +燕 +燗 +燥 +燭 +燻 +爆 +爐 +爪 +爬 +爲 +爵 +父 +爺 +爼 +爽 +爾 +片 +版 +牌 +牒 +牘 +牙 +牛 +牝 +牟 +牡 +牢 +牧 +物 +牲 +特 +牽 犂 +犠 +犬 +犯 +状 +狂 +狄 +狐 +狗 +狙 +狛 +狡 +狩 +独 +狭 狷 +狸 +狼 猊 -祗 -瑾 -瑪 +猛 +猟 +猥 +猨 +猩 +猪 +猫 +献 +猴 +猶 +猷 +猾 +猿 +獄 +獅 +獏 +獣 +獲 +玄 +玅 +率 +玉 +王 +玖 +玩 +玲 +珀 +珂 +珈 +珉 +珊 +珍 +珎 +珞 +珠 +珣 +珥 +珪 +班 +現 +球 +理 +琉 +琢 +琥 +琦 +琮 +琲 +琳 +琴 +琵 +琶 +瑁 +瑋 瑙 +瑚 +瑛 +瑜 +瑞 +瑠 +瑤 +瑩 +瑪 +瑳 +瑾 +璃 +璋 +璜 +璞 +璧 +璨 +環 +璵 +璽 +璿 +瓊 +瓔 +瓜 +瓢 +瓦 +瓶 甍 +甑 +甕 +甘 +甚 +甞 +生 +産 +甥 +用 +甫 +田 +由 +甲 +申 +男 +町 +画 +界 +畏 +畑 +畔 +留 +畜 +畝 +畠 +畢 +略 +番 +異 +畳 +當 +畷 +畸 +畺 +畿 +疆 +疇 +疋 +疎 +疏 +疑 +疫 +疱 +疲 +疹 +疼 +疾 +病 +症 +痒 +痔 +痕 +痘 +痙 +痛 +痢 +痩 +痴 +痺 +瘍 瘡 瘧 +療 +癇 +癌 +癒 +癖 +癡 +癪 +発 +登 +白 +百 +的 +皆 +皇 +皋 +皐 +皓 +皮 +皺 +皿 盂 -鉉 +盃 +盆 +盈 +益 +盒 +盗 +盛 +盞 +盟 +盡 +監 +盤 +盥 +盧 +目 +盲 +直 +相 +盾 +省 +眉 +看 +県 +眞 +真 +眠 +眷 +眺 +眼 +着 +睡 +督 +睦 睨 +睿 +瞋 +瞑 +瞞 +瞬 +瞭 +瞰 +瞳 +瞻 +瞼 +瞿 矍 -鑠 +矛 矜 +矢 +知 +矧 +矩 +短 +矮 +矯 +石 +砂 +砌 +研 +砕 +砥 +砦 +砧 +砲 +破 +砺 +硝 +硫 +硬 +硯 +碁 +碇 碌 +碑 +碓 +碕 +碗 碣 +碧 +碩 +確 +碾 +磁 +磐 磔 +磧 +磨 +磬 +磯 +礁 +礎 礒 +礙 礫 +礬 +示 +礼 +社 +祀 +祁 +祇 +祈 +祉 +祐 +祓 +祕 +祖 +祗 +祚 +祝 +神 +祟 +祠 +祢 +祥 +票 +祭 +祷 +祺 +禁 +禄 +禅 +禊 +禍 +禎 +福 +禔 +禖 +禛 +禦 +禧 +禮 +禰 禹 +禽 +禿 +秀 +私 +秋 +科 +秒 +秘 +租 +秤 +秦 +秩 +称 +移 +稀 +程 +税 +稔 +稗 +稙 +稚 +稜 稠 +種 稱 +稲 +稷 +稻 +稼 +稽 +稿 +穀 +穂 +穆 +積 +穎 +穏 +穗 +穜 +穢 +穣 +穫 +穴 +究 +空 +突 +窃 +窄 +窒 +窓 +窟 +窠 +窩 +窪 +窮 +窯 +竃 +竄 +竈 +立 +站 +竜 +竝 +竟 +章 +童 +竪 +竭 +端 +竴 +競 +竹 +竺 +竽 +竿 +笄 +笈 笏 +笑 +笙 +笛 笞 +笠 +笥 +符 +第 +笹 +筅 +筆 +筇 +筈 +等 +筋 +筌 +筍 +筏 +筐 +筑 +筒 +答 +策 +筝 筥 +筧 筬 -箜 -篌 -筝 +筮 +筯 +筰 +筵 +箆 +箇 +箋 +箏 +箒 +箔 +箕 +算 箙 +箜 +管 +箪 +箭 +箱 +箸 +節 +篁 +範 篆 -籀 +篇 +築 +篋 +篌 篝 +篠 +篤 +篥 +篦 +篩 +篭 +篳 +篷 +簀 +簒 +簡 簧 +簪 +簫 +簺 +簾 +簿 +籀 +籃 +籌 +籍 +籐 +籟 +籠 +籤 +籬 +米 +籾 +粂 +粉 +粋 +粒 +粕 +粗 +粘 +粛 +粟 +粥 +粧 +粮 粳 +精 +糊 +糖 +糜 +糞 +糟 +糠 +糧 糯 +糸 糺 +系 +糾 +紀 +約 +紅 +紋 +納 +紐 +純 +紗 +紘 +紙 +級 +紛 +素 +紡 +索 +紫 +紬 +累 +細 +紳 +紵 +紹 +紺 +絁 +終 +絃 +組 +絅 +経 +結 絖 +絞 +絡 +絣 +給 +統 +絲 +絵 +絶 +絹 絽 +綏 +經 +継 +続 +綜 綟 -縅 -繦 +綬 +維 +綱 +網 +綴 +綸 +綺 +綽 +綾 +綿 +緊 +緋 +総 +緑 +緒 +線 +締 緥 +編 +緩 +緬 +緯 +練 +緻 +縁 +縄 +縅 +縒 +縛 +縞 +縢 +縣 +縦 +縫 +縮 縹 -繧 +總 +績 +繁 +繊 +繋 +繍 +織 +繕 繝 -纐 +繦 +繧 +繰 +繹 +繼 +纂 纈 +纏 +纐 +纒 纛 +缶 罔 +罠 罧 +罪 +置 +罰 +署 +罵 +罷 +罹 +羂 +羅 +羆 羇 +羈 +羊 +羌 +美 +群 +羨 +義 +羯 +羲 +羹 +羽 +翁 +翅 +翌 +習 +翔 +翛 +翠 +翡 +翫 +翰 +翺 +翻 +翼 +耀 +老 +考 +者 +耆 +而 +耐 +耕 +耗 +耨 +耳 +耶 +耽 +聊 +聖 +聘 +聚 +聞 +聟 +聡 +聨 +聯 聰 +聲 +聴 +職 +聾 肄 -膀 +肆 +肇 +肉 +肋 +肌 +肖 +肘 +肛 +肝 +股 +肢 +肥 +肩 +肪 +肯 +肱 +育 +肴 +肺 +胃 +胆 +背 +胎 +胖 +胚 +胝 +胞 +胡 +胤 胱 +胴 +胸 +能 +脂 +脅 +脆 +脇 +脈 +脊 +脚 +脛 +脩 +脱 +脳 +腋 +腎 +腐 +腑 +腔 +腕 +腫 +腰 +腱 +腸 +腹 +腺 +腿 +膀 +膏 +膚 +膜 +膝 +膠 +膣 +膨 +膩 +膳 膵 膾 +膿 +臂 +臆 +臈 +臍 +臓 臘 +臚 +臣 +臥 +臨 +自 +臭 +至 +致 +臺 +臼 +舂 +舅 +與 +興 +舌 +舍 +舎 +舒 +舖 +舗 +舘 +舜 +舞 +舟 +舩 +航 +般 舳 -范 -鷄 -苻 +舶 +船 +艇 +艘 +艦 +艮 +良 +色 +艶 +芋 +芒 +芙 +芝 +芥 +芦 +芬 +芭 +芯 +花 +芳 +芸 +芹 +芻 +芽 +芿 +苅 +苑 +苔 +苗 +苛 +苞 +苡 +若 +苦 +苧 +苫 +英 苴 -擔 +苻 +茂 +范 +茄 +茅 +茎 +茗 +茘 +茜 +茨 +茲 +茵 +茶 +茸 +茹 +草 +荊 +荏 +荒 +荘 +荷 +荻 +荼 +莞 莪 +莫 +莬 +莱 +莵 +莽 +菅 +菊 +菌 +菓 +菖 +菘 +菜 +菟 +菩 +菫 +華 +菱 +菴 +萄 +萊 +萌 +萍 +萎 +萠 +萩 +萬 +萱 +落 +葉 +著 +葛 +葡 +董 +葦 +葩 +葬 +葭 +葱 +葵 +葺 +蒋 +蒐 +蒔 +蒙 蒟 +蒡 +蒲 +蒸 蒻 -薨 +蒼 +蒿 +蓄 +蓆 +蓉 +蓋 +蓑 +蓬 +蓮 +蓼 +蔀 +蔑 +蔓 +蔚 +蔡 +蔦 +蔬 +蔭 +蔵 +蔽 +蕃 +蕉 +蕊 +蕎 +蕨 +蕩 +蕪 +蕭 +蕾 +薄 +薇 +薊 +薔 +薗 +薙 薛 -茘 -蠣 +薦 +薨 +薩 +薪 +薫 +薬 +薭 +薮 +藁 +藉 +藍 +藏 +藐 +藝 +藤 +藩 +藪 +藷 +藹 +藺 +藻 +蘂 +蘆 +蘇 +蘊 +蘭 +虎 +虐 +虔 +虚 +虜 +虞 +號 +虫 +虹 +虻 +蚊 +蚕 +蛇 +蛉 +蛍 +蛎 +蛙 +蛛 蛟 -蜆 +蛤 +蛭 +蛮 +蛸 +蛹 +蛾 +蜀 +蜂 蜃 -雖 +蜆 +蜊 +蜘 +蜜 +蜷 +蜻 +蝉 +蝋 +蝕 +蝙 +蝠 +蝦 +蝶 +蝿 +螂 +融 +螣 +螺 +蟄 +蟇 蟠 +蟷 +蟹 +蟻 蠢 +蠣 +血 +衆 +行 +衍 +衒 +術 +街 +衙 +衛 +衝 +衞 +衡 +衢 +衣 +表 +衫 +衰 衵 +衷 衽 +衾 +衿 +袁 +袈 +袋 +袍 +袒 +袖 袙 +袞 +袢 +被 袰 +袱 +袴 +袷 +袿 +裁 +裂 +裃 +装 +裏 +裔 +裕 +裘 裙 +補 +裟 +裡 +裲 +裳 +裴 +裸 裹 +製 +裾 褂 -裲 +褄 +複 +褌 +褐 +褒 +褥 褪 褶 +褻 +襄 +襖 襞 +襟 +襠 襦 -袢 襪 -誥 +襲 +襴 +襷 +西 +要 +覆 +覇 +覈 +見 +規 +視 +覗 +覚 +覧 +親 +覲 +観 +覺 +觀 +角 +解 +触 +言 +訂 +計 +討 +訓 +託 +記 +訛 +訟 +訢 +訥 +訪 +設 +許 +訳 +訴 +訶 +診 +註 +証 +詐 +詔 +評 +詛 +詞 +詠 +詢 +詣 +試 +詩 +詫 +詮 +詰 +話 +該 +詳 +誄 +誅 +誇 +誉 +誌 +認 +誓 +誕 +誘 +語 +誠 +誡 誣 +誤 +誥 +誦 +説 +読 +誰 +課 +誼 +誾 +調 +談 +請 諌 -謚 +諍 +諏 +諒 +論 +諚 +諜 +諟 +諡 +諦 +諧 +諫 +諭 +諮 +諱 +諶 +諷 +諸 +諺 +諾 +謀 +謄 +謌 +謎 謗 +謙 +謚 +講 +謝 +謡 +謫 +謬 +謹 +證 +識 +譚 譛 +譜 +警 +譬 +譯 +議 +譲 譴 +護 +讀 +讃 +讐 讒 +谷 +谿 +豅 +豆 +豊 +豎 豐 +豚 +象 +豪 +豫 +豹 +貌 +貝 +貞 +負 +財 +貢 +貧 +貨 +販 貪 +貫 +責 +貯 +貰 +貴 +買 +貸 +費 +貼 +貿 +賀 +賁 +賂 +賃 +賄 +資 +賈 +賊 +賎 +賑 +賓 +賛 +賜 +賞 +賠 +賢 +賣 +賤 +賦 +質 +賭 +購 賽 +贄 +贅 +贈 +贋 +贔 贖 -扈 +赤 +赦 +走 +赴 +起 +超 +越 +趙 +趣 +足 +趺 +趾 +跋 +跏 +距 +跡 +跨 跪 +路 +跳 +践 +踊 +踏 踐 -躑 +踞 +踪 +踵 +蹄 +蹉 +蹊 +蹟 +蹲 +蹴 躅 +躇 +躊 +躍 +躑 躙 躪 +身 +躬 +躯 +躰 +車 軋 +軌 +軍 +軒 +軟 +転 +軸 軻 +軽 +軾 +較 +載 +輌 +輔 輜 +輝 +輦 +輩 +輪 +輯 +輸 +輿 +轄 +轍 +轟 +轢 +辛 +辞 辟 -檮 -邂 +辥 +辦 +辨 +辰 +辱 +農 +辺 +辻 +込 +迂 +迅 +迎 +近 +返 +迢 +迦 +迪 +迫 +迭 +述 +迷 +迹 +追 +退 +送 +逃 逅 +逆 +逍 +透 +逐 +逓 +途 +逕 +逗 +這 +通 +逝 +逞 +速 +造 +逢 +連 +逮 +週 +進 +逸 +逼 +遁 +遂 +遅 +遇 +遊 +運 +遍 +過 +遐 +道 +達 +違 +遙 +遜 +遠 +遡 +遣 +遥 +適 +遭 +遮 +遯 +遵 +遷 +選 +遺 +遼 +避 邀 +邁 +邂 +邃 +還 +邇 +邉 +邊 +邑 +那 +邦 +邨 +邪 邯 -鄲 +邵 +邸 +郁 +郊 +郎 +郡 郢 +部 +郭 +郴 +郵 +郷 +都 鄂 +鄙 +鄭 +鄰 +鄲 +酉 +酋 +酌 +配 +酎 +酒 +酔 +酢 +酥 +酪 +酬 +酵 +酷 +酸 +醍 +醐 +醒 +醗 +醜 +醤 醪 醵 +醸 +采 +釈 +釉 +釋 +里 +重 +野 +量 +釐 +金 +釘 +釜 +針 +釣 +釧 釿 +鈍 +鈎 +鈐 +鈔 +鈞 +鈦 +鈴 +鈷 +鈸 +鈿 +鉄 +鉇 +鉉 +鉋 +鉛 +鉢 +鉤 +鉦 +鉱 +鉾 +銀 +銃 +銅 +銈 +銑 +銕 +銘 +銚 銜 +銭 鋏 +鋒 +鋤 +鋭 +鋲 +鋳 +鋸 鋺 +鋼 +錆 +錍 +錐 +錘 +錠 +錣 +錦 +錫 +錬 +錯 +録 錵 +鍋 +鍍 +鍑 +鍔 +鍛 +鍬 +鍮 +鍵 鍼 -灸 +鍾 +鎌 +鎖 +鎗 +鎚 +鎧 +鎬 +鎮 鎰 鎹 -鐔 +鏃 +鏑 +鏡 鐃 -鈸 鐇 +鐐 +鐔 +鐘 +鐙 +鐚 +鐡 +鐵 +鐸 +鑁 +鑊 +鑑 +鑒 +鑚 +鑠 +鑢 +鑰 +鑵 鑷 +鑼 +鑽 鑿 +長 +門 +閃 +閇 +閉 +開 +閏 +閑 +間 閔 +閘 +関 +閣 +閤 +閥 +閦 +閨 +閬 +閲 +閻 閼 -崛 +閾 +闇 +闍 +闔 +闕 +闘 +關 +闡 +闢 +闥 +阜 +阪 阮 +阯 +防 +阻 +阿 +陀 +陂 +附 +陌 +降 +限 +陛 +陞 +院 +陣 +除 +陥 +陪 陬 +陰 +陳 +陵 +陶 +陸 +険 +陽 +隅 +隆 +隈 +隊 +隋 +階 +随 +隔 +際 +障 +隠 +隣 +隧 +隷 +隻 +隼 +雀 +雁 +雄 +雅 +集 +雇 +雉 雊 +雋 +雌 +雍 +雑 +雖 +雙 +雛 +離 +難 +雨 +雪 +雫 +雰 +雲 +零 +雷 +雹 +電 +需 +震 +霊 霍 +霖 +霜 +霞 +霧 +霰 +露 +靈 +青 +靖 +静 +靜 +非 +面 +革 靫 +靭 靱 -乎 +靴 +靺 +鞁 +鞄 +鞆 +鞋 +鞍 +鞏 +鞘 +鞠 +鞨 +鞭 +韋 +韓 +韜 +韮 +音 +韶 +韻 +響 +頁 +頂 +頃 +項 +順 +須 +頌 +預 +頑 +頒 +頓 +領 +頚 +頬 +頭 +頴 +頸 +頻 +頼 顆 +題 +額 +顎 +顔 +顕 +顗 +願 +顛 +類 +顧 +顯 +風 +飛 +食 +飢 +飩 +飫 +飯 +飲 +飴 +飼 +飽 +飾 +餃 +餅 +餉 +養 +餌 +餐 +餓 餘 +餝 +餡 +館 +饂 +饅 +饉 +饋 +饌 饒 +饗 +首 +馗 +香 +馨 +馬 +馳 +馴 +駄 +駅 +駆 +駈 +駐 +駒 +駕 +駝 +駿 騁 +騎 +騏 +騒 +験 +騙 +騨 +騰 +驕 +驚 驛 驢 +骨 +骸 +髄 +體 +高 +髙 髢 +髪 +髭 +髮 +髷 +髻 +鬘 +鬚 鬢 鬨 +鬯 +鬱 +鬼 +魁 +魂 +魄 +魅 +魏 +魔 +魚 +魯 +鮎 鮑 +鮒 +鮪 +鮫 +鮭 +鮮 +鯉 +鯔 +鯖 +鯛 +鯨 +鯰 鯱 +鰐 鰒 +鰭 +鰯 鰰 +鰹 +鰻 +鱈 +鱒 +鱗 鱧 +鳥 +鳩 鳰 +鳳 +鳴 +鳶 +鴈 +鴉 +鴎 +鴛 鴟 -鶉 +鴦 +鴨 +鴫 +鴻 +鵄 +鵜 +鵞 +鵡 +鵬 +鵲 鵺 +鶉 +鶏 +鶯 +鶴 +鷄 鷙 +鷲 +鷹 +鷺 鸚 -鵡 +鸞 +鹸 +鹽 +鹿 麁 +麒 +麓 +麗 +麝 +麞 +麟 +麦 +麩 +麹 +麺 +麻 +麾 +麿 +黄 +黌 +黍 +黒 +黙 +黛 黠 鼈 +鼉 +鼎 +鼓 +鼠 +鼻 +齊 +齋 齟 +齢 齬 -棠 -遙 -瑤 -銈 -禔 -禛 -鈐 -儇 -匲 -媄 -尪 -巀 -辥 -忉 -掄 -枓 -栻 -梲 -檥 -滹 -沱 -潙 -炷 -猨 -璜 -穜 -竽 -筇 -翛 -薭 -螣 +龍 +龕 +龗 +! +# +% +& +( +) ++ +, +- +. / -豅 -辦 -鉇 -鍑 -鑊 -鼉 -磧 -寔 -拈 -轍 -泯 -諍 -? -錣 -爼 -纒 -鑵 -櫨 -酎 -泡 -俄 -燗 -鞋 -鵲 -茵 -缶 -紬 -絣 -衿 -鴈 -盥 -凛 -燎 -袞 -淹 -瀉 -聟 -嫐 -俤 -薊 -衢 -醗 -斂 -懌 -袁 -渟 -杼 -鱒 -瀞 -鐚 -苛 -陌 -侈 -旌 -筵 -泗 -槊 -稷 -鐐 -頒 -斤 -勺 -嶼 -篦 -埔 -假 -墺 -刪 -于 -鯰 -穗 -渚 -崑 -轟 -皐 -關 -晁 -迢 -崋 -榕 -楨 -菘 -呰 -蒿 -憬 -雋 -珥 -羆 -弌 -墻 -鮪 -陂 -裴 -顯 -鐡 -臺 -煥 -稻 -肆 -遯 -鹽 -暘 -栲 -洩 -抓 -覈 -豎 -禦 +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 +R +S +T +U +V +W +X +Z +a +c +d +e +f +h +i +j +k +l +m +n +o +p +r +s +t +u +y +z +~ +・ diff --git a/ppocr/utils/korean_dict.txt b/ppocr/utils/korean_dict.txt index 0edec5fe5635cefe094a303f3c3038153e1b8e05..a13899f14dfe3bfc25b34904390c7b1e4ed8674b 100644 --- a/ppocr/utils/korean_dict.txt +++ b/ppocr/utils/korean_dict.txt @@ -1,3636 +1,3688 @@ -저 -자 -명 -: -신 -효 -필 -< -국 -문 -초 -록 +! +" +# +$ +% +& +' +* ++ +- +/ +0 +1 2 +3 +4 5 -한 -어 -관 -계 -구 -의 -통 -사 -와 -미 -조 -- -합 -법 -적 -접 -근 -본 -논 -은 -형 -성 -일 -종 -으 -로 -오 -래 -전 -부 -터 -되 -온 -인 -특 -을 -살 -피 -고 -다 -시 -이 -를 -정 -보 -기 -반 -머 -리 -중 -심 -하 -여 -가 -상 -호 -작 -용 -는 -모 -안 -에 -서 -련 -된 -러 -현 -들 -술 -해 -것 -목 -표 -삼 -론 -과 -두 -함 -께 -복 -면 -더 -나 -아 -화 -황 -까 -지 -요 -측 -므 -재 -느 -른 -및 -포 -괄 -할 -수 -있 -잘 -착 -장 -뒤 -식 -절 -차 -위 -범 -주 -그 -유 6 -3 -동 -격 -설 -징 -찰 -존 -9 -라 -분 -류 -양 -였 -출 -발 -개 -념 -공 -백 -대 -귀 -등 -펴 -략 -연 -도 -울 -핀 -많 -영 -역 -니 -제 -능 -내 -만 -충 -첨 -점 -핵 -' -않 -높 -체 -낮 -섬 -약 -드 -난 -또 -순 -진 -언 -타 -소 -편 -르 -데 7 -별 -립 -야 -외 -밀 -맺 -방 -속 -행 -배 -경 -건 -려 -운 -원 -따 -후 -규 -짓 -바 -탕 -우 -선 -달 -활 -질 -채 -택 -임 -단 -히 -벗 -될 -색 -았 -간 -극 -루 -세 -파 -악 -게 -1 -말 -었 -집 -생 -입 -밝 -혀 -졌 -맥 -락 -쪽 -왔 -검 -토 -던 -확 -새 -란 -음 -치 -마 -못 -했 -맞 -춘 -며 -급 -거 -석 -남 8 -누 -든 -완 -갖 -추 -앞 -쓰 -익 -섭 -홍 -빈 -같 -눈 -{ -0 -런 -낸 -열 -람 -네 -떤 -렵 -때 -닌 -} -학 -당 -혼 -준 -즉 -불 -없 -취 -비 -강 -변 -결 -렇 -겨 -키 -무 -받 -4 -항 -흔 -처 -직 -뿌 -엄 -축 -휘 -담 -컴 -퓨 -향 -몇 -둔 -박 -병 -참 -잡 -율 -금 -긴 -태 -각 -값 -렬 -예 -+ -| -[ -] -큰 -갈 -칙 -됨 -산 -매 -크 -증 -막 -뿐 -럼 -청 -층 -롯 -랜 -떻 -독 -력 -응 -감 -틀 -롭 -낼 -최 -희 -돈 -겹 -친 -쉽 -삭 -킨 -놓 -실 -" -폭 -넓 -료 -허 -메 -교 -* -ㄴ -붙 -스 -싸 -환 -찬 -= -흐 -름 -물 -켰 -뀌 -삽 -# -첫 -번 -째 -억 -너 -멀 -떨 -져 -밑 -줄 -냥 -움 -볼 -둘 -깊 -탈 -낳 -왜 -벽 -족 -책 -읽 -겠 -찾 -큼 -투 -곳 -판 -끼 -철 -쉬 -칭 +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/tools/infer/predict_det.py b/tools/infer/predict_det.py index e658b9f690dd7832b4825386c1e073a41145b34a..4dd9fdf78efd1e3e991b3c8713b4a747ffce2f74 100755 --- a/tools/infer/predict_det.py +++ b/tools/infer/predict_det.py @@ -117,7 +117,7 @@ class TextDetector(object): box = self.clip_det_res(box, img_height, img_width) rect_width = int(np.linalg.norm(box[0] - box[1])) rect_height = int(np.linalg.norm(box[0] - box[3])) - if rect_width <= 10 or rect_height <= 10: + if rect_width <= 3 or rect_height <= 3: continue dt_boxes_new.append(box) dt_boxes = np.array(dt_boxes_new) diff --git a/tools/infer/predict_system.py b/tools/infer/predict_system.py index dd6b76a6661e714bbea43a0b20ecc355244d29ba..766cc577b07bc9845af610a7a7e1ba50614d64eb 100755 --- a/tools/infer/predict_system.py +++ b/tools/infer/predict_system.py @@ -160,7 +160,7 @@ def main(args): txts = [rec_res[i][0] for i in range(len(rec_res))] scores = [rec_res[i][1] for i in range(len(rec_res))] - draw_img = draw_ocr( + draw_img = draw_ocr_box_txt( image, boxes, txts, diff --git a/tools/infer/utility.py b/tools/infer/utility.py index bd3919e84be4cca797c5567bd99d4091d1c61f13..7dbeeec3751d0f86d754648fb19ede7490e2d862 100755 --- a/tools/infer/utility.py +++ b/tools/infer/utility.py @@ -202,7 +202,12 @@ def draw_ocr(image, return image -def draw_ocr_box_txt(image, boxes, txts, font_path="./doc/simfang.ttf"): +def draw_ocr_box_txt(image, + boxes, + txts, + scores=None, + drop_score=0.5, + font_path="./doc/simfang.ttf"): h, w = image.height, image.width img_left = image.copy() img_right = Image.new('RGB', (w, h), (255, 255, 255)) @@ -212,7 +217,9 @@ def draw_ocr_box_txt(image, boxes, txts, font_path="./doc/simfang.ttf"): random.seed(0) draw_left = ImageDraw.Draw(img_left) draw_right = ImageDraw.Draw(img_right) - for (box, txt) in zip(boxes, txts): + for idx, (box, txt) in enumerate(zip(boxes, txts)): + if scores is not None and scores[idx] < drop_score: + continue color = (random.randint(0, 255), random.randint(0, 255), random.randint(0, 255)) draw_left.polygon(box, fill=color)