justadudewhohacks / face-api.js

JavaScript API for face detection and face recognition in the browser and nodejs with tensorflow.js
MIT License
16.53k stars 3.69k forks source link

faceapi.locateFaces returns empty array #77

Open dmastag opened 6 years ago

dmastag commented 6 years ago

Following #75, I have succeeded in downloading the models. But for some reason when on my android device using faceapi.locateFaces returns an empty array. Though it works flawlessly on my browser.

Any pointers on what I should check ?

dmastag commented 6 years ago

Interestingly though, I uploaded my code to my server at https://julianalimin.com/models/app/

And for some reason it works on some phones only. Crashed my iPhone SE and does not work on my Asus Zenfone 3.

Are there minimum requirements to work on phone?

justadudewhohacks commented 6 years ago

Looking at your app, it seems you are using the ssd mobilenetv1 model for face detection. This one doesn't run on my android as well, probably because it requires too much resources.

For mobile face detection I would recommend using the new tiny yolo v2 face detector, which uses separable convs instead of regular convolutions. This model is much lighter and way faster on mobile devices than ssd mobilenetv1 and MTCNN.