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

Could not load the model. Showing CUDA error #6

Open
anujit-mandal opened this issue May 5, 2020 · 3 comments
Open

Could not load the model. Showing CUDA error #6

anujit-mandal opened this issue May 5, 2020 · 3 comments

Comments

@anujit-mandal
Copy link

image
While I try to load the model it is showing
"in _check_driver
raise AssertionError("Torch not compiled with CUDA enabled")
AssertionError: Torch not compiled with CUDA enabled". Torch installation is not done with cuda enabled.

@juancaceres
Copy link

You have a problem because your torch was not compiled with CUDA capabilities... be sure you have a GPU card and use a version of torch with cuda capabilities

@swuxyj
Copy link

swuxyj commented Jun 2, 2020

facemask/utils/config.py
line 6:
config.device = torch.device('cpu')

@joao-carvalheira
Copy link

joao-carvalheira commented Jul 3, 2020

To add to @swuxyj 's response and to avoid having to install it manually:

import torch
import facemask as fm
fm.utils.config.config.device = torch.device('cpu')

# Or this: model = fm.FaceMaskDetector(modelpath, device=torch.device('cpu'))
model = fm.FaceMaskDetector(modelpath)
...

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

4 participants