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
fad40158
Unverified
Commit
fad40158
authored
Jan 29, 2021
by
MissPenguin
Committed by
GitHub
Jan 29, 2021
Browse files
Merge pull request #1623 from tirkarthi/fix-warnings
Fix syntax warning over comparison of literals using is.
parents
95a60fa4
841adff9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
PPOCRLabel/PPOCRLabel.py
PPOCRLabel/PPOCRLabel.py
+4
-4
No files found.
PPOCRLabel/PPOCRLabel.py
View file @
fad40158
...
...
@@ -1031,7 +1031,7 @@ class MainWindow(QMainWindow, WindowMixin):
for
box
in
self
.
result_dic
:
trans_dic
=
{
"label"
:
box
[
1
][
0
],
"points"
:
box
[
0
],
'difficult'
:
False
}
if
trans_dic
[
"label"
]
is
""
and
mode
==
'Auto'
:
if
trans_dic
[
"label"
]
==
""
and
mode
==
'Auto'
:
continue
shapes
.
append
(
trans_dic
)
...
...
@@ -1764,7 +1764,7 @@ class MainWindow(QMainWindow, WindowMixin):
QMessageBox
.
information
(
self
,
"Information"
,
msg
)
return
result
=
self
.
ocr
.
ocr
(
img_crop
,
cls
=
True
,
det
=
False
)
if
result
[
0
][
0
]
is
not
''
:
if
result
[
0
][
0
]
!=
''
:
result
.
insert
(
0
,
box
)
print
(
'result in reRec is '
,
result
)
self
.
result_dic
.
append
(
result
)
...
...
@@ -1795,7 +1795,7 @@ class MainWindow(QMainWindow, WindowMixin):
QMessageBox
.
information
(
self
,
"Information"
,
msg
)
return
result
=
self
.
ocr
.
ocr
(
img_crop
,
cls
=
True
,
det
=
False
)
if
result
[
0
][
0
]
is
not
''
:
if
result
[
0
][
0
]
!=
''
:
result
.
insert
(
0
,
box
)
print
(
'result in reRec is '
,
result
)
if
result
[
1
][
0
]
==
shape
.
label
:
...
...
@@ -1991,7 +1991,7 @@ if __name__ == '__main__':
resource_file
=
'./libs/resources.py'
if
not
os
.
path
.
exists
(
resource_file
):
output
=
os
.
system
(
'pyrcc5 -o libs/resources.py resources.qrc'
)
assert
output
is
0
,
"operate the cmd have some problems ,please check whether there is a in the lib "
\
assert
output
==
0
,
"operate the cmd have some problems ,please check whether there is a in the lib "
\
"directory resources.py "
import
libs.resources
sys
.
exit
(
main
())
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