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
554d2f4f
authored
2021-06-14 02:55:37 +0800
by
周伟奇
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'feature/bs_excel' into feature/0611
2 parents
174d2005
b17b3c65
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
1 deletions
src/apps/doc/consts.py
src/apps/doc/management/commands/ocr_process.py
src/apps/doc/named_enum.py
src/apps/doc/ocr/wb.py
src/apps/doc/consts.py
View file @
554d2f4
...
...
@@ -99,6 +99,7 @@ RES_FAILED = '识别失败'
RES_FAILED_1
=
'识别失败(阶段1)'
RES_FAILED_2
=
'识别失败(阶段2)'
RES_FAILED_3
=
'识别失败(阶段1数据格式错误)'
RES_FAILED_SET
=
{
RES_FAILED
,
RES_FAILED_1
,
RES_FAILED_2
,
RES_FAILED_3
}
CARD_RATIO
=
0.9
UNKNOWN_CARD
=
'未知卡号'
...
...
src/apps/doc/management/commands/ocr_process.py
View file @
554d2f4
...
...
@@ -768,7 +768,9 @@ class Command(BaseCommand, LoggerMixin):
type
=
KeywordsType
.
LOAN
.
value
,
on_off
=
True
)
.
values_list
(
'keyword'
,
flat
=
True
)
wechat_keyword
=
Keywords
.
objects
.
filter
(
type
=
KeywordsType
.
ALI_WECHART
.
value
,
on_off
=
True
)
.
values_list
(
'keyword'
,
flat
=
True
)
wb
=
BSWorkbook
(
interest_keyword
,
salary_keyword
,
loan_keyword
,
wechat_keyword
)
repayments_keyword
=
Keywords
.
objects
.
filter
(
type
=
KeywordsType
.
REPAYMENTS
.
value
,
on_off
=
True
)
.
values_list
(
'keyword'
,
flat
=
True
)
wb
=
BSWorkbook
(
interest_keyword
,
salary_keyword
,
loan_keyword
,
wechat_keyword
,
repayments_keyword
)
for
img_path
,
res
in
ocr_1_res
.
items
():
pno
,
ino
=
self
.
parse_img_path
(
img_path
)
part_idx
=
1
...
...
src/apps/doc/named_enum.py
View file @
554d2f4
...
...
@@ -19,6 +19,7 @@ class KeywordsType(NamedEnum):
SALARY
=
(
1
,
'薪资'
)
LOAN
=
(
2
,
'贷款'
)
ALI_WECHART
=
(
3
,
'微信/支付宝'
)
REPAYMENTS
=
(
4
,
'还款'
)
class
RequestTeam
(
NamedEnum
):
...
...
src/apps/doc/ocr/wb.py
View file @
554d2f4
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