1adrianb / face-alignment

:fire: 2D and 3D Face alignment library build using pytorch
https://www.adrianbulat.com
BSD 3-Clause "New" or "Revised" License
6.88k stars 1.33k forks source link

cant run on google colab : RuntimeError: Found no NVIDIA driver on your system. Please check that you have an NVIDIA GPU and installed a driver from http://www.nvidia.com/Download/index.aspx #355

Closed sugizo closed 4 months ago

sugizo commented 6 months ago

error

Downloading: "https://www.adrianbulat.com/downloads/python-fan/s3fd-619a316812.pth" to /root/.cache/torch/hub/checkpoints/s3fd-619a316812.pth
100%|██████████| 85.7M/85.7M [00:05<00:00, 17.7MB/s]
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
[<ipython-input-75-d76635ddeaab>](https://localhost:8080/#) in <cell line: 1>()
----> 1 fa = face_alignment.FaceAlignment(face_alignment.LandmarksType.TWO_D, flip_input = False)
      2 
      3 input = io.imread('photo.jpg')
      4 preds = fa.get_landmarks(input)

6 frames
[/usr/local/lib/python3.10/dist-packages/torch/cuda/__init__.py](https://localhost:8080/#) in _lazy_init()
    296         if "CUDA_MODULE_LOADING" not in os.environ:
    297             os.environ["CUDA_MODULE_LOADING"] = "LAZY"
--> 298         torch._C._cuda_init()
    299         # Some of the queued calls may reentrantly call _lazy_init();
    300         # we need to just return without initializing in that case.

RuntimeError: Found no NVIDIA driver on your system. Please check that you have an NVIDIA GPU and installed a driver from http://www.nvidia.com/Download/index.aspx

best regards

baselqt commented 4 months ago

choose runtime type in colab and make sure to use T4 GPU