Spaces:
Runtime error
Runtime error
maduvantha
commited on
Commit
·
e984f29
1
Parent(s):
0009fca
Update logger.py
Browse files
logger.py
CHANGED
@@ -4,7 +4,7 @@ import torch.nn.functional as F
|
|
4 |
import imageio
|
5 |
|
6 |
import os
|
7 |
-
from skimage.draw import
|
8 |
|
9 |
import matplotlib.pyplot as plt
|
10 |
import collections
|
@@ -111,7 +111,7 @@ class Visualizer:
|
|
111 |
kp_array = spatial_size * (kp_array + 1) / 2
|
112 |
num_kp = kp_array.shape[0]
|
113 |
for kp_ind, kp in enumerate(kp_array):
|
114 |
-
rr, cc =
|
115 |
image[rr, cc] = np.array(self.colormap(kp_ind / num_kp))[:3]
|
116 |
return image
|
117 |
|
|
|
4 |
import imageio
|
5 |
|
6 |
import os
|
7 |
+
from skimage.draw import disk
|
8 |
|
9 |
import matplotlib.pyplot as plt
|
10 |
import collections
|
|
|
111 |
kp_array = spatial_size * (kp_array + 1) / 2
|
112 |
num_kp = kp_array.shape[0]
|
113 |
for kp_ind, kp in enumerate(kp_array):
|
114 |
+
rr, cc =disk(kp[1], kp[0], self.kp_size, shape=image.shape[:2])
|
115 |
image[rr, cc] = np.array(self.colormap(kp_ind / num_kp))[:3]
|
116 |
return image
|
117 |
|