timmeinhardt / trackformer

Implementation of "TrackFormer: Multi-Object Tracking with Transformers”. [Conference on Computer Vision and Pattern Recognition (CVPR), 2022]
https://arxiv.org/abs/2101.02702
Apache License 2.0
509 stars 115 forks source link

TypeError: ms_deform_attn_forward(): incompatible function arguments. #59

Closed harkiratbehl closed 2 years ago

harkiratbehl commented 2 years ago

Hi,

Cheers on the wonderful work. I am trying to run just the evaluation with 'python3 src/track.py with reid'.

I am getting the following error:

TypeError: ms_deform_attn_forward(): incompatible function arguments. The following argument types are supported:

  1. (arg0: at::Tensor, arg1: at::Tensor, arg2: at::Tensor, arg3: at::Tensor, arg4: at::Tensor, arg5: int) -> at::Tensor Invoked with: tensor([[[[-9.0617e+00, 2.9002e+00, -5.3017e+00, ..., -1.4381e+00, 3.8348e+00, 2.1320e-01], [ 1.0434e+00, -3.8773e-01, -3.6883e+00, ..., -2.8583e+00, -5.9393e-01, 6.8181e-01], [ 1.6065e+00, 7.8195e-01, -2.3155e+00, ..., -2.0958e+00, -1.9994e-01, -1.6163e+00], ..., [-2.0559e+00, 6.3167e-02, 4.4025e+00, ..., 1.9450e+00, -8.6947e-01, 1.3416e+00], [ 2.9230e+00, 1.6198e+00, 3.9162e+00, ..., -1.7625e+00, -6.7662e-01, -2.4316e+00], [-2.7931e+00, -1.3822e-01, -1.1136e+00, ..., 1.2329e-01, 3.1032e+00, -1.0232e+00]],

..... device='cuda:0'), 64

timmeinhardt commented 2 years ago

I just tested the current master branch and it works on my side. Please post the entire error output and was the compilation of the deformalbe attention modules successful?

harkiratbehl commented 2 years ago

I was able to resolve this and make code work for recent Pytorch and Python versions too. I have opened a pull request. You can check and see if it will be helpful.

Thanks for the great work and timely response

Soulmate7 commented 1 year ago

I am also getting this error now, which is strange that I worked train and track two week ago successifully, but now it failed. So could you tell me how to fix it?

Thanks.

timmeinhardt commented 1 year ago

If it worked before something must have changed on your side. Double check python environments, CUDA versions, GPU types etc. etc.

Soulmate7 commented 1 year ago

I guess there is something wrong with my MultiScaleDeformableAttention package, so I rerun the following command: python src/trackformer/models/ops/setup.py build --build-base=src/trackformer/models/ops/ install Now it works again!

Thanks for your response.

timmeinhardt commented 1 year ago

The packages you compile manually usually only work for the specific configuration you compiled them in. If sth changed you need to recompile. Glad it works now!