jdonnelly36 / Deformable-ProtoPNet

The official repository for Deformable ProtoPNet, as described in "Deformable ProtoPNet: An Interpretable Image Classifier Using Deformable Prototypes".
MIT License
37 stars 11 forks source link

make.sh file #5

Closed JuChanSeo closed 2 years ago

JuChanSeo commented 2 years ago

Hi, Thanks for your fabulous work.

I have a question Readme.md. Following your instruction, I tried to build DCN in my conda env

In make.sh which is located in subdirectory of "Deformable-Convolution-V2-Pytorch", make.sh file is implemented as below. source /home/jdonnelly/protoPNet/bin/activate srun python setup.py build install

Q1. Is it working on Windows? I just executed directly "python setup.py build install" in the subdirectory of "Deformable-Convolution-V2-Pytorch" but it gives me an error

File "C:\Users\prais\anaconda3\envs\gpu_test\lib\distutils\util.py", line 125, in convert_path raise ValueError("path '%s' cannot be absolute" % pathname) ValueError: path '/home/jdonnelly/code/Deformable-Convolution-V2-PyTorch/Deformable-Convolution-V2-PyTorch/src/vision.cpp' cannot be absolute

And it looks like your path information is remaining somewhere in your code(but i have no idea where...) And it seems like launching setup.py is essential for importing "DCN" packages. So I think I should build that cpps to launch main.py

Q2. It seems like your working OS is ubuntu. So I just wonder if I change the working OS, this issue will be solved

캡처 .

Attached picture is screen capture of err message when I run the setup.py under subdirectory of "...\Deformable-ProtoPNet-main\Deformable-convolution-VS-PyTorch\"

jdonnelly36 commented 2 years ago

Hello! Thank you for your interest.

We haven't tested the codebase on Windows, so I cannot guarantee what steps will be necessary to make it work. However, the following troubleshooting steps may be helpful:

  1. Delete the directory "DCN.egg-info" and the directory "dist"
  2. Run "python setup.py build install" once again

Let me know what output you get after trying this.

Best! Jon

TeodorChiaburu commented 2 years ago

Hello!

I had a similar problem. I would get error: namespace "std" has no member "cout" in the deform_conv_cuda.cu file. After adding #include <iostream> in that file, I could successfully build DCN. Hope this helps.

PS: Jon, greetings from Berlin ^^ We met at the CVPR. Hope you're doing well and thanks again for the great contribution! I'm using it right now for my work.

jdonnelly36 commented 2 years ago

Thanks Teodor! It's good to hear from you. I'm really happy to hear you're using this model, and do let me know if you run into any problems. I look forward to seeing your next paper, and hopefully we'll see each other at the next conference :)

@JuChanSeo, please let me know if either of these solutions work for you.

JuChanSeo commented 2 years ago

Thanks Teodor! It's good to hear from you. I'm really happy to hear you're using this model, and do let me know if you run into any problems. I look forward to seeing your next paper, and hopefully we'll see each other at the next conference :)

@JuChanSeo, please let me know if either of these solutions work for you.

In my case, Removing DCN.egg info file and then running "python setup.py build install" solved my problem.

Sorry for late reply.

Thanks a lot!

jdonnelly36 commented 2 years ago

No problem! Glad it worked. Marking this as resolved.