Zhu-FaceOnLive commited on
Commit
675ebfd
1 Parent(s): 40b494b

Upload 7 files

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ facewrapper/libs/libttvfaceengine6.so filter=lfs diff=lfs merge=lfs -text
facewrapper/dict/data1.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:36cf5fcc49345989a86839a53529314ec1fe5d621c377a1952bc7538d55e7f1b
3
+ size 16255630
facewrapper/dict/data2.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f25fb0cd3d70cb84c258e7109620f411c087e0875828d6ab86cc9c4838d49bec
3
+ size 11875339
facewrapper/dict/data3.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:06daf36a8545f59ac104415e8b2d38072d06abc027cb346fd4a6c6029fed55b4
3
+ size 90716260
facewrapper/facewrapper.py ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import ctypes, ctypes.util
2
+ from ctypes import *
3
+ from numpy.ctypeslib import ndpointer
4
+ import sys
5
+ import os
6
+
7
+ lib_path = os.path.abspath(os.path.dirname(__file__)) + '/libs/libttvfaceengine6.so'
8
+ liveness_engine = cdll.LoadLibrary(lib_path)
9
+
10
+ ttv_version = liveness_engine.ttv_version
11
+ ttv_version.argtypes = []
12
+ ttv_version.restype = ctypes.c_char_p
13
+
14
+ ttv_get_hwid = liveness_engine.ttv_get_hwid
15
+ ttv_get_hwid.argtypes = []
16
+ ttv_get_hwid.restype = ctypes.c_char_p
17
+
18
+ ttv_init = liveness_engine.ttv_init
19
+ ttv_init.argtypes = [ctypes.c_char_p, ctypes.c_char_p]
20
+ ttv_init.restype = ctypes.c_int32
21
+
22
+ ttv_init_offline = liveness_engine.ttv_init_offline
23
+ ttv_init_offline.argtypes = [ctypes.c_char_p, ctypes.c_char_p]
24
+ ttv_init_offline.restype = ctypes.c_int32
25
+
26
+ ttv_extract_feature = liveness_engine.ttv_extract_feature
27
+ ttv_extract_feature.argtypes = [ndpointer(ctypes.c_ubyte, flags='C_CONTIGUOUS'), ctypes.c_int32, ctypes.c_int32, ndpointer(ctypes.c_int32, flags='C_CONTIGUOUS'), ndpointer(ctypes.c_ubyte, flags='C_CONTIGUOUS'), ndpointer(ctypes.c_int32, flags='C_CONTIGUOUS')]
28
+ ttv_extract_feature.restype = ctypes.c_int
29
+
30
+ ttv_compare_feature = liveness_engine.ttv_compare_feature
31
+ ttv_compare_feature.argtypes = [ndpointer(ctypes.c_ubyte, flags='C_CONTIGUOUS'), ndpointer(ctypes.c_ubyte, flags='C_CONTIGUOUS')]
32
+ ttv_compare_feature.restype = ctypes.c_double
facewrapper/libs/libimutils.so ADDED
Binary file (412 kB). View file
 
facewrapper/libs/libimutils.so_for_ubuntu22 ADDED
Binary file (412 kB). View file
 
facewrapper/libs/libttvfaceengine6.so ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cd2a6754393502f760dfda5fce7ed3427cc85e1076d7f4feba7acf80f23cb50c
3
+ size 3706691