Mathux / TMR

Official PyTorch implementation of the paper "TMR: Text-to-Motion Retrieval Using Contrastive 3D Human Motion Synthesis" ICCV 2023
https://mathis.petrovich.fr/tmr
MIT License
196 stars 17 forks source link

eval with threshold #7

Closed yinkangning0124 closed 11 months ago

yinkangning0124 commented 11 months ago

Hi @Mathux : when running the evaluation with threshold of my own model, I faced the problems below and I wonder how to fix this issue? In my setting, the shape of sims and text_selfsim is all (512, 512), and I set the threhold to 0.8. Thanks a lot ! image

Mathux commented 11 months ago

Hello @yinkangning0124,

Thanks for your interest with TMR.

Do you have the same issue when evaluating with the provided pre-trained model? If you don't get the issue, can you check if the shape of the tensors are similar between the two models? (dists, idx , partition)

For debugging, you can try to split the line into two lines:

dd = dists[tuple(idx.T)]
gt_dists = np.minimum.reduceat(dd, partition)
yinkangning0124 commented 11 months ago

Yeah, I solved the issue, the type of text_selfsim should be nparray instead of tensor. Thanks again for your great work !