An open source library for face detection in images. The face detection speed can reach 1000FPS.

Overview

libfacedetection

This is an open source library for CNN-based face detection in images. The CNN model has been converted to static variables in C source files. The source code does not depend on any other libraries. What you need is just a C++ compiler. You can compile the source code under Windows, Linux, ARM and any platform with a C++ compiler.

SIMD instructions are used to speed up the detection. You can enable AVX2 if you use Intel CPU or NEON for ARM.

The model files are provided in src/facedetectcnn-data.cpp (C++ arrays) & the model (ONNX) from OpenCV Zoo. You can try our scripts (C++ & Python) in opencv_dnn/ with the ONNX model. View the network architecture here.

examples/detect-image.cpp and examples/detect-camera.cpp show how to use the library.

The library was trained by libfacedetection.train.

Examples

How to use the code

You can copy the files in directory src/ into your project, and compile them as the other files in your project. The source code is written in standard C/C++. It should be compiled at any platform which supports C/C++.

Some tips:

  • Please add facedetection_export.h file in the position where you copy your facedetectcnn.h files, add #define FACEDETECTION_EXPORT to facedetection_export.h file. See: issues #222
  • Please add -O3 to turn on optimizations when you compile the source code using g++.
  • Please choose 'Maximize Speed/-O2' when you compile the source code using Microsoft Visual Studio.
  • You can enable OpenMP to speedup. But the best solution is to call the detection function in different threads.

You can also compile the source code to a static or dynamic library, and then use it in your project.

How to compile

CNN-based Face Detection on Intel CPU

Method Time FPS Time FPS
X64 X64 X64 X64
Single-thread Single-thread Multi-thread Multi-thread
cnn (CPU, 640x480) 58.06ms. 17.22 12.93ms 77.34
cnn (CPU, 320x240) 13.77ms 72.60 3.19ms 313.14
cnn (CPU, 160x120) 3.26ms 306.81 0.77ms 1293.99
cnn (CPU, 128x96) 1.41ms 711.69 0.49ms 2027.74
  • Minimal face size ~10x10
  • Intel(R) Core(TM) i7-1065G7 CPU @ 1.3GHz

CNN-based Face Detection on ARM Linux (Raspberry Pi 4 B)

Method Time FPS Time FPS
Single-thread Single-thread Multi-thread Multi-thread
cnn (CPU, 640x480) 492.99ms 2.03 149.66ms 6.68
cnn (CPU, 320x240) 116.43ms 8.59 34.19ms 29.25
cnn (CPU, 160x120) 27.91ms 35.83 8.43ms 118.64
cnn (CPU, 128x96) 17.94ms 55.74 5.24ms 190.82
  • Minimal face size ~10x10
  • Raspberry Pi 4 B, Broadcom BCM2835, Cortex-A72 (ARMv8) 64-bit SoC @ 1.5GHz

Performance on WIDER Face

Run on default settings: scales=[1.], confidence_threshold=0.3, floating point:

AP_easy=0.856, AP_medium=0.842, AP_hard=0.727

Author

Contributors

All contributors who contribute at GitHub.com are listed here.

The contributors who were not listed at GitHub.com:

  • Jia Wu (吴佳)
  • Dong Xu (徐栋)
  • Shengyin Wu (伍圣寅)

Acknowledgment

The work was partly supported by the Science Foundation of Shenzhen (Grant No. 20170504160426188).

Citation

We published a paper on face detection to evaluate different methods. This project has also been evaluated in the paper.

@article{facedetect-yu,
 author={Yuantao Feng and Shiqi Yu and Hanyang Peng and Yan-ran Li and Jianguo Zhang}
 title={Detect Faces Efficiently: A Survey and Evaluations},
 journal={IEEE Transactions on Biometrics, Behavior, and Identity Science},
 year={2021}
 }

The paper can be open accessed at https://ieeexplore.ieee.org/document/9580485

The loss used in training is EIoU, a novel extended IoU. More details can be found in:

@article{eiou,
 author={Peng, Hanyang and Yu, Shiqi},
 journal={IEEE Transactions on Image Processing}, 
 title={A Systematic IoU-Related Method: Beyond Simplified Regression for Better Localization}, 
 year={2021},
 volume={30},
 pages={5032-5044},
 doi={10.1109/TIP.2021.3077144}
 }

The paper can be open accessed at https://ieeexplore.ieee.org/document/9429909.

Comments
  • Performance far below result with Raspberry Pi 3 B+

    Performance far below result with Raspberry Pi 3 B+

    于老师您好!

    我在用Raspberry Pi 3 B+做调试,看到项目README的结论,这款设备在320x240的图片下,单核性能是8.1fps,多核性能是23.74fps。但是我这边在320x240的实际测试结果,多核只有4.2fps,远远低于前面给出的结论。方便的话,请帮我找找原因,谢谢!

    //下面是一些环境参数

    1. os: 2020-02-13-raspbian-buster-lite
    2. gcc version: 8.3.0 (Raspbian 8.3.0-6+rpi1) (本地编译)
    3. cmake options: AVX512 = OFF AVX2 = OFF NEON = ON OpenMP = TRUE DEMO = ON add_compile_options(-mfpu=neon) (不加编译不通过)
    4. opencv: 3.2.0

    //cmake的输出 -- The C compiler identification is GNU 8.3.0 -- The CXX compiler identification is GNU 8.3.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done fatal: No names found, cannot describe anything. BUILD_VERSION:v0.0.1 Using ENON -- Found OpenMP_C: -fopenmp (found version "4.5") -- Found OpenMP_CXX: -fopenmp (found version "4.5") -- Found OpenMP: TRUE (found version "4.5")
    -- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY -- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success -- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY -- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success -- Performing Test COMPILER_HAS_DEPRECATED_ATTR -- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success -- Found OpenCV: /usr (found version "3.2.0") AVX512 = OFF AVX2 = OFF NEON = ON OpenMP = TRUE DEMO = ON -- Configuring done -- Generating done -- Build files have been written to: /home/pi/dev/libfacedetection/build

    //benchmark的运行结果 [email protected]:~/dev/libfacedetection/build $ ./benchmark 320_0.jpg There are 4 threads, 4 processors. cnn facedetection average time = 238.36ms | 4.20 FPS

    opened by iamliuyin 19
  • 运行速度比预期慢很多

    运行速度比预期慢很多

    于老师,您好!

    我在windows系统运行图片人脸检测,912*524分辨率的png图片,可以正常完整运行,但是facedetect_cnn 这个函数耗时1903ms,我知道这是不合理的,但是我没有找到原因。电脑配置不差。使用默认的cmakeLists编译的facedetection_export.h,使用detect-image.cpp的示例代码做了一点修改,把图片地址写在代码里的。请问是会是什么原因导致?
    
    opened by johniao 17
  • face detection with thermal images?

    face detection with thermal images?

    Do you have any activity for using your algorithm for detecting face on thermal images? It is very interesting now especially by Corona, where automatical facial temperature detection

    opened by Thanh-Binh 11
  • 读取位置 0xFFFFFFFFFFFFFFFF 时发生访问冲突

    读取位置 0xFFFFFFFFFFFFFFFF 时发生访问冲突

    您好,我用VS2013在x86和x64环境下没有错误提示,但运行示例时libfacedetectcnn-example都出现以下错误提示,请大家帮忙指点: 一直错误提示: 0x000000013F659557 处的第一机会异常(在 LibFaceDetection.exe 中): 0xC0000005: 读取位置 0xFFFFFFFFFFFFFFFF 时发生访问冲突。

    代码停留在: _mm256_store_si256((__m256i*)sumarray, sum_int32x8);

    没有更改过源文件。

    TIM截图20190916100744

    opened by yuanYangSee 11
  • Just ported to android and NOT run as fast as it told,can anyone figure out what is wrong with it?

    Just ported to android and NOT run as fast as it told,can anyone figure out what is wrong with it?

    I ported libfacedetection with jni and build with ndk19, then ran on a Nokia 7 plus android phone which cpu is Qualcomm 660. The face rect is given correctly but took almost 700ms to get the result without couting the convert time of bitmap to rgb. Barely can it run 2fps... And last time I check ,NEON was enabled. Can anyone help me with it ?

    opened by dpmaycry 11
  • Can not alloc memory for data.

    Can not alloc memory for data.

    I use your library in java with jni. And this error happens if i'm run "facedetect_frontal" function about 350-400 times. Can you tell me what mean this error ? How i can resolve it ? Thank you. ` #include "faceSwap_OurNativeLib.h" #include "facedetect-dll.h" #include <opencv2/opencv.hpp> #include #include #include using namespace std; using namespace cv; #define DETECT_BUFFER_SIZE 0x20000

    JNIEXPORT jintArray JNICALL Java_faceswap_OurNativeLib_getPointsAndRec (JNIEnv * env, jobject obj, jlong matAddr, jfloat scale, jint min_neighbors,jint minObjectWidth,jint maxObjectWidth,jint dolandmark) { jintArray rezult = nullptr; Mat * inputMat = (Mat*)matAddr; Mat gray; cvtColor(*inputMat, gray, CV_BGR2GRAY); int * pResults = NULL; //pBuffer is used in the detection functions. //If you call functions in multiple threads, please create one buffer for each thread! unsigned char * pBuffer = (unsigned char *)malloc(DETECT_BUFFER_SIZE); if (!pBuffer) { fprintf(stderr, "Can not alloc buffer.\n"); rezult = env->NewIntArray(1); return rezult; }

    ///////////////////////////////////////////
    // frontal face detection / 68 landmark detection
    // it's fast, but cannot detect side view faces
    //////////////////////////////////////////
    //!!! The input image must be a gray one (single-channel)
    //!!! DO NOT RELEASE pResults !!!
    pResults = facedetect_frontal(pBuffer, (unsigned char*)(gray.ptr(0)), gray.cols, gray.rows, (int)gray.step,
    	scale, min_neighbors, minObjectWidth, maxObjectWidth, dolandmark);
    
    
    if ((*pResults) <= 0)
    {
    	fprintf(stderr, "Nofaces.\n");
    	rezult = env->NewIntArray(1);
    	return rezult;
    }
    
    rezult = env->NewIntArray((*pResults) * 140);
    if (rezult == nullptr)
    {
    	fprintf(stderr, "Can not alloc rezult memory.\n");
    	rezult = env->NewIntArray(1);
    	return rezult;
    }
    //jint bodyOfrezult[140];
    //for (int i = 0; i < (pResults ? *pResults : 0); i++)
    //{
    //	short * p = ((short*)(pResults + 1)) + 142 * i;
    //	for (int k = 0; k < 4; k++)
    //	{
    //		bodyOfrezult[k] = p[k];
    //	}
    //	if (dolandmark)
    //	{
    //		for (int j = 4; j < 140; j++)
    //		{
    //			bodyOfrezult[j] = ((int)p[2 + j]);
    //		}
    //		env->SetIntArrayRegion(rezult, i * 140, 140 , bodyOfrezult);
    //	}
    //}
    free(pBuffer);
    gray.release();
    return rezult;
    

    }

    `

    opened by ussernamenikita 11
  • 🔥🔥🔥  [Guide]  How to use this lib in iOS

    🔥🔥🔥 [Guide] How to use this lib in iOS

    This lib is very useful! I try it in iOS and successful run.

    1. download or clone this lib in your computer;
    2. create New Xcode project;
    3. add this lib's src to your project;
    4. add the system lib libc++.tbd and other you need framework(eg. ACFoundation.framework etc.);
    5. download opencv2.framework and add it in your project;
    6. follow the example file to write the code.

    !!!

    1. modify facedetectcnn.h
    //#define _ENABLE_AVX2 //Please enable it if X64 CPU
    #define _ENABLE_NEON //Please enable it if ARM CPU
    
    1. modify .m to .mm
    2. import lib in your .mm
    #import <opencv2/opencv.hpp>
    #import <opencv2/imgcodecs/ios.h>
    #import "ViewController.h"
    #import "facedetectcnn.h"
    

    you must import the opencv2/opencv.hpp first !!!

    MyCode:

    #import <opencv2/opencv.hpp>
    #import <opencv2/imgcodecs/ios.h>
    #import "ViewController.h"
    #import "facedetectcnn.h"
    
    //define the buffer size. Do not change the size!
    #define DETECT_BUFFER_SIZE 0x20000
    using namespace cv;
    
    @implementation ViewController
    
    - (UIImage *)loadImageAndDectect:(const char *)image_file{
        Mat img = imread(image_file);
        if (img.empty()) {
            fprintf(stderr, "Can not load the image file %s.\n", image_file);
            return nil;
        }
        
        int *pResults = NULL;
        unsigned char * pBuffer = (unsigned char *)malloc(DETECT_BUFFER_SIZE);
        if (!pBuffer) {
            fprintf(stderr, "Can not alloc buffer.\n");
            return nil;
        }
        pResults = facedetect_cnn(pBuffer, (unsigned char *)(img.ptr(0)), img.cols, img.rows, (int)img.step);
        printf("%d faces detected.\n", (pResults ? *pResults : 0));
        Mat result_cnn = img.clone();;
        //print the detection results
        for(int i = 0; i < (pResults ? *pResults : 0); i++)
        {
            short * p = ((short*)(pResults+1))+142*i;
            int x = p[0];
            int y = p[1];
            int w = p[2];
            int h = p[3];
            int neighbors = p[4];
            int angle = p[5];
            
            printf("face_rect=[%d, %d, %d, %d], neighbors=%d, angle=%d\n", x,y,w,h,neighbors, angle);
            rectangle(result_cnn, cv::Rect(x, y, w, h), Scalar(0, 255, 0), 2);
        }
        
        free(pBuffer);
        
        return MatToUIImage(result_cnn);
    }
    
    
    - (void)viewDidLoad {
        [super viewDidLoad];
        // Do any additional setup after loading the view, typically from a nib.
        
        UIImageView *imageView = [[UIImageView alloc] initWithFrame:[UIScreen mainScreen].bounds];
        imageView.contentMode = UIViewContentModeScaleAspectFit;
        [self.view addSubview:imageView];
        
        NSString *path = [[NSBundle mainBundle] pathForResource:@"test" ofType:@".jpg"];
        
        imageView.image = [self loadImageAndDectect:[path UTF8String]];
    }
    
    
    @end
    

    IMG_0428 IMG_0429 IMG_0430

    opened by zycslog 10
  • CMakeLists.txt doesn't work

    CMakeLists.txt doesn't work

    [email protected]:~/Projects/libfacedetection/build$ make -j4
    [ 16%] Building CXX object CMakeFiles/demo.dir/src/facedetectcnn.cpp.o
    /home/lvmc/Projects/libfacedetection/src/facedetectcnn.cpp: In function ‘float dotProductFloatChGeneral(float*, float*, int, int)’:
    /home/lvmc/Projects/libfacedetection/src/facedetectcnn.cpp:115:39: warning: AVX vector return without AVX enabled changes the ABI [-Wpsabi]
         __m256 sumvec = _mm256_setzero_ps();
                                           ^
    In file included from /usr/lib/gcc/x86_64-linux-gnu/7/include/immintrin.h:41:0,
                     from /home/lvmc/Projects/libfacedetection/src/facedetectcnn.h:54,
                     from /home/lvmc/Projects/libfacedetection/src/facedetectcnn.cpp:39:
    /usr/lib/gcc/x86_64-linux-gnu/7/include/avxintrin.h:1227:1: error: inlining failed in call to always_inline ‘__m256 _mm256_setzero_ps()’: target specific option mismatch
     _mm256_setzero_ps (void)
     ^~~~~~~~~~~~~~~~~
    /home/lvmc/Projects/libfacedetection/src/facedetectcnn.cpp:115:38: note: called from here
         __m256 sumvec = _mm256_setzero_ps();
                         ~~~~~~~~~~~~~~~~~^~
    In file included from /usr/lib/gcc/x86_64-linux-gnu/7/include/immintrin.h:85:0,
                     from /home/lvmc/Projects/libfacedetection/src/facedetectcnn.h:54,
                     from /home/lvmc/Projects/libfacedetection/src/facedetectcnn.cpp:39:
    /usr/lib/gcc/x86_64-linux-gnu/7/include/fmaintrin.h:63:1: error: inlining failed in call to always_inline ‘__m256 _mm256_fmadd_ps(__m256, __m256, __m256)’: target specific option mismatch
     _mm256_fmadd_ps (__m256 __A, __m256 __B, __m256 __C)
     ^~~~~~~~~~~~~~~
    /home/lvmc/Projects/libfacedetection/src/facedetectcnn.cpp:127:33: note: called from here
             sumvec = _mm256_fmadd_ps(avec, bvec, sumvec);
                      ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
    In file included from /usr/lib/gcc/x86_64-linux-gnu/7/include/immintrin.h:41:0,
                     from /home/lvmc/Projects/libfacedetection/src/facedetectcnn.h:54,
                     from /home/lvmc/Projects/libfacedetection/src/facedetectcnn.cpp:39:
    /usr/lib/gcc/x86_64-linux-gnu/7/include/avxintrin.h:871:1: error: inlining failed in call to always_inline ‘__m256 _mm256_load_ps(const float*)’: target specific option mismatch
     _mm256_load_ps (float const *__P)
     ^~~~~~~~~~~~~~
    /home/lvmc/Projects/libfacedetection/src/facedetectcnn.cpp:120:14: note: called from here
             bvec = _mm256_load_ps(p2 + i);
             ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
    In file included from /usr/lib/gcc/x86_64-linux-gnu/7/include/immintrin.h:41:0,
                     from /home/lvmc/Projects/libfacedetection/src/facedetectcnn.h:54,
                     from /home/lvmc/Projects/libfacedetection/src/facedetectcnn.cpp:39:
    /usr/lib/gcc/x86_64-linux-gnu/7/include/avxintrin.h:871:1: error: inlining failed in call to always_inline ‘__m256 _mm256_load_ps(const float*)’: target specific option mismatch
     _mm256_load_ps (float const *__P)
     ^~~~~~~~~~~~~~
    /home/lvmc/Projects/libfacedetection/src/facedetectcnn.cpp:119:14: note: called from here
             avec = _mm256_load_ps(p1 + i);
             ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
    In file included from /usr/lib/gcc/x86_64-linux-gnu/7/include/immintrin.h:41:0,
                     from /home/lvmc/Projects/libfacedetection/src/facedetectcnn.h:54,
                     from /home/lvmc/Projects/libfacedetection/src/facedetectcnn.cpp:39:
    /usr/lib/gcc/x86_64-linux-gnu/7/include/avxintrin.h:269:1: error: inlining failed in call to always_inline ‘__m256 _mm256_hadd_ps(__m256, __m256)’: target specific option mismatch
     _mm256_hadd_ps (__m256 __X, __m256 __Y)
     ^~~~~~~~~~~~~~
    /home/lvmc/Projects/libfacedetection/src/facedetectcnn.cpp:131:28: note: called from here
         sumvec = _mm256_hadd_ps(sumvec, sumvec);
                  ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
    In file included from /usr/lib/gcc/x86_64-linux-gnu/7/include/immintrin.h:41:0,
                     from /home/lvmc/Projects/libfacedetection/src/facedetectcnn.h:54,
                     from /home/lvmc/Projects/libfacedetection/src/facedetectcnn.cpp:39:
    /usr/lib/gcc/x86_64-linux-gnu/7/include/avxintrin.h:269:1: error: inlining failed in call to always_inline ‘__m256 _mm256_hadd_ps(__m256, __m256)’: target specific option mismatch
     _mm256_hadd_ps (__m256 __X, __m256 __Y)
     ^~~~~~~~~~~~~~
    /home/lvmc/Projects/libfacedetection/src/facedetectcnn.cpp:132:28: note: called from here
         sumvec = _mm256_hadd_ps(sumvec, sumvec);
                  ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
    CMakeFiles/demo.dir/build.make:134: recipe for target 'CMakeFiles/demo.dir/src/facedetectcnn.cpp.o' failed
    make[2]: *** [CMakeFiles/demo.dir/src/facedetectcnn.cpp.o] Error 1
    CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/demo.dir/all' failed
    make[1]: *** [CMakeFiles/demo.dir/all] Error 2
    Makefile:83: recipe for target 'all' failed
    make: *** [all] Error 2
    
    opened by Grabber 9
  • undefined reference to `facedetect_cnn(unsigned char*, unsigned char*, int, int, int)'

    undefined reference to `facedetect_cnn(unsigned char*, unsigned char*, int, int, int)'

    我在Ubantu上运行g++ libfacedetectcnn-example.cpp ./test.jpg -O3 pkg-config --libs --cflags opencv4 undefined reference to `facedetect_cnn(unsigned char*, unsigned char*, int, int, int)', 我已经加头文件了啊

    opened by Adhders 9
  • How to Use Android Platform??

    How to Use Android Platform??

    Why is it that after I migrated to Android, the recognition time of keliamoniz1.jpg in the sample image was 2800 milliseconds?

    This is my CMakeList.txt:

    cmake_minimum_required(VERSION 3.4.1)
    
    SET(CMAKE_BUILD_TYPE Release)
    
    set(CMAKE_SYSTEM_NAME Linux)
    set(CMAKE_SYSTEM_VERSION 1)
    set(CMAKE_SYSTEM_PROCESSOR "aarch64")
    
    add_definitions(-O3)
    
    add_definitions(-D_ENABLE_INT8)
    #add_definitions(-D_ENABLE_AVX2)
    
    SET(CMAKE_C_FLAGS "$ENV{CFLAGS} -O3 -Wall")
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11 -O3 -pthread")
    SET(CMAKE_CXX_FLAGS_RELEASE "$ENV{CXXFLAGS} -O3 -Wall")
    
    #set(CMAKE_C_COMPILER_ABI armeabi-v7a)
    
    set(OPENCV_PATH /home/ww/Downloads/OpenCV-android-sdk)
    set(CMAKE_VERBOSE_MAKEFILE on)
    
    include_directories(${OPENCV_PATH}/sdk/native/jni/include)
    add_library(lib_opencv STATIC IMPORTED)
    set_target_properties(lib_opencv
            PROPERTIES
            IMPORTED_LOCATION ${PROJECT_SOURCE_DIR}/src/main/jniLibs/${ANDROID_ABI}/libopencv_java4.so
            )
    
    add_library( 
            native-lib
    
            SHARED
    
            src/main/cpp/native-lib.cpp
            src/main/cpp/facedetectcnn.cpp
            src/main/cpp/facedetectcnn-floatdata.cpp
            src/main/cpp/facedetectcnn-int8data.cpp
            src/main/cpp/facedetectcnn-model.cpp
            )
    
    find_library( 
            log-lib
            log)
    
    target_link_libraries( 
            native-lib
            ${log-lib}
            lib_opencv
            )
    

    Android device CPU is : mtk6737

    opened by xiaomochen520 8
  • 多线程调用

    多线程调用

    您好,11 月 10 日更新的这个版本您说的是可以在多线程调用,但是我用 VS2015(以及 opencv 3.1)测试发现,还是没法多线程同时调用啊,必须要加锁。 另外,您提供的 dll 似乎是 VS2010 编译的,而新版的接口里面用到了 vector,编译器版本不匹配时在 vector 析构的时候就会出现问题,除非调用之前为 vector 预留足够的空间。

    opened by sean028 8
  • 关于facedetect_cnn函数定义

    关于facedetect_cnn函数定义

    我在facedetectcnn-model.cpp中找到了facedetect_cnn函数的定义,注释写着“input image, it must be RGB (three-channel) image!”而在头文件中facedetectcnn.h写着"input image, it must be BGR (three channels) insteed of RGB image!"。我觉得虽然是个小问题,但不一致的代码注释可能引起阅读混乱?

    opened by biepenghaomie 0
  • [MSVC] Libfacedetection build failed due to error C2039: 'to_string': is not a member of 'std'

    [MSVC] Libfacedetection build failed due to error C2039: 'to_string': is not a member of 'std'

    Description: Recently, we updated the commit of bitcoin for MSVC RWC testing, it failed to build due to the error C2039 and error C3861 like below, could you please help take a look? Thanks.

    F:\gitP\ShiqiYu\libfacedetection\src\facedetectcnn.cpp(638,17): error C2039: 'to_string': is not a member of 'std' [F:\gitP\ShiqiYu\libfacedetection\build_amd64\facedetection.vcxproj]
             F:\gitP\ShiqiYu\libfacedetection\src\facedetectcnn.cpp(638,26): error C3861: 'to_string': identifier not found [F:\gitP\ShiqiYu\libfacedetection\build_amd64\facedetection.vcxproj]
    

    Expected behavior: Build successfully.

    Actual behavior: Build failed with error C2039 and error C3861

    To reprodece:

    1. open VS2019 x64 Native Tools command.
    2. git clone https://github.com/ShiqiYu/libfacedetection F:\gitP\ShiqiYu\libfacedetection
    3. mkdir F:\gitP\ShiqiYu\libfacedetection\build_amd64 and cd F:\gitP\ShiqiYu\libfacedetection\build_amd64
    4. cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_SYSTEM_VERSION=10.0.18362.0 -DCMAKE_INSTALL_PREFIX=install -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release -DDEMO=OFF ..
    5. msbuild /m /p:Platform=x64 /p:Configuration=Release libfacedetection.sln /t:Rebuild

    More info: The commit of Libfacedetection we use: 4092665 VS version: VS2019 (v16.11.20)

    Detailed log: build.log

    opened by Zhaojun-Liu 2
  • Is 150ms normal for AMD Ryzen 5 3550H in Single-thread?

    Is 150ms normal for AMD Ryzen 5 3550H in Single-thread?

    I ran the detect-camera.cpp in example, and the average time consumption of face detection is 150ms. The environment is:

    • AMD Ryzen 5 3550H
    • 16GB RAM
    • Microsoft Visual Studio 2022

    By the way, I have enabled AVX2 and -O2 optimization when compling.

    opened by YjFnajEz 3
  • Problem about FDDB score

    Problem about FDDB score

    教授您好,有鉴于您的测试性能与精度相当地高,我使用您的模型测试FDDB的结果如下(红框部分):

    我想请问教授这个测试结果是正常的吗,我有看到有些评测说您的模型可达到 0.994 平均精度(AP),但我的测试都只达到0.968左右,

    我目前是个程式菜鸟,有些地方不太了解其中的意义,如果有什么地方有做错或少做的话请您给与指教,谢谢!

    opened by asiagodtonegg3beo 2
  • Upside-down images

    Upside-down images

    dotted_3 dotted_Right

    Good morning. How can I implement processing of upside-down images? Looks like keypoints are the same, so I can't just check them and rotate image. Is there any tool or hint to work with that images?

    Thank you.

    opened by snolentinque 1
Releases(v3.0)
Owner
Shiqi Yu
Associate Professor, Department of Computer Science and Engineering, Southern University of Science and Technology, Shenzhen, China.
Shiqi Yu
Deep Learning ❤️ OneFlow

Deep Learning with OneFlow made easy 🚀 ! Carefree? carefree-learn aims to provide CAREFREE usages for both users and developers. User Side Computer V

21 Oct 27, 2022
Code for Active Learning at The ImageNet Scale.

Code for Active Learning at The ImageNet Scale. This repository implements many popular active learning algorithms and allows training with torch's DDP.

Zeyad Emam 47 Dec 12, 2022
Starter Code for VALUE benchmark

StarterCode for VALUE Benchmark This is the starter code for VALUE Benchmark [website], [paper]. This repository currently supports all baseline model

VALUE Benchmark 73 Dec 09, 2022
PyTorch code for EMNLP 2021 paper: Don't be Contradicted with Anything! CI-ToD: Towards Benchmarking Consistency for Task-oriented Dialogue System

Don’t be Contradicted with Anything!CI-ToD: Towards Benchmarking Consistency for Task-oriented Dialogue System This repository contains the PyTorch im

Libo Qin 25 Sep 06, 2022
A compendium of useful, interesting, inspirational usage of pandas functions, each example will be an ipynb file

Pandas_by_examples A compendium of useful/interesting/inspirational usage of pandas functions, each example will be an ipynb file What is this reposit

Guangyuan(Frank) Li 32 Nov 20, 2022
Deploy optimized transformer based models on Nvidia Triton server

Deploy optimized transformer based models on Nvidia Triton server

Lefebvre Sarrut Services 1.2k Jan 05, 2023
A generalized framework for prototyping full-stack cooperative driving automation applications under CARLA+SUMO.

OpenCDA OpenCDA is a SIMULATION tool integrated with a prototype cooperative driving automation (CDA; see SAE J3216) pipeline as well as regular autom

UCLA Mobility Lab 726 Dec 29, 2022
A set of tools for Namebase and HNS

HNS-TOOLS A set of tools for Namebase and HNS To install: pip install -r requirements.txt To run: py main.py My Namebase referral code: http://namebas

RunDavidMC 7 Apr 08, 2022
Nvdiffrast - Modular Primitives for High-Performance Differentiable Rendering

Nvdiffrast – Modular Primitives for High-Performance Differentiable Rendering Modular Primitives for High-Performance Differentiable Rendering Samuli

NVIDIA Research Projects 675 Jan 06, 2023
Rainbow: Combining Improvements in Deep Reinforcement Learning

Rainbow Rainbow: Combining Improvements in Deep Reinforcement Learning [1]. Results and pretrained models can be found in the releases. DQN [2] Double

Kai Arulkumaran 1.4k Dec 29, 2022
Machine learning algorithms for many-body quantum systems

NetKet NetKet is an open-source project delivering cutting-edge methods for the study of many-body quantum systems with artificial neural networks and

NetKet 413 Dec 31, 2022
Official implementation of the ICCV 2021 paper "Conditional DETR for Fast Training Convergence".

The DETR approach applies the transformer encoder and decoder architecture to object detection and achieves promising performance. In this paper, we handle the critical issue, slow training convergen

281 Dec 30, 2022
Sign Language Transformers (CVPR'20)

Sign Language Transformers (CVPR'20) This repo contains the training and evaluation code for the paper Sign Language Transformers: Sign Language Trans

Necati Cihan Camgoz 164 Dec 30, 2022
Interpretation of T cell states using reference single-cell atlases

Interpretation of T cell states using reference single-cell atlases ProjecTILs is a computational method to project scRNA-seq data into reference sing

Cancer Systems Immunology Lab 139 Jan 03, 2023
mPose3D, a mmWave-based 3D human pose estimation model.

mPose3D, a mmWave-based 3D human pose estimation model.

KylinChen 35 Nov 08, 2022
NAS Benchmark in "Prioritized Architecture Sampling with Monto-Carlo Tree Search", CVPR2021

NAS-Bench-Macro This repository includes the benchmark and code for NAS-Bench-Macro in paper "Prioritized Architecture Sampling with Monto-Carlo Tree

35 Jan 03, 2023
PyTorch implementation(s) of various ResNet models from Twitch streams.

pytorch-resnet-twitch PyTorch implementation(s) of various ResNet models from Twitch streams. Status: ResNet50 currently not working. Will update in n

Daniel Bourke 3 Jan 11, 2022
Human head pose estimation using Keras over TensorFlow.

RealHePoNet: a robust single-stage ConvNet for head pose estimation in the wild.

Rafael Berral Soler 71 Jan 05, 2023
Implementation of UNET architecture for Image Segmentation.

Semantic Segmentation using UNET This is the implementation of UNET on Carvana Image Masking Kaggle Challenge About the Dataset This dataset contains

Anushka agarwal 4 Dec 21, 2021
FANet - Real-time Semantic Segmentation with Fast Attention

FANet Real-time Semantic Segmentation with Fast Attention Ping Hu, Federico Perazzi, Fabian Caba Heilbron, Oliver Wang, Zhe Lin, Kate Saenko , Stan Sc

Ping Hu 42 Nov 30, 2022