scores, indices = torch.sort(scores_final[:, 0], descending=True)
keypoints_scores=scores[:self.num_keypoints].unsqueeze(1)
# post processing
object_points=object_points.permute(0,2,1).squeeze(0)
sorted_points = object_points[indices]
keypoints= sorted_points[:self.num_keypoints, :3]
Some messages about the codes above:
varibales:
scores_final: an output of a neural network, has gradients.
object_points: data from point cloud, has no gradinets.
I want to make the codes differentiable. Thanks a lot.