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
e6936198
Commit
e6936198
authored
Mar 23, 2022
by
WenmuZhou
Browse files
add relative import
parent
3425bd7f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
3 deletions
+11
-3
__init__.py
__init__.py
+4
-2
paddleocr.py
paddleocr.py
+7
-1
No files found.
__init__.py
View file @
e6936198
...
...
@@ -11,8 +11,10 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import
paddleocr
from
.paddleocr
import
*
__version__
=
paddleocr
.
VERSION
__all__
=
[
'PaddleOCR'
,
'PPStructure'
,
'draw_ocr'
,
'draw_structure_result'
,
'save_structure_res'
,
'download_with_progressbar'
]
__all__
=
[
'PaddleOCR'
,
'PPStructure'
,
'draw_ocr'
,
'draw_structure_result'
,
'save_structure_res'
,
'download_with_progressbar'
]
paddleocr.py
View file @
e6936198
...
...
@@ -11,9 +11,11 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from
__future__
import
absolute_import
import
os
import
sys
import
importlib
__dir__
=
os
.
path
.
dirname
(
__file__
)
...
...
@@ -26,6 +28,10 @@ import logging
import
numpy
as
np
from
pathlib
import
Path
tools
=
importlib
.
import_module
(
'.'
,
'tools'
)
ppocr
=
importlib
.
import_module
(
'.'
,
'ppocr'
)
ppstructure
=
importlib
.
import_module
(
'.'
,
'ppstructure'
)
from
tools.infer
import
predict_system
from
ppocr.utils.logging
import
get_logger
...
...
@@ -42,7 +48,7 @@ __all__ = [
]
SUPPORT_DET_MODEL
=
[
'DB'
]
VERSION
=
'2.4.0.
2
'
VERSION
=
'2.4.0.
3
'
SUPPORT_REC_MODEL
=
[
'CRNN'
]
BASE_DIR
=
os
.
path
.
expanduser
(
"~/.paddleocr/"
)
...
...
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