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
b3fbfc31
Commit
b3fbfc31
authored
Mar 30, 2022
by
WenmuZhou
Browse files
rename OCRSystem to StructureSystem
parent
2471a6a1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
paddleocr.py
paddleocr.py
+2
-2
ppstructure/predict_system.py
ppstructure/predict_system.py
+2
-2
No files found.
paddleocr.py
View file @
b3fbfc31
...
@@ -39,7 +39,7 @@ from ppocr.utils.utility import check_and_read_gif, get_image_file_list
...
@@ -39,7 +39,7 @@ from ppocr.utils.utility import check_and_read_gif, get_image_file_list
from
ppocr.utils.network
import
maybe_download
,
download_with_progressbar
,
is_link
,
confirm_model_dir_url
from
ppocr.utils.network
import
maybe_download
,
download_with_progressbar
,
is_link
,
confirm_model_dir_url
from
tools.infer.utility
import
draw_ocr
,
str2bool
,
check_gpu
from
tools.infer.utility
import
draw_ocr
,
str2bool
,
check_gpu
from
ppstructure.utility
import
init_args
,
draw_structure_result
from
ppstructure.utility
import
init_args
,
draw_structure_result
from
ppstructure.predict_system
import
OCR
System
,
save_structure_res
from
ppstructure.predict_system
import
Structure
System
,
save_structure_res
__all__
=
[
__all__
=
[
'PaddleOCR'
,
'PPStructure'
,
'draw_ocr'
,
'draw_structure_result'
,
'PaddleOCR'
,
'PPStructure'
,
'draw_ocr'
,
'draw_structure_result'
,
...
@@ -398,7 +398,7 @@ class PaddleOCR(predict_system.TextSystem):
...
@@ -398,7 +398,7 @@ class PaddleOCR(predict_system.TextSystem):
return
rec_res
return
rec_res
class
PPStructure
(
OCR
System
):
class
PPStructure
(
Structure
System
):
def
__init__
(
self
,
**
kwargs
):
def
__init__
(
self
,
**
kwargs
):
params
=
parse_args
(
mMain
=
False
)
params
=
parse_args
(
mMain
=
False
)
params
.
__dict__
.
update
(
**
kwargs
)
params
.
__dict__
.
update
(
**
kwargs
)
...
...
ppstructure/predict_system.py
View file @
b3fbfc31
...
@@ -35,7 +35,7 @@ from ppstructure.utility import parse_args, draw_structure_result
...
@@ -35,7 +35,7 @@ from ppstructure.utility import parse_args, draw_structure_result
logger
=
get_logger
()
logger
=
get_logger
()
class
OCR
System
(
object
):
class
Structure
System
(
object
):
def
__init__
(
self
,
args
):
def
__init__
(
self
,
args
):
self
.
mode
=
args
.
mode
self
.
mode
=
args
.
mode
if
self
.
mode
==
'structure'
:
if
self
.
mode
==
'structure'
:
...
@@ -139,7 +139,7 @@ def main(args):
...
@@ -139,7 +139,7 @@ def main(args):
image_file_list
=
image_file_list
image_file_list
=
image_file_list
image_file_list
=
image_file_list
[
args
.
process_id
::
args
.
total_process_num
]
image_file_list
=
image_file_list
[
args
.
process_id
::
args
.
total_process_num
]
structure_sys
=
OCR
System
(
args
)
structure_sys
=
Structure
System
(
args
)
img_num
=
len
(
image_file_list
)
img_num
=
len
(
image_file_list
)
save_folder
=
os
.
path
.
join
(
args
.
output
,
structure_sys
.
mode
)
save_folder
=
os
.
path
.
join
(
args
.
output
,
structure_sys
.
mode
)
os
.
makedirs
(
save_folder
,
exist_ok
=
True
)
os
.
makedirs
(
save_folder
,
exist_ok
=
True
)
...
...
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