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
99a08630
Unverified
Commit
99a08630
authored
Apr 15, 2021
by
zhoujun
Committed by
GitHub
Apr 15, 2021
Browse files
Merge branch 'dygraph' into update_requirements
parents
4cb3914a
c5f33b00
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11008 additions
and
10994 deletions
+11008
-10994
PPOCRLabel/PPOCRLabel.py
PPOCRLabel/PPOCRLabel.py
+20
-10
PPOCRLabel/libs/canvas.py
PPOCRLabel/libs/canvas.py
+1
-1
PPOCRLabel/libs/resources.py
PPOCRLabel/libs/resources.py
+10984
-10982
PPOCRLabel/resources/strings/strings-zh-CN.properties
PPOCRLabel/resources/strings/strings-zh-CN.properties
+1
-0
PPOCRLabel/resources/strings/strings.properties
PPOCRLabel/resources/strings/strings.properties
+2
-1
No files found.
PPOCRLabel/PPOCRLabel.py
View file @
99a08630
...
...
@@ -147,6 +147,7 @@ class MainWindow(QMainWindow, WindowMixin):
self
.
itemsToShapesbox
=
{}
self
.
shapesToItemsbox
=
{}
self
.
prevLabelText
=
getStr
(
'tempLabel'
)
self
.
noLabelText
=
getStr
(
'nullLabel'
)
self
.
model
=
'paddle'
self
.
PPreader
=
None
self
.
autoSaveNum
=
5
...
...
@@ -1020,7 +1021,7 @@ class MainWindow(QMainWindow, WindowMixin):
item
.
setText
(
str
([(
int
(
p
.
x
()),
int
(
p
.
y
()))
for
p
in
shape
.
points
]))
self
.
updateComboBox
()
def
updateComboBox
(
self
):
# TODO:貌似没用
def
updateComboBox
(
self
):
# Get the unique labels and add them to the Combobox.
itemsTextList
=
[
str
(
self
.
labelList
.
item
(
i
).
text
())
for
i
in
range
(
self
.
labelList
.
count
())]
...
...
@@ -1040,7 +1041,7 @@ class MainWindow(QMainWindow, WindowMixin):
return
dict
(
label
=
s
.
label
,
# str
line_color
=
s
.
line_color
.
getRgb
(),
fill_color
=
s
.
fill_color
.
getRgb
(),
points
=
[(
p
.
x
(),
p
.
y
())
for
p
in
s
.
points
],
# QPonitF
points
=
[(
int
(
p
.
x
()
)
,
int
(
p
.
y
())
)
for
p
in
s
.
points
],
# QPonitF
# add chris
difficult
=
s
.
difficult
)
# bool
...
...
@@ -1069,7 +1070,7 @@ class MainWindow(QMainWindow, WindowMixin):
# print('Image:{0} -> Annotation:{1}'.format(self.filePath, annotationFilePath))
return
True
except
:
self
.
errorMessage
(
u
'Error saving label data'
)
self
.
errorMessage
(
u
'Error saving label
data'
,
u
'Error saving label
data'
)
return
False
def
copySelectedShape
(
self
):
...
...
@@ -1802,10 +1803,14 @@ class MainWindow(QMainWindow, WindowMixin):
result
.
insert
(
0
,
box
)
print
(
'result in reRec is '
,
result
)
self
.
result_dic
.
append
(
result
)
if
result
[
1
][
0
]
==
shape
.
label
:
print
(
'label no change'
)
else
:
rec_flag
+=
1
else
:
print
(
'Can not recognise the box'
)
self
.
result_dic
.
append
([
box
,(
self
.
noLabelText
,
0
)])
if
self
.
noLabelText
==
shape
.
label
or
result
[
1
][
0
]
==
shape
.
label
:
print
(
'label no change'
)
else
:
rec_flag
+=
1
if
len
(
self
.
result_dic
)
>
0
and
rec_flag
>
0
:
self
.
saveFile
(
mode
=
'Auto'
)
...
...
@@ -1836,9 +1841,14 @@ class MainWindow(QMainWindow, WindowMixin):
print
(
'label no change'
)
else
:
shape
.
label
=
result
[
1
][
0
]
self
.
singleLabel
(
shape
)
self
.
setDirty
()
print
(
box
)
else
:
print
(
'Can not recognise the box'
)
if
self
.
noLabelText
==
shape
.
label
:
print
(
'label no change'
)
else
:
shape
.
label
=
self
.
noLabelText
self
.
singleLabel
(
shape
)
self
.
setDirty
()
def
autolcm
(
self
):
vbox
=
QVBoxLayout
()
...
...
PPOCRLabel/libs/canvas.py
View file @
99a08630
...
...
@@ -45,7 +45,7 @@ class Canvas(QWidget):
CREATE
,
EDIT
=
list
(
range
(
2
))
_fill_drawing
=
False
# draw shadows
epsilon
=
11
.0
epsilon
=
5
.0
def
__init__
(
self
,
*
args
,
**
kwargs
):
super
(
Canvas
,
self
).
__init__
(
*
args
,
**
kwargs
)
...
...
PPOCRLabel/libs/resources.py
View file @
99a08630
This diff is collapsed.
Click to expand it.
PPOCRLabel/resources/strings/strings-zh-CN.properties
View file @
99a08630
...
...
@@ -87,6 +87,7 @@ creatPolygon=四点标注
drawSquares
=
正方形标注
saveRec
=
保存识别结果
tempLabel
=
待识别
nullLabel
=
无法识别
steps
=
操作步骤
choseModelLg
=
选择模型语言
cancel
=
取消
...
...
PPOCRLabel/resources/strings/strings.properties
View file @
99a08630
...
...
@@ -77,7 +77,7 @@ IR=Image Resize
autoRecognition
=
Auto Recognition
reRecognition
=
Re-recognition
mfile
=
File
medit
=
E
i
dt
medit
=
Ed
i
t
mview
=
View
mhelp
=
Help
iconList
=
Icon List
...
...
@@ -87,6 +87,7 @@ creatPolygon=Create Quadrilateral
drawSquares
=
Draw Squares
saveRec
=
Save Recognition Result
tempLabel
=
TEMPORARY
nullLabel
=
NULL
steps
=
Steps
choseModelLg
=
Choose Model Language
cancel
=
Cancel
...
...
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