From 959de5514e12bcc12dce3bd49c206f0c81399e63 Mon Sep 17 00:00:00 2001 From: James Ketrenos Date: Tue, 4 Dec 2018 19:46:30 -0800 Subject: [PATCH] Updated install notes for face-recognition Signed-off-by: James Ketrenos --- README.md | 12 ++++++++++-- face.js | 4 ++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0ea720c..664e736 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -#### Upgrade to Node >v6 +#### Upgrade Node ```bash wget -qO- https://deb.nodesource.com/setup_8.x | sudo bash - @@ -12,10 +12,18 @@ sudo npm install --global npm@latest sudo npm install --global polymer-cli sudo npm install --global bower ``` + +# Install BLAS to improve performance, and dev tools so +# face-recognition can build. + +```bash +sudo apt install -y libopenblas-dev cmake +``` + ### NEF processing uses ufraw-batch ``` -sudo apt install ufraw-batch +sudo apt install -y ufraw-batch ``` ### Create `photos` user for DB diff --git a/face.js b/face.js index f1930c5..721c0b1 100644 --- a/face.js +++ b/face.js @@ -13,6 +13,10 @@ const detector = fr.FaceDetector() console.log("Detecting faces..."); const faceRectangles = detector.locateFaces(image) +if (faceRectangles.length == 0) { + console.log("No faces found."); + process.exit(-1); +} /* 200x200 picture faces */ const faceImages = detector.detectFaces(image, 200)