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
32665fe5
Unverified
Commit
32665fe5
authored
Apr 01, 2021
by
zhoujun
Committed by
GitHub
Apr 01, 2021
Browse files
Merge pull request #2370 from WenmuZhou/update_whl
update font path in doc
parents
d6ee6bdb
3deaca9d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
12 deletions
+12
-12
doc/doc_ch/whl.md
doc/doc_ch/whl.md
+6
-6
doc/doc_en/whl_en.md
doc/doc_en/whl_en.md
+6
-6
No files found.
doc/doc_ch/whl.md
View file @
32665fe5
...
@@ -36,7 +36,7 @@ image = Image.open(img_path).convert('RGB')
...
@@ -36,7 +36,7 @@ image = Image.open(img_path).convert('RGB')
boxes
=
[
line
[
0
]
for
line
in
result
]
boxes
=
[
line
[
0
]
for
line
in
result
]
txts
=
[
line
[
1
][
0
]
for
line
in
result
]
txts
=
[
line
[
1
][
0
]
for
line
in
result
]
scores
=
[
line
[
1
][
1
]
for
line
in
result
]
scores
=
[
line
[
1
][
1
]
for
line
in
result
]
im_show
=
draw_ocr
(
image
,
boxes
,
txts
,
scores
,
font_path
=
'/path/to/PaddleOCR/doc/simfang.ttf'
)
im_show
=
draw_ocr
(
image
,
boxes
,
txts
,
scores
,
font_path
=
'/path/to/PaddleOCR/doc/
fonts/
simfang.ttf'
)
im_show
=
Image
.
fromarray
(
im_show
)
im_show
=
Image
.
fromarray
(
im_show
)
im_show
.
save
(
'result.jpg'
)
im_show
.
save
(
'result.jpg'
)
```
```
...
@@ -69,7 +69,7 @@ image = Image.open(img_path).convert('RGB')
...
@@ -69,7 +69,7 @@ image = Image.open(img_path).convert('RGB')
boxes
=
[
line
[
0
]
for
line
in
result
]
boxes
=
[
line
[
0
]
for
line
in
result
]
txts
=
[
line
[
1
][
0
]
for
line
in
result
]
txts
=
[
line
[
1
][
0
]
for
line
in
result
]
scores
=
[
line
[
1
][
1
]
for
line
in
result
]
scores
=
[
line
[
1
][
1
]
for
line
in
result
]
im_show
=
draw_ocr
(
image
,
boxes
,
txts
,
scores
,
font_path
=
'/path/to/PaddleOCR/doc/simfang.ttf'
)
im_show
=
draw_ocr
(
image
,
boxes
,
txts
,
scores
,
font_path
=
'/path/to/PaddleOCR/doc/
fonts/
simfang.ttf'
)
im_show
=
Image
.
fromarray
(
im_show
)
im_show
=
Image
.
fromarray
(
im_show
)
im_show
.
save
(
'result.jpg'
)
im_show
.
save
(
'result.jpg'
)
```
```
...
@@ -114,7 +114,7 @@ for line in result:
...
@@ -114,7 +114,7 @@ for line in result:
from
PIL
import
Image
from
PIL
import
Image
image
=
Image
.
open
(
img_path
).
convert
(
'RGB'
)
image
=
Image
.
open
(
img_path
).
convert
(
'RGB'
)
im_show
=
draw_ocr
(
image
,
result
,
txts
=
None
,
scores
=
None
,
font_path
=
'/path/to/PaddleOCR/doc/simfang.ttf'
)
im_show
=
draw_ocr
(
image
,
result
,
txts
=
None
,
scores
=
None
,
font_path
=
'/path/to/PaddleOCR/doc/
fonts/
simfang.ttf'
)
im_show
=
Image
.
fromarray
(
im_show
)
im_show
=
Image
.
fromarray
(
im_show
)
im_show
.
save
(
'result.jpg'
)
im_show
.
save
(
'result.jpg'
)
```
```
...
@@ -253,7 +253,7 @@ image = Image.open(img_path).convert('RGB')
...
@@ -253,7 +253,7 @@ image = Image.open(img_path).convert('RGB')
boxes
=
[
line
[
0
]
for
line
in
result
]
boxes
=
[
line
[
0
]
for
line
in
result
]
txts
=
[
line
[
1
][
0
]
for
line
in
result
]
txts
=
[
line
[
1
][
0
]
for
line
in
result
]
scores
=
[
line
[
1
][
1
]
for
line
in
result
]
scores
=
[
line
[
1
][
1
]
for
line
in
result
]
im_show
=
draw_ocr
(
image
,
boxes
,
txts
,
scores
,
font_path
=
'/path/to/PaddleOCR/doc/simfang.ttf'
)
im_show
=
draw_ocr
(
image
,
boxes
,
txts
,
scores
,
font_path
=
'/path/to/PaddleOCR/doc/
fonts/
simfang.ttf'
)
im_show
=
Image
.
fromarray
(
im_show
)
im_show
=
Image
.
fromarray
(
im_show
)
im_show
.
save
(
'result.jpg'
)
im_show
.
save
(
'result.jpg'
)
```
```
...
@@ -285,7 +285,7 @@ image = Image.open(img_path).convert('RGB')
...
@@ -285,7 +285,7 @@ image = Image.open(img_path).convert('RGB')
boxes
=
[
line
[
0
]
for
line
in
result
]
boxes
=
[
line
[
0
]
for
line
in
result
]
txts
=
[
line
[
1
][
0
]
for
line
in
result
]
txts
=
[
line
[
1
][
0
]
for
line
in
result
]
scores
=
[
line
[
1
][
1
]
for
line
in
result
]
scores
=
[
line
[
1
][
1
]
for
line
in
result
]
im_show
=
draw_ocr
(
image
,
boxes
,
txts
,
scores
,
font_path
=
'/path/to/PaddleOCR/doc/simfang.ttf'
)
im_show
=
draw_ocr
(
image
,
boxes
,
txts
,
scores
,
font_path
=
'/path/to/PaddleOCR/doc/
fonts/
simfang.ttf'
)
im_show
=
Image
.
fromarray
(
im_show
)
im_show
=
Image
.
fromarray
(
im_show
)
im_show
.
save
(
'result.jpg'
)
im_show
.
save
(
'result.jpg'
)
```
```
...
@@ -314,7 +314,7 @@ image = Image.open(img_path).convert('RGB')
...
@@ -314,7 +314,7 @@ image = Image.open(img_path).convert('RGB')
boxes
=
[
line
[
0
]
for
line
in
result
]
boxes
=
[
line
[
0
]
for
line
in
result
]
txts
=
[
line
[
1
][
0
]
for
line
in
result
]
txts
=
[
line
[
1
][
0
]
for
line
in
result
]
scores
=
[
line
[
1
][
1
]
for
line
in
result
]
scores
=
[
line
[
1
][
1
]
for
line
in
result
]
im_show
=
draw_ocr
(
image
,
boxes
,
txts
,
scores
,
font_path
=
'/path/to/PaddleOCR/doc/simfang.ttf'
)
im_show
=
draw_ocr
(
image
,
boxes
,
txts
,
scores
,
font_path
=
'/path/to/PaddleOCR/doc/
fonts/
simfang.ttf'
)
im_show
=
Image
.
fromarray
(
im_show
)
im_show
=
Image
.
fromarray
(
im_show
)
im_show
.
save
(
'result.jpg'
)
im_show
.
save
(
'result.jpg'
)
```
```
...
...
doc/doc_en/whl_en.md
View file @
32665fe5
...
@@ -35,7 +35,7 @@ image = Image.open(img_path).convert('RGB')
...
@@ -35,7 +35,7 @@ image = Image.open(img_path).convert('RGB')
boxes
=
[
line
[
0
]
for
line
in
result
]
boxes
=
[
line
[
0
]
for
line
in
result
]
txts
=
[
line
[
1
][
0
]
for
line
in
result
]
txts
=
[
line
[
1
][
0
]
for
line
in
result
]
scores
=
[
line
[
1
][
1
]
for
line
in
result
]
scores
=
[
line
[
1
][
1
]
for
line
in
result
]
im_show
=
draw_ocr
(
image
,
boxes
,
txts
,
scores
,
font_path
=
'/path/to/PaddleOCR/doc/simfang.ttf'
)
im_show
=
draw_ocr
(
image
,
boxes
,
txts
,
scores
,
font_path
=
'/path/to/PaddleOCR/doc/
fonts/
simfang.ttf'
)
im_show
=
Image
.
fromarray
(
im_show
)
im_show
=
Image
.
fromarray
(
im_show
)
im_show
.
save
(
'result.jpg'
)
im_show
.
save
(
'result.jpg'
)
```
```
...
@@ -69,7 +69,7 @@ image = Image.open(img_path).convert('RGB')
...
@@ -69,7 +69,7 @@ image = Image.open(img_path).convert('RGB')
boxes
=
[
line
[
0
]
for
line
in
result
]
boxes
=
[
line
[
0
]
for
line
in
result
]
txts
=
[
line
[
1
][
0
]
for
line
in
result
]
txts
=
[
line
[
1
][
0
]
for
line
in
result
]
scores
=
[
line
[
1
][
1
]
for
line
in
result
]
scores
=
[
line
[
1
][
1
]
for
line
in
result
]
im_show
=
draw_ocr
(
image
,
boxes
,
txts
,
scores
,
font_path
=
'/path/to/PaddleOCR/doc/simfang.ttf'
)
im_show
=
draw_ocr
(
image
,
boxes
,
txts
,
scores
,
font_path
=
'/path/to/PaddleOCR/doc/
fonts/
simfang.ttf'
)
im_show
=
Image
.
fromarray
(
im_show
)
im_show
=
Image
.
fromarray
(
im_show
)
im_show
.
save
(
'result.jpg'
)
im_show
.
save
(
'result.jpg'
)
```
```
...
@@ -116,7 +116,7 @@ for line in result:
...
@@ -116,7 +116,7 @@ for line in result:
from
PIL
import
Image
from
PIL
import
Image
image
=
Image
.
open
(
img_path
).
convert
(
'RGB'
)
image
=
Image
.
open
(
img_path
).
convert
(
'RGB'
)
im_show
=
draw_ocr
(
image
,
result
,
txts
=
None
,
scores
=
None
,
font_path
=
'/path/to/PaddleOCR/doc/simfang.ttf'
)
im_show
=
draw_ocr
(
image
,
result
,
txts
=
None
,
scores
=
None
,
font_path
=
'/path/to/PaddleOCR/doc/
fonts/
simfang.ttf'
)
im_show
=
Image
.
fromarray
(
im_show
)
im_show
=
Image
.
fromarray
(
im_show
)
im_show
.
save
(
'result.jpg'
)
im_show
.
save
(
'result.jpg'
)
```
```
...
@@ -262,7 +262,7 @@ image = Image.open(img_path).convert('RGB')
...
@@ -262,7 +262,7 @@ image = Image.open(img_path).convert('RGB')
boxes
=
[
line
[
0
]
for
line
in
result
]
boxes
=
[
line
[
0
]
for
line
in
result
]
txts
=
[
line
[
1
][
0
]
for
line
in
result
]
txts
=
[
line
[
1
][
0
]
for
line
in
result
]
scores
=
[
line
[
1
][
1
]
for
line
in
result
]
scores
=
[
line
[
1
][
1
]
for
line
in
result
]
im_show
=
draw_ocr
(
image
,
boxes
,
txts
,
scores
,
font_path
=
'/path/to/PaddleOCR/doc/simfang.ttf'
)
im_show
=
draw_ocr
(
image
,
boxes
,
txts
,
scores
,
font_path
=
'/path/to/PaddleOCR/doc/
fonts/
simfang.ttf'
)
im_show
=
Image
.
fromarray
(
im_show
)
im_show
=
Image
.
fromarray
(
im_show
)
im_show
.
save
(
'result.jpg'
)
im_show
.
save
(
'result.jpg'
)
```
```
...
@@ -292,7 +292,7 @@ image = Image.open(img_path).convert('RGB')
...
@@ -292,7 +292,7 @@ image = Image.open(img_path).convert('RGB')
boxes
=
[
line
[
0
]
for
line
in
result
]
boxes
=
[
line
[
0
]
for
line
in
result
]
txts
=
[
line
[
1
][
0
]
for
line
in
result
]
txts
=
[
line
[
1
][
0
]
for
line
in
result
]
scores
=
[
line
[
1
][
1
]
for
line
in
result
]
scores
=
[
line
[
1
][
1
]
for
line
in
result
]
im_show
=
draw_ocr
(
image
,
boxes
,
txts
,
scores
,
font_path
=
'/path/to/PaddleOCR/doc/simfang.ttf'
)
im_show
=
draw_ocr
(
image
,
boxes
,
txts
,
scores
,
font_path
=
'/path/to/PaddleOCR/doc/
fonts/
simfang.ttf'
)
im_show
=
Image
.
fromarray
(
im_show
)
im_show
=
Image
.
fromarray
(
im_show
)
im_show
.
save
(
'result.jpg'
)
im_show
.
save
(
'result.jpg'
)
```
```
...
@@ -320,7 +320,7 @@ image = Image.open(img_path).convert('RGB')
...
@@ -320,7 +320,7 @@ image = Image.open(img_path).convert('RGB')
boxes
=
[
line
[
0
]
for
line
in
result
]
boxes
=
[
line
[
0
]
for
line
in
result
]
txts
=
[
line
[
1
][
0
]
for
line
in
result
]
txts
=
[
line
[
1
][
0
]
for
line
in
result
]
scores
=
[
line
[
1
][
1
]
for
line
in
result
]
scores
=
[
line
[
1
][
1
]
for
line
in
result
]
im_show
=
draw_ocr
(
image
,
boxes
,
txts
,
scores
,
font_path
=
'/path/to/PaddleOCR/doc/simfang.ttf'
)
im_show
=
draw_ocr
(
image
,
boxes
,
txts
,
scores
,
font_path
=
'/path/to/PaddleOCR/doc/
fonts/
simfang.ttf'
)
im_show
=
Image
.
fromarray
(
im_show
)
im_show
=
Image
.
fromarray
(
im_show
)
im_show
.
save
(
'result.jpg'
)
im_show
.
save
(
'result.jpg'
)
```
```
...
...
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