Skip to content
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

Blendmask test img error #48

Closed
zhepherd opened this issue Apr 30, 2020 · 20 comments
Closed

Blendmask test img error #48

zhepherd opened this issue Apr 30, 2020 · 20 comments

Comments

@zhepherd
Copy link

image

@zhepherd
Copy link
Author

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
Copy link
Author

my cuda version is CUDA Version 10.0.130
CUDA Patch Version 10.0.130.1

@stan-haochen
Copy link
Collaborator

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
Copy link
Author

zhepherd commented May 6, 2020

which python version need??my python version is 3.7

@stan-haochen
Copy link
Collaborator

@zhepherd same as Detectron2, python >= 3.6

@zhepherd
Copy link
Author

zhepherd commented May 7, 2020

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

@zhepherd
Copy link
Author

zhepherd commented May 7, 2020

image

@stan-haochen
Copy link
Collaborator

@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
Copy link
Author

zhepherd commented May 7, 2020

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

@zhepherd
Copy link
Author

zhepherd commented May 7, 2020

image

@stan-haochen
Copy link
Collaborator

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
Copy link
Author

zhepherd commented May 7, 2020

use pip
image

@stan-haochen
Copy link
Collaborator

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
Copy link
Author

zhepherd commented May 7, 2020

which torch and torchvision should i install ?

@stan-haochen
Copy link
Collaborator

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
Copy link
Author

zhepherd commented May 7, 2020

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

@stan-haochen
Copy link
Collaborator

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
Copy link
Author

zhepherd commented May 7, 2020

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

@zhepherd
Copy link
Author

zhepherd commented May 8, 2020

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

image

@zhepherd
Copy link
Author

zhepherd commented May 8, 2020

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

@zhepherd zhepherd closed this as completed May 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants