aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVasil Zlatanov <v@skozl.com>2018-10-18 15:34:39 +0100
committerVasil Zlatanov <v@skozl.com>2018-10-18 15:34:39 +0100
commit1a7d30e24d5213b1ae7f60c0d20fce7f2d277bf7 (patch)
tree6fe2f5409c9d90ed3951a5174eb2e6af54b73bef
parent1afdc762b80613f9ae8c6f35296a883c40fdc375 (diff)
downloadvz215_np1915-1a7d30e24d5213b1ae7f60c0d20fce7f2d277bf7.tar.gz
vz215_np1915-1a7d30e24d5213b1ae7f60c0d20fce7f2d277bf7.tar.bz2
vz215_np1915-1a7d30e24d5213b1ae7f60c0d20fce7f2d277bf7.zip
Add projections and average face to the model
-rw-r--r--report/paper.md5
-rwxr-xr-xtrain.py8
2 files changed, 12 insertions, 1 deletions
diff --git a/report/paper.md b/report/paper.md
index 5b6fd86..8ea9791 100644
--- a/report/paper.md
+++ b/report/paper.md
@@ -41,5 +41,10 @@ tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At
vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren,
no sea takimata sanctus est Lorem ipsum dolor sit amet.
+If you want to write an equation:
+
+$$ x^2 = \frac{\pi}{2} $$
+
+
# References
diff --git a/train.py b/train.py
index a0c2a9a..6c17cc7 100755
--- a/train.py
+++ b/train.py
@@ -33,4 +33,10 @@ normal_faces = normalise_faces(average_face, raw_faces)
e_vals, e_vecs = LA.eig(np.cov(normal_faces))
-np.savez(args.model, e_vals=e_vals[:M], e_vecs=e_vecs[:M])
+np.savez(args.model,
+ average_face=average_face,
+ e_vals=e_vals[:M],
+ e_vecs=e_vecs[:M],
+ projections=np.dot(e_vecs[:M], raw_faces)
+ )
+