Open ghost opened 2 years ago
You can extract activation from heatmaps
at the position of coord_out
in the line of here
Thanks for your reply. I think Coord_out means the position of x y and z. If I want to get each probability of key points I need to calculate from heatmaps not coord_out?
x = coord_out[:,:,0] / cfg.output_shape[1] 2 - 1 y = coord_out[:,:,1] / cfg.output_shape[0] 2 - 1 z = coord_out[:,:,2] / cfg.depth_dim * 2 - 1 xyz = torch.stack((x,y,z),2) prob = [] for j in range(xyz.shape[1]): tab prob_j = F.grid_sample(heatmaps[:,j,None,:,:,:], xyz[:,j,None,None,None,:])[:,:,0,0,0] # N, 1 tab prob.append(prob_j) prob = torch.cat(prob,1) # N, J
might work
How can I get the probability of pose_3d? I find vis_kps[2,:] that always equals one in the demo.py.