# Error with Python face\_recognition

**URL:** <https://forums.developer.nvidia.com/t/error-with-python-face-recognition/75974>\
**Category:** Jetson Nano\
**Created:** [June 6, 2019, 3:10am UTC](https://forums.developer.nvidia.com/t/error-with-python-face-recognition/75974 "2019-06-06T03:10:09Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![2023295451](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@2023295451](https://forums.developer.nvidia.com/u/2023295451)\
**Post date:** [June 6, 2019, 3:10am UTC](https://forums.developer.nvidia.com/t/error-with-python-face-recognition/75974/1 "2019-06-06T03:10:09Z")

</div>

Install face\_recognition:  
sudo pip3 install face\_recognition

Download demo:  
git clone --single-branch [GitHub - ageitgey/face\_recognition: The world's simplest facial recognition api for Python and the command line](https://github.com/ageitgey/face_recognition.git)

run demo:

cd examples  
python3 facerec\_from\_webcam\_faster.py

When a face is detected, the array has an item and the error occurs.

/usr/local/lib/python3.6/dist-packages/face\_recognition/api.py:222: RuntimeWarning: invalid value encountered in less\_equal  
return list(face\_distance[known\_face\_encodings, face\_encoding\_to\_check) \<= tolerance)

---

<div class="post-metadata">

**Author:** ![AastaLLL](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/aastalll/32/14043_2.png) [@AastaLLL](https://forums.developer.nvidia.com/u/AastaLLL)\
**Post date:** [June 6, 2019, 5:49am UTC](https://forums.developer.nvidia.com/t/error-with-python-face-recognition/75974/2 "2019-06-06T05:49:18Z")

</div>

Hi,

There is an cuDNN error on the Jetson Nano which leads to some issue in the dlib.  
You can find more information in this topic:  
[url][https://devtalk.nvidia.com/default/topic/1049660/issues-with-dlib-library/[/url]](https://devtalk.nvidia.com/default/topic/1049660/issues-with-dlib-library/%5B/url%5D)

In summary, you will need to build dlib from source with the steps shared in this comment:  
[url][issues with dlib library - Jetson Nano - NVIDIA Developer Forums](https://devtalk.nvidia.com/default/topic/1049660/jetson-nano/issues-with-dlib-library/post/5336330/#5336330%5B/url%5D)

Thanks.

---

<div class="post-metadata">

**Author:** ![2023295451](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@2023295451](https://forums.developer.nvidia.com/u/2023295451)\
**Post date:** [June 6, 2019, 6:32am UTC](https://forums.developer.nvidia.com/t/error-with-python-face-recognition/75974/3 "2019-06-06T06:32:29Z")

</div>

We have confirmed that this issue is fixed in the cuDNN v7.6.1.

how can I update to cuDNN v7.6.1.?

---

<div class="post-metadata">

**Author:** ![richard\_liu](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@richard\_liu](https://forums.developer.nvidia.com/u/richard_liu)\
**Post date:** [June 7, 2019, 6:52am UTC](https://forums.developer.nvidia.com/t/error-with-python-face-recognition/75974/4 "2019-06-07T06:52:32Z")

</div>

Hi,  
I had the same error on the Jetson Nano with face recognition:  
/usr/local/lib/python3.6/dist-packages/face\_recognition/api.py:222: RuntimeWarning: invalid value encountered in less\_equal  
return list(face\_distance[known\_face\_encodings, face\_encoding\_to\_check) \<= tolerance)

And I go to the download page, there isn’t cuDNN v7.6.1  
[https://developer.nvidia.com/rdp/cudnn-download](https://developer.nvidia.com/rdp/cudnn-download)

Please help, thanks.

---

<div class="post-metadata">

**Author:** ![AastaLLL](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/aastalll/32/14043_2.png) [@AastaLLL](https://forums.developer.nvidia.com/u/AastaLLL)\
**Post date:** [June 10, 2019, 1:47am UTC](https://forums.developer.nvidia.com/t/error-with-python-face-recognition/75974/5 "2019-06-10T01:47:42Z")

</div>

Hi,

cuDNN 7.6 is not available yet.  
Please wait for our future JetPack release to get the fix.

Currently, you can apply the workaround mentioned here first:  
[url][issues with dlib library - Jetson Nano - NVIDIA Developer Forums](https://devtalk.nvidia.com/default/topic/1049660/jetson-nano/issues-with-dlib-library/post/5336330/#5336330%5B/url%5D)

Thanks.

---

<div class="post-metadata">

**Author:** ![dilshata](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@dilshata](https://forums.developer.nvidia.com/u/dilshata)\
**Post date:** [June 13, 2019, 2:58am UTC](https://forums.developer.nvidia.com/t/error-with-python-face-recognition/75974/6 "2019-06-13T02:58:09Z")

</div>

Hi,

I had the same error on the Jetson Nano with face recognition.  
But, I have confirmed that face recognition works well on Windows and Raspberry Pi 3 B (with Python3).

---

<div class="post-metadata">

**Author:** ![stshpatibandla](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@stshpatibandla](https://forums.developer.nvidia.com/u/stshpatibandla)\
**Post date:** [December 19, 2019, 12:46pm UTC](https://forums.developer.nvidia.com/t/error-with-python-face-recognition/75974/7 "2019-12-19T12:46:24Z")

</div>

Hi, i am also facing the same issue. its working in windows but not working in jetson nano

---

<div class="post-metadata">

**Author:** ![amirtousa](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@amirtousa](https://forums.developer.nvidia.com/u/amirtousa)\
**Post date:** [March 23, 2020, 9:22pm UTC](https://forums.developer.nvidia.com/t/error-with-python-face-recognition/75974/8 "2020-03-23T21:22:45Z")

</div>

Hi nanos,  
Works everywhere else but not on jetson nano yet.  
Any progress in fixing this?  
Thx+regards

---

<div class="post-metadata">

**Author:** ![nadeemm](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/nadeemm/32/367020_2.png) [@nadeemm](https://forums.developer.nvidia.com/u/nadeemm)\
**Post date:** [October 14, 2021, 10:02pm UTC](https://forums.developer.nvidia.com/t/error-with-python-face-recognition/75974/9 "2021-10-14T22:02:01Z")

</div>

Closed on October 14, 2021, 10:02pm UTC


