Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
周伟奇
/
bmw-ocr
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
5c08056d
authored
2021-10-25 17:10:24 +0800
by
周伟奇
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
add wsc
1 parent
5a19df38
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
8 deletions
src/apps/doc/management/commands/folder_dda_process.py
src/apps/doc/management/commands/folder_ltgt_process.py
src/apps/doc/management/commands/folder_ocr_process.py
src/apps/doc/management/commands/folder_wsc_process.py
src/apps/doc/management/commands/folder_dda_process.py
View file @
5c08056
...
...
@@ -206,8 +206,8 @@ class Command(BaseCommand, LoggerMixin):
ocr_res
=
ocr_response
.
json
()
end_time
=
time
.
time
()
speed_time
=
int
(
end_time
-
start_time
)
self
.
folder_log
.
info
(
'{0} [ocr success] [img={1}] [
res={2}] [speed_time={3
}]'
.
format
(
self
.
log_base
,
img_path
,
ocr_res
,
speed_time
))
self
.
folder_log
.
info
(
'{0} [ocr success] [img={1}] [
speed_time={2
}]'
.
format
(
self
.
log_base
,
img_path
,
speed_time
))
if
isinstance
(
ocr_res
,
dict
):
if
ocr_res
.
get
(
'code'
)
==
1
:
...
...
src/apps/doc/management/commands/folder_ltgt_process.py
View file @
5c08056
...
...
@@ -224,8 +224,8 @@ class Command(BaseCommand, LoggerMixin):
ocr_res
=
ocr_response
.
json
()
end_time
=
time
.
time
()
speed_time
=
int
(
end_time
-
start_time
)
self
.
folder_log
.
info
(
'{0} [ocr success] [img={1}] [
res={2}] [speed_time={3
}]'
.
format
(
self
.
log_base
,
img_path
,
ocr_res
,
speed_time
))
self
.
folder_log
.
info
(
'{0} [ocr success] [img={1}] [
speed_time={2
}]'
.
format
(
self
.
log_base
,
img_path
,
speed_time
))
if
isinstance
(
ocr_res
,
dict
):
if
ocr_res
.
get
(
'code'
)
==
1
:
...
...
@@ -275,8 +275,8 @@ class Command(BaseCommand, LoggerMixin):
ocr_res
=
ocr_response
.
json
()
end_time
=
time
.
time
()
speed_time
=
int
(
end_time
-
start_time
)
self
.
folder_log
.
info
(
'{0} [ltgt ocr success] [path={1}] [
res={2}] [speed_time={3
}]'
.
format
(
self
.
log_base
,
path
,
ocr_res
,
speed_time
))
self
.
folder_log
.
info
(
'{0} [ltgt ocr success] [path={1}] [
speed_time={2
}]'
.
format
(
self
.
log_base
,
path
,
speed_time
))
return
ocr_res
else
:
self
.
folder_log
.
warn
(
'{0} [ltgt ocr failed] [path={1}]'
.
format
(
self
.
log_base
,
path
))
...
...
src/apps/doc/management/commands/folder_ocr_process.py
View file @
5c08056
...
...
@@ -201,8 +201,8 @@ class Command(BaseCommand, LoggerMixin):
ocr_res
=
ocr_response
.
json
()
end_time
=
time
.
time
()
speed_time
=
int
(
end_time
-
start_time
)
self
.
folder_log
.
info
(
'{0} [ocr success] [img={1}] [
res={2}] [speed_time={3
}]'
.
format
(
self
.
log_base
,
img_path
,
ocr_res
,
speed_time
))
self
.
folder_log
.
info
(
'{0} [ocr success] [img={1}] [
speed_time={2
}]'
.
format
(
self
.
log_base
,
img_path
,
speed_time
))
return
ocr_res
else
:
self
.
folder_log
.
warn
(
'{0} [ocr failed] [img_path={1}]'
.
format
(
self
.
log_base
,
img_path
))
...
...
src/apps/doc/management/commands/folder_wsc_process.py
0 → 100644
View file @
5c08056
This diff is collapsed.
Click to expand it.
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment