Spaces:
Build error
Build error
sabrinabenas
commited on
Commit
β’
571ea3a
1
Parent(s):
2c98aa2
test
Browse files
app.py
CHANGED
@@ -47,7 +47,8 @@ def draw_keypoints_on_image(image,
|
|
47 |
font_style='amiko',
|
48 |
font_size=8,
|
49 |
keypt_color="#ff0000",
|
50 |
-
marker_size='2'
|
|
|
51 |
"""Draws keypoints on an image.
|
52 |
Modified from:
|
53 |
https://www.programcreek.com/python/?code=fjchange%2Fobject_centric_VAD%2Fobject_centric_VAD-master%2Fobject_detection%2Futils%2Fvisualization_utils.py
|
@@ -60,6 +61,8 @@ def draw_keypoints_on_image(image,
|
|
60 |
radius: keypoint radius. Default value is 2.
|
61 |
use_normalized_coordinates: if True (default), treat keypoint values as
|
62 |
relative to the image. Otherwise treat them as absolute.
|
|
|
|
|
63 |
"""
|
64 |
# get a drawing context
|
65 |
draw = ImageDraw.Draw(image)
|
@@ -224,6 +227,8 @@ def predict_pipeline(img_input,
|
|
224 |
path_to_DLCmodel,
|
225 |
dlc_proc)
|
226 |
# draw kpts on input img
|
|
|
|
|
227 |
draw_keypoints_on_image(img_input,
|
228 |
list_kpts_per_crop[0], # a numpy array with shape [num_keypoints, 2].
|
229 |
map_label_id_to_str,
|
|
|
47 |
font_style='amiko',
|
48 |
font_size=8,
|
49 |
keypt_color="#ff0000",
|
50 |
+
marker_size='2',
|
51 |
+
):
|
52 |
"""Draws keypoints on an image.
|
53 |
Modified from:
|
54 |
https://www.programcreek.com/python/?code=fjchange%2Fobject_centric_VAD%2Fobject_centric_VAD-master%2Fobject_detection%2Futils%2Fvisualization_utils.py
|
|
|
61 |
radius: keypoint radius. Default value is 2.
|
62 |
use_normalized_coordinates: if True (default), treat keypoint values as
|
63 |
relative to the image. Otherwise treat them as absolute.
|
64 |
+
|
65 |
+
alpha is the lklh (check)
|
66 |
"""
|
67 |
# get a drawing context
|
68 |
draw = ImageDraw.Draw(image)
|
|
|
227 |
path_to_DLCmodel,
|
228 |
dlc_proc)
|
229 |
# draw kpts on input img
|
230 |
+
print(list_kpts_per_crop)
|
231 |
+
print(list_kpts_per_crop[0])
|
232 |
draw_keypoints_on_image(img_input,
|
233 |
list_kpts_per_crop[0], # a numpy array with shape [num_keypoints, 2].
|
234 |
map_label_id_to_str,
|