Coder Social home page Coder Social logo

zeusees / zeusee-face-anti-spoofing Goto Github PK

View Code? Open in Web Editor NEW
649.0 44.0 226.0 90.07 MB

开源配合型人脸活体检测 Open Source Face Anti-spoofing

Home Page: http://www.zeusee.com

License: Apache License 2.0

CMake 1.46% Java 12.68% C++ 80.49% C 5.13% Objective-C 0.19% Makefile 0.05%
android cpp deep-learning anti-spoofing

zeusee-face-anti-spoofing's People

Contributors

szad670401 avatar yangkezun avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

zeusee-face-anti-spoofing's Issues

error: undefined reference to cv::dnn: 看起来找不到 cvv, std, 库, 该怎么办?

使用 Android Studio 尝试编造, 显示以下错误, 看起来找不到 cvv, std, 库, 该怎么办?

Error while executing process C:\Users\Wesley\AppData\Local\Android\Sdk\cmake\3.6.4111459\bin\cmake.exe with arguments {--build D:\WorkingDirectory\MyStudy\Zeusee-Face-Anti-spoofing-master\Prj-Android-full-src\app.externalNativeBuild\cmake\debug\armeabi-v7a --target native-lib}
[1/1] Linking CXX shared library ........\build\intermediates\cmake\debug\obj\armeabi-v7a\libnative-lib.so
FAILED: cmd.exe /C "cd . && C:\Users\Wesley\AppData\Local\Android\Sdk\ndk-bundle\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe --target=armv7-none-linux-androideabi --gcc-toolchain=C:/Users/Wesley/AppData/Local/Android/Sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64 --sysroot=C:/Users/Wesley/AppData/Local/Android/Sdk/ndk-bundle/sysroot -fPIC -isystem C:/Users/Wesley/AppData/Local/Android/Sdk/ndk-bundle/sysroot/usr/include/arm-linux-androideabi -D__ANDROID_API__=22 -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -mthumb -Wa,--noexecstack -Wformat -Werror=format-security -std=c++11 -std=c++11 -frtti -fexceptions -O0 -fno-limit-debug-info -Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libatomic.a -nostdlib++ --sysroot C:/Users/Wesley/AppData/Local/Android/Sdk/ndk-bundle/platforms/android-22/arch-arm -Wl,--build-id -Wl,--warn-shared-textrel -Wl,--fatal-warnings -Wl,--fix-cortex-a8 -Wl,--exclude-libs,libunwind.a -LC:/Users/Wesley/AppData/Local/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a -Wl,--no-undefined -Wl,-z,noexecstack -Qunused-arguments -Wl,-z,relro -Wl,-z,now -shared -Wl,-soname,libnative-lib.so -o ........\build\intermediates\cmake\debug\obj\armeabi-v7a\libnative-lib.so @CMakeFiles/native-lib.rsp && cd ."
D:\WorkingDirectory\MyStudy\Zeusee-Face-Anti-spoofing-master\Prj-Android-full-src\app\src\main\cpp/AliveDetector.h:294: error: undefined reference to 'cv::dnn::experimental_dnn_v3::blobFromImages(std::__ndk1::vector<cv::Mat, std::ndk1::allocatorcv::Mat > const&, double, cv::Size, cv::Scalar const&, bool, bool)'
D:\WorkingDirectory\MyStudy\Zeusee-Face-Anti-spoofing-master\Prj-Android-full-src\app\src\main\cpp/AliveDetector.h:305: error: undefined reference to 'cv::dnn::experimental_dnn_v3::Net::forward(cv::_OutputArray const&, std::__ndk1::vector<cv::String, std::__ndk1::allocatorcv::String > const&)'
D:\WorkingDirectory\MyStudy\Zeusee-Face-Anti-spoofing-master\Prj-Android-full-src\app\src\main\cpp/AliveDetector.h:315: error: undefined reference to 'cv::dnn::experimental_dnn_v3::Net::forward(cv::_OutputArray const&, std::__ndk1::vector<cv::String, std::__ndk1::allocatorcv::String > const&)'
D:\WorkingDirectory\MyStudy\Zeusee-Face-Anti-spoofing-master\Prj-Android-full-src\app\src\main\cpp/AliveDetector.h:396: error: undefined reference to 'cv::dnn::experimental_dnn_v3::Net::forward(cv::_OutputArray const&, std::__ndk1::vector<cv::String, std::__ndk1::allocatorcv::String > const&)'

萌新求帮助

我引用了so库,但是我的手机无法设置前置摄像头的聚焦模式,一用聚焦就显示setParaments failed,把它去掉后,能正常预览,但是人像一直无法识别,永远显示无法识别人像。萌新,这方面不是很懂。

关于ActiveDetector_Shake::getState() 代码的一些问题

感谢分享,在AliveDetector.hActiveDetector_Shake类中getState()方法有一些不理解。

bool getState() {
      if (idx < CYCLE_ACTIVE)
            return false;
        int sum = 0;
        bool flag = 0;
        for (int i = 0; i < CYCLE_ACTIVE; i++) {
            if (frames[i] > 11 || frames[i] < -11) {
                flag = 1;
            }
            if (frames[i] > 8)
                sum++;
            else if (frames[i] < -8)
                sum--;
        }
        if (abs(sum - 0) < 6 && flag == 1)
            return true;
        else
            return false;
    }
  1. 为什么frames[i]<-8时,sum需要--;

  2. 为什么最后if判断时需要判断“abs(sum-0)<6”;

alive.zeusees.activedetection E/STATE_log: -1

app build successfully after the app is opened its not showing camera just a human black body

2020-01-14 19:26:19.761 15587-15587/alive.zeusees.activedetection E/STATE_log: -1
2020-01-14 19:26:19.801 15587-15587/alive.zeusees.activedetection E/STATE_log: -1
2020-01-14 19:26:19.832 15587-15587/alive.zeusees.activedetection E/DisplayEventDispatcher: dispatcher 0xeb6b4300 ~ last event processed while scheduling was for 120152685

Rubbish project

You have many issues with the project however you are not bothering to reply or fix then !
Your company website says you have professional products made by professionals - it does not seem so if this Github project does compile and also has run errors as others have mentioned.

If you don't like the comment then fix the project @lsy17096535

使用SO库,启动后闪退

使用的Android-easy-so目录下提供的so,Detection.java以及assets目录下所有东西,启动后,报错如下
FATAL EXCEPTION: main
Process: com.jianzhiku.zhongrenbang, PID: 23724
java.lang.UnsatisfiedLinkError: No implementation found for long com.baidu.aip.fl.exception.AliveDetection.init(java.lang.String) (tried Java_com_baidu_aip_fl_exception_AliveDetection_init and Java_com_baidu_aip_fl_exception_AliveDetection_init__Ljava_lang_String_2)
at com.baidu.aip.fl.exception.AliveDetection.init(Native Method)
at com.baidu.aip.fl.exception.AliveDetection.(AliveDetection.java:167)
at com.baidu.aip.fl.exception.Detection.onCreate(Detection.java:178)
at android.app.Activity.performCreate(Activity.java:7094)
at android.app.Activity.performCreate(Activity.java:7085)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1215)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2750)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2875)
at android.app.ActivityThread.-wrap11(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1604)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6618)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:518)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:822)
根据错误找到报错的那行,是 aliveDetection = new AliveDetection("/sdcard//AliveDetection");
这个地方应该怎么配置才对?

error: undefined reference to 'cv::dnn::experimental_dnn_v3::blobFromImages

I encounter the issue
\app\src\main\cpp/AliveDetector.h:294: error: undefined reference to 'cv::dnn::experimental_dnn_v3::blobFromImages(std::__ndk1::vector<cv::Mat, std::ndk1::allocatorcv::Mat > const&, double, cv::Size, cv::Scalar const&, bool, bool)'

In my CMakeList.txt OpenCV_DIR is precised as
set(OpenCV_DIR "E:/OpenCV-android-sdk343/sdk/native/jni")

安卓端demo自动退出

你好,想问一下,调试了一下安卓端的demo,手机摄像头权限什么都打开了,但是每次点击“打开相机,活体检测”按钮,就会自动退出?

AliveDetector中的getState状态统计

bool getState() {
if (idx < CYCLE_ACTIVE)
return false;
int sum = 0;
bool flag = 0;

    for (int i = 0; i < CYCLE_ACTIVE; i++) {
        if (frames[i] > 11 || frames[i] < -11) {
            flag = 1;
        }
        if (frames[i] > 8)
            sum++;
        else if (frames[i] < -8)
            sum--;

    }
    if (abs(sum - 0) < 6 && flag == 1)
        return true;
    else
        return false;
}

这里的abs(sum - 0) < 6 不是大于吗?还是我理解有错误

國恥級垃圾Project, Rubbish project, don't use

長時間沒維護,就應該封存起來。
程序本身不單止版本兼容問題,是跟本不完整。
在github 上很少見到那麼垃圾的開源項目,跟你的官網上所說的完全不是一回事。

Documentation

Hi, thanks for this project.

Wanted to ask if i can find documentation of any kind to use the library?

求大佬帮助

/Users/wonders/Documents/workspace/Zeusee-Face/Prj-Android-full-src/app/src/main/cpp/include/opencv2/core/cvstd.inl.hpp
Error:(81) undefined reference to cv::String::allocate(unsigned long)' /Users/wonders/Documents/workspace/Zeusee-Face/Prj-Android-full-src/app/src/main/cpp/native-lib.cpp Error:(18) undefined reference to cv::cvtColor(cv::_InputArray const&, cv::OutputArray const&, int,
Error:(19) undefined reference to cv::transpose(cv::_InputArray const&, cv::_OutputArray const&)' Error:(20) undefined reference to cv::flip(cv::InputArray const&, cv::OutputArray const&, int)'
/Users/wonders/Documents/workspace/Zeusee-Face/Prj-Android-full-src/app/src/main/cpp/include/opencv2/core/mat.inl.hpp
Error:(834) undefined reference to cv::Mat::Mat(cv::Mat const&, cv::Rect_<int> const&)' Error:(768) undefined reference to cv::Mat::copyTo(cv::OutputArray const&) const'
Error:(696) undefined reference to cv::fastFree(void*)' Error:(491) undefined reference to cv::Mat::copySize(cv::Mat const&)'
Error:(501) undefined reference to cv::error(int, cv::String const&, char const*, char const*, int)' Error:(514) undefined reference to cv::error(int, cv::String const&, char const*, char const*, int)'
Error:(521) undefined reference to cv::Mat::updateContinuityFlag()' Error:(808) undefined reference to cv::Mat::deallocate()'
/Users/wonders/Documents/workspace/Zeusee-Face/Prj-Android-full-src/app/src/main/cpp/AliveDetector.h
Error:(75) undefined reference to cv::dnn::experimental_dnn_34_v7::Net::Net()' Error:(75) undefined reference to cv::dnn::experimental_dnn_34_v7::Net::Net()'
Error:(75) undefined reference to cv::dnn::experimental_dnn_34_v7::Net::Net()' Error:(76) undefined reference to cv::dnn::experimental_dnn_34_v7::readNetFromCaffe(cv::String const&, cv::String const&)'
Error:(76) undefined reference to cv::dnn::experimental_dnn_34_v7::Net::~Net()' Error:(77) undefined reference to cv::dnn::experimental_dnn_34_v7::readNetFromCaffe(cv::String const&, cv::String const&)'
Error:(77) undefined reference to cv::dnn::experimental_dnn_34_v7::Net::~Net()' Error:(78) undefined reference to cv::dnn::experimental_dnn_34_v7::readNetFromCaffe(cv::String const&, cv::String const&)'
Error:(78) undefined reference to cv::dnn::experimental_dnn_34_v7::Net::~Net()' Error:(76) undefined reference to cv::dnn::experimental_dnn_34_v7::Net::~Net()'
Error:(78) undefined reference to cv::dnn::experimental_dnn_34_v7::Net::~Net()' Error:(79) undefined reference to cv::dnn::experimental_dnn_34_v7::Net::~Net()'
Error:(282) undefined reference to cv::resize(cv::_InputArray const&, cv::_OutputArray const&, cv::Size_<int>, double, double, int)' Error:(294) undefined reference to cv::dnn::experimental_dnn_34_v7::blobFromImages(cv::InputArray const&, double, cv::Size, cv::Scalar
const&, bool, bool, int)'
Error:(305) undefined reference to cv::dnn::experimental_dnn_34_v7::Net::forward(cv::_OutputArray const&, std::vector<cv::String, std::allocator<cv::String> > const&)' Error:(313) undefined reference to cv::dnn::experimental_dnn_34_v7::Net::setInput(cv::InputArray const&, cv::String const&, double, cv::Scalar const&)'
Error:(315) undefined reference to cv::dnn::experimental_dnn_34_v7::Net::forward(cv::_OutputArray const&, std::vector<cv::String, std::allocator<cv::String> > const&)' Error:(375) undefined reference to cv::resize(cv::InputArray const&, cv::OutputArray const&, cv::Size, double, double, int)'
Error:(390) undefined reference to cv::dnn::experimental_dnn_34_v7::blobFromImage(cv::_InputArray const&, double, cv::Size_<int> const&, cv::Scalar_<double> const&, bool, bool, int)' Error:(393) undefined reference to cv::dnn::experimental_dnn_34_v7::Net::setInput(cv::InputArray const&, cv::String const&, double, cv::Scalar const&)'
Error:(396) undefined reference to cv::dnn::experimental_dnn_34_v7::Net::forward(cv::_OutputArray const&, std::vector<cv::String, std::allocator<cv::String> > const&)' Error:(663) undefined reference to cv::rectangle(cv::Mat&, cv::Rect
, cv::Scalar
const&, int, int, int)'
Error:(684) undefined reference to cv::line(cv::_InputOutputArray const&, cv::Point_<int>, cv::Point_<int>, cv::Scalar_<double> const&, int, int, int)' Error:(685) undefined reference to cv::line(cv::InputOutputArray const&, cv::Point, cv::Point, cv::Scalar const&, int, int, int)'
Error:(689) undefined reference to cv::circle(cv::_InputOutputArray const&, cv::Point_<int>, int, cv::Scalar_<double> const&, int, int, int)' Error:(46) undefined reference to cv::dnn::experimental_dnn_34_v7::Net::~Net()'
Error:(46) undefined reference to cv::dnn::experimental_dnn_34_v7::Net::~Net()' Error:(46) undefined reference to cv::dnn::experimental_dnn_34_v7::Net::~Net()'
/Users/wonders/Documents/workspace/Zeusee-Face/Prj-Android-full-src/app/src/main/cpp/include/opencv2/core/cvstd.hpp
Error:(648) undefined reference to cv::String::deallocate()' Error:(602) undefined reference to cv::String::allocate(unsigned long)'
Error:(656) undefined reference to `cv::String::deallocate()'
Error:error: linker command failed with exit code 1 (use -v to see invocation)
Information:BUILD FAILED
Information:Total time: 12.931 secs
Information:44 errors
Information:0 warnings
Information:See complete output in console

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.