我试着安装Facebook的Detectron2和这个官方回购。在此基础上,detectron2只能在linux上安装。但是,我正在Windows操作符上运行一个服务器。有人知道如何在Windows上安装吗?
发布于 2021-10-28 07:33:35
通过这个问题找到的答案:https://github.com/facebookresearch/detectron2/issues/9
这些步骤在我的RTX 3070上对我有效。
environment.yml文件。name: detectron2
channels:
- pytorch
- conda-forge
- anaconda
- defaults
dependencies:
- python=3.8
- numpy
- pywin32
- cudatoolkit=11.0
- pytorch==1.7.1
- torchvision
- git
- pip
- pip:
- git+https://github.com/facebookresearch/detectron2.git@v0.3yml文件并运行conda env create -f environment.ymlconda activate detectron2你可以走了。
编辑:如果您在anaconda终端中运行您的脚本,这是没有问题的,但是在从VS代码运行脚本时,我也有这个问题ImportError: DLL load failed: The specified module could not be found.,所以如果您碰巧有这个问题,我通过从anaconda终端卸载和重新安装问题模块来修复它。
pip uninstall numpy
pip install numpy发布于 2021-12-27 16:39:58
在Windows中安装detectron2有点棘手。我挣扎了整整一周才让它运转起来。为此,我创建了一个新的anaconda环境(以配合detectron2对py手电筒和torchvision的版本要求),并从在该环境中安装cudatoolkit和cudnn开始。这可能是最好的方式,以避免混乱现有的水蟒环境。
下面是一步一步的过程(用我的笔记本电脑与Windows 10和RTX2070 GPU进行验证):
你应该得到“真”。但是,如果您发现GPU没有为py手电筒启用,请转到步骤1),然后用不同的版本号重试cuda和/或python。
- conda install -c anaconda cython- pip install opencv-python- pip install git+https://github.com/facebookresearch/fvcore- pip install git+https://github.com/philferriere/cocoapi.git#subdirectory=PythonAPI- pip install av- conda install -c anaconda scipy- conda install -c anaconda ninja如果上面的操作不成功,您可能需要从头开始重新启动,或者重新安装pytorch。如果重新安装pytocrh,则需要重新构建detectron2。
如果上述方法成功,那么
发布于 2021-07-28 14:41:37
这是安装说明。要安装( Detectron2的最新版本),请执行以下命令。
在航站楼:
python -m pip install git+https://github.com/facebookresearch/detectron2.githttps://stackoverflow.com/questions/60631933
复制相似问题