Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
wangsen
paddle_dbnet
Commits
b642f40e
Unverified
Commit
b642f40e
authored
May 15, 2020
by
dyning
Committed by
GitHub
May 15, 2020
Browse files
Merge pull request #37 from tink2123/rename_yml
fix doc and rename det yml
parents
81d8d190
55065c04
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
9 additions
and
9 deletions
+9
-9
configs/det/det_mv3_db.yml
configs/det/det_mv3_db.yml
+0
-0
configs/det/det_mv3_east.yml
configs/det/det_mv3_east.yml
+0
-0
configs/det/det_r50_vd_db.yml
configs/det/det_r50_vd_db.yml
+0
-0
configs/det/det_r50_vd_east.yml
configs/det/det_r50_vd_east.yml
+0
-0
doc/detection.md
doc/detection.md
+5
-5
doc/recognition.md
doc/recognition.md
+4
-4
No files found.
configs/det/det_
db_
mv3.yml
→
configs/det/det_mv3
_db
.yml
View file @
b642f40e
File moved
configs/det/det_east
_mv3
.yml
→
configs/det/det_
mv3_
east.yml
View file @
b642f40e
File moved
configs/det/det_
db_
r50_vd.yml
→
configs/det/det_r50_vd
_db
.yml
View file @
b642f40e
File moved
configs/det/det_
east_
r50_vd.yml
→
configs/det/det_r50_vd
_east
.yml
View file @
b642f40e
File moved
doc/detection.md
View file @
b642f40e
...
...
@@ -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/"
```
doc/recognition.md
View file @
b642f40e
...
...
@@ -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 : 韩国小馆
```
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment