akanazawa / hmr

Project page for End-to-end Recovery of Human Shape and Pose
Other
1.54k stars 395 forks source link

Where are the betas? betas==theta[:,75:] ? #79

Closed jeffkim0 closed 5 years ago

jeffkim0 commented 5 years ago

Hi Ms. Kanazawa,

First just wanted to say this work is great. I think HMR is revolutionary: really ahead of it's time. I wanted to confirm that theta[:,75:] in your demo.py contains the shape parameters. I think I'm understanding your comments correctly but want to confirm

def main(img_path, json_path=None):
    sess = tf.Session()
    model = RunModel(config, sess=sess)

    input_img, proc_param, img = preprocess_image(img_path, json_path)
    # Add batch dimension: 1 x D x D x 3
    input_img = np.expand_dims(input_img, 0)

    # Theta is the 85D vector holding [camera, pose, shape]
    # where camera is 3D [s, tx, ty]
    # pose is 72D vector holding the rotation of 24 joints of SMPL in axis angle format
    # shape is 10D shape coefficients of SMPL
    joints, verts, cams, joints3d, theta = model.predict(
        input_img, get_theta=True)

    betas=theta[:,75:]  # <== my edit
    print(betas)        

    visualize(img, proc_param, joints[0], verts[0], cams[0])

Thanks! -Jeff

A7ocin commented 5 years ago

Hi, I think it is correct

akanazawa commented 5 years ago

Thank you Jeff, and yes you are correct!

Best,

Angjoo

hellozjj commented 4 years ago

Thank you Jeff, and yes you are correct!

Best,

Angjoo

I want to ask what joints3d means. Does it mean the joints' 3D world position?