Comments (7)
Hello,
To get the yaw, pitch, and roll results of our method you can use our notebooks inside evaluation.
We updated the results, so they will differ from the current paper, but we will soon release a new version of it.
On the readme you can find out where to download the BIWI/AFLW2000-3D dataset for evaluation.
Hope this helps.
from img2pose.
I ll try it later, thanks!
from img2pose.
Hi, 3 more questions for your kind help!
- it seems that
pose_para
is the original label fromBIWI/AFLW2000-3D
's mat, but the code usespose_target
as final label for evaluation by applyingget_pose
function to calculate the relationship betweenthreed_points
(objectPoints in 3D object coordinate) and2d-target_points
(imagePoints in 2D image coordinate ), why not usepose_para
as the direct label, instead of theprocessed label
generated byget_pose
function? .T[:, :2]
seems to generate2d-target_points
from original3d-pt3d_68
, why is this reasonable, why could we treat 2 dimension of3d-pt3d_68
as2d-target_points
(imagePoints in 3D image coordinate )?- How to get the 6 Dof for
BIWI/AFLW2000-3D
evaluation, if firstly getting 5 landmarks by other face detection method?
(w, h) = ori_img.size
image_intrinsics = np.array([[w + h, 0, w // 2], [0, w + h, h // 2], [0, 0, 1]])
mat_contents = sio.loadmat(img_path[:-4] + ".mat")
target_points = np.asarray(mat_contents['pt3d_68']).T[:, :2]
_, pose_target = get_pose(threed_points, target_points, image_intrinsics)
target_bbox = expand_bbox_rectangle(w, h, 1.1, 1.1, target_points, roll=pose_target[2])
pose_para = np.asarray(mat_contents['Pose_Para'])[0][:3]
pose_para_degrees = pose_para[:3] * (180 / math.pi)
if np.any(np.abs(pose_para_degrees) > 99):
continue
from img2pose.
Hello,
-
I think you might have an older evaluation notebook, as we updated the AFLW2000-3D evaluation to use the
pose_para
as ground-truth. Now, we only useget_pose
to get the translation vector for comparison. For BIWI, we only have the rotation matrix, so we cannot get a translation vector ground truth for comparison. -
The
3d-pt3d_68
are landmarks in the image coordinates, with an additional z axis. By just removing the z axis, we get the accurate annotated 2D landmarks. They are not 3D points in an arbitrary 3D coordinates likethreed_points
are. -
To get the 6DoF for AFLW2000-3D you just use the
pose_target
that is output fromget_pose
, or convert the originalpose_para
to rotation vector and then combine it with the translation part of thepose_target
. For BIWI, as no landmarks are provided, you can't get ground-truth 6DoF.
Hope this helps.
from img2pose.
Hello,
- I think you might have an older evaluation notebook, as we updated the AFLW2000-3D evaluation to use the
pose_para
as ground-truth. Now, we only useget_pose
to get the translation vector for comparison. For BIWI, we only have the rotation matrix, so we cannot get a translation vector ground truth for comparison.- The
3d-pt3d_68
are landmarks in the image coordinates, with an additional z axis. By just removing the z axis, we get the accurate annotated 2D landmarks. They are not 3D points in an arbitrary 3D coordinates likethreed_points
are.- To get the 6DoF for AFLW2000-3D you just use the
pose_target
that is output fromget_pose
, or convert the originalpose_para
to rotation vector and then combine it with the translation part of thepose_target
. For BIWI, as no landmarks are provided, you can't get ground-truth 6DoF.Hope this helps.
For the Q-1, yes๏ผI update to the newest version just now, and found the following changes:
pose_para = np.asarray(mat_contents["Pose_Para"])[0][:3]
pose_target_degrees = pose_para[:3] * (180 / math.pi)
### Before
pose_target[:3] = Rotation.from_rotvec(pose_target[:3]).as_euler(seq, degrees=True) pose_pred[:3] = Rotation.from_rotvec(pose_pred[:3]).as_euler(seq, degrees=True)
### After
pose_target[:3] = pose_para_degrees
pose_pred[:3] = convert_to_aflw(pose_pred[:3])
The newest version actually use pose_para
as the direct label for the rotation vector, but why should the translation vector still be got by get_pose
, instead of using pose_para
as that of the rotation vector?
from img2pose.
@vitoralbiero
Hello, It seems that the sequence of yaw, pitch and roll is not right.
In the newest version, rot_mat_2 = np.transpose(rotvec)
is used in convert_to_aflw
function, so the sequence shoudle be
Yaw: {threed_pose[0]:.3f} Pitch: {threed_pose[1]:.3f} Roll: {threed_pose[2]:.3f}
, instead of "yaw: 1, pitch 0, roll 2".
What do you think about that?
### Before
Yaw: {threed_pose[2]:.3f} Pitch: {threed_pose[1]:.3f} Roll: {threed_pose[0]:.3f}
### After
Yaw: {threed_pose[1]:.3f} Pitch: {threed_pose[0]:.3f} Roll: {threed_pose[2]:.3f}
from img2pose.
The newest version actually use pose_para as the direct label for the rotation vector, but why should the translation vector still be got by get_pose, instead of using pose_para as that of the rotation vector?
We cannot use the original translation vector because it was computed using a 3D model that we do not have access to, so the units will be different.
Hello, It seems that the sequence of yaw, pitch and roll is not right.
In the newest version, rot_mat_2 = np.transpose(rotvec) is used in convert_to_aflw function, so the sequence shoudle be
Yaw: {threed_pose[0]:.3f} Pitch: {threed_pose[1]:.3f} Roll: {threed_pose[2]:.3f}, instead of "yaw: 1, pitch 0, roll 2".
What do you think about that?
The AFLW2000-3D format is pitch, yaw, roll
, so the function convert_to_aflw
returns the Euler angles in this same sequence.
angle = Rotation.from_matrix(rot_mat_2).as_euler('xyz', degrees=True)
return np.array([angle[0], -angle[1], -angle[2]])
So, the evaluation is correct with yaw: 1, pitch: 0, roll: 2
.
from img2pose.
Related Issues (20)
- Question about 300W-LP labels acquirements HOT 6
- Pose to angle HOT 1
- jaw data HOT 1
- Hi, I'm confused about the definition of the output pose HOT 1
- Slow inference HOT 2
- Question about Visualizing the Activation Map on each layer of the model HOT 1
- Question on fine-tuning HOT 1
- Question about Fine tuning Model with 300W-LP HOT 1
- Bug in readme file HOT 1
- img2pose_v1.pth convert onnx? HOT 1
- A Question about the conversion of t .
- A question about K_box and K_img. HOT 1
- A Question about fine-tuning HOT 2
- TypeError: a bytes-like object is required, not 'NoneType' HOT 4
- A Question about the 6DoF HOT 1
- A Question about the convert_to_aflw
- ONNX output is giving incorrect DOF values HOT 1
- How to get the tvec=[tx,ty,tz]?
- Utilizing GT intrinsics
- AFLW2000-3D translation
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 img2pose.