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

Is there a way to run this model on Apple M1 that doesn't have CUDA support? #50

Open
gurpreetsinghmukker opened this issue Jul 24, 2023 · 2 comments

Comments

@gurpreetsinghmukker
Copy link

I get the following error when I try to run the SixDRepNet() model on an image.

File "/Users/gurpreetmukker/Desktop/face_detection/face_detection/lib/python3.11/site-packages/torch/cuda/__init__.py", line 239, in _lazy_init raise AssertionError("Torch not compiled with CUDA enabled") AssertionError: Torch not compiled with CUDA enabled

Thanks

@thohemp
Copy link
Owner

thohemp commented Jul 31, 2023

The error occurs in the face detection package, that is used to generate the face crops for 6DRepNet.
Modifying the detector or changing it should solve the issue. 6DRepNet itself can run on CPU, even though it's not recommended.

@lheiler
Copy link

lheiler commented Feb 29, 2024

For me it worked to set line 17 in site-packages/sixdrepnet/regressor.py from
def __init__(self, gpu_id : int=0, dict_path: str=''): to def __init__(self, gpu_id : int=-1, dict_path: str=''):.
I tested the same picture in the Colab and on my M1 Max and I got the following results for pitch, yaw, roll:
M1 Max = [-3.0097966] [-14.455278] [1.3092302]
Google Colab: [-3.0097966] [-14.455285] [1.3092275]

For me that is close enough. :)

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

3 participants