MKnoche / warp3d_reposing

Reposing Humans by Warping 3D Features
27 stars 6 forks source link

3D Affine Parameters #3

Closed zhangyahu1 closed 1 year ago

zhangyahu1 commented 2 years ago

Thanks for sharing your nice work! I have a question about the scaling (affine_mul) operation of 3D affine parameters (transform_params) :

affine_mul = [[1, 1, 1 / z_scale, v_scale], [1, 1, 1 / z_scale, v_scale], [z_scale, z_scale, 1, v_scale z_scale], 1, 1, 1 / z_scale, 1]] affine_mul = np.array(affine_mul).reshape((1, 4, 4)) affine_transforms = transform_params affine_mul affine_transforms = affine_transforms.reshape((-1, 4, 4))

I tried to use pytorch to warp 3D features but the affine parameters in pytorch should be 3X4 instead of 4*4. 1) I wonder if transform_params is a 3X4 matrix, how do I modify the affine_mul? dirtectly delete the last row? 2) Why did you use multiply operation instead of dot product when scaling the 'transform_params '?

Thanks in advance! @MKnoche @isarandi

isarandi commented 1 year ago

Since we are performing affine transformations, the last row of the transformation matrix is anyway supposed to be [0,0,0,1] always, so I believe you can just cut that row off when passing the matrix to that PyTorch function.

zhangyahu1 commented 1 year ago

Thanks!