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

What is the box_warp here means? #5

Open
bobfacer opened this issue Jun 21, 2023 · 0 comments
Open

What is the box_warp here means? #5

bobfacer opened this issue Jun 21, 2023 · 0 comments

Comments

@bobfacer
Copy link

Thanks for your great excellent work.I have a little question about this params in the code box_warp,It seems that you use this params to scale the coordinates,in your conf,you set this params to be 3,It is in the triplane_pet.py:

def sample_from_planes(plane_axes, plane_features, coordinates, mode='bilinear', padding_mode='zeros', box_warp=None):
    assert padding_mode == 'zeros'
    N, n_planes, C, H, W = plane_features.shape
    _, M, _ = coordinates.shape
    plane_features = plane_features.view(N*n_planes, C, H, W)

    coordinates = (2/box_warp) * coordinates #why?

    projected_coordinates = project_onto_planes(plane_axes, coordinates).unsqueeze(1)
    output_features = grid_sample.grid_sample_2d(plane_features, projected_coordinates.float()).permute(0, 3, 2, 1).reshape(N, n_planes, M, C) 

    return output_features #[1, 3, num_points, channels]

I want to know why have to do like that,thank you!

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

1 participant