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

3 dimension coordinate regression #20

Open
wangxin1999 opened this issue Nov 8, 2021 · 1 comment
Open

3 dimension coordinate regression #20

wangxin1999 opened this issue Nov 8, 2021 · 1 comment
Labels

Comments

@wangxin1999
Copy link

Use your model to predict 2 points which have x-y-z axis,what modify should i do?

@anibali
Copy link
Owner

anibali commented Nov 8, 2021

This should just work. Here's an example:

>>> unnormalized_heatmaps = torch.randn(1, 2, 7, 7, 7)
>>> heatmaps = dsntnn.flat_softmax(unnormalized_heatmaps)
>>> heatmaps[0, 0].sum()
tensor(1.)
>>> heatmaps[0, 1].sum()
tensor(1.0000)
>>> coords = dsntnn.dsnt(heatmaps)
>>> coords
tensor([[[-0.0227,  0.0297, -0.0091],
         [-0.0852, -0.0441, -0.0360]]])

The shape of unnormalized_heatmaps is [batch_size, num_points, depth, height, width], and coords contains values in x-y-z order.

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

No branches or pull requests

2 participants