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
fd51ba3d
Unverified
Commit
fd51ba3d
authored
Apr 23, 2021
by
MissPenguin
Committed by
GitHub
Apr 23, 2021
Browse files
Merge pull request #2593 from Evezerest/dygraph
Fix a bug in PPOCRLabel
parents
88a5f76e
7204a23b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
4 deletions
+11
-4
PPOCRLabel/README.md
PPOCRLabel/README.md
+1
-3
PPOCRLabel/README_ch.md
PPOCRLabel/README_ch.md
+1
-1
PPOCRLabel/libs/utils.py
PPOCRLabel/libs/utils.py
+9
-0
No files found.
PPOCRLabel/README.md
View file @
fd51ba3d
...
...
@@ -29,9 +29,7 @@ PaddleOCR models has been built in PPOCRLabel, please refer to [PaddleOCR instal
### 2. Install PPOCRLabel
#### Windows + Anaconda
Download and install
[
Anaconda
](
https://www.anaconda.com/download/#download
)
(
Python
3+)
#### Windows
```
pip install pyqt5
...
...
PPOCRLabel/README_ch.md
View file @
fd51ba3d
...
...
@@ -31,7 +31,7 @@ PPOCRLabel是一款适用于OCR领域的半自动化图形标注工具,内置P
PPOCRLabel内置PaddleOCR模型,故请参考
[
PaddleOCR安装文档
](
https://github.com/PaddlePaddle/PaddleOCR/blob/develop/doc/doc_ch/installation.md
)
准备好PaddleOCR,并确保PaddleOCR安装成功。
### 2. 安装PPOCRLabel
#### Windows
+ Anaconda
#### Windows
```
pip install pyqt5
...
...
PPOCRLabel/libs/utils.py
View file @
fd51ba3d
...
...
@@ -124,6 +124,15 @@ def natural_sort(list, key=lambda s:s):
def
get_rotate_crop_image
(
img
,
points
):
# Use Green's theory to judge clockwise or counterclockwise
# author: biyanhua
d
=
0.0
for
index
in
range
(
-
1
,
3
):
d
+=
-
0.5
*
(
points
[
index
+
1
][
1
]
+
points
[
index
][
1
])
*
(
points
[
index
+
1
][
0
]
-
points
[
index
][
0
])
if
d
<
0
:
# counterclockwise
tmp
=
np
.
array
(
points
)
points
[
1
],
points
[
3
]
=
tmp
[
3
],
tmp
[
1
]
try
:
img_crop_width
=
int
(
...
...
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