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
ModelZoo
LivePortrait_pytorch
Commits
c36d19db
Commit
c36d19db
authored
Jul 22, 2024
by
mashun1
Browse files
liveportrait
parents
Pipeline
#1402
canceled with stages
Changes
141
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
src/utils/viz.py
src/utils/viz.py
+19
-0
No files found.
src/utils/viz.py
0 → 100644
View file @
c36d19db
# coding: utf-8
import
cv2
;
cv2
.
setNumThreads
(
0
);
cv2
.
ocl
.
setUseOpenCL
(
False
)
def
viz_lmk
(
img_
,
vps
,
**
kwargs
):
"""可视化点"""
lineType
=
kwargs
.
get
(
"lineType"
,
cv2
.
LINE_8
)
# cv2.LINE_AA
img_for_viz
=
img_
.
copy
()
for
pt
in
vps
:
cv2
.
circle
(
img_for_viz
,
(
int
(
pt
[
0
]),
int
(
pt
[
1
])),
radius
=
kwargs
.
get
(
"radius"
,
1
),
color
=
(
0
,
255
,
0
),
thickness
=
kwargs
.
get
(
"thickness"
,
1
),
lineType
=
lineType
,
)
return
img_for_viz
Prev
1
…
4
5
6
7
8
Next
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