shape_templates
shape_templates copied to clipboard
Visualizing the keypoints
Hi,
I am using the pre-trained model and running inference on my own dataset.I wasnt able to find any code that would convert the returned heatmaps to keypoints. I want to visualize the models predictoins. Is there any function in the repository that I could use?
Thanks
Hi,
sorry for the late reply. The Predictor
class in pretrained_model.py
returns tensors containing the xy-coordinates for the anchorpoints of all transformed parts. There are duplicates in there because some are overlapping by design, so you would have to pick the ones you're interested in by indexing.
Thank you for your reply.
When I run inference, I get 3 sets of anchor points with shapes [1, 1, 3, 3, 1], [1, 5, 1, 3, 1], [1, 12, 2, 3, 1]. How should I intrepret these? I tried plotting them but my results are quiet different on the H36M dataset compared to the results on the project webpage.
For the transformer anchor points with shape [1, 1, 3, 3, 1], how would an xy pair be indexed?
You can interpret the dimensions like this: [batch, number_of_parts, anchor_number, xy(z), ()], where () are dimensions added for broadcasting matrix mutliplications. So the first tensor with shape [1,,1, 3, 3, 1] corresponds to the core, which consists of 3 anchors, where each one can be indexed via [0, 0, i, :2, 0]. I'm gonna add some code to make this more clear, it's quite confusing.
I tried running inference on some H36M frames with the indexing you provided but the results I am getting are still not really meaningfull. I guess I am missing some pre processing steps. It would be really helpfull if you could share a script for inference.
Thank you for your time.
Hi,
I will update the repo, just need a little more time.