vacancy / PreciseRoIPooling

Precise RoI Pooling with coordinate gradient support, proposed in the paper "Acquisition of Localization Confidence for Accurate Object Detection" (https://arxiv.org/abs/1807.11590).
MIT License
772 stars 152 forks source link

compile failed using windows #30

Open taochen526 opened 5 years ago

taochen526 commented 5 years ago

I tried to use this library in windows, and I came across the question "error LNK2019:......__declspec(dllimport)". Does anyone know how to solve this problem in windows 10?

taochen526 commented 5 years ago

I have solved the issue by compiling the whole program using visual studio

alanlukezic commented 5 years ago

Hi @taochen526 , can you give a bit more information about how did you compile (VS version, commands used to compile, etc.) Thanks!

taochen526 commented 5 years ago

Hi @taochen526 , can you give a bit more information about how did you compile (VS version, commands used to compile, etc.) Thanks!

I use the visual studio 2015 to compile the C++/CUDA program all over again to *.pyd format in win 10. It's easy to do using the pybind11. And the compiled pyd file can work well. However, the torch library keeps crashing down and the CUBLAS runtime error keeps happening, I was told that some library was not initialized. So I don't completely solve the issue, and I hope someone can tell me the reason. But you can try my method on your computer, maybe it's just some version problem and I hope I can help you a little bit.

alanlukezic commented 5 years ago

Thanks a lot @taochen526 I will let you know if I manage to compile and run the code on win10.

taochen526 commented 5 years ago

Thanks a lot @taochen526 I will let you know if I manage to compile and run the code on win10.

Did you successfully solve the issue?

alanlukezic commented 5 years ago

I was away for a few days so I have not work on this. I am not familiar with pybind11...did you use cmake for compiling? If yes, did you make a cmake script by your own?

taochen526 commented 5 years ago

I was away for a few days so I have not work on this. I am not familiar with pybind11...did you use cmake for compiling? If yes, did you make a cmake script by your own?

I did not use cmake, cause I use vs more in windows, I've updated all the libraries & dependencies these days, and I'll try again this weekend. I hope it'll work this time.

flowgrow commented 5 years ago

any update on this?

taochen526 commented 5 years ago

any update on this?

After I updated all the dependet libraries, I finally succesfully recompiled the C/CUDA source code to *.pyd file and it works well now. My working env is win10+vs 2015+pybind11,it's easy to recompile the source code using vs 2015 on win 10, youcan try.