Open elnazsn1988 opened 4 years ago
@elnazsn1988 Hello, friend. Have you solved this problem? I just get the same error. If you solved it, please tell me how to make it work, thanks so much!
okay,i got the same problem..
@elnazsn1988 Hello, friend. Have you solved this problem? I just get the same error. If you solved it, please tell me how to make it work, thanks so much!
okay,i got the same problem..
@zzw0225 @Zy1013921842 I posted what worked for me in one of the links:
" so what worked for me, was using the conansherry detectron2, doing the changes here to every possible version of the documents saved on my system: #237 (comment) , changing the ROI files (rotated and not cu) and not sure if this means anything, but also cloning in parallel in Conda. I wasnt able to actually get a complete run in Conda, but somehow now it "seems" to be working."
The changes made to files : several files must be changed by manually. file1: {your evn path}\Lib\site-packages\torch\include\torch\csrc\jit\argument_spec.h example: {C:\Miniconda3\envs\py36}\Lib\site-packages\torch\include\torch\csrc\jit\argument_spec.h(190) static constexpr size_t DEPTH_LIMIT = 128; change to --> static const size_t DEPTH_LIMIT = 128; file2: {your evn path}\Lib\site-packages\torch\include\pybind11\cast.h example: {C:\Miniconda3\envs\py36}\Lib\site-packages\torch\include\pybind11\cast.h(1449) explicit operator type&() { return *(this->value); } change to --> explicit operator type&() { return ((type)this->value); }
This has also been mentioned here : https://github.com/facebookresearch/detectron2/issues/9#issuecomment-549839014
I also changed two files in number 12 of https://github.com/facebookresearch/maskrcnn-benchmark/issues/1042 , namely the ROIAligned rotated cu file in sysWoW64. As Im not sure what I changed here, I will try and attach my SysWow64/detectron2/detectron2/layers/csrc folder bellow and you can compare to see if same as yours in ROIAligned.
I also conda installed as opposed to pip installed after doing all this and it worked. Which one worked, I did not figure out unfortunaley, as I did not try to reproduce. I did all this having uninstalled and reinstalling everything to ensure correct versions was being accessed.
I would suggest trying to implement changes mentioned step by step and seeing where it fixes issue, but make sure you have same windows, VS and cuda versions as the post.
@elnazsn1988 Is changing the cu files for ROIAligned and ROIAlignedRotated still required in the newer versions of pytorch?
Referencing https://github.com/facebookresearch/detectron2/issues/232 , I followed to https://github.com/facebookresearch/detectron2/issues/9 and found this solution. I cloned this version of detectron2 and implemented the ROI changes in pytorch, running the setup.py command in x64 Native Tools Command prompt for VS2019, with the cd set as the folder detectron2 has been cloned to.
I have hit error:
complete error log: