Git Product home page Git Product logo

Comments (4)

vitoralbiero avatar vitoralbiero commented on May 25, 2024 2

Thanks @vujadeyoon

Yes, the pose_pred includes rotation vectors (left axis rotation, top axis rotation, front axis rotation) and translation coordinates.
If you want pitch, yaw and roll (in this order) on the same format as AFLW2000 dataset, you can use the conversion below:

def convert_to_aflw(rotvec, is_rotvec=True):
    if is_rotvec:
        rotvec = Rotation.from_rotvec(rotvec).as_matrix()
    rot_mat_2 = np.transpose(rotvec)
    angle = Rotation.from_matrix(rot_mat_2).as_euler('xyz', degrees=True)
    
    return np.array([angle[0], -angle[1], -angle[2]])

However, this format suffers from a problem where yaw is limited to (-90, 90) degrees, and if go beyond this point, pitch and roll are affected to compensate.

Otherwise, just used the first three values from the pose_pred which corresponds to the rotation vector.

Hope this helps.

from img2pose.

97jay avatar 97jay commented on May 25, 2024 1

Ok I got your point. Thank you for letting me know.

from img2pose.

vujadeyoon avatar vujadeyoon commented on May 25, 2024

Dear 976jay,

You can find code [1] that you want in the jupyter cell, Run on a folder or an image list.
I think the variable, pose_pred, includes information related to the yaw, pitch, and roll angles as well as 3D translation coordinate values (i.e. x, y, z)

Best,
vujadeyoon

[1] pose_pred = res["dofs"].cpu().numpy()[i].astype('float')

from img2pose.

97jay avatar 97jay commented on May 25, 2024

I will look into this. Thank you so much

from img2pose.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.