From 5fe25dee269c5d71546a240c8ce62e50bfeab896 Mon Sep 17 00:00:00 2001 From: Sudo Chia Date: Sun, 15 Oct 2023 01:42:34 +0800 Subject: [PATCH] Update pose_utils.py --- utils/pose_utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/utils/pose_utils.py b/utils/pose_utils.py index bc95b46..d31670a 100644 --- a/utils/pose_utils.py +++ b/utils/pose_utils.py @@ -1,6 +1,6 @@ import numpy as np from scipy.ndimage.filters import gaussian_filter -from skimage.draw import circle, line_aa, polygon +from skimage.draw import disk, line_aa, polygon import json import matplotlib @@ -88,7 +88,7 @@ def draw_pose_from_cords(pose_joints, img_size, radius=2, draw_joints=True): for i, joint in enumerate(pose_joints): if pose_joints[i][0] == MISSING_VALUE or pose_joints[i][1] == MISSING_VALUE: continue - yy, xx = circle(joint[0], joint[1], radius=radius, shape=img_size) + yy, xx = disk(joint, radius=radius, shape=img_size) colors[yy, xx] = COLORS[i] mask[yy, xx] = True @@ -147,7 +147,7 @@ def produce_ma_mask(kp_array, img_size, point_radius=4): for i, joint in enumerate(kp_array): if kp_array[i][0] == MISSING_VALUE or kp_array[i][1] == MISSING_VALUE: continue - yy, xx = circle(joint[0], joint[1], radius=point_radius, shape=img_size) + yy, xx = disk(joint, radius=point_radius, shape=img_size) mask[yy, xx] = True mask = dilation(mask, square(5))