anibali/dsntnn

3 dimension coordinate regression

Opened this issue · 1 comments

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

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.