Face_recognition: Code 30, reason: unknown error

Created on 12 Feb 2018  路  7Comments  路  Source: ageitgey/face_recognition

  • face_recognition version: 1.2.1
  • Python version: 3.5.2
  • Operating System: Linux Mint

Description

Attempting to run the face_recognition in anyway, changed directories and without directories, all produce same issue.

What I Did

rob@Turing ~/face_recognition $ face_recognition /known/ /unknown/

Traceback (most recent call last):
File "/usr/local/bin/face_recognition", line 7, in
from face_recognition.cli import main
File "/usr/local/lib/python3.5/dist-packages/face_recognition/__init__.py", line 7, in
from .api import load_image_file, face_locations, batch_face_locations, face_landmarks, face_encodings, compare_faces, face_distance
File "/usr/local/lib/python3.5/dist-packages/face_recognition/api.py", line 24, in
cnn_face_detector = dlib.cnn_face_detection_model_v1(cnn_face_detection_model)
RuntimeError: Error while calling cudaMallocHost(&data, new_size*sizeof(float)) in file /tmp/pip-build-_n7xryvl/dlib/dlib/dnn/gpu_data.cpp:185. code: 30, reason: unknown error

Most helpful comment

got same problem while running raw dlib.cnn_face_detection_model_v1('mmod_human_face_detector.dat')

RuntimeError: Error while calling cudaGetDevice(&the_device_id) in file /tmp/pip-install-6k2tx_yh/dlib/dlib/cuda/gpu_data.cpp:178. code: 30, reason: unknown error

fixed just by restarting computer ;)

All 7 comments

The most likely cause is probably a bad installation of CUDA. Make sure the CUDA kernel module running is the same version as the CUDA library used to compile dlib.

I'm running cuda 9.0.176 (downloaded from nvidia), the dlib was installed via the pip3 command (19.7) from your installation guide. I'll try to compile dlib locally and see if that fixes the issue.

Nope, same issue. I uninstalled dlib via pip3. Then build dlib from source with cuda support enabled. and I'm getting the same code 30 error when running face_recognition.

On a whim, I decided to run face_recognition via the sudo command and it worked. It must have been a permissions issue of some kind, not sure. but hey, if it works, it works.

Fixed using sudo

got same problem while running raw dlib.cnn_face_detection_model_v1('mmod_human_face_detector.dat')

RuntimeError: Error while calling cudaGetDevice(&the_device_id) in file /tmp/pip-install-6k2tx_yh/dlib/dlib/cuda/gpu_data.cpp:178. code: 30, reason: unknown error

fixed just by restarting computer ;)

Hi,
My system got stuck in login loop and to fix it I removed nvidia-drivers and then reinstalled it.
After that I am facing error:

Traceback (most recent call last):
  File "face_clustering.py", line 282, in <module>
    facerec = dlib.face_recognition_model_v1(face_rec_model_path)
RuntimeError: Error while calling cudaMallocHost(&data, new_size*sizeof(float)) in file /tmp/pip-install-usd7a31_/dlib/dlib/cuda/gpu_data.cpp:185. code: 30, reason: unknown error

I restarted the pc, reinstalled dlib, cudatoolkit in the conda environment but nothing works.

System details:
Ubuntu 16.04
Python version - 3.5.5 in the conda environment.
dlib version - 19.12
cudatoolkit -8.0

Was this page helpful?
0 / 5 - 0 ratings