naver / multi-hmr

Pytorch demo code and models for Multi-HMR
Other
183 stars 18 forks source link

How to change the camera_parameters? #28

Closed IceFtv closed 1 week ago

IceFtv commented 1 month ago

Very great work! But when I want to change the setting in get_camera_parameters, I found some problems. I have defined a new function to obtain K basic on focal to replace get_camera_focal_parameters( ) : ` def get_camera_focal_parameters(img_size, focal, p_x=None, p_y=None, device=torch.device('cuda')): K = torch.eye(3)

Get focal length.

K[0,0], K[1,1] = focal, focal

# Set principal point
if p_x is not None and p_y is not None:
        K[0,-1], K[1,-1] = p_x * img_size, p_y * img_size
else:
        K[0,-1], K[1,-1] = img_size//2, img_size//2

# Add batch dimension
K = K.unsqueeze(0).to(device)
return K

` I use focal = 5000. But I got a small body result like this: image Could you tell me how to solve it? Maybe elsewhere needs to be modified?

fabienbaradel commented 1 month ago

Hi, thanks your interest in our work. Do you know what is the field-of-view that you are using here for example? We trained our model with field-of-view in the range 50:70 degrees so if you give higher of smaller field-of-view the reconstruction will need improvement. I recommend to use a field of view close to 60 degree for good reconstruction.

fabienbaradel commented 1 week ago

Closing this issue due to inactivity.