Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to change the camera_parameters? #28

Closed
IceFtv opened this issue Jul 22, 2024 · 2 comments
Closed

How to change the camera_parameters? #28

IceFtv opened this issue Jul 22, 2024 · 2 comments

Comments

@IceFtv
Copy link

IceFtv commented Jul 22, 2024

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
Copy link
Contributor

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
Copy link
Contributor

Closing this issue due to inactivity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants