Comments (9)
Hi @ahmelshi I think your problem is that you did not isolate the face frame. You cannot pass the entire image to Deepgaze, the face requires to be isolated. You can do it using any face detector (e.g. haar-cascade in OpenCV). The Prima dataset includes a text file with the coordinates of the faces, you can use that coordinates to isolate the faces. It is necessary to pass a square frame.
Massimiliano
from deepgaze.
In that image the cropping may be correct (would be better to be close to the chin on the bottom).
But I notice that there is a distorsion in the face proportion. Probably because it was a rectangular frame which has been squashed in a square frame without an appropriate crop. This kind of aberrattions may negatevely effect the performance of the classifier. When the frame is rectangular (let's say of size R x C) would be better to take the longest side (let's suppose it is R) and use it to crop a squared frame (in this example of size R x R) centered on the face.
Another thing to take into account is the image format. Deepgaze uses BGR convention like in OpenCV, if you are reading the image with another library it is possible that you get an image in RGB format which can cause trouble to the CNN. I suggest you to use the OpenCV imread() function to read the images.
The head pose estimator module does not require any other particular pre-processing operation. An internal normalisation is performed at pixel level and appropriate resize is applied to images larger than 64x64 pixels.
Massimiliano
from deepgaze.
Hi,
The last image you sent looks good. The type of cropping I generally use is similar to the one in this image.
The output of the network should be quite accurate for yaw angles in the range [+60, -60] degrees.
Unfortunately the performances slightly degradate when the face is completely turned. This is due to the fact that the images used for training have a low number of faces for those positions.
Massimiliano
from deepgaze.
Regarding pitch and roll there are some limitations as well. The roll estimator has been trained in the range [-25, +25] degrees, whereas the pitch span from -45 to +45 degrees. Also in this case when you move to the end of the range the performance deteriorate. These limits are due to the AFLW dataset which is the one used for the training. In this moment there is not another dataset in-the-wild having the same amount of images. The positive thing is that the aferementioned ranges allow estimating the pose of most of the images released in social networks and media.
Massimiliano
from deepgaze.
Hi Massimiliano,
Thanks for your fast reply.
just to confirm, would a CelebA-unaligned image like so https://ibb.co/dFMPuQ is considered "correct square frame" to be passed to deepgaze-head pose estimation ? also any more specifications to consider when using deepgaze head pose estimation ?
Thanks in advance :)
from deepgaze.
Hi Massimiliano,
Thanks alot for your detailed feedback. I appreciate your help.
To follow your instructions i tried with (http://conradsanderson.id.au/lfwcrop/) and random pic from that db would like this (https://ibb.co/dFz3M5) (img_dim is 64x64) (read with cv2.imread) i guess this fits the description, however deepgaze produces Estimated [roll, pitch, yaw] ..... [-1.51543,7.9395,49.6683], i just visually compare it to (https://ibb.co/njF4Tk) and wouldn't this should be a yaw of (+90) ? or what do you think is wrong in addressing this interpretation from my side?
Thanks in advance :)
from deepgaze.
Hi Massimiliano,
Thank you for the quick feedback and reply.
Any other "performance know about", regarding the other two angles (pitch and roll) like you mention deepgaze works perfect for yaw angles in the range [+60, -60] degrees. what about (pitch and roll) ranges ?
Many thanks to you.
from deepgaze.
Thanks a lot Massimiliano for your help.
from deepgaze.
You are welcome.
from deepgaze.
Related Issues (20)
- Improvements on skin detect HOT 3
- How could I load the head pose estimator pre-trained model by checkpoint? HOT 1
- cnn_head_pose estimation: module 'tensorflow' has no attribute 'placeholder' HOT 7
- cnn_head_pose_estimation problems HOT 1
- Can I achieve the 3D head translation vector HOT 1
- Face recognition
- What is the range of angles for the head pose estimation? HOT 3
- difficulties installing HOT 3
- Check for OpenCV 2, 3 and 4 HOT 1
- contours, hierarchy = cv2.findContours(mask, 1, 2) ValueError: too many values to unpack (expected 2) HOT 2
- import cv doesn't work in both version HOT 6
- Unsupported image type, must be 8bit gray or RGB image. HOT 2
- A bit issue that i fixed for you use in opencv v3 HOT 1
- NameError: name 'x_center' is not defined HOT 3
- Freezing and optimizing the model HOT 6
- Input format for the network HOT 4
- Accuracy of deepgaze HOT 8
- Problem with tensorflow version
- Different head pose angles HOT 2
- Notebooks HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from deepgaze.