-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplot_eye.py
More file actions
41 lines (32 loc) · 5.11 KB
/
plot_eye.py
File metadata and controls
41 lines (32 loc) · 5.11 KB
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
39
40
41
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
headers = ['eye_lmk_X' + str(ind) for ind in range(56)] + \
['eye_lmk_Y' + str(ind) for ind in range(56)] + \
['eye_lmk_Z' + str(ind) for ind in range(56)]
# conf = [0, 0]
# val3 = [-92,-92.3,-92.4,-92.1,-91.7,-91.4,-91.2,-91.5,-94.8,-93,-91.5,-90.6,-90.9,-91.7,-92.7,-91.6,-90.7,-90.6,-91.4,-93,-92.2,-92.1,-92.1,-92.3,-92.5,-92.6,-92.6,-92.4,-91.7,-92.1,-92.4,-92.3,-92,-91.5,-91.2,-91.4,-92.7,-91.7,-90.9,-90.6,-91.5,-93,-94.8,-93,-91.4,-90.6,-90.7,-91.6,-92.1,-92.1,-92.2,-92.4,-92.6,-92.6,-92.5,-92.3,-67,-67.3,-67.3,-67.1,-66.8,-66.6,-66.4,-66.6,-69,-67.8,-66.6,-66,-66.2,-66.8,-67.5,-66.7,-66,-66,-66.6,-67.7,-67.1,-67.1,-67.1,-67.2,-67.4,-67.4,-67.4,-67.3,-66.8,-67.1,-67.3,-67.3,-67,-66.6,-66.4,-66.6,-67.5,-66.8,-66.2,-66,-66.6,-67.8,-69,-67.7,-66.6,-66,-66,-66.7,-67.1,-67.1,-67.1,-67.3,-67.4,-67.4,-67.4,-67.2,141.6,142.2,142.3,141.9,141.2,140.8,140.5,140.9,145.9,143.3,140.9,139.6,139.9,141.2,142.7,141.1,139.7,139.5,140.8,143.2,142,141.8,141.8,142.1,142.4,142.6,142.6,142.3,141.2,141.9,142.3,142.2,141.6,140.9,140.5,140.8,142.7,141.2,139.9,139.6,140.9,143.3,145.9,143.2,140.8,139.5,139.7,141.1,141.8,141.8,142,142.3,142.6,142.6,142.4,142.1]
# val2 = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
# conf = [0.57,1]
# val3 = [-136.2,-134.1,-129.7,-125.7,-124.3,-126.3,-130.8,-134.9,-143.8,-139.9,-135.1,-130,-125.7,-122.9,-121.3,-123.8,-127.3,-131.5,-136,-140.3,-132.6,-130.8,-128.9,-127.9,-128.5,-130.3,-132.2,-133.2,-83.3,-81.8,-77.9,-74,-72.4,-73.9,-77.7,-82,-87.7,-84.7,-80.8,-76.3,-72.6,-70.1,-68.9,-70.3,-72.8,-76.1,-80.2,-84.5,-79.9,-78.2,-76.5,-75.8,-76.6,-78.3,-79.9,-80.6,-39.7,-43.7,-44.9,-42.5,-38,-33.6,-32.8,-35.2,-38.7,-40.3,-41.1,-41,-39.7,-37.5,-34.8,-33.7,-33.7,-34,-35,-36.5,-37.1,-36.1,-36.6,-38.4,-40.4,-41.4,-40.9,-39.1,-33.5,-37.7,-39.4,-37.5,-33.1,-28.8,-27.2,-28.8,-31,-33.3,-34.8,-35.4,-34.6,-33.2,-31,-29.3,-28.5,-28.3,-28.7,-29.4,-31.4,-30.6,-31.3,-33.1,-35,-35.9,-35.2,-33.3,348.7,349.2,349.3,348.8,348.1,347.7,347.5,347.9,353,350.4,347.9,346.6,346.9,348.2,349.6,348,346.6,346.5,347.8,350.3,349,348.8,348.8,349.1,349.4,349.6,349.6,349.3,341.7,342.8,344,344.7,344.4,343.3,342.1,341.6,342.5,341.5,340.9,341.4,343.6,346.6,349.6,346.4,343.4,341.4,340.7,341.4,343.1,343.4,343.9,344.4,344.5,344.2,343.7,343.2]
# val2 = [36.6,37.6,39.4,41,41.4,40.6,38.7,37.1,34.3,35.4,37,38.9,40.7,42,42.8,41.6,40,38.2,36.6,35.2,38.2,38.9,39.7,40.1,39.9,39.2,38.4,38,57.5,58.2,59.9,61.6,62.2,61.5,59.8,58,55.7,56.9,58.4,60.3,62.1,63.3,64.1,63.2,62,60.4,58.7,57,59,59.8,60.5,60.8,60.5,59.8,59.1,58.7,50.9,49.3,48.8,49.7,51.5,53.3,53.6,52.7,51.5,50.7,50.3,50.2,50.8,51.7,52.9,53.3,53.2,53.1,52.8,52.3,51.9,52.3,52.1,51.4,50.6,50.2,50.4,51.1,53.1,51.4,50.8,51.6,53.4,55.1,55.7,55,54.2,53.2,52.5,52.3,52.7,53.4,54.4,55,55.3,55.3,55.1,54.8,54,54.4,54.1,53.4,52.6,52.2,52.5,53.3]
conf = [0.98,1]
val3 = [-127,-124.7,-120.2,-116.3,-115.1,-117.3,-121.9,-125.9,-134.5,-130.6,-125.9,-120.8,-116.5,-113.7,-112.2,-114.8,-118.4,-122.6,-127.1,-131.3,-123.4,-121.7,-119.8,-118.7,-119.2,-121,-122.9,-123.9,-75.2,-73.5,-69.7,-65.9,-64.4,-66,-69.9,-74.1,-79.7,-76.6,-72.7,-68.2,-64.5,-62.1,-61,-62.5,-65,-68.3,-72.3,-76.5,-71.9,-70.2,-68.5,-67.8,-68.5,-70.1,-71.8,-72.5,-38.9,-42.8,-43.9,-41.4,-36.9,-32.6,-31.9,-34.3,-38.4,-39.8,-40.3,-40,-38.6,-36.4,-33.7,-32.5,-32.5,-32.9,-34.1,-35.9,-36.3,-35.2,-35.7,-37.4,-39.4,-40.5,-40,-38.3,-32.2,-36.4,-38.1,-36.2,-31.8,-27.6,-25.9,-27.5,-29.7,-32,-33.5,-34,-33.3,-32.1,-30.1,-28.1,-27.1,-26.8,-27.2,-28,-30.2,-29.3,-30,-31.9,-33.8,-34.6,-33.9,-32.1,337.7,337.9,337.7,337.3,336.8,336.9,336.8,337.2,342.3,339.4,336.8,335.3,335.6,336.9,338.5,337.1,335.8,335.8,337.2,339.6,338.1,337.9,337.8,337.9,338.1,338.3,338.3,338.2,332.1,332.9,334.1,335,335.1,334.3,333.1,332.4,333.1,331.9,331.3,331.9,334.1,337.3,340.6,337.5,334.4,332.4,331.6,332.2,333.8,334.2,334.7,335,335,334.6,334.1,333.8]
val2 = [38.7,39.7,41.6,43.2,43.6,42.7,40.7,39.1,36.3,37.5,39.1,41,42.8,44.2,45,43.7,42.1,40.3,38.6,37.2,40.3,41,41.8,42.2,42,41.3,40.5,40.1,59.9,60.7,62.4,64.1,64.8,64,62.3,60.4,58.1,59.3,60.9,62.9,64.6,65.9,66.6,65.8,64.5,62.9,61.1,59.4,61.5,62.2,63,63.3,63,62.3,61.5,61.2,50.7,49,48.6,49.6,51.5,53.3,53.6,52.6,51.1,50.4,50.1,50.1,50.7,51.7,52.9,53.3,53.3,53.1,52.7,52,51.8,52.2,52,51.3,50.5,50,50.2,51,53.3,51.5,50.9,51.7,53.6,55.3,56,55.3,54.3,53.4,52.7,52.5,52.9,53.5,54.5,55.2,55.5,55.6,55.4,55,54.2,54.6,54.3,53.5,52.7,52.3,52.6,53.4]
val2 = np.array(val2)
val2 = np.array([val2[:56], val2[56:56*2]]).T
val3 = np.array(val3)
val3 = np.array([val3[:56], val3[56:56*2], val3[56*2:]]).T
fig = plt.figure()
ax = fig.add_subplot(121, projection='3d')
ax.scatter(val3[:,0], val3[:,1], val3[:,2])
ax.set_xlabel('X')
ax.set_ylabel('Y')
ax.set_zlabel('Z')
ax.set_title('3D Landmarks: Confidence {}, Success {}'.format(conf[0], conf[1]))
ax = fig.add_subplot(122)
ax.scatter(val2[:,0], val2[:,1])
ax.set_xlabel('X')
ax.set_ylabel('Y')
ax.set_title('2D Landmarks: Confidence {}, Success {}'.format(conf[0], conf[1]))
plt.show()