Implement align
This commit is contained in:
@@ -2,19 +2,19 @@ from pathlib import Path
|
||||
|
||||
from skimage.io import imread
|
||||
|
||||
from falign.landmarks import get_landmarks
|
||||
from falign.landmarks import read_image_and_get_landmarks
|
||||
from falign.plot import imsave_with_landmarks
|
||||
|
||||
|
||||
def test_get_landmarks():
|
||||
dir_gallery = Path(__file__).parent.parent.parent / "gallery"
|
||||
path_image = dir_gallery / "original.jpg"
|
||||
landmarks = get_landmarks(path_image)
|
||||
|
||||
image, landmarks = read_image_and_get_landmarks(path_image)
|
||||
assert landmarks.shape == (68, 2)
|
||||
|
||||
imsave_with_landmarks(
|
||||
dir_gallery / "test_get_landmarks.jpg",
|
||||
imread(path_image), landmarks,
|
||||
image, landmarks,
|
||||
size=5
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user