justadudewhohacks / face-api.js

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

Boolean WearsMask Feature Request #607

Open hpssjellis opened 4 years ago

hpssjellis commented 4 years ago

Great Repo!

With the latest Pandemic, please consider a feature request for a boolean WearsMask. Presently Face-Api does not register a face if the mouth is covered. Is there an API command that I can detect a face without mouth/nose information, just eyes and ears. That by itself would be enough to determine if a face was wearing a mask.

aveloso4 commented 4 years ago

Hi, in my case, Face-api.js is detecting faces and landmarks (haven't tried face recognition), even if the person is wearing a mask. I intended to implement mask wearing detection by getting landmarks and check if there were landmarks for mouth and nose. Surprinsingly it returns mouth and nose landarmks even if the are covered by a mask.

hpssjellis commented 4 years ago

I found on a low power device like a cell phone that you could estimate a mask by the sudden size difference of the face, this effect did not occur on a desktop computer. See webapp here.