def show_landmarks(self, arr, landmark_num, width, height): from src.utils.util import show_slice temp = np.zeros((height, width)) x = arr[:, np.arange(0, landmark_num*2-1, 2)].reshape(-1, 1) y = arr[:, np.arange(1, landmark_num*2, 2)].reshape(-1, 1) temp[x, y] = 255 show_slice(temp)
def show_landmark(arr, landmark_num, width, height): from src.utils.util import show_slice temp = np.zeros((height, width)) x = arr[np.arange(0, landmark_num*2-1, 2)] y = arr[np.arange(1, landmark_num*2, 2)] temp[x, y] = 255 show_slice(temp)