-
Notifications
You must be signed in to change notification settings - Fork 7.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can I install detectron2 on Win10? #9
Comments
We do not officially support windows, but given that maskrcnn-benchmark can run on win10, it probably won't take a lot of changes to run detectron2 on win10. You can refer to facebookresearch/maskrcnn-benchmark#741 or facebookresearch/maskrcnn-benchmark#1042 to see what basic setups are needed, and welcome to share more if you have any luck with it. |
thank you very much! |
@jinyuan30 hello, have you installed detectron2 on win10 successfully? |
I turn to Ubuntu, and didn't try on Win10 cause I think maybe there are some unkonwn bug. |
If it's of any use, attempting to compile without any changes to the code gives the following error: pytorch/extension-cpp#37 references this problem, but using the patch suggested there raises 4 other issues all within the |
I tried similar path.
to
looks like it worked. |
@akinari1223 can you make a patch of your changes? Greatly appreciated. EDIT: I see now it is mainly an issue in pytorch, never mind. |
yes you can. I have done for it. |
@ppwwyyxx we can do little change to support windows build. but it refer to pytorch files changed. detectron2 change: conansherry/detectron2@4d57e12 pytorch change:
|
@conansherry I tried your git of detectron2, having deleted both decetron2 and detectron2 repos from the pytoch folder. Reference to #232 , I am facing a similar set of issues building Detectron2 on Windows10 with CUDA 10.1 and VS 2019 @akinari1223 the changes on ROI cu files were implemented. Im trying to build detectron2 via setup_py, and recieve the initial error mentioned:
When opennig the tmp file referenced I see: _
_ Prior to recieving mentioned errors, I encounter a ton of warnings in Log :
_
|
@elnazsn1988
|
@conansherry done, changed both argument_spec.h and cast.h , git cloned your detectron2, recieved following error :
|
@elnazsn1988
the problem is your nvcc.exe and cl.exe is executable. please check your PATH environment. find your vcvars64.bat and run it in the console. |
@conansherry checked and ran vcvars64.bat in the Administrator x64 Native Tolls Command Prompt for VS 2019:
I had tried this before I cloned detectron2, I then clone your detectron2 into pytorch having moved the directory to it. Should I be cloning somewhere else, or is there anything else I can check for my enviroment variables? |
@elnazsn1988 you can use nvcc.exe to compile a simplest file to check if your environment is correct |
@conansherry also, I have two argument_spec.h files, one sits in : C:\projects\pytorch\pytorch\torch\include\torch\csrc\jit , I change both to your specs, is this an issue? |
the issue is nvcc.exe dosen't work correctly, Not related to pytorch. |
@conansherry checked enviroment variables and did extended google search, / and %path% existed around tmp folder and Temp folder in enviroment variables, now removed - I get a different error #232 which was my original one before using your version of detectron2 :
|
@elnazsn1988
do: if your env is correct, you will get a executable file named "hello.exe". |
response to above is an "hello.exe" executable file in the path specified where I saved the hello.cu text document:
|
The problem may occur when using python to call nvcc to compile. Sorry, I have not encountered a similar problem.
you can search in google with key word "nvcc fatal : Could not set up the environment for Microsoft Visual Studio". There are many similar problems. |
@conansherry could you possibly give a step by step commands list of how you built caffe2 on pytorch before all this, maybe I should wipe everything clean and start there and this is baffling. The file in the Temp folder its trying to access is the same one throwing up the error as pytorch/extension-cpp#37 (comment) , though in their case they get an explicit depth limit error. |
@conansherry also do you also use Pytorch 1.3? as the normal detectron clone from the facebookresearch folder needed it I upgraded from 1.2 to 1.3 despite it being experimental |
I use pytorch1.3. and use "conda install pytorch torchvision cudatoolkit=10.1 -c pytorch" to install pytorch. |
@akkiss You need VS2017 or later |
rtx3060 File "D:\Desktop\detectron2_solov2_six\AdelaiDet-master\detectron2\data_init_.py", line 4, in |
@ppwwyyxx One question I have is that if one gets detectron2 running in Windows on a multi-gpu machine, could that setup work for DDP training? It looks like DDP was added to Windows on PyTorch release 1.7: https://pytorch.org/blog/pytorch-1.7-released/ One question is would anything have to be changed to get train_net.py working? Would you have to force a gloo backend? |
@xiezhiyu275 I encountered same DLL loading error as you, and have just managed to resolve it. To build Detectron2 on Windows, you'll need to:
It is important to run Can refer to this repo: https://github.com/conansherry/detectron2 for more info. |
Hello Cheers |
This worked like a charm for my system which has an RTX 3070. |
In Windows 10 What I have done:
I also executed inference code of videopose3d successfully. no error. I hope anybody who want to install this on windows got help. |
Also had problems building detectron2 on windows, bottom line is it builds with ninja but does not build without it (see details in #2770). |
Summary: (#9) Pull Request resolved: fairinternal/detectron2#83 Reviewed By: wanyenlo Differential Revision: D13779774 Pulled By: ppwwyyxx fbshipit-source-id: 0d55acb44d65ce6936bba16c16a1fbbfd52435df
Here's my
When I run
|
This comment was marked as spam.
This comment was marked as spam.
I've tried a bunch of different instructions, but still can't get past this Any help is appreciated! |
conda create -n detectron_env python=3.8 ======Work on my WindowsOS with "cpu" , run underneath code... from detectron2.engine import DefaultPredictor import cv2 Load an imageres = requests.get("https://live.staticflickr.com/700/33224654191_fdaee2e3f1_c_d.jpg") config_file = 'COCO-Detection/faster_rcnn_R_101_FPN_3x.yaml' Create predictorpredictor = DefaultPredictor(cfg) Make predictionoutput = predictor(image) |
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
* add DAB-DETR R101 training configs * refine cfg Co-authored-by: ntianhe ren <[email protected]>
* add dn detr projects * test * Align DAB-DETR-R101 training configs (facebookresearch#9) * add DAB-DETR R101 training configs * refine cfg Co-authored-by: ntianhe ren <[email protected]> * Clean utils and add dist function (facebookresearch#13) * clean utils code * refine format Co-authored-by: ntianhe ren <[email protected]> * delete meta_arch (facebookresearch#14) Co-authored-by: ntianhe ren <[email protected]> * add dn-detr r50 training config Co-authored-by: feng li <lifeng@mgmt04-eno1> Co-authored-by: Ren Tianhe <[email protected]> Co-authored-by: ntianhe ren <[email protected]>
Try this one, it works on Windows 10 and 11 for me.
|
这是来自AAAAAAAAAAAAAA
|
Is there a way you can do a step by step to try this? Does it works with gpu? |
这是来自AAAAAAAAAAAAAA
|
Hello @MatiasGil88 , I was able to install detectron2 some time ago using this explanation from stackexchage https://stackoverflow.com/questions/60631933/install-detectron2-on-windows-10/72784255#72784255 |
Where you able to use gpu? |
Can I install detectron2 on Win10?
The text was updated successfully, but these errors were encountered: