LiuShuaiyr / UAVMOT

multi-object tracking meets moving UAV
36 stars 4 forks source link

ImportError: cannot import name 'correlation_cuda' #18

Closed zosel260 closed 1 year ago

zosel260 commented 1 year ago

Hello, Thank your for sharing your nice work.

I successfully built the 'correlation_package' follow the instructions of https://github.com/NVIDIA/flownet2-pytorch/blob/master/install.sh

$ cd ./networks/correlation_package $ rm -rf *_cuda.egg-info build dist pycache $ python3 setup.py install --user

However, when I run train.py, I got an error like this.

ImportError: cannot import name 'correlation_cuda' from lib.models.networks.correlation_package/correlation.py

Could you give me any advice?

zosel260 commented 1 year ago

I solved it by explicitly inserting the built object file (.so) path in the correlation.py

from ctypes import * correlation_cuda = cdll.LoadLibrary("...../correlation_package/buld/xxxx.so)