Closed bucktoothsir closed 5 years ago
@bucktoothsir Could you be more specific?
@lck1201 check my updates
Yes, you are correct. We will fix the problem in the future. However, currently we generate ground truth heatmap in consistent way, see function https://github.com/JimmySuen/integral-human-pose/blob/536a7b33cb87c15e1c9a3411a8cc0df87c4f9510/pytorch_projects/common_pytorch/loss/integral.py#L86 So there would not be big problems.
@lck1201 Hi~ . Whether it may be better to modify these three lines of code as shown below?
accu_x = accu_x * torch.cuda.comm.broadcast(torch.arange(1, x_dim+1).type(torch.cuda.FloatTensor), devices=[accu_x.device.index])[0]
accu_y = accu_y * torch.cuda.comm.broadcast(torch.arange(1, y_dim+1).type(torch.cuda.FloatTensor), devices=[accu_y.device.index])[0]
accu_z = accu_z * torch.cuda.comm.broadcast(torch.arange(1, z_dim+1).type(torch.cuda.FloatTensor), devices=[accu_z.device.index])[0]
@fabro66 Hi, in essence, range shoule be [0, dim]
. But I don't know whether performance will differ if changed to torch.arange(1, x_dim+1)
or x = x / float(hm_width-1) - 0.5
. Maybe you can give a try.
as your code showed above, the
torch.arange(x_dim)
results in[0, 1, 2, 3, ..., x_xim-1]
. The max num of sum of accu_x isx_dim-1
as well as accu_y and accu_z. so I think it is invalid to dox / float(hm_width) - 0.5
, you should changex = x / float(hm_width) - 0.5
tox = x / float(hm_width-1) - 0.5