face-alignment
face-alignment copied to clipboard
Working with Cuda 11 and Cudnn 8
Hi, this is more a question than an issue.
I have a system with RTX 3080, Driver version 450.102, Ubuntu 20.04, Cuda 11.03 and Cudnn 8.0.5 My question, is the library ready to work with this type of configuration? I also usually work with blazeface detector. @1adrianb
Thanks in advance
Hi @moncio This interfacing is handled by pytorch, as such this shouldn't be an issue. Just make sure that you install an appropriate pytorch version ( see https://pytorch.org/get-started/locally/)
Sorry again @1adrianb . I opened this question because I found this issue in this environment:
This is my code to initialize the library:
self.face_alignment = FaceAlignment(landmarks_type=LandmarksType._3D,
flip_input=False,
device='cuda',
face_detector='blazeface')
However, when I run the same code under Ubuntu 18.04, Cuda 10.0 and Cudnn 7.6.5, the program runs succesfully. As well, if I checkit with sfd detector, it works.
So, do I need to do some adjustment in order to use the blazeface properly?
Thanks!
Can you please try updating the face alignment lib to the latest version? (1.3.3)
Ok, I was running with v1.1.1. I will update it and try again. Thanks!
Hi again @1adrianb . Bad news, when I run v1.3.3 with blazeface, same error I posted before.
On the other hand, when I run with sfd:
Trying with dlib detector, the same error.
It seems the main problem is here:
out = self.face_alignment_net(inp).detach()
According to the error trace this seems to be an issue with your nvidia/cuda installation: failed to open libnvrtc-builtins.so.
Please make sure this is installed and added to your path.
Well, in this case I'm building a docker image from this: https://hub.docker.com/r/nvidia/cuda/tags?page=1&ordering=last_updated
Using this image: nvidia/cuda:11.0.3-cudnn8-devel-ubuntu20.04
Anyway, I will check this specific library.
But, the problem regarding to blazeface? Invalid shape dimension? I dont understand it. @1adrianb
Thanks!
@moncio I am unable to reproduce the issue at the moment on my system. Could you check please if after fixing the missing library the error still occurs?
Ok, now running with Cuda 11.0 and trying your example script: https://github.com/1adrianb/face-alignment/blob/master/examples/detect_landmarks_in_image.py . it seems it works great at least with blazeface
But when I'm trying to Cuda 11.1 the problems come regarding to torch (But this error is more about compatibility of versions) This is the message:
RuntimeError: Unexpected error from cudaGetDeviceCount(). Did you run some cuda functions before calling NumCudaDevices() that might have already set an error? Error 804: forward compatibility was attempted on non supported HW
Thanks for the help @1adrianb
Sorry again @1adrianb but the problem about RuntimeError: invalid shape dimension -1061950504
persists.
I'm running a code with a video as an input source inside a image with Cuda 11.0.3, Cudnn 8.0.5 and Python 3.8 Do you have any example like that to try it?
Thanks!
Could you please try running the test suite, available in test folder? Also, does the code provided here: https://github.com/1adrianb/face-alignment/blob/master/examples/demo.ipynb work? Finally, does sdf instead of blazeface work?
Where is this video "acazlolrpz.mp4" which you refer in the script? I tried with sfd and it's working but the GPU memory comsumption is quite higher than the other one and the speed slower
@moncio Thanks for checking. If you can give me some details regarding the video (resolution at least), or if you can send me the frame that causes the crash I can try to reproduce your error in a container.
Yes, the resolution is 1920x1080, frame rate 30. Sorry but I can`t pass to you the video. I'm not authorized.