Skip to content

Commit

Permalink
Merge pull request #565 from sheth2chintan/fix_demo_pad
Browse files Browse the repository at this point in the history
update augmentation.py
  • Loading branch information
AliaksandrSiarohin authored May 4, 2023
2 parents 3d152de + 1242092 commit c6996b9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion augmentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import PIL

from skimage.transform import resize, rotate
from skimage.util import pad
from numpy import pad
import torchvision

import warnings
Expand Down
4 changes: 2 additions & 2 deletions logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import imageio

import os
from skimage.draw import circle
from skimage.draw import disk

import matplotlib.pyplot as plt
import collections
Expand Down Expand Up @@ -111,7 +111,7 @@ def draw_image_with_kp(self, image, kp_array):
kp_array = spatial_size * (kp_array + 1) / 2
num_kp = kp_array.shape[0]
for kp_ind, kp in enumerate(kp_array):
rr, cc = circle(kp[1], kp[0], self.kp_size, shape=image.shape[:2])
rr, cc = disk(kp[1], kp[0], self.kp_size, shape=image.shape[:2])
image[rr, cc] = np.array(self.colormap(kp_ind / num_kp))[:3]
return image

Expand Down

0 comments on commit c6996b9

Please sign in to comment.