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
feff9d23
authored
2021-11-02 17:27:56 +0800
by
周伟奇
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix gb
1 parent
e2dacd53
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
src/apps/doc/management/commands/ocr_process.py
src/apps/doc/management/commands/ocr_process.py
View file @
feff9d2
...
...
@@ -413,8 +413,6 @@ class Command(BaseCommand, LoggerMixin):
elif
classify
==
consts
.
MVC_CLASSIFY
:
rebuild_data_dict
=
{}
position_dict
=
{}
rebuild_data_dict
[
consts
.
IMG_PATH_KEY
]
=
img_path
rebuild_data_dict
[
consts
.
SECTION_IMG_PATH_KEY
]
=
section_img_path
mvc_page
=
license_data
.
pop
(
'page'
,
'VehicleRCI'
)
mvc_res
=
license_data
.
pop
(
'results'
,
{})
if
mvc_page
==
'VehicleRegArea'
:
...
...
@@ -445,6 +443,9 @@ class Command(BaseCommand, LoggerMixin):
'width'
:
tmp_position_list
[
2
],
}
}
rebuild_data_dict
[
consts
.
ALL_POSITION_KEY_2
]
=
position_dict
rebuild_data_dict
[
consts
.
IMG_PATH_KEY_2
]
=
img_path
rebuild_data_dict
[
consts
.
SECTION_IMG_PATH_KEY_2
]
=
section_img_path
else
:
for
cn_key
,
detail_dict
in
mvc_res
.
items
():
rebuild_data_dict
[
cn_key
]
=
detail_dict
.
get
(
'words'
,
''
)
...
...
@@ -458,8 +459,10 @@ class Command(BaseCommand, LoggerMixin):
'width'
:
position_list
[
2
],
}
}
rebuild_data_dict
[
consts
.
ALL_POSITION_KEY
]
=
position_dict
rebuild_data_dict
[
consts
.
IMG_PATH_KEY
]
=
img_path
rebuild_data_dict
[
consts
.
SECTION_IMG_PATH_KEY
]
=
section_img_path
del
mvc_res
rebuild_data_dict
[
consts
.
ALL_POSITION_KEY
]
=
position_dict
license_summary
.
setdefault
(
classify
,
[])
.
append
(
rebuild_data_dict
)
...
...
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