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
5e9fb50d
Commit
5e9fb50d
authored
Jan 26, 2021
by
tink2123
Browse files
Merge branch 'dygraph' of
https://github.com/PaddlePaddle/PaddleOCR
into multi_languages
parents
45117f90
5a5d627d
Changes
84
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
194 additions
and
107 deletions
+194
-107
doc/imgs_words/serbian_cyrillic/rsc_2.jpg
doc/imgs_words/serbian_cyrillic/rsc_2.jpg
+0
-0
doc/imgs_words/serbian_latin/rs_1.jpg
doc/imgs_words/serbian_latin/rs_1.jpg
+0
-0
doc/imgs_words/serbian_latin/rs_2.jpg
doc/imgs_words/serbian_latin/rs_2.jpg
+0
-0
doc/imgs_words/spanish/xi_1.jpg
doc/imgs_words/spanish/xi_1.jpg
+0
-0
doc/imgs_words/spanish/xi_2.jpg
doc/imgs_words/spanish/xi_2.jpg
+0
-0
doc/imgs_words/tamil/ta_1.jpg
doc/imgs_words/tamil/ta_1.jpg
+0
-0
doc/imgs_words/tamil/ta_2.jpg
doc/imgs_words/tamil/ta_2.jpg
+0
-0
doc/imgs_words/telugu/te_1.jpg
doc/imgs_words/telugu/te_1.jpg
+0
-0
doc/imgs_words/telugu/te_2.jpg
doc/imgs_words/telugu/te_2.jpg
+0
-0
doc/imgs_words/ukranian/uk_1.jpg
doc/imgs_words/ukranian/uk_1.jpg
+0
-0
doc/imgs_words/ukranian/uk_2.jpg
doc/imgs_words/ukranian/uk_2.jpg
+0
-0
doc/imgs_words/urdu/ur_1.jpg
doc/imgs_words/urdu/ur_1.jpg
+0
-0
doc/imgs_words/urdu/ur_2.jpg
doc/imgs_words/urdu/ur_2.jpg
+0
-0
doc/imgs_words/uyghur/ug_1.jpg
doc/imgs_words/uyghur/ug_1.jpg
+0
-0
doc/imgs_words/uyghur/ug_2.jpg
doc/imgs_words/uyghur/ug_2.jpg
+0
-0
doc/joinus.PNG
doc/joinus.PNG
+0
-0
paddleocr.py
paddleocr.py
+3
-1
ppocr/data/__init__.py
ppocr/data/__init__.py
+2
-2
ppocr/data/imaug/sast_process.py
ppocr/data/imaug/sast_process.py
+188
-103
ppocr/data/lmdb_dataset.py
ppocr/data/lmdb_dataset.py
+1
-1
No files found.
doc/imgs/rsc_2.jpg
→
doc/imgs
_words/serbian_cyrillic
/rsc_2.jpg
View file @
5e9fb50d
File moved
doc/imgs/rs_1.jpg
→
doc/imgs
_words/serbian_latin
/rs_1.jpg
View file @
5e9fb50d
File moved
doc/imgs/rs_2.jpg
→
doc/imgs
_words/serbian_latin
/rs_2.jpg
View file @
5e9fb50d
File moved
doc/imgs/xi_1.jpg
→
doc/imgs
_words/spanish
/xi_1.jpg
View file @
5e9fb50d
File moved
doc/imgs/xi_2.jpg
→
doc/imgs
_words/spanish
/xi_2.jpg
View file @
5e9fb50d
File moved
doc/imgs/ta_1.jpg
→
doc/imgs
_words/tamil
/ta_1.jpg
View file @
5e9fb50d
File moved
doc/imgs/ta_2.jpg
→
doc/imgs
_words/tamil
/ta_2.jpg
View file @
5e9fb50d
File moved
doc/imgs/te_1.jpg
→
doc/imgs
_words/telugu
/te_1.jpg
View file @
5e9fb50d
File moved
doc/imgs/te_2.jpg
→
doc/imgs
_words/telugu
/te_2.jpg
View file @
5e9fb50d
File moved
doc/imgs/uk_1.jpg
→
doc/imgs
_words/ukranian
/uk_1.jpg
View file @
5e9fb50d
File moved
doc/imgs/uk_2.jpg
→
doc/imgs
_words/ukranian
/uk_2.jpg
View file @
5e9fb50d
File moved
doc/imgs/ur_1.jpg
→
doc/imgs
_words/urdu
/ur_1.jpg
View file @
5e9fb50d
File moved
doc/imgs/ur_2.jpg
→
doc/imgs
_words/urdu
/ur_2.jpg
View file @
5e9fb50d
File moved
doc/imgs/ug_1.jpg
→
doc/imgs
_words/uyghur
/ug_1.jpg
View file @
5e9fb50d
File moved
doc/imgs/ug_2.jpg
→
doc/imgs
_words/uyghur
/ug_2.jpg
View file @
5e9fb50d
File moved
doc/joinus.PNG
View replaced file @
45117f90
View file @
5e9fb50d
109 KB
|
W:
|
H:
107 KB
|
W:
|
H:
2-up
Swipe
Onion skin
paddleocr.py
View file @
5e9fb50d
...
@@ -290,7 +290,9 @@ class PaddleOCR(predict_system.TextSystem):
...
@@ -290,7 +290,9 @@ class PaddleOCR(predict_system.TextSystem):
image_file
=
img
image_file
=
img
img
,
flag
=
check_and_read_gif
(
image_file
)
img
,
flag
=
check_and_read_gif
(
image_file
)
if
not
flag
:
if
not
flag
:
img
=
cv2
.
imread
(
image_file
)
with
open
(
image_file
,
'rb'
)
as
f
:
np_arr
=
np
.
frombuffer
(
f
.
read
(),
dtype
=
np
.
uint8
)
img
=
cv2
.
imdecode
(
np_arr
,
cv2
.
IMREAD_COLOR
)
if
img
is
None
:
if
img
is
None
:
logger
.
error
(
"error in loading image:{}"
.
format
(
image_file
))
logger
.
error
(
"error in loading image:{}"
.
format
(
image_file
))
return
None
return
None
...
...
ppocr/data/__init__.py
View file @
5e9fb50d
...
@@ -51,7 +51,7 @@ signal.signal(signal.SIGINT, term_mp)
...
@@ -51,7 +51,7 @@ signal.signal(signal.SIGINT, term_mp)
signal
.
signal
(
signal
.
SIGTERM
,
term_mp
)
signal
.
signal
(
signal
.
SIGTERM
,
term_mp
)
def
build_dataloader
(
config
,
mode
,
device
,
logger
):
def
build_dataloader
(
config
,
mode
,
device
,
logger
,
seed
=
None
):
config
=
copy
.
deepcopy
(
config
)
config
=
copy
.
deepcopy
(
config
)
support_dict
=
[
'SimpleDataSet'
,
'LMDBDateSet'
]
support_dict
=
[
'SimpleDataSet'
,
'LMDBDateSet'
]
...
@@ -61,7 +61,7 @@ def build_dataloader(config, mode, device, logger):
...
@@ -61,7 +61,7 @@ def build_dataloader(config, mode, device, logger):
assert
mode
in
[
'Train'
,
'Eval'
,
'Test'
assert
mode
in
[
'Train'
,
'Eval'
,
'Test'
],
"Mode should be Train, Eval or Test."
],
"Mode should be Train, Eval or Test."
dataset
=
eval
(
module_name
)(
config
,
mode
,
logger
)
dataset
=
eval
(
module_name
)(
config
,
mode
,
logger
,
seed
)
loader_config
=
config
[
mode
][
'loader'
]
loader_config
=
config
[
mode
][
'loader'
]
batch_size
=
loader_config
[
'batch_size_per_card'
]
batch_size
=
loader_config
[
'batch_size_per_card'
]
drop_last
=
loader_config
[
'drop_last'
]
drop_last
=
loader_config
[
'drop_last'
]
...
...
ppocr/data/imaug/sast_process.py
View file @
5e9fb50d
This diff is collapsed.
Click to expand it.
ppocr/data/lmdb_dataset.py
View file @
5e9fb50d
...
@@ -21,7 +21,7 @@ from .imaug import transform, create_operators
...
@@ -21,7 +21,7 @@ from .imaug import transform, create_operators
class
LMDBDateSet
(
Dataset
):
class
LMDBDateSet
(
Dataset
):
def
__init__
(
self
,
config
,
mode
,
logger
):
def
__init__
(
self
,
config
,
mode
,
logger
,
seed
=
None
):
super
(
LMDBDateSet
,
self
).
__init__
()
super
(
LMDBDateSet
,
self
).
__init__
()
global_config
=
config
[
'Global'
]
global_config
=
config
[
'Global'
]
...
...
Prev
1
2
3
4
5
Next
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