mirror of https://github.com/vladmandic/human
update
parent
7b980ccec8
commit
65800ae036
|
@ -182,9 +182,7 @@ async function main() {
|
||||||
dir = (res && res.ok) ? await res.json() : [];
|
dir = (res && res.ok) ? await res.json() : [];
|
||||||
images = images.concat(dir.filter((img) => (img.endsWith('.jpg'))));
|
images = images.concat(dir.filter((img) => (img.endsWith('.jpg'))));
|
||||||
|
|
||||||
// download and analyze all images
|
|
||||||
log('Enumerated:', images.length, 'images');
|
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
|
// could not dynamically enumerate images so using static list
|
||||||
if (images.length === 0) {
|
if (images.length === 0) {
|
||||||
|
@ -204,6 +202,9 @@ async function main() {
|
||||||
log('Adding static image list:', images.length, 'images');
|
log('Adding static image list:', images.length, 'images');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// download and analyze all images
|
||||||
|
for (let i = 0; i < images.length; i++) await process(i, images[i]);
|
||||||
|
|
||||||
// print stats
|
// print stats
|
||||||
const num = all.reduce((prev, cur) => prev += cur.length, 0);
|
const num = all.reduce((prev, cur) => prev += cur.length, 0);
|
||||||
log('Extracted faces:', num, 'from images:', all.length);
|
log('Extracted faces:', num, 'from images:', all.length);
|
||||||
|
|
Loading…
Reference in New Issue