MATLAB: How to detect glasses on the face

Computer Vision ToolboxDeep Learning Toolboxfacialfeaturesneural networks

I am doing a project just to detect if the person is wearing glasses or not. I have a training database. I want to use a neural network for this. I want to train the neural network with features of the image near the eye.
Does anyone know how to extract features near the eye using Matlab ?
I tried the vision.cascadedetector in Matlab but it gave [0,4] as the value for the bounding box.
Is there any other way to get the features of the eye. Please help me.
Thank you for the help.

Best Answer

Hi Varun,
I would try using vision.CascadeObjectDetector to detect the face first. Then, I would try to detect the eyes inside the detected face regions.
To determine whether the person is wearing glasses you would need to train your own glasses vs. no glasses classifier. There is a variety of methods for doing that. For example, you can try using HOG features and the SVM classifier.
Related Question