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
6b6cd955
Commit
6b6cd955
authored
Jun 08, 2021
by
WenmuZhou
Browse files
remove test code
parent
2f074068
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
21 deletions
+0
-21
ppstructure/paddlestructure.py
ppstructure/paddlestructure.py
+0
-21
No files found.
ppstructure/paddlestructure.py
View file @
6b6cd955
...
@@ -146,24 +146,3 @@ def main():
...
@@ -146,24 +146,3 @@ def main():
logger
.
info
(
item
[
'res'
])
logger
.
info
(
item
[
'res'
])
save_res
(
result
,
save_folder
,
img_name
)
save_res
(
result
,
save_folder
,
img_name
)
logger
.
info
(
'result save to {}'
.
format
(
os
.
path
.
join
(
save_folder
,
img_name
)))
logger
.
info
(
'result save to {}'
.
format
(
os
.
path
.
join
(
save_folder
,
img_name
)))
if
__name__
==
'__main__'
:
table_engine
=
PaddleStructure
(
output
=
'/Users/zhoujun20/Desktop/工作相关/table/table_pr/PaddleOCR/output/table'
,
show_log
=
True
)
img_path
=
'/Users/zhoujun20/Desktop/工作相关/table/table_pr/PaddleOCR/ppstructure/test_imgs/paper-image.jpg'
img
=
cv2
.
imread
(
img_path
)
result
=
table_engine
(
img
)
for
line
in
result
:
print
(
line
)
from
PIL
import
Image
font_path
=
'/Users/zhoujun20/Desktop/工作相关/table/table_pr/PaddleOCR//doc/fonts/simfang.ttf'
image
=
Image
.
open
(
img_path
).
convert
(
'RGB'
)
im_show
=
draw_result
(
image
,
result
,
font_path
=
'/Users/zhoujun20/Desktop/工作相关/table/table_pr/PaddleOCR//doc/fonts/simfang.ttf'
)
im_show
=
Image
.
fromarray
(
im_show
)
im_show
.
save
(
'result.jpg'
)
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