wincle / npd Goto Github PK
View Code? Open in Web Editor NEWC++ implementation of Fast-and-Accurate-Unconstrained-Face-Detector
License: BSD 3-Clause "New" or "Revised" License
C++ implementation of Fast-and-Accurate-Unconstrained-Face-Detector
License: BSD 3-Clause "New" or "Revised" License
Hi,
I would like to transfer the Matlab Frontal.mat to binary file. Firstly I check the code of LoadModel in C++ file, but I didn't figure out how can I get the feaId variable in this line
fread(_feaId,sizeof(int),numBranchNodes,file);
代码中的 feaIds 是做什么用的
feaIds.push_back(feaId[i]); leftChilds.push_back(leftChild[i]); rightChilds.push_back(rightChild[i]); cutpoints.push_back(cutpoint[i << 1]);
opencv function Mat::eye is memory consumptive, when numCandidates is 200k, it will take away 200000*200000=40,000,000,000, nearly 40G memory.
Hi,
can you also provide a dump of the 72-stage model (model_frontal.mat) from the matlab code or the code you used to create your 1226model file?
Thanks!
Hello,my learned model is poor.How many neg images and hard neg images did you use and what is the ration of neg/pos?Which training parameters are be modified for your 620model?Thank you very much!
Hello there, I have already done make process and generated the demo file in the detection folder. However, I don't know how to operate NPD on a single image. Would you like to give an example about how to perform NPD on NPD/detection/1.jpg ?
LearnGAB.cpp line 276 and 278
int y0 = max(rects[idx].y - floor(3.0 * delta),0);
int x0 = max(rects[idx].x + floor(0.25 * delta),0);
why the y0 offset is 3 times of delta, but x is only 0.25 times of detla?
shouldn't the 3 become 0.3?
The negRatio is 0.5 means when loadding negative dataset we just load the half size of positive dataset. I used 24142 face images, acturlly 241420 for training,and the loaded neg size is 120710. The nNeg was declining. In LearnGAB.cpp, void GAB::MiningNeg(int n,DataSet& neg), the function can not mine more negs, so the program stucked when I trained 199 stages.
I am confused that should not negdataset much larger than posdataset generally? I tried to change the negRatio to 2 or 3 to load more negs, but run error. what's wrong?
楼主好,感谢您提供c++版本的代码。我在使用过程中发现检测速度特别慢,我的电脑配置为I5-6500 3.2GHz,内存8G,对640*480图片(只有一张脸)检测时间接近4.5s,我选择的最小人脸尺寸80,模型为620model,请问这样的速度是正常的吗?
As you mentioned 'Because the difference between matlab and OpenCV. You should also change the coefficient in detection/LearnGAB.cpp:276~279 to fit the model.' , if I keep the parameters as they are, i get a bit strange outputs. Do you have any hints how to set those parameters if I want to use the model trained from Matlab? Thanks.
框为32时无法检测出人脸;
框为24*24时,Nms函数崩溃:
int numCandidates = rects.size();
Mat predicate = Mat::eye(numCandidates,numCandidates,IPL_DEPTH_1U); //此处宽高超过31000会崩溃
宽高太大,也就是rects数目太多(调试时看到是6位数)
the variable FAR is the keyword of C language. I compiled it in vs and got errors.
btw, the training method in the paper is soft cascade , and your implemention is gentle adaboost?
is there any testing result?
Hi, @wincle ,
In data folder, I creat two file named FaceDB.txt and NonFaceDB.txt.Every thing is done.
when I run ./demo, it print:
[daniel@localhost NPD-c]$ ./train/demo
NPD
train: train a model ,if you already have, will resume it
and
[daniel@localhost NPD-c]$ ./train/demo train
Loading Pos data
段错误(吐核)
How to train the data? would you give some me help? Thank you.
您好,我按照这个工程跑FDDB数据一张图需要500ms左右,请问还有什么需要更改的吗
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.