Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Face orientation #23

Open
yjhong89 opened this issue Sep 30, 2022 · 8 comments
Open

Face orientation #23

yjhong89 opened this issue Sep 30, 2022 · 8 comments

Comments

@yjhong89
Copy link

Hi, I am YJHong and thanks for sharing great work!

I checked code measuring landmark alignment (NME, benchmark_alfw2000.py) though, couldn't find any related code for measuring face orientation (pitch/yaw/roll).

Would you let me know how measure face orientation given 3d landmarks ? (or any related code / repo)

  • Have you used cv2.solvePnP function for estimating euler angle ?
@choyingw
Copy link
Owner

This line

def benchmark_FOE(params):

@choyingw
Copy link
Owner

choyingw commented Sep 30, 2022

3DMM builds posed meshes and 3D landmarks and face orientation are directly from meshes. There is no need to solve a PnP problem.

@yjhong89
Copy link
Author

@choyingw, thank you!

@yjhong89 yjhong89 reopened this Sep 30, 2022
@yjhong89
Copy link
Author

How did you make this files ?
I downloaded AFLW2000 from here and there is only mat file containing Pose param and pts3d.
Is Pose param containing yaw/pitch/roll ?

exclude_aflw2000 = './aflw2000_data/eval/ALFW2000-3D_pose_3ANG_excl.npy'

@choyingw
Copy link
Owner

They're processed by FSA's script https://github.com/shamangary/FSA-Net/blob/master/data/type1/TYY_create_db_type1.py

specifically,
pitch = pose_para[0] * 180 / np.pi
yaw = pose_para[1] * 180 / np.pi
roll = pose_para[2] * 180 / np.pi

@yjhong89
Copy link
Author

yjhong89 commented Oct 1, 2022

@choyingw
Thank you!

@yjhong89 yjhong89 closed this as completed Oct 4, 2022
@yjhong89
Copy link
Author

yjhong89 commented Oct 4, 2022

@choyingw
Sorry for bothering you agian.

As you mentioned and based on script, I followed this code (https://github.com/shamangary/FSA-Net/blob/master/data/type1/TYY_create_db_type1.py) and remove data which have yaw angles outside the range [-99, 99]
This is code snippet.

pose_para = mat_contents["Pose_Para"][0]
pitch = pose_para[0] * 180 / np.pi
yaw = pose_para[1] * 180 / np.pi
roll = pose_para[2] * 180 / np.pi

if np.abs(yaw) < 99:
    cont_labels = np.array([yaw, pitch, roll])
    out_poses.append(cont_labels)
...

But when I counted the number of data which have absolute yaw angle outside 99 degree, there are only 6 samples (in 2000) while 31 samples are noted in your paper (SynergyNet)
image

Would you let me know what should I do more for face orientation evaluation ?

  • BTW, do you know how GT pitch/yaw/roll degrees are derived ? (can we believe this is real true degree ?)

Thanks you again.

YJHong.

@yjhong89 yjhong89 reopened this Oct 4, 2022
@yjhong89
Copy link
Author

yjhong89 commented Oct 4, 2022

When I change the code as below, the number of filtered samples is exactly 31

pose_para = mat_contents["Pose_Para"][0]
pitch = pose_para[0] * 180 / np.pi
yaw = pose_para[1] * 180 / np.pi
roll = pose_para[2] * 180 / np.pi

if np.abs(yaw) > 99 or np.abs(pitch) > 99 or np.abs(roll) > 99 :
    pass
else:
    cont_labels = np.array([yaw, pitch, roll])
    out_poses.append(cont_labels)
...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants