aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornunzip <np.scarh@gmail.com>2018-10-23 16:51:08 +0100
committerVasil Zlatanov <v@skozl.com>2018-10-29 15:34:12 +0000
commit1b1d22a025c23703b05b08204276a4066ebbe9bc (patch)
treeba93b0a42a44f720c54a7c49e562230ea349ca04
parent5b3291144270dc4736ce0c1fd5dda52ba6808d22 (diff)
downloadvz215_np1915-1b1d22a025c23703b05b08204276a4066ebbe9bc.tar.gz
vz215_np1915-1b1d22a025c23703b05b08204276a4066ebbe9bc.tar.bz2
vz215_np1915-1b1d22a025c23703b05b08204276a4066ebbe9bc.zip
Rotate faces
-rwxr-xr-xtrain.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/train.py b/train.py
index cdf3f5e..a2d9d4b 100755
--- a/train.py
+++ b/train.py
@@ -6,7 +6,7 @@
import matplotlib.pyplot as plt
import sys
import random
-
+from numpy import linalg as LA
from random import randint
from sklearn.neighbors import KNeighborsClassifier
@@ -105,7 +105,7 @@ if args.faces:
sys.exit("Can not plot eigenfaces when using LDA")
for i in range(args.faces):
ax = plt.subplot(2, args.faces/2, i + 1)
- ax.imshow(pca.components_[i].reshape([46, 56]))
+ ax.imshow(pca.components_[i].reshape([46, 56]).T)
plt.show()
if args.principal: