From 1a7d30e24d5213b1ae7f60c0d20fce7f2d277bf7 Mon Sep 17 00:00:00 2001 From: Vasil Zlatanov Date: Thu, 18 Oct 2018 15:34:39 +0100 Subject: Add projections and average face to the model --- train.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'train.py') 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) + ) + -- cgit v1.2.3-54-g00ecf