-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsession33(a).py
More file actions
45 lines (28 loc) · 775 Bytes
/
session33(a).py
File metadata and controls
45 lines (28 loc) · 775 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import numpy as np
import matplotlib.pyplot as plt
from skimage import io
import pandas as pd
table = pd.read_csv("faces/face_landmarks.csv")
print(table)
n = 7
imageName = table.iloc[n, 0]
print("Image name is:", imageName)
landMarks = table.iloc[n, 1:].as_matrix()
print(">>LandMarks")
print(landMarks)
print()
landMarks = landMarks.astype('int').reshape(-1, 2)
print(">>New LandMarks are:")
print(landMarks)
print()
path = "faces/{}".format(imageName)
image = io.imread(path)
print(image)
plt.imshow(image)
plt.title(imageName)
print("***************************************")
print(landMarks[:, 0])
print("***************************************")
print(landMarks[:, 1])
plt.scatter(landMarks[:, 0], landMarks[:, 1], s=20, marker=".", c='r')
plt.show()