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
2fab9045
"vscode:/vscode.git/clone" did not exist on "8e5945a76ef8a3aac6767b4a80e087f4721b2d7d"
Commit
2fab9045
authored
Jun 23, 2021
by
WenmuZhou
Browse files
opt doc
parent
bf1a7168
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
10 deletions
+26
-10
test1/api.md
test1/api.md
+12
-4
test1/api_ch.md
test1/api_ch.md
+12
-4
test1/table/README.md
test1/table/README.md
+1
-1
test1/table/README_ch.md
test1/table/README_ch.md
+1
-1
No files found.
test1/api.md
View file @
2fab9045
...
...
@@ -30,11 +30,19 @@ Types 1-4 follow the traditional OCR process, and 5 follow the Table OCR process
[
doc
](
table/README.md
)
## 4. P
addleStructure whl package introduction
## 4. P
redictive by inference engine
### 4.1 Use
Use the following commands to complete the inference
```
python
python3
table
/
predict_system
.
py
--
det_model_dir
=
path
/
to
/
det_model_dir
--
rec_model_dir
=
path
/
to
/
rec_model_dir
--
table_model_dir
=
path
/
to
/
table_model_dir
--
image_dir
=
..
/
doc
/
table
/
1.
png
--
rec_char_dict_path
=
..
/
ppocr
/
utils
/
dict
/
table_dict
.
txt
--
table_char_dict_path
=
..
/
ppocr
/
utils
/
dict
/
table_structure_dict
.
txt
--
rec_char_type
=
EN
--
det_limit_side_len
=
736
--
det_limit_type
=
min
--
output
..
/
output
/
table
```
After running, each image will have a directory with the same name under the directory specified in the output field. Each table in the picture will be stored as an excel, and the excel file name will be the coordinates of the table in the image.
## 5. PaddleStructure whl package introduction
### 5.1 Use
4
.
1.1 Use by code
5
.
1.1 Use by code
```
python
import
os
import
cv2
...
...
@@ -60,7 +68,7 @@ im_show = Image.fromarray(im_show)
im_show
.
save
(
'result.jpg'
)
```
4
.
1.2 Use by command line
5
.
1.2 Use by command line
```
bash
paddlestructure
--image_dir
=
../doc/table/1.png
```
...
...
test1/api_ch.md
View file @
2fab9045
...
...
@@ -30,11 +30,19 @@ PaddleStructure 是一个用于复杂板式文字OCR的工具包,流程如下
[
文档
](
table/README_ch.md
)
## 4.
PaddleStructure whl包介绍
## 4.
预测引擎推理
### 4.1 使用
使用如下命令即可完成预测引擎的推理
```
python
python3
table
/
predict_system
.
py
--
det_model_dir
=
path
/
to
/
det_model_dir
--
rec_model_dir
=
path
/
to
/
rec_model_dir
--
table_model_dir
=
path
/
to
/
table_model_dir
--
image_dir
=
..
/
doc
/
table
/
1.
png
--
rec_char_dict_path
=
..
/
ppocr
/
utils
/
dict
/
table_dict
.
txt
--
table_char_dict_path
=
..
/
ppocr
/
utils
/
dict
/
table_structure_dict
.
txt
--
rec_char_type
=
EN
--
det_limit_side_len
=
736
--
det_limit_type
=
min
--
output
..
/
output
/
table
```
运行完成后,每张图片会output字段指定的目录下有一个同名目录,图片里的每个表格会存储为一个excel,excel文件名为表格在图片里的坐标。
## 5. PaddleStructure whl包介绍
### 5.1 使用
4
.
1.1 代码使用
5
.
1.1 代码使用
```
python
import
os
import
cv2
...
...
@@ -60,7 +68,7 @@ im_show = Image.fromarray(im_show)
im_show
.
save
(
'result.jpg'
)
```
4
.
1.2 命令行使用
5
.
1.2 命令行使用
```
bash
paddlestructure
--image_dir
=
../doc/table/1.png
```
...
...
test1/table/README.md
View file @
2fab9045
...
...
@@ -46,4 +46,4 @@ First cd to the PaddleOCR/ppstructure directory
```
python
python3
table
/
predict_table
.
py
--
det_model_dir
=
path
/
to
/
det_model_dir
--
rec_model_dir
=
path
/
to
/
rec_model_dir
--
table_model_dir
=
path
/
to
/
table_model_dir
--
image_dir
=
..
/
doc
/
table
/
1.
png
--
rec_char_dict_path
=
..
/
ppocr
/
utils
/
dict
/
table_dict
.
txt
--
table_char_dict_path
=
..
/
ppocr
/
utils
/
dict
/
table_structure_dict
.
txt
--
rec_char_type
=
EN
--
det_limit_side_len
=
736
--
det_limit_type
=
min
--
output
..
/
output
/
table
```
After running, the excel sheet of each picture will be saved in the directory specified by the table_output field
\ No newline at end of file
After running, the excel sheet of each picture will be saved in the directory specified by the output field
\ No newline at end of file
test1/table/README_ch.md
View file @
2fab9045
...
...
@@ -46,4 +46,4 @@ python3 table/eval_table.py --det_model_dir=path/to/det_model_dir --rec_model_di
```
python
python3
table
/
predict_table
.
py
--
det_model_dir
=
path
/
to
/
det_model_dir
--
rec_model_dir
=
path
/
to
/
rec_model_dir
--
table_model_dir
=
path
/
to
/
table_model_dir
--
image_dir
=
..
/
doc
/
table
/
1.
png
--
rec_char_dict_path
=
..
/
ppocr
/
utils
/
dict
/
table_dict
.
txt
--
table_char_dict_path
=
..
/
ppocr
/
utils
/
dict
/
table_structure_dict
.
txt
--
rec_char_type
=
EN
--
det_limit_side_len
=
736
--
det_limit_type
=
min
--
output
..
/
output
/
table
```
运行完成后,每张图片的excel表格会保存到
table_
output字段指定的目录下
运行完成后,每张图片的excel表格会保存到output字段指定的目录下
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