aim-uofa / AdelaiDet

AdelaiDet is an open source toolbox for multiple instance-level detection and recognition tasks.
https://git.io/AdelaiDet
Other
3.37k stars 647 forks source link

Blendmask test img error #48

Closed zhepherd closed 4 years ago

zhepherd commented 4 years ago

image

zhepherd commented 4 years ago

Traceback (most recent call last): File "demo/demo.py", line 74, in demo = VisualizationDemo(cfg) File "/nfs/project/huangzhipeng/tools/opensorce/AdelaiDet/demo/predictor.py", line 37, in init self.predictor = DefaultPredictor(cfg) File "/home/huangzhipeng/miniconda3/envs/blendmask/lib/python3.7/site-packages/detectron2/engine/defaults.py", line 184, in init self.model = build_model(self.cfg) File "/home/huangzhipeng/miniconda3/envs/blendmask/lib/python3.7/site-packages/detectron2/modeling/meta_arch/build.py", line 21, in build_model model = META_ARCH_REGISTRY.get(meta_arch)(cfg) File "/nfs/project/huangzhipeng/tools/opensorce/AdelaiDet/adet/modeling/blendmask/blendmask.py", line 58, in init pixel_mean = torch.Tensor(cfg.MODEL.PIXEL_MEAN).to(self.device).view(3, 1, 1) File "/home/huangzhipeng/miniconda3/envs/blendmask/lib/python3.7/site-packages/torch/cuda/init.py", line 149, in _lazy_init _check_driver() File "/home/huangzhipeng/miniconda3/envs/blendmask/lib/python3.7/site-packages/torch/cuda/init.py", line 63, in _check_driver of the CUDA driver.""".format(str(torch._C._cuda_getDriverVersion()))) AssertionError: The NVIDIA driver on your system is too old (found version 10010). Please update your GPU driver by downloading and installing a new version from the URL: http://www.nvidia.com/Download/index.aspx Alternatively, go to: https://pytorch.org to install a PyTorch version that has been compiled with your version of the CUDA driver.

zhepherd commented 4 years ago

my cuda version is CUDA Version 10.0.130 CUDA Patch Version 10.0.130.1

stan-haochen commented 4 years ago

Hi zhepherd, AdelaiDet supports CUDA 10.0.

Please make sure you have compiled AdelaiDet with the same cuda as your python runtime. This error typically happens when the cuda in your python environment is of a lower version.

Also, you can check official Detectron2 demos. If those work, BlendMask should also work.

zhepherd commented 4 years ago

which python version need??my python version is 3.7

stan-haochen commented 4 years ago

@zhepherd same as Detectron2, python >= 3.6

zhepherd commented 4 years ago

my python is 3.7 why has cuda error? i try as detectron2 install.md,but also has the error! pls help

zhepherd commented 4 years ago

image

stan-haochen commented 4 years ago

@zhepherd As I said before, it is probably because you did not compile detectron2/AdelaiDet with the same cuda as your python runtime.

Please make sure you have installed the correct precompiled detectron2 or have compiled with the right nvcc.

I also suggest you go to Detectron2's repo for help.

zhepherd commented 4 years ago

i am think i compile detectron2 with the same cuda as my python runtime

zhepherd commented 4 years ago

image

stan-haochen commented 4 years ago

So how did you install pytorch?

If with conda, please try

conda list | grep torch

and make sure torch is compiled with the same version of CUDA

zhepherd commented 4 years ago

use pip image

stan-haochen commented 4 years ago

It seems to me the torch version you installed is not compiled to support CUDA 10.0.

The NVIDIA driver on your system is too old (found version 10010). Please update your GPU driver by downloading and installing a new version from the URL: http://www.nvidia.com/Download/index.aspx Alternatively, go to: https://pytorch.org to install a PyTorch version that has been compiled with your version of the CUDA driver.

zhepherd commented 4 years ago

which torch and torchvision should i install ?

stan-haochen commented 4 years ago

if you insist on using cuda 10.0, try pytorch 1.3 with cuda 10.0. Remember to specify the CUDA version when you install.

zhepherd commented 4 years ago

specify cuda version when install ? how to specify? not the sys default cuda 10.0?

stan-haochen commented 4 years ago

Something like this

pip install torch==1.3.1+cu100 torchvision==0.4.2+cu100 -f https://download.pytorch.org/whl/torch_stable.html

or this

conda install pytorch torchvision cudatoolkit=10.0 -c pytorch

If you have further questions, join our discord channel here

https://discord.gg/afxvbrZ

The issues are for bug reports and feature requests. Not general QAs

zhepherd commented 4 years ago

image i look my runtime cuda ,find is not the same as sys cuda

zhepherd commented 4 years ago

i solve this problem after update the nvidia driver,but has anther problem

image

zhepherd commented 4 years ago

thx very much, i solve this problem after reinstall ,thx very much for help!!! @stan-haochen