21 lines
503 B
Python
21 lines
503 B
Python
from pathlib import Path
|
|
|
|
from skimage.io import imread
|
|
|
|
from falign.landmarks import 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)
|
|
|
|
assert landmarks.shape == (68, 2)
|
|
|
|
imsave_with_landmarks(
|
|
dir_gallery / "test_get_landmarks.jpg",
|
|
imread(path_image), landmarks,
|
|
size=5
|
|
)
|