shiqiyu / libfacedetection Goto Github PK
View Code? Open in Web Editor NEWAn open source library for face detection in images. The face detection speed can reach 1000FPS.
License: Other
An open source library for face detection in images. The face detection speed can reach 1000FPS.
License: Other
您好,我想把代码编译成库供他人使用,我的源代码中有二十个类,分别声明和定义在不同的20个头文件和源文件中,我要如何做才能将代码做成类似您的样子,只提供一个头文件和一个库文件,他人就能使用呢?谢谢您的指导。
Hi. Would you mind creating a library file for Linux? I need to use it on an embedded system.
how can I run this code?
I don't know how to run this.
thank you
as title says, could u provide a version of linux.
Is it amazing without trained .xml file?
in your earlier issue, you admitted that you use multi-block LBP approach in face detection.
http://docs.opencv.org/3.2.0/dc/d88/tutorial_traincascade.html
In the bottom part of the website, it shows that the opencv Cascade Classifier Training LBP mode is using multi-block LBP as feature.
So here comes the tough question:
Did your group use opencv3.0 to train your face detection model and rewrite into C code?
if not, do you think the opencv3.0 LBP mode can train the performance-similar model with your database(20GB negative samples).
您好,11 月 10 日更新的这个版本您说的是可以在多线程调用,但是我用 VS2015(以及 opencv 3.1)测试发现,还是没法多线程同时调用啊,必须要加锁。
另外,您提供的 dll 似乎是 VS2010 编译的,而新版的接口里面用到了 vector,编译器版本不匹配时在 vector 析构的时候就会出现问题,除非调用之前为 vector 预留足够的空间。
Do we have linux version?
你好,libfacedetection这个库支持gpu加速吗?
Thanks your project,which give us help. If you publish paper about the project. I want to know it.Thanks!
现在能支持mac和ios系统吗?
HI,
it is a great work.
would you please help to describe the license fee if we want to use it on Linux system?
thanks a lot.
Hi,
I just had a question about the instruction set. Does it use SSE2 or avx/avx2?
Thanks
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;
}
`
Dear Mr Yu,
Hello,sir! You libfacedetection lib is so cool, thanks for your contribution.Now I have a quertion,that is about the poter pResults. In the code the face rectangular box together with the 68 key points neighbors and yaw angle can be get from the pResults. In fact I do not understand how to get all these just by short * p = ((short*)(pResults + 1)) + 142 * i. Look forward for your reply! Thank you!
Doctor Yu.
I downloaded the library and binary file and it works well.
High speed and accuracy. Awesome.
Then I am going to build embedded arm(stm32 etc) project using this detector. (without linux).
Could you let me know how can I get a source code?
Thank you.
Hi, Prof. Yu,
As mentioned in the title, the date of that file stay 6 months ago. Thank you.
有没有计划linux的版本呢?
iOS x8_64和arm64都不支持,请问以后会支持吗?
when use webcam and stop motion.
but landmark sway....
At the face with glass, the detecting rate is too lower than others. Could you have time to do some improvement.
.
Hi:
would you provide dll for multiple threads?
thanks
;
MBLBPDetectMultiScale_Multiview
MBLBPDetectSingleScale
MBLBPDetectMultiScale
H:\Yu\projects\facedetect-mblbp-updated\vs\Release\libfacedetect.pdb
So it is using "Multi-Block LBP" for face detection :-)
Hi shiyu,
Thanks for sharing your excellent works, and I noticed that your dll file is just about 10M,whereas the shape predicator in dlib is about 95M,so my question is that don't you need a shape predicator in your code? If so,can you explain how to do that in your porject?
当使用 JNA 调用时,由于头文件 __declspec(dllexport) 时没有 extern "C" 而导致无法调用 dll 的函数。
当定义了之后,如果没有 #define FACEDETECTDLL_EXPORTS 也会导致无法调用。
In the landmark detection, facial detection is based on facial landmark or, that is, face detection
it would be great if multi architecture libs are provided
Hi
is it possible to use libfacedetection to detect facial landmarks from a video file ?
This isn't very useful for non-Windows 32-bit users, and doesn't represent open source code since this is actually a binary release. Why would you not provide the code that you used to create the lib? For example, I don't use Windows and so I cannot use this library!
there's a .dll file in this project. ( for windows )
Is this code supports any other platforms?
like Linux / OS X / Android / iOS
请问能提供64位下的文件吗?
能否提供静态库版本或分享源码?
what type of mode is suitable for 'real-time' face detection?
I don't know which one is better for video
I compiled the example code using mingw and got this error:
obj\Release\main.o:main.cpp:(.text.startup+0x20d)||undefined reference to `_imp___Z18facedetect_frontalPhS_iiifiiii'|
I also convert .lib to .a with reimp, but It doesn't work.
What should I do? Thanks a lot!
你好, 这个检测方法真的非常好用,不过无意中我发现了一个内存泄漏的BUG。 当我用来在视频中检索人脸的时候,我测试的图像尺寸是352x192,没有问题。但是把原始图片截取小尺寸人脸目标(比如85x83)进行连续检测的时候,会发生内存泄漏的问题,而且比较明显。希望尽快看看
It's working great!
You are so appreciated if provide us with source files of the binary library for Unix.
Thanks
mac 跟linux下无法使用。不能跨品台。
such as title.
您好,谢谢您提供的这个库,非常有效!不过libfacedetect-x64.dll在新版Intel i3上的执行速度还是不够理想(有时候慢到34甚至50ms),所以请问老师您能分享一套用AVX指令集编译的版本吗?我自己测试的是AVX和AVX2速度基本一样,但都比标准指令集快很多,比 #26 (comment) 中提到的 SSE2 应该也能快一些。
Will you provide VS2013 64 bits version in the future?
When I try to run the exe, it tells missing VCOMP100.dll and other dlls.
32bit dll is ok
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.