From 0e27370b8ca8884d945d31ac9a3ac30ab196b821 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Fri, 2 Apr 2021 08:05:19 -0400 Subject: [PATCH] update demos --- demo/facematch.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/demo/facematch.js b/demo/facematch.js index 68f7a8e4..c68ff1e8 100644 --- a/demo/facematch.js +++ b/demo/facematch.js @@ -186,6 +186,23 @@ async function main() { log('Enumerated:', images.length, 'images'); for (let i = 0; i < images.length; i++) await process(i, images[i]); + // could not dynamically enumerate images so using static list + if (images.length === 0) { + images = [ + '/assets/sample1.jpg', + '/assets/sample2.jpg', + '/assets/sample3.jpg', + '/assets/sample4.jpg', + '/assets/sample5.jpg', + '/assets/sample6.jpg', + '/assets/sample6.jpg', + '/assets/sample-me.jpg', + '/assets/human-sample-face.jpg', + '/assets/human-sample-upper.jpg', + '/assets/human-sample-body.jpg', + ]; + } + // print stats const num = all.reduce((prev, cur) => prev += cur.length, 0); log('Extracted faces:', num, 'from images:', all.length);