Megvii-BaseDetection / cvpods

All-in-one Toolbox for Computer Vision Research.

Home Page:https://cvpods.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

window10 support

eduo97 opened this issue · comments

Hello! When I compiled the project in Windows 10 environment, there was such a problem:
link: fatal error lnk1181: I couldn't open the input file "E: / / GitHub / cvpods master / cvpods master / build"\ temp.win -amd64-3.8\Release\github\cvpods-master\cvpods-master\cvpods\layers\csrc\ vision.obj ”
error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\bin\HostX86\x64\ link.exe ' failed with exit status 1181。

Is there any solution?

commented

we'll check this very soon.

how can i install cvpods on windows10 environment.

I also want to how can I install cvpods on windows10 environment.

how can i install cvpods on windows10 environment.

折腾了快一天,终于解决了这个问题,见图
image

总结一下给在windows上装cvpods的后来人,安装命令很简单就只有一行:pip install -e . --user
但是错误很多,需要逐个排查,没有点c++基础的人建议谨慎死磕。我碰到的问题罗列如下:
1、一开始nvcc获取不到版本,算了,在setup.py中把cuda_version 直接写死
2、uint报错的文件,开始#include<wtypes.h>好像没啥用,后来直接加上typedef unsigned int uint;
3、很多个文件都报min和max的错误,百度后得知
maximum = (std::numeric_limits::max)(); //把max用括号括起来避免和windows定义的宏混淆
4、coco相关的一个文件里面关于time的报错,要#include <time.h> 并修改为localtime_s(&local_time,&rawtime);
5、下面开始解决nvcc时候cu文件的报错。ATenCeilDiv函数报参数类型不匹配,google得知要强制类型转换at::cuda::ATenCeilDiv(static_cast<int64_t>(output_size), static_cast<int64_t>(512)),
6、std::thread pids[batch_size]; 要修改为new 指针,很低级的错误啊,不知道是谁写的,常数值才能初始化定义数组啊

补充下我的环境,vs2019 + torch1.8.1 + python3.6 + windows10
总之你要相信,如果只是编译问题,大不了改源码,死磕的话你总能赢的-_-||
接下来可以在windows上愉快的玩耍cvpods了

总结一下给在windows上装cvpods的后来人,安装命令很简单就只有一行:pip install -e . --user 但是错误很多,需要逐个排查,没有点c++基础的人建议谨慎死磕。我碰到的问题罗列如下: 1、一开始nvcc获取不到版本,算了,在setup.py中把cuda_version 直接写死 2、uint报错的文件,开始#include<wtypes.h>好像没啥用,后来直接加上typedef unsigned int uint; 3、很多个文件都报min和max的错误,百度后得知 maximum = (std::numeric_limits::max)(); //把max用括号括起来避免和windows定义的宏混淆 4、coco相关的一个文件里面关于time的报错,要#include <time.h> 并修改为localtime_s(&local_time,&rawtime); 5、下面开始解决nvcc时候cu文件的报错。ATenCeilDiv函数报参数类型不匹配,google得知要强制类型转换at::cuda::ATenCeilDiv(static_cast<int64_t>(output_size), static_cast<int64_t>(512)), 6、std::thread pids[batch_size]; 要修改为new 指针,很低级的错误啊,不知道是谁写的,常数值才能初始化定义数组啊

补充下我的环境,vs2019 + torch1.8.1 + python3.6 + windows10 总之你要相信,如果只是编译问题,大不了改源码,死磕的话你总能赢的-_-|| 接下来可以在windows上愉快的玩耍cvpods了

这些能解决楼主的问题吗