Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update pose_utils.py #94

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions utils/pose_utils.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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))
Expand Down