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
7d6ce4df
authored
2021-05-18 01:21:18 +0800
by
周伟奇
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix bug
1 parent
17c207a9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
src/apps/doc/management/commands/ocr_process.py
src/apps/doc/management/commands/ocr_process.py
View file @
7d6ce4d
...
...
@@ -212,7 +212,7 @@ class Command(BaseCommand, LoggerMixin):
}
license_summary
.
setdefault
(
classify
,
[])
.
append
(
dda_ocr_result
)
if
classify
==
consts
.
MVC_CLASSIFY
:
# 车辆登记证 3/4页结果整合
el
if
classify
==
consts
.
MVC_CLASSIFY
:
# 车辆登记证 3/4页结果整合
for
mvc_dict
in
license_data
:
try
:
mvc_page
=
mvc_dict
.
pop
(
'page'
)
...
...
@@ -249,7 +249,7 @@ class Command(BaseCommand, LoggerMixin):
del
mvc_res
license_summary
.
setdefault
(
classify
,
[])
.
extend
(
license_data
)
if
classify
==
consts
.
IC_CLASSIFY
:
# 身份证真伪
el
if
classify
==
consts
.
IC_CLASSIFY
:
# 身份证真伪
for
id_card_dict
in
license_data
:
try
:
base64_img
=
id_card_dict
.
pop
(
'base64_img'
)
...
...
@@ -302,6 +302,8 @@ class Command(BaseCommand, LoggerMixin):
if
len
(
ic_name
)
>
0
and
len
(
ic_id
)
>
0
:
dda_id_bc_mapping
.
setdefault
(
consts
.
IC_FIELD
,
[])
.
append
((
ic_name
,
ic_id
,
img_path
))
license_summary
.
setdefault
(
classify
,
[])
.
extend
(
license_data
)
else
:
license_summary
.
setdefault
(
classify
,
[])
.
extend
(
license_data
)
def
license2_process
(
self
,
ocr_res_2
,
license_summary
,
pid
,
classify
,
res_list
,
pno
,
ino
,
part_idx
,
img_path
,
do_dda
,
dda_id_bc_mapping
):
if
ocr_res_2
.
get
(
'ErrorCode'
)
in
consts
.
SUCCESS_CODE_SET
:
...
...
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