ImportError: No module named '_FaceLivenessDetectionSDK'

135 views
Skip to first unread message

Asif Khan

unread,
Jan 14, 2022, 8:42:40 AM1/14/22
to doubango-ai
Hi,

What am I doing wrong?

I followed the instructions (in /FaceLivenessDetection-SDK/python/README.md and /FaceLivenessDetection-SDK/samples/python/liveness/README.md) and ran the following command:

Predator:~/Projects/Doubango/FaceLivenessDetection-SDK/binaries/linux/x86_64$ PYTHONPATH=$PYTHONPATH:.:../../../python \ > LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH \ > python3 ../../../samples/python/liveness/liveness.py --image ../../../assets/images/disguise.jpg --assets ../../../assets

i received the following error:

Traceback (most recent call last): File "/home/tf/Projects/Doubango/FaceLivenessDetection-SDK/python/FaceLivenessDetectionSDK.py", line 16, in swig_import_helper fp, pathname, description = imp.find_module('_FaceLivenessDetectionSDK', [dirname(__file__)]) File "/usr/lib/python3.6/imp.py", line 297, in find_module raise ImportError(_ERR_MSG.format(name), name=name) ImportError: No module named '_FaceLivenessDetectionSDK' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "../../../samples/python/liveness/liveness.py", line 20, in <module> import FaceLivenessDetectionSDK File "/home/tf/Projects/Doubango/FaceLivenessDetection-SDK/python/FaceLivenessDetectionSDK.py", line 26, in <module> _FaceLivenessDetectionSDK = swig_import_helper() File "/home/tf/Projects/Doubango/FaceLivenessDetection-SDK/python/FaceLivenessDetectionSDK.py", line 18, in swig_import_helper import _FaceLivenessDetectionSDK ImportError: libtensorflow.so.1: cannot open shared object file: No such file or directory 

Asif Khan

unread,
Jan 14, 2022, 9:30:30 AM1/14/22
to doubango-ai
I think, I have to install tensorflow from https://www.tensorflow.org/install/lang_c

Mamadou DIOP

unread,
Jan 14, 2022, 9:36:21 AM1/14/22
to Asif Khan, doubango-ai
Hi,

The error is pretty clear as it conplains about missing tensorflow libs. Install Tensorflow as per https://github.com/DoubangoTelecom/FaceLivenessDetection-SDK/tree/master/samples/cpp#gpu-acceleration-tensorflow-linux



Sent from my Galaxy
--
You received this message because you are subscribed to the Google Groups "doubango-ai" group.
To unsubscribe from this group and stop receiving emails from it, send an email to doubango-ai...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/doubango-ai/1c93f520-c492-4ad0-bc37-37d32a7f625dn%40googlegroups.com.

Asif Khan

unread,
Jan 14, 2022, 11:00:07 AM1/14/22
to doubango-ai
I installed tensorflow c api and can successfully compile and run example on https://www.tensorflow.org/install/lang_c 
but still I the same error. I can't find libtensorflow.so.1.

Which specific version of the tensorflow are you using? 

Is it the problem of tensorflow or something else?

Asif Khan

unread,
Jan 14, 2022, 11:11:47 AM1/14/22
to doubango-ai

Mamadou DIOP

unread,
Jan 14, 2022, 1:44:21 PM1/14/22
to Asif Khan, doubango-ai
Before trying to run the program on Linux x86_64 you'll need to download libtensorflow.so as explained here.

It's hard to miss that you need to download that lib and where to find it.

The Lib you downloaded from Google website is Tensorflow version 2.0 and that's why it fails to find the symbolic link libtensorflow.so.1. You could notice that the lib you download contain libtensorflow.so.2.

To use the latest Tensorflow (not recommended for beginners), check https://github.com/DoubangoTelecom/ultimateALPR-SDK/tree/master/samples/c%2B%2B#migration-tf2

Sent from my Galaxy


-------- Original message --------
From: Asif Khan <asifs...@gmail.com>
Date: 1/14/22 17:11 (GMT+01:00)
To: doubango-ai <douba...@googlegroups.com>
--
You received this message because you are subscribed to the Google Groups "doubango-ai" group.
To unsubscribe from this group and stop receiving emails from it, send an email to doubango-ai...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages