From 53f2e9d44ec2671d781aa1f00077522f10f4c709 Mon Sep 17 00:00:00 2001 From: tink2123 Date: Fri, 15 May 2020 15:17:55 +0800 Subject: [PATCH] fix doc and rename det yml --- configs/det/{det_db_mv3.yml => det_mv3_db.yml} | 0 configs/det/{det_east_mv3.yml => det_mv3_east.yml} | 0 configs/det/{det_db_r50_vd.yml => det_r50_vd_db.yml} | 0 .../det/{det_east_r50_vd.yml => det_r50_vd_east.yml} | 0 doc/detection.md | 10 +++++----- doc/recognition.md | 8 ++++---- 6 files changed, 9 insertions(+), 9 deletions(-) rename configs/det/{det_db_mv3.yml => det_mv3_db.yml} (100%) rename configs/det/{det_east_mv3.yml => det_mv3_east.yml} (100%) rename configs/det/{det_db_r50_vd.yml => det_r50_vd_db.yml} (100%) rename configs/det/{det_east_r50_vd.yml => det_r50_vd_east.yml} (100%) diff --git a/configs/det/det_db_mv3.yml b/configs/det/det_mv3_db.yml similarity index 100% rename from configs/det/det_db_mv3.yml rename to configs/det/det_mv3_db.yml diff --git a/configs/det/det_east_mv3.yml b/configs/det/det_mv3_east.yml similarity index 100% rename from configs/det/det_east_mv3.yml rename to configs/det/det_mv3_east.yml diff --git a/configs/det/det_db_r50_vd.yml b/configs/det/det_r50_vd_db.yml similarity index 100% rename from configs/det/det_db_r50_vd.yml rename to configs/det/det_r50_vd_db.yml diff --git a/configs/det/det_east_r50_vd.yml b/configs/det/det_r50_vd_east.yml similarity index 100% rename from configs/det/det_east_r50_vd.yml rename to configs/det/det_r50_vd_east.yml diff --git a/doc/detection.md b/doc/detection.md index 97649f7c..7f19382a 100644 --- a/doc/detection.md +++ b/doc/detection.md @@ -47,7 +47,7 @@ wget -P ./pretrain_models/ https://paddle-imagenet-models-name.bj.bcebos.com/Res **启动训练** ``` -python3 tools/train.py -c configs/det/det_db_mv3.yml +python3 tools/train.py -c configs/det/det_mv3_db.yml ``` 上述指令中,通过-c 选择训练使用configs/det/det_db_mv3.yml配置文件。 @@ -55,7 +55,7 @@ python3 tools/train.py -c configs/det/det_db_mv3.yml 您也可以通过-o参数在不需要修改yml文件的情况下,改变训练的参数,比如,调整训练的学习率为0.0001 ``` -python3 tools/train.py -c configs/det/det_db_mv3.yml -o Optimizer.base_lr=0.0001 +python3 tools/train.py -c configs/det/det_mv3_db.yml -o Optimizer.base_lr=0.0001 ``` ## 指标评估 @@ -65,17 +65,17 @@ PaddleOCR计算三个OCR检测相关的指标,分别是:Precision、Recall 运行如下代码,根据配置文件det_db_mv3.yml中save_res_path指定的测试集检测结果文件,计算评估指标。 ``` -python3 tools/eval.py -c configs/det/det_db_mv3.yml -o Gloabl.checkpoints="./output/best_accuracy" +python3 tools/eval.py -c configs/det/det_mv3_db.yml -o Gloabl.checkpoints="./output/best_accuracy" ``` ## 测试检测效果 测试单张图像的检测效果 ``` -python3 tools/infer_det.py -c config/det/det_db_mv3.yml -o TestReader.single_img_path="./demo.jpg" +python3 tools/infer_det.py -c config/det/det_mv3_db.yml -o TestReader.single_img_path="./demo.jpg" ``` 测试文件夹下所有图像的检测效果 ``` -python3 tools/infer_det.py -c config/det/det_db_mv3.yml -o TestReader.single_img_path="./demo_img/" +python3 tools/infer_det.py -c config/det/det_mv3_db.yml -o TestReader.single_img_path="./demo_img/" ``` diff --git a/doc/recognition.md b/doc/recognition.md index 604ce44d..d99e3e92 100644 --- a/doc/recognition.md +++ b/doc/recognition.md @@ -3,7 +3,7 @@ ### 数据准备 -PaddleOCR 支持两种数据格式: `lmdb` 用于训练公开数据,调试算法; `通用数据` 训练自己的数据: +PaddleOCR 支持两种数据格式: `lmdb` 用于训练公开数据,调试算法; `通用数据` 训练自己的数据: 请按如下步骤设置数据集: @@ -40,7 +40,7 @@ PaddleOCR 提供了一份用于训练 icdar2015 数据集的标签文件,通 # 训练集标签 wget -P ./train_data/ic15_data https://paddleocr.bj.bcebos.com/dataset/rec_gt_train.txt # 测试集标签 -wget -P ./train_data/ic15_data https://paddleocr.bj.bcebos.com/dataset/rec_gt_test.txt +wget -P ./train_data/ic15_data https://paddleocr.bj.bcebos.com/dataset/rec_gt_test.txt ``` 最终训练集应有如下文件结构: @@ -99,7 +99,8 @@ word_dict.txt 每行有一个单字,将字符与数字索引映射在一起, PaddleOCR提供了训练脚本、评估脚本和预测脚本,本节将以 CRNN 识别模型为例: 首先下载pretrain model,您可以下载训练好的模型在 icdar2015 数据上进行finetune -`` + +``` cd PaddleOCR/ # 下载MobileNetV3的预训练模型 wget -P ./pretrain_models/ https://paddleocr.bj.bcebos.com/rec_mv3_none_bilstm_ctc.tar @@ -156,4 +157,3 @@ infer_img: doc/imgs_words/word_1.jpg index: [2092 177 312 2503] word : 韩国小馆 ``` - -- GitLab