Image Dataset for Face Direction - image-processing

I am trying to create a face direction detection based on yolov5, is there any existing or does anyone know any image datasets available for face direction like left, right, front and back of the head. any help will be appreciated.
Thanks

You can try using datasets for head pose estimation:
https://paperswithcode.com/task/head-pose-estimation#datasets
Some examples: AFLW, AFLW2000-3D, BIWI
They contain images of faces labeled with 3 angles: yaw, pitch, roll.

Related

Detect nose coordinates on a face profil view

In such tasks, I tend to you Mediapipe or Dlib to detect the landmarks of the face and get the specific coordinates I'm interested to work with.
But in the case of the human face taken from a Profil view, Dlib can't detect anything and Mediapipe shows me a standard 3D face-mesh superimposed on top of the 2D image which provides false coordinates.
I was wondering if anyone with Computer Vision (Image Processing) knowledge can guide me on how to detect the A & B points coordinates from this image
PS: The color of the background changes & also the face location is not standard.
Thanks in advance strong text
Your question seems a little unclear. If you just want (x,y) screen coordinates you can use this answer to convert the (x,y,z) that mediapipe gives you to just (x,y). If this doesn't
doesnt work for you I would recommend this repo or this one which both only work with 68 facial landmarks, but this should be sufficient for your use case.
If all of this fails I would recommend retraining hrnet on a dataset with profile views. I believe either 300-W dataset or the 300-VW dataset provides some data with heads at extreme angles.
If you wish to get the 3D coordinates in camera coordinates (X,Y,Z) you're going to have to use solvePNP. This will require getting calibration info and model mesh points for whatever facial landmark detector you use. You can find a some examples for some of this here

How can i improve stereo calibration accuracy?

I want to calibrate stereo camera in c#(in Emgu library). but the calibration accuracy is very badthis is an example of disparity map!Please help me.
Thank you
As you can see in the picture, the two corner positions are not aligned vertically in the right and left images (red lines). Thus the stereo matching would fail. (Your disparity image is not noisy - it is just invalid.)
I think there is a problem producing the rectified images but I have no clue unless you provide more information on how you made the images.
Normally, the stereo vision algorithm must be able to delete this misalignment. In the attached file 1, rectification images are shown. It seems the rectified images are good, but disparity map is very bad. What is your idea?
Thank you

How to create 3D perspective views of an image using OpenCV?

I have an image on the wall. I'd like to create its 3D perspective views by myself. Suppose the points on the images, camera location, orientation of the camera are given, how can I do to obtain the 3d perspective matrix to play with the original image?
I understand I can use the orientation of the camera to calculate the 3d rotation matrix, but I've no idea how to calculate the subsequent projection matrix...
I've come across this link (see Section Perspective Projection), but I don't understand what's going on after projection.. And what is the difference between the camera position and the viewer's position?
Thanks a lot.
use openGl and its open example to solve your problem.
in bellow link there are good samples to undestand 3d reconstruction:
http://www.songho.ca/opengl/gl_transform.html
wish helpful

two images with camera position and angle to 3d data?

Suppose I've got two images taken by the same camera. I know the 3d position of the camera and the 3d angle of the camera when each picture was taken. I want to extract some 3d data from the images on the portion of them that overlaps. It seems that OpenCV could help me solve this problem, but I can't seem to find where my camera position and angle would be used in their method stack. Help? Is there some other C library that would be more helpful? I don't even know what keywords to search for on the web. What's the technical term for overlapping image content?
You need to learn a little more about camera geometry, and stereo rig geometry. Unless your camera was mounted on a special rig, it's rather doubtful that its pose at each image can be specified with just an angle and a point. Rather, you'd need three angles (e.g. roll, pitch, yaw). Plus, if you want your reconstruction to be metrical accurate, you need to calibrate accurately the focal length of the camera (at a minimum).

Head pose estimation with Opencv

I am using OpenCV Haar Algorithm to track the Head and overlay an image over the Head.
What I am doing is saving frames generated by camera and overlaying image over each frames.
And time is not a constraint as I am not doing it Real-Time.
My code is working fine for say 45 degree of left and right rotation of Head.
But I need something which will track up to 90 degree of rotation.
Even I got many reference of OpenCV functions and link to estimate Head Pose
Please provide me some reference. Code Examples will be cool.
Thanks in advance
You can use an algorithm like SURF (you have samples in OpenCV package) and use it over a picture of the face, the over the image, and then use SURF descriptors to match the points and estimate the 3d position of the face in the image.
You can use the same code on the sample "find_obj" but replace the image by the face picture you want to track.
Hope this helps.
There is a functionc in openCV called POSIT that permit to estimate the pose of 3d object in a single image. It implements POSIT algorithm. Try to have a look there.
You could check the EHCI project at http://code.google.com/p/ehci/ as it gives a nice overview about POSIT and Lukas Kanade.

Resources