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

Detect uneven lighting on face #718

Open Namrataijare opened 3 years ago

Namrataijare commented 3 years ago

Hi, I want to detect uneven lighting on face. Is there any way to do so. Please help. I want to use this lib for some face validations like "Face is not fronting to camera"," Uneven lit on face" and "Face is too far from camera". Please help me with how I can detect uneven lit face with this lib.

Namrataijare commented 3 years ago

@justadudewhohacks please help me with this. Can we get blur and exposure value of face using this lib?

josiahbryan commented 3 years ago

Probably not blur/exposure, no

You could do a histo of the image using opencv.js for lighting. Exposure is tough.

I found this project: https://github.com/idealo/image-quality-assessment - but haven't made it work in javascript yet - just an idea of other work in the field.

For your "front facing face" problem, my best suggestion is ... you could also use opencv.js to detect only front-facing faces (one of their haarcascades ONLY works for front-faces) then use this lib to do the face matching for descriptors...just an idea

@Namrataijare HTH, lmk if you have more questions

Namrataijare commented 3 years ago

@josiahbryan Thanks for your suggestions. I will try out this. Thank you so much.