Spaces:
Build error
Build error
Update viz_utils.py
Browse files- viz_utils.py +2 -0
viz_utils.py
CHANGED
@@ -65,6 +65,8 @@ def draw_keypoints_on_image(image,
|
|
65 |
round_fill = list(cm.viridis(norm(colores[i]),bytes=True))#[round(num*255) for num in list(cmap(i))[:3]] #check!
|
66 |
if np.isnan(alpha[i]) == False :
|
67 |
round_fill[3] = round(alpha[i] *255)
|
|
|
|
|
68 |
#print(round_fill)
|
69 |
#round_outline = [round(num*255) for num in list(cmap2(alpha[i]))[:3]]
|
70 |
draw.ellipse([(keypoint_x - marker_size, keypoint_y - marker_size),
|
|
|
65 |
round_fill = list(cm.viridis(norm(colores[i]),bytes=True))#[round(num*255) for num in list(cmap(i))[:3]] #check!
|
66 |
if np.isnan(alpha[i]) == False :
|
67 |
round_fill[3] = round(alpha[i] *255)
|
68 |
+
if np.isnan(keypoint_x).any():
|
69 |
+
continue
|
70 |
#print(round_fill)
|
71 |
#round_outline = [round(num*255) for num in list(cmap2(alpha[i]))[:3]]
|
72 |
draw.ellipse([(keypoint_x - marker_size, keypoint_y - marker_size),
|