├── CCCascadeClassifier.cpp ├── CCCascadeClassifier.h ├── FDImage.cpp ├── FDImage.h ├── NeuralNetWork.cpp ├── README.md ├── cnn.cpp ├── cnn.h ├── data ├── .DS_Store ├── cascadeClassifier.txt ├── outColor1.mp4 ├── outColor2.mp4 ├── resultMatrix.txt ├── zInput12 │ └── theanocnn.json ├── zInput20 │ └── theanocnn.json ├── zInput24 │ └── theanocnn.json ├── zInput40 │ ├── .DS_Store │ ├── theanocnn.json │ ├── 参数1 │ │ ├── .DS_Store │ │ └── theanocnn.json │ ├── 参数2 │ │ ├── .DS_Store │ │ └── theanocnn.json │ └── 参数3 │ │ ├── .DS_Store │ │ └── theanocnn.json └── zKernel20-50 │ └── theanocnn.json ├── featuremap.cpp ├── featuremap.h ├── head ├── .DS_Store ├── libopencv_calib3d.2.4.13.dylib ├── libopencv_calib3d.2.4.dylib ├── libopencv_calib3d.dylib ├── libopencv_contrib.2.4.13.dylib ├── libopencv_contrib.2.4.dylib ├── libopencv_contrib.dylib ├── libopencv_core.2.4.13.dylib ├── libopencv_core.2.4.dylib ├── libopencv_core.dylib ├── libopencv_features2d.2.4.13.dylib ├── libopencv_features2d.2.4.dylib ├── libopencv_features2d.dylib ├── libopencv_flann.2.4.13.dylib ├── libopencv_flann.2.4.dylib ├── libopencv_flann.dylib ├── libopencv_gpu.2.4.13.dylib ├── libopencv_gpu.2.4.dylib ├── libopencv_gpu.dylib ├── libopencv_highgui.2.4.13.dylib ├── libopencv_highgui.2.4.dylib ├── libopencv_highgui.dylib ├── libopencv_imgproc.2.4.13.dylib ├── libopencv_imgproc.2.4.dylib ├── libopencv_imgproc.dylib ├── libopencv_legacy.2.4.13.dylib ├── libopencv_legacy.2.4.dylib ├── libopencv_legacy.dylib ├── libopencv_ml.2.4.13.dylib ├── libopencv_ml.2.4.dylib ├── libopencv_ml.dylib ├── libopencv_nonfree.2.4.13.dylib ├── libopencv_nonfree.2.4.dylib ├── libopencv_nonfree.dylib ├── libopencv_objdetect.2.4.13.dylib ├── libopencv_objdetect.2.4.dylib ├── libopencv_objdetect.dylib ├── libopencv_ocl.2.4.13.dylib ├── libopencv_ocl.2.4.dylib ├── libopencv_ocl.dylib ├── libopencv_photo.2.4.13.dylib ├── libopencv_photo.2.4.dylib ├── libopencv_photo.dylib ├── libopencv_stitching.2.4.13.dylib ├── libopencv_stitching.2.4.dylib ├── libopencv_stitching.dylib ├── libopencv_superres.2.4.13.dylib ├── libopencv_superres.2.4.dylib ├── libopencv_superres.dylib ├── libopencv_ts.a ├── libopencv_video.2.4.13.dylib ├── libopencv_video.2.4.dylib ├── libopencv_video.dylib ├── libopencv_videostab.2.4.13.dylib ├── libopencv_videostab.2.4.dylib ├── libopencv_videostab.dylib ├── pkgconfig │ └── opencv.pc └── python2.7 │ └── site-packages │ ├── cv.py │ └── cv2.so ├── hiddenLayer.cpp ├── hiddenLayer.h ├── logisticRegression.cpp ├── logisticRegression.h ├── main.cpp ├── mlp.cpp ├── mlp.h ├── neuralNetwork.h ├── neuralbase.cpp ├── neuralbase.h ├── poollayer.cpp ├── poollayer.h ├── stdafx.cpp ├── stdafx.h ├── targetver.h ├── util.cpp └── util.h /CCCascadeClassifier.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | using namespace std; 9 | 10 | #include "FDImage.h" 11 | #include "CCCascadeClassifier.h" 12 | 13 | #include "mlp.h" 14 | #include "util.h" 15 | // #include "testinherit.h" 16 | #include "neuralNetwork.h" 17 | #include 18 | #include 19 | #include 20 | // 新版本写在下面文件中: 21 | #include 22 | //#include "opencv2/features2d/features2d.hpp" 23 | #include 24 | 25 | using namespace cv; 26 | 27 | #ifdef _DEBUG 28 | #define new DEBUG_NEW 29 | #undef THIS_FILE 30 | static char THIS_FILE[] = __FILE__; 31 | #endif 32 | 33 | CCCascadeClassifier::CCCascadeClassifier():count(0),indexBoosted(0) 34 | { 35 | // resultsGroup.resize(9); 36 | } 37 | 38 | CCCascadeClassifier::~CCCascadeClassifier() 39 | { 40 | Clear(); 41 | } 42 | 43 | void CCCascadeClassifier::Clear() 44 | { 45 | count = 0; 46 | } 47 | 48 | CCCascadeClassifier& CCCascadeClassifier::operator=(const CCCascadeClassifier& source) 49 | { 50 | Clear(); 51 | count = source.count; 52 | return *this; 53 | } 54 | 55 | void CCCascadeClassifier::DrawResults(FDImage& image, vector& results) const 56 | { 57 | int i; 58 | unsigned int k; 59 | int x1,x2,y1,y2; 60 | 61 | for(k=0;k=0)?results[k].y:0; 64 | y1 = (results[k].y=0)?results[k].y+results[k].height:0; 66 | y2 = (results[k].y+results[k].height=0)?results[k].x:0; 68 | x1 = (results[k].x=0)?results[k].x+results[k].width:0; 70 | x2 = (results[k].x+results[k].width& results) const 89 | { 90 | int i; 91 | unsigned int k; 92 | int x1,x2,y1,y2; 93 | 94 | for(k=0;k=0)?results[k].rect.y:0; 97 | y1 = (results[k].rect.y=0)?results[k].rect.y+results[k].rect.height:0; 99 | y2 = (results[k].rect.y+results[k].rect.height=0)?results[k].rect.x:0; 101 | x1 = (results[k].rect.x=0)?results[k].rect.x+results[k].rect.width:0; 103 | x2 = (results[k].rect.x+results[k].rect.width CCCascadeClassifier::FaceDetectWithRet_ScaleIamge(FDImage& original,const string filename) 153 | { 154 | int sx = 40; 155 | int sy = 40; 156 | 157 | ratio = 1.0; 158 | original.Resize(procface,ratio); 159 | results.clear(); 160 | 161 | // 步长 162 | // int stripSize = sx/5; 163 | int stripSize = 8; 164 | 165 | while((procface.height+1>sx+1) && (procface.width+1>sy+1)) 166 | { 167 | for(int i=0,size_x=procface.height+1-sx;i& result,const int combine_min) 260 | { 261 | vector res1; 262 | vector resmax; 263 | vector res2; 264 | bool yet; 265 | Rect rectInter,rectUnion; 266 | 267 | for(unsigned int i=0,size_i=result.size();i 0.6){ 276 | if((double)SizeOfRect(rectInter)/SizeOfRect(result_i) > 0.6 && 277 | (double)SizeOfRect(rectInter)/SizeOfRect(resmax_j) > 0.6 ){ 278 | Rect& res1_j = res1[j]; 279 | resmax_j= resmax_j | result_i; 280 | //int temp = res1_j.y; 281 | res1_j.y += result_i.y; 282 | //res1_j.height = res1_j.height + temp + result_i.height + result_i.y - res1_j.y; 283 | res1_j.height += result_i.height; 284 | //int tmp = res1_j.x; 285 | res1_j.x += result_i.x; 286 | //res1_j.width = res1_j.width + tmp + result_i.width + result_i.x - res1_j.x; 287 | res1_j.width += result_i.width; 288 | res2[j]++; 289 | yet = true; 290 | break; 291 | } 292 | } 293 | } 294 | if(yet==false){ 295 | res1.push_back(result_i); 296 | resmax.push_back(result_i); 297 | res2.push_back(1); 298 | } 299 | } 300 | 301 | for(unsigned int i=0,size=res1.size();i result1,result2;vector res3,res4; 315 | for(int i=0,size=res1.size();icombine_min){ 317 | result2.push_back(res1[i]); 318 | res4.push_back(res2[i]); 319 | } 320 | } 321 | 322 | bool bcan; 323 | while(true){ 324 | bcan = false; 325 | vector toDel; 326 | result1.clear();result1 = result2; 327 | res3.clear();res3 = res4; 328 | for(int i=0,size_i=result1.size();i 1 || s2/s1 > 1 || areaInter/areaI > 0.6 || areaInter/areaJ > 0.6){ 346 | if(res3[i] > res3[j]) 347 | toDel[j] = 0; 348 | else 349 | toDel[i] = 0; 350 | bcan = true; 351 | } 352 | } 353 | } 354 | } 355 | if(bcan == false) 356 | break; 357 | result2.clear();res4.clear(); 358 | for(unsigned int i=0,size=result1.size();i& srcRects, 371 | std::vector& resRects, 372 | float thresh 373 | ) 374 | { 375 | resRects.clear(); 376 | 377 | const size_t size = srcRects.size(); 378 | if (!size) 379 | { 380 | return; 381 | } 382 | 383 | // Sort the bounding boxes by the bottom - right y - coordinate of the bounding box 384 | std::multimap idxs; 385 | for (size_t i = 0; i < size; ++i) 386 | { 387 | idxs.insert(std::pair(srcRects[i].br().y, i)); 388 | } 389 | 390 | // keep looping while some indexes still remain in the indexes list 391 | while (idxs.size() > 0) 392 | { 393 | // grab the last rectangle 394 | auto lastElem = --std::end(idxs); 395 | const cv::Rect& rect1 = srcRects[lastElem->second]; 396 | 397 | resRects.push_back(rect1); 398 | 399 | idxs.erase(lastElem); 400 | 401 | for (auto pos = std::begin(idxs); pos != std::end(idxs); ) 402 | { 403 | // grab the current rectangle 404 | const cv::Rect& rect2 = srcRects[pos->second]; 405 | 406 | float intArea = (rect1 & rect2).area(); 407 | float unionArea = rect1.area() + rect2.area() - intArea; 408 | float overlap = intArea / unionArea; 409 | 410 | // if there is sufficient overlap, suppress the current bounding box 411 | if (overlap > thresh) 412 | { 413 | pos = idxs.erase(pos); 414 | } 415 | else 416 | { 417 | ++pos; 418 | } 419 | } 420 | } 421 | } 422 | -------------------------------------------------------------------------------- /CCCascadeClassifier.h: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | #include 5 | // 新版本写在下面文件中: 6 | #include 7 | //#include "opencv2/features2d/features2d.hpp" 8 | #include 9 | 10 | #include 11 | using namespace std; 12 | using namespace cv; 13 | 14 | class FDImage; 15 | 16 | struct rectScore{ 17 | Rect rect; 18 | float score; 19 | }; 20 | 21 | 22 | struct CCCascadeClassifier 23 | { 24 | int count; 25 | int indexBoosted; 26 | CCCascadeClassifier(); 27 | ~CCCascadeClassifier(); 28 | void Clear(void); 29 | CCCascadeClassifier& operator=(const CCCascadeClassifier& source); 30 | 31 | vector FaceDetectWithRet_ScaleIamge(FDImage& original,const string filename); 32 | 33 | void DrawResults(FDImage& image, vector& results) const; 34 | void DrawResults2(FDImage& image, const vector& results) const; 35 | void PostProcess(vector& result, const int combine_min); 36 | void nms( 37 | const std::vector& srcRects, 38 | std::vector& resRects, 39 | float thresh 40 | ); 41 | 42 | 43 | 44 | double Expression_Recognition(FDImage& original,const string filename); 45 | 46 | void getInputData(FDImage &im,double* data,int x,int y,int rh,int rw, REAL ratio); 47 | 48 | FDImage procface; 49 | double value; 50 | double data40[1600]; 51 | double data24[576]; 52 | double data20[400]; 53 | double T_time; 54 | Rect rect; 55 | REAL ratio; 56 | vector results; 57 | vector res; 58 | FDImage image; 59 | Rect rect40; 60 | }; 61 | 62 | -------------------------------------------------------------------------------- /FDImage.cpp: -------------------------------------------------------------------------------- 1 | 2 | #pragma comment(lib, "vfw32.lib ") 3 | #pragma comment (lib , "comctl32.lib") 4 | 5 | #include 6 | #include 7 | #include 8 | // 新版本写在下面文件中: 9 | #include 10 | //#include "opencv2/features2d/features2d.hpp" 11 | #include 12 | #include 13 | #include 14 | using namespace std; 15 | 16 | #include "FDImage.h" 17 | #include "CCCascadeClassifier.h" 18 | 19 | #ifdef _DEBUG 20 | #define new DEBUG_NEW 21 | #undef THIS_FILE 22 | static char THIS_FILE[] = __FILE__; 23 | #endif 24 | 25 | FDImage::FDImage():height(0),width(0),data(NULL),label(-1),variance(0.0) 26 | { 27 | for(int i=0;i 0); 88 | assert(source.width > 0); 89 | if(&source == this) return; 90 | SetSize(cvSize(source.height,source.width)); 91 | label = source.label; 92 | memcpy(buf,source.buf,sizeof(REAL)*height*width); 93 | } 94 | 95 | void FDImage::Load(IplImage* temp) 96 | { 97 | img = temp; 98 | SetSize(cvSize(img->height,img->width)); 99 | for(int i=0,ih=img->height,iw=img->width;i(img->imageData+img->widthStep*i); 103 | for(int j=0;j= 0); assert(size.width >= 0); 113 | //Clear(); 114 | height = size.height; width = size.width; 115 | buf = new REAL[height*width]; assert(buf != NULL); 116 | data = new REAL*[height]; assert(data != NULL); 117 | for(int i=0;i=1, take care. 147 | if (x0 == width-1) x0--; 148 | if (y0 == height-1) y0--; 149 | 150 | x = x - x0; y = y - y0; 151 | 152 | fx0 = data[y0][x0] + x*(data[y0][x0+1]-data[y0][x0]); 153 | fx1 = data[y0+1][x0] + x*(data[y0+1][x0+1]-data[y0+1][x0]); 154 | 155 | result.data[i][j] = fx0 + y*(fx1-fx0); 156 | } 157 | } 158 | 159 | void FDImage::CutToLxL(FDImage &result, CvRect rect, int iL) const 160 | { 161 | CvSize dst_cvsize; IplImage* pdst = 0; 162 | dst_cvsize.width = iL; //ƒø±ÍÕºœÒøÌ∂» 163 | dst_cvsize.height = iL; //ƒø±ÍÕºœÒ∏fl∂» 164 | pdst = cvCreateImage(dst_cvsize, IPL_DEPTH_8U, 1); 165 | 166 | // Ω´ƒ⁄¥Ê÷–µƒÕº∆¨ –¥µΩ opencv Ω·ππµƒÕº∆¨÷– 167 | IplImage* tsimg; 168 | tsimg = cvCreateImage(cvSize(width,height),IPL_DEPTH_8U,1); 169 | for(int i=0,ih=tsimg->height,iw=tsimg->width;i(tsimg->imageData+tsimg->widthStep*i); 173 | for(int j=0;jheight,pdst->width)); 185 | for(int i=0,ih=pdst->height,iw=pdst->width;i(pdst->imageData+pdst->widthStep*i); 189 | for(int j=0;jheight,iw=tsimg->width;i(tsimg->imageData+tsimg->widthStep*i); 210 | for(int j=0;jheight,pdst->width)); 217 | for(int i=0,ih=pdst->height,iw=pdst->width;i(pdst->imageData+pdst->widthStep*i); 221 | for(int j=0;j 11 | #include 12 | #include 13 | // 新版本写在下面文件中: 14 | #include 15 | //#include "opencv2/features2d/features2d.hpp" 16 | #include 17 | 18 | class FDImage 19 | { 20 | public: 21 | FDImage(); 22 | ~FDImage(); 23 | 24 | void Clear(void); 25 | void SetSize(const CvSize size); 26 | FDImage& operator=(const FDImage& source); 27 | void Resize(FDImage &result, REAL ratio) const; 28 | void Resize240x40(FDImage &result) const; 29 | void CutToLxL(FDImage &result, CvRect rect, int iL) const; 30 | void Copy(const FDImage& source); 31 | void Load(IplImage* img); 32 | void cleartmp(); 33 | 34 | public: 35 | int height; // height, or, number of rows of the image 36 | int width; // width, or, number of columns of the image 37 | REAL** data; // auxiliary pointers to accelerate the read/write of the image 38 | // no memory is really allocated, use memory in (buf) 39 | // data[i][j] is a pixel's gray value in (i)th row and (j)th column 40 | REAL* buf; // pointer to a block of continuous memory containing the image 41 | int label; 42 | REAL variance; 43 | 44 | // SIFT 45 | //Mat 46 | 47 | IplImage* img; 48 | }; 49 | -------------------------------------------------------------------------------- /NeuralNetWork.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MachineLP/cnn_faceDetection/10872c30492c6dd23b713003197f378c7df68b65/NeuralNetWork.cpp -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | 公众号MachineLN,邀请您扫码关注: 3 | 4 | ![image](http://upload-images.jianshu.io/upload_images/4618424-3ef1722341ba72d2?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 5 | 6 | 7 | **机器学习进阶系列:(下面内容在微信公众号同步)** 8 | 9 | 1. [机器学习-1:MachineLN之三要素](http://blog.csdn.net/u014365862/article/details/78955063) 10 | 11 | 2. [机器学习-2:MachineLN之模型评估](http://blog.csdn.net/u014365862/article/details/78959353) 12 | 13 | 3. [机器学习-3:MachineLN之dl](http://blog.csdn.net/u014365862/article/details/78980142) 14 | 15 | 4. [机器学习-4:DeepLN之CNN解析](http://blog.csdn.net/u014365862/article/details/78986089) 16 | 17 | 5. [机器学习-5:DeepLN之CNN权重更新(笔记)](http://blog.csdn.net/u014365862/article/details/78959211) 18 | 19 | 6. [机器学习-6:DeepLN之CNN源码](http://blog.csdn.net/u014365862/article/details/79010248) 20 | 21 | 7. [机器学习-7:MachineLN之激活函数](http://blog.csdn.net/u014365862/article/details/79007801) 22 | 23 | 8. [机器学习-8:DeepLN之BN](http://blog.csdn.net/u014365862/article/details/79019518) 24 | 25 | 9. [机器学习-9:MachineLN之数据归一化](http://blog.csdn.net/u014365862/article/details/79031089) 26 | 27 | 10. [机器学习-10:MachineLN之样本不均衡](http://blog.csdn.net/u014365862/article/details/79040390) 28 | 29 | 11. [机器学习-11:MachineLN之过拟合](http://blog.csdn.net/u014365862/article/details/79057073) 30 | 31 | 12. [机器学习-12:MachineLN之优化算法](http://blog.csdn.net/u014365862/article/details/79070721) 32 | 33 | 13. [机器学习-13:MachineLN之kNN](http://blog.csdn.net/u014365862/article/details/79091913) 34 | 35 | 14. [机器学习-14:MachineLN之kNN源码](http://blog.csdn.net/u014365862/article/details/79101209) 36 | 37 | 15. [](http://mp.blog.csdn.net/postedit/79135612)[机器学习-15:MachineLN之感知机](http://blog.csdn.net/u014365862/article/details/79135612) 38 | 39 | 16. [机器学习-16:MachineLN之感知机源码](http://blog.csdn.net/u014365862/article/details/79135767) 40 | 41 | 17. [机器学习-17:MachineLN之逻辑回归](http://blog.csdn.net/u014365862/article/details/79157777) 42 | 43 | 18. [机器学习-18:MachineLN之逻辑回归源码](http://blog.csdn.net/u014365862/article/details/79157841) 44 | 45 | 19. [机器学习-19:MachineLN之SVM(1)](http://blog.csdn.net/u014365862/article/details/79184858) 46 | 47 | 20. [机器学习-20:MachineLN之SVM(2)](http://blog.csdn.net/u014365862/article/details/79202089) 48 | 49 | 21. [机器学习-21:MachineLN之SVM源码](http://blog.csdn.net/u014365862/article/details/79224119) 50 | 51 | 22. [机器学习-22:MachineLN之RL](http://blog.csdn.net/u014365862/article/details/79240997) 52 | 53 | **人脸检测系列:** 54 | 55 | 1. [人脸检测——AFLW准备人脸](http://blog.csdn.net/u014365862/article/details/74682464) 56 | 57 | 2. [人脸检测——生成矫正人脸——cascade cnn的思想, 但是mtcnn的效果貌似更赞](http://blog.csdn.net/u014365862/article/details/74690865) 58 | 59 | 3. [人脸检测——准备非人脸](http://blog.csdn.net/u014365862/article/details/74719498) 60 | 61 | 4. [人脸检测——矫正人脸生成标签](http://blog.csdn.net/u014365862/article/details/74853099) 62 | 63 | 5. [人脸检测——mtcnn思想,生成negative、positive、part样本。](http://blog.csdn.net/u014365862/article/details/78051411) 64 | 65 | 6. [**人脸检测——滑动窗口篇(训练和实现)**](http://blog.csdn.net/u014365862/article/details/77816493) 66 | 67 | 7. [**人脸检测——fcn**](http://blog.csdn.net/u014365862/article/details/78036382) 68 | 69 | 8. [简单的人脸跟踪](http://blog.csdn.net/u014365862/article/details/77989896) 70 | 71 | 9. [Face Detection(OpenCV) Using Hadoop Streaming API](http://blog.csdn.net/u014365862/article/details/78173740) 72 | 73 | 10. [Face Recognition(face_recognition) Using Hadoop Streaming API](http://blog.csdn.net/u014365862/article/details/78175803) 74 | 75 | 11. [非极大值抑制(Non-Maximum-Suppression)](http://blog.csdn.net/u014365862/article/details/53376516) 76 | 77 | **OCR系列:** 78 | 79 | **1. [tf20: CNN—识别字符验证码](http://blog.csdn.net/u014365862/article/details/53869816)** 80 | 81 | 2. [**身份证识别——生成身份证号和汉字**](http://blog.csdn.net/u014365862/article/details/78581949) 82 | 83 | 3. [**tf21: 身份证识别——识别身份证号**](http://blog.csdn.net/u014365862/article/details/78582128) 84 | 85 | 4. **[tf22: ocr识别——不定长数字串识别](http://blog.csdn.net/u014365862/article/details/78582417)** 86 | 87 | **机器学习,深度学习系列:** 88 | 89 | 1. [反向传播与它的直观理解](http://blog.csdn.net/u014365862/article/details/54728707) 90 | 91 | 2. [卷积神经网络(CNN):从原理到实现](http://blog.csdn.net/u014365862/article/details/54865609) 92 | 93 | 3. [机器学习算法应用中常用技巧-1](http://blog.csdn.net/u014365862/article/details/54890040) 94 | 95 | 4. [机器学习算法应用中常用技巧-2](http://blog.csdn.net/u014365862/article/details/54890046) 96 | 97 | 5. [一个隐马尔科夫模型的应用实例:中文分词](http://blog.csdn.net/u014365862/article/details/54891582) 98 | 99 | 6. [**Pandas处理csv表格**](http://blog.csdn.net/u014365862/article/details/54923429) 100 | 101 | 7. [sklearn查看数据分布](http://blog.csdn.net/u014365862/article/details/54973495) 102 | 103 | 8. [TensorFlow 聊天机器人](http://blog.csdn.net/u014365862/article/details/57518873) 104 | 105 | 9. [YOLO](http://blog.csdn.net/u014365862/article/details/60321879) 106 | 107 | 10. [感知机--模型与策略](http://blog.csdn.net/u014365862/article/details/61413859) 108 | 109 | 11. [从 0 到 1 走进 Kaggle](http://blog.csdn.net/u014365862/article/details/72794198) 110 | 111 | 12. [python调用Face++,玩坏了!](http://blog.csdn.net/u014365862/article/details/74149097) 112 | 113 | 13. [人脸识别keras实现教程](http://blog.csdn.net/u014365862/article/details/74332028) 114 | 115 | 14. [机器学习中的Bias(偏差),Error(误差),和Variance(方差)有什么区别和联系?](http://blog.csdn.net/u014365862/article/details/76360351) 116 | 117 | 15. [CNN—pooling层的作用](http://blog.csdn.net/u014365862/article/details/77159143) 118 | 119 | 16. [trick—Batch Normalization](http://blog.csdn.net/u014365862/article/details/77159778) 120 | 121 | 17. [**tensorflow使用BN—Batch Normalization**](http://blog.csdn.net/u014365862/article/details/77188011) 122 | 123 | 18. [trick—Data Augmentation](http://blog.csdn.net/u014365862/article/details/77193754) 124 | 125 | 19. [CNN图图图](http://blog.csdn.net/u014365862/article/details/77367172) 126 | 127 | 20. [为什么很多做人脸的Paper会最后加入一个Local Connected Conv?](http://blog.csdn.net/u014365862/article/details/77795902) 128 | 129 | 21. [**Faster RCNN:RPN,anchor,sliding windows**](http://blog.csdn.net/u014365862/article/details/77887230) 130 | 131 | 22. [**深度学习这些坑你都遇到过吗?**](http://blog.csdn.net/u014365862/article/details/77961624) 132 | 133 | 23. [**image——Data Augmentation的代码**](http://blog.csdn.net/u014365862/article/details/78086604) 134 | 135 | 24. [8种常见机器学习算法比较](http://blog.csdn.net/u014365862/article/details/52937983) 136 | 137 | 25. [几种常见的激活函数](http://blog.csdn.net/u014365862/article/details/52710698) 138 | 139 | 26. [**Building powerful image classification models using very little data**](http://blog.csdn.net/u014365862/article/details/78519629) 140 | 141 | 27. [**机器学习模型训练时候tricks**](http://blog.csdn.net/u014365862/article/details/78519727) 142 | 143 | 28. [OCR综述](https://handong1587.github.io/deep_learning/2015/10/09/ocr.html#handwritten-recognition) 144 | 145 | 29. [一个有趣的周报](http://blog.csdn.net/u014365862/article/details/78757109) 146 | 147 | 30. [根据已给字符数据,训练逻辑回归、随机森林、SVM,生成ROC和箱线图](http://blog.csdn.net/u014365862/article/details/78835541) 148 | 149 | **图像处理系列:** 150 | 151 | 1. [python下使用cv2.drawContours填充轮廓颜色](http://blog.csdn.net/u014365862/article/details/77720368) 152 | 153 | 2. [imge stitching图像拼接stitching](http://blog.csdn.net/u014365862/article/details/53433048) 154 | 155 | 3. [用python简单处理图片(1):打开\显示\保存图像](http://blog.csdn.net/u014365862/article/details/52652256) 156 | 157 | 4. [用python简单处理图片(2):图像通道\几何变换\裁剪](http://blog.csdn.net/u014365862/article/details/52652273) 158 | 159 | 5. [用python简单处理图片(3):添加水印](http://blog.csdn.net/u014365862/article/details/52652296) 160 | 161 | 6. [用python简单处理图片(4):图像中的像素访问](http://blog.csdn.net/u014365862/article/details/52652300) 162 | 163 | 7. [用python简单处理图片(5):图像直方图](http://blog.csdn.net/u014365862/article/details/52652309) 164 | 165 | 8. [**仿射变换,透视变换:二维坐标到二维坐标之间的线性变换,可用于landmark人脸矫正。**](http://blog.csdn.net/u014365862/article/details/78678872) 166 | 167 | **代码整合系列:** 168 | 169 | 1. [windows下C++如何调用matlab程序](http://blog.csdn.net/u014365862/article/details/77480325) 170 | 171 | 2. [ubuntu下C++如何调用matlab程序](http://blog.csdn.net/u014365862/article/details/77529096) 172 | 173 | 3. [matlab使用TCP/IP Server Sockets](http://blog.csdn.net/u014365862/article/details/77745476) 174 | 175 | 4. [ubuntu下C++如何调用python程序,gdb调试C++代码](http://blog.csdn.net/u014365862/article/details/77864743) 176 | 177 | 5. [How to pass an array from C++ to an embedded python](http://blog.csdn.net/u014365862/article/details/77891487) 178 | 179 | 6. [如何使用Python为Hadoop编写一个简单的MapReduce程序](http://blog.csdn.net/u014365862/article/details/78169554) 180 | 181 | 7. [图像的遍历](http://blog.csdn.net/u014365862/article/details/53513710) 182 | 183 | 8. [**ubuntu下CMake编译生成动态库和静态库,以OpenTLD为例。**](http://blog.csdn.net/u014365862/article/details/78663269) 184 | 185 | 9. [**ubuntu下make编译生成动态库,然后python调用cpp。**](http://blog.csdn.net/u014365862/article/details/78675033) 186 | 187 | **数据结构和算法系列:** 188 | 189 | 1. [堆排序](http://blog.csdn.net/u014365862/article/details/78200711) 190 | 191 | 2. [red and black (深度优先搜索算法dfs)](http://blog.csdn.net/u014365862/article/details/48781603) 192 | 193 | 3. [深度优先搜索算法](http://blog.csdn.net/u014365862/article/details/48729681) 194 | 195 | 4. [qsort原理和实现](http://blog.csdn.net/u014365862/article/details/48688457) 196 | 197 | 5. [stack实现queue ; list实现stack](http://blog.csdn.net/u014365862/article/details/48594323) 198 | 199 | 6. [另一种斐波那契数列](http://blog.csdn.net/u014365862/article/details/48573545) 200 | 201 | 7. [堆和栈的区别(个人感觉挺不错的)](http://blog.csdn.net/u014365862/article/details/49159499) 202 | 203 | 8. [排序方法比较](http://blog.csdn.net/u014365862/article/details/52502824) 204 | 205 | 9. [漫画 :什么是红黑树?](https://mp.weixin.qq.com/s/JJVbi7kqDpLUuh696J7oLg) 206 | 207 | 10. [牛客网刷题](https://www.nowcoder.com/activity/oj) 208 | 209 | 11. [莫烦python 666](https://morvanzhou.github.io/) 210 | 211 | **kinect 系列:** 212 | 213 | 1. [Kinect v2.0原理介绍之一:硬件结构](http://blog.csdn.net/u014365862/article/details/46713807) 214 | 215 | 2. [Kinect v2.0原理介绍之二:6种数据源](http://blog.csdn.net/u014365862/article/details/46849253) 216 | 217 | 3. [Kinect v2.0原理介绍之三:骨骼跟踪的原理](http://blog.csdn.net/u014365862/article/details/46849309) 218 | 219 | 4. [Kinect v2.0原理介绍之四:人脸跟踪探讨](http://blog.csdn.net/u014365862/article/details/46849357) 220 | 221 | 5. [Kinect v2.0原理介绍之五:只检测离kinect最近的人脸](http://blog.csdn.net/u014365862/article/details/47809401) 222 | 223 | 6. [Kinect v2.0原理介绍之六:Kinect深度图与彩色图的坐标校准](http://blog.csdn.net/u014365862/article/details/48212085) 224 | 225 | 7. [Kinect v2.0原理介绍之七:彩色帧获取](http://blog.csdn.net/u014365862/article/details/48212377) 226 | 227 | 8. [Kinect v2.0原理介绍之八:高清面部帧(1) FACS 介绍](http://blog.csdn.net/u014365862/article/details/48212631) 228 | 229 | 9. [Kinect v2.0原理介绍之九:高清面部帧(2) 面部特征对齐](http://blog.csdn.net/u014365862/article/details/48212757) 230 | 231 | 10. [Kinect v2.0原理介绍之十:获取高清面部帧的AU单元特征保存到文件](http://blog.csdn.net/u014365862/article/details/48780361) 232 | 233 | 11. [kinect v2.0原理介绍之十一:录制视频](http://blog.csdn.net/u014365862/article/details/77929405) 234 | 235 | 12. [Kinect v2.0原理介绍之十二:音频获取](http://blog.csdn.net/u014365862/article/details/49204931) 236 | 237 | 13. [Kinect v2.0原理介绍之十三:面部帧获取](http://blog.csdn.net/u014365862/article/details/50434088) 238 | 239 | 14. [Kinect for Windows V2和V1对比开发___彩色数据获取并用OpenCV2.4.10显示](http://blog.csdn.net/u014365862/article/details/48948861) 240 | 241 | 15. [Kinect for Windows V2和V1对比开发___骨骼数据获取并用OpenCV2.4.10显示](http://blog.csdn.net/u014365862/article/details/48949055) 242 | 243 | 16. [用kinect录视频库](http://blog.csdn.net/u014365862/article/details/48946543) 244 | 245 | **tensorflow系列:** 246 | 247 | 1. [](http://blog.csdn.net/u014365862/article/details/78422315)[Ubuntu 16.04 安装 Tensorflow(GPU支持)](http://blog.csdn.net/u014365862/article/details/53868411) 248 | 249 | 2. [使用Python实现神经网络](http://blog.csdn.net/u014365862/article/details/53868414) 250 | 251 | 3. [tf1: nn实现评论分类](http://blog.csdn.net/u014365862/article/details/53868418) 252 | 253 | 4. [tf2: nn和cnn实现评论分类](http://blog.csdn.net/u014365862/article/details/53868422) 254 | 255 | 5. [tf3: RNN—mnist识别](http://blog.csdn.net/u014365862/article/details/53868425) 256 | 257 | 6. [tf4: CNN—mnist识别](http://blog.csdn.net/u014365862/article/details/53868430) 258 | 259 | 7\.  [tf5: Deep Q Network—AI游戏](http://blog.csdn.net/u014365862/article/details/53868436) 260 | 261 | 8. [tf6: autoencoder—WiFi指纹的室内定位](http://blog.csdn.net/u014365862/article/details/53868533) 262 | 263 | 9. [tf7: RNN—古诗词](http://blog.csdn.net/u014365862/article/details/53868544) 264 | 265 | 10. [tf8:RNN—生成音乐](http://blog.csdn.net/u014365862/article/details/53868549) 266 | 267 | 11. [tf9: PixelCNN](http://blog.csdn.net/u014365862/article/details/53868557) 268 | 269 | 12. [tf10: 谷歌Deep Dream](http://blog.csdn.net/u014365862/article/details/53868560) 270 | 271 | 13. [tf11: retrain谷歌Inception模型](http://blog.csdn.net/u014365862/article/details/53868568) 272 | 273 | 14. [tf12: 判断男声女声](http://blog.csdn.net/u014365862/article/details/54600398) 274 | 275 | 15. [tf13: 简单聊天机器人](http://blog.csdn.net/u014365862/article/details/53869660) 276 | 277 | 16. [tf14: 黑白图像上色](http://blog.csdn.net/u014365862/article/details/53869682) 278 | 279 | 17. [tf15: 中文语音识别](http://blog.csdn.net/u014365862/article/details/53869701) 280 | 281 | 18. [tf16: 脸部特征识别性别和年龄](http://blog.csdn.net/u014365862/article/details/53869712) 282 | 283 | 19. [tf17: “声音大挪移”](http://blog.csdn.net/u014365862/article/details/53869724) 284 | 285 | 20. [tf18: 根据姓名判断性别](http://blog.csdn.net/u014365862/article/details/53869732) 286 | 287 | 21\.  [tf19: 预测铁路客运量](http://blog.csdn.net/u014365862/article/details/53869802) 288 | 289 | 22. [**tf20: CNN—识别字符验证码**](http://blog.csdn.net/u014365862/article/details/53869816) 290 | 291 | 23. [tf21: 身份证识别——识别身份证号](http://blog.csdn.net/u014365862/article/details/78582128) 292 | 293 | 24. [](http://blog.csdn.net/u014365862/article/details/78582417)[tf22: ocr识别——不定长数字串识别](http://blog.csdn.net/u014365862/article/details/78582417) 294 | 295 | 25. [tf23: “恶作剧” --人脸检测](http://blog.csdn.net/u014365862/article/details/53978811) 296 | 297 | 26. [tf24: GANs—生成明星脸](http://blog.csdn.net/u014365862/article/details/54380277) 298 | 299 | 27. [](http://blog.csdn.net/u014365862/article/details/54706771)[tf25: 使用深度学习做阅读理解+完形填空](http://blog.csdn.net/u014365862/article/details/54428325) 300 | 301 | 28. [tf26: AI操盘手](http://blog.csdn.net/u014365862/article/details/54706771) 302 | 303 | 29. [tensorflow_cookbook--preface](http://blog.csdn.net/u014365862/article/details/70837573) 304 | 305 | 30. [01 TensorFlow入门(1)](http://blog.csdn.net/u014365862/article/details/70837638) 306 | 307 | 31. [01 TensorFlow入门(2)](http://blog.csdn.net/u014365862/article/details/70849334) 308 | 309 | 32. [02 The TensorFlow Way(1)](http://blog.csdn.net/u014365862/article/details/70884624) 310 | 311 | 33. [02 The TensorFlow Way(2)](http://blog.csdn.net/u014365862/article/details/70887213) 312 | 313 | 34. [02 The TensorFlow Way(3)](http://blog.csdn.net/u014365862/article/details/71038528) 314 | 315 | 35. [03 Linear Regression](http://blog.csdn.net/u014365862/article/details/71064855) 316 | 317 | 36. [04 Support Vector Machines](http://blog.csdn.net/u014365862/article/details/71078010) 318 | 319 | 37. [tf API 研读1:tf.nn,tf.layers, tf.contrib概述](http://blog.csdn.net/u014365862/article/details/77833481) 320 | 321 | 38. [tf API 研读2:math](http://blog.csdn.net/u014365862/article/details/77847410) 322 | 323 | 39. [tensorflow中的上采样(unpool)和反卷积(conv2d_transpose)](http://blog.csdn.net/u014365862/article/details/77936259) 324 | 325 | 40. [tf API 研读3:Building Graphs](http://blog.csdn.net/u014365862/article/details/77944301) 326 | 327 | 41. [tf API 研读4:Inputs and Readers](http://blog.csdn.net/u014365862/article/details/77946268) 328 | 329 | 42. [](http://blog.csdn.net/u014365862/article/details/77967231)[tf API 研读5:Data IO](http://blog.csdn.net/u014365862/article/details/77967231) 330 | 331 | 43. [tf API 研读6:Running Graphs](http://blog.csdn.net/u014365862/article/details/77967995) 332 | 333 | 44. [**tf.contrib.rnn.static_rnn与tf.nn.dynamic_rnn区别**](http://blog.csdn.net/u014365862/article/details/78238807) 334 | 335 | 45. [**Tensorflow使用的预训练的resnet_v2_50,resnet_v2_101,resnet_v2_152等模型预测,训练**](http://blog.csdn.net/u014365862/article/details/78272811) 336 | 337 | 46. [**tensorflow下设置使用某一块GPU、多GPU、CPU的情况**](http://blog.csdn.net/u014365862/article/details/78292475) 338 | 339 | 47. [**工业器件检测和识别**](http://blog.csdn.net/u014365862/article/details/78359194) 340 | 341 | 48. [**将tf训练的权重保存为CKPT,PB ,CKPT 转换成 PB格式。并将权重固化到图里面,并使用该模型进行预测**](http://blog.csdn.net/u014365862/article/details/78404980) 342 | 343 | 49. **[tensorsor快速获取所有变量,和快速计算L2范数](http://blog.csdn.net/u014365862/article/details/78422315)** 344 | 345 | 50. [**cnn+rnn+attention**](http://blog.csdn.net/u014365862/article/details/78495870) 346 | 347 | 51. [Tensorflow实战学习笔记](https://github.com/MachineLP/Tensorflow-) 348 | 349 | 52. [tf27: Deep Dream—应用到视频](http://blog.csdn.net/u014365862/article/details/53869830) 350 | 351 | 53. [tf28: 手写汉字识别](http://blog.csdn.net/u014365862/article/details/53869837) 352 | 353 | 54. [tf29: 使用tensorboard可视化inception_v4](http://blog.csdn.net/u014365862/article/details/79115556) 354 | 355 | 55. [tf30: center loss及其mnist上的应用](http://blog.csdn.net/u014365862/article/details/79184966) 356 | 357 | 56. [tf31: keras的LSTM腾讯人数在线预测](http://blog.csdn.net/u014365862/article/details/79186993) 358 | 359 | 57. [tf32: 一个简单的cnn模型:人脸特征点训练](http://blog.csdn.net/u014365862/article/details/79187157) 360 | 361 | 58. [tf33: 图片降噪:卷积自编码](http://blog.csdn.net/u014365862/article/details/79246179) 362 | 363 | **C++系列:** 364 | 365 | 1. [c++ primer之const限定符](http://blog.csdn.net/u014365862/article/details/46848613) 366 | 367 | 2. [c++primer之auto类型说明符](http://blog.csdn.net/u014365862/article/details/46849697) 368 | 369 | 3. [c++primer之预处理器](http://blog.csdn.net/u014365862/article/details/46853869) 370 | 371 | 4. [c++primer之string](http://blog.csdn.net/u014365862/article/details/46860037) 372 | 373 | 5. [c++primer之vector](http://blog.csdn.net/u014365862/article/details/46885087) 374 | 375 | 6. [c++primer之多维数组](http://blog.csdn.net/u014365862/article/details/46933199) 376 | 377 | 7. [c++primer之范围for循环](http://blog.csdn.net/u014365862/article/details/47706255) 378 | 379 | 8. [c++primer之运算符优先级表](http://blog.csdn.net/u014365862/article/details/47706423) 380 | 381 | 9. [c++primer之try语句块和异常处理](http://blog.csdn.net/u014365862/article/details/47707669) 382 | 383 | 10. [c++primer之函数(函数基础和参数传递)](http://blog.csdn.net/u014365862/article/details/47783193) 384 | 385 | 11. [c++primer之函数(返回类型和return语句)](http://blog.csdn.net/u014365862/article/details/47808711) 386 | 387 | 12. [c++primer之函数重载](http://blog.csdn.net/u014365862/article/details/47834667) 388 | 389 | 13. [c++重写卷积网络的前向计算过程,完美复现theano的测试结果](http://blog.csdn.net/u014365862/article/details/48010697) 390 | 391 | 14. [c++ primer之类](http://blog.csdn.net/u014365862/article/details/48165685) 392 | 393 | 15. [c++primer之类(构造函数再探)](http://blog.csdn.net/u014365862/article/details/48198595) 394 | 395 | 16. [c++primer之类(类的静态成员)](http://blog.csdn.net/u014365862/article/details/48199161) 396 | 397 | 17. [c++primer之顺序容器(容器库概览)](http://blog.csdn.net/u014365862/article/details/48209805) 398 | 399 | 18. [c++primer之顺序容器(添加元素)](http://blog.csdn.net/u014365862/article/details/48226673) 400 | 401 | 19. [c++primer之顺序容器(访问元素)](http://blog.csdn.net/u014365862/article/details/48230053) 402 | 403 | **OpenCV系列:** 404 | 405 | 1. [自己训练SVM分类器,进行HOG行人检测。](http://blog.csdn.net/u014365862/article/details/53243604) 406 | 407 | 2. [opencv-haar-classifier-training](http://blog.csdn.net/u014365862/article/details/53096367) 408 | 409 | 3. [vehicleDectection with Haar Cascades](http://blog.csdn.net/u014365862/article/details/53087675) 410 | 411 | 4. [LaneDetection](http://blog.csdn.net/u014365862/article/details/53083143) 412 | 413 | 5. [OpenCV学习笔记大集锦](http://blog.csdn.net/u014365862/article/details/53063627) 414 | 415 | 6. [Why always OpenCV Error: Assertion failed (elements_read == 1) in unknown function ?](http://blog.csdn.net/u014365862/article/details/53000619) 416 | 417 | 7. [目标检测之训练opencv自带的分类器(opencv_haartraining 或 opencv_traincascade)](http://blog.csdn.net/u014365862/article/details/52997019) 418 | 419 | 8. [车牌识别 之 字符分割](http://blog.csdn.net/u014365862/article/details/52672747) 420 | 421 | 9. **[仿射变换,透视变换:二维坐标到二维坐标之间的线性变换,可用于landmark人脸矫正。](http://blog.csdn.net/u014365862/article/details/78678872)** 422 | 423 | 10. [opencv实现抠图(单一背景),替换背景图](http://blog.csdn.net/u014365862/article/details/78863756) 424 | 425 | **python系列(**web开发、多线程等**):** 426 | 427 | 1. [**flask的web开发,用于机器学习(主要还是DL)模型的简单演示。**](http://blog.csdn.net/u014365862/article/details/78818334) 428 | 429 | 2. **[python多线程,获取多线程的返回值](http://blog.csdn.net/u014365862/article/details/78835348)** 430 | 431 | 3. [文件中字的统计及创建字典](http://blog.csdn.net/u014365862/article/details/78914151) 432 | 433 | **其他:** 434 | 435 | 1. [MAC平台下Xcode配置使用OpenCV的具体方法 (2016最新)](http://blog.csdn.net/u014365862/article/details/53067565) 436 | 437 | 2. [**python下如何安装.whl包?**](http://blog.csdn.net/u014365862/article/details/51817390) 438 | 439 | 3. [给中国学生的第三封信:成功、自信、快乐](http://blog.csdn.net/u014365862/article/details/47972321) 440 | 441 | 4. [自己-社会-机器学习](http://blog.csdn.net/u014365862/article/details/48604145) 442 | 443 | 5. [不执著才叫看破,不完美才叫人生。](http://blog.csdn.net/u014365862/article/details/49079047) 444 | 445 | 6. [PCANet的C++代码——详细注释版](http://blog.csdn.net/u014365862/article/details/51213280) 446 | 447 | 7. [责任与担当](http://blog.csdn.net/u014365862/article/details/51841590) 448 | 449 | 8. [好走的都是下坡路](http://blog.csdn.net/u014365862/article/details/53244402) 450 | 451 | 9. [一些零碎的语言,却触动到内心深处。](http://blog.csdn.net/u014365862/article/details/53186012) 452 | 453 | 10. [用一个脚本学习 python](http://blog.csdn.net/u014365862/article/details/54428373) 454 | 455 | 11. [一个有趣的周报](http://blog.csdn.net/u014365862/article/details/78757109) 456 | -------------------------------------------------------------------------------- /cnn.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MachineLP/cnn_faceDetection/10872c30492c6dd23b713003197f378c7df68b65/cnn.cpp -------------------------------------------------------------------------------- /cnn.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MachineLP/cnn_faceDetection/10872c30492c6dd23b713003197f378c7df68b65/cnn.h -------------------------------------------------------------------------------- /data/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MachineLP/cnn_faceDetection/10872c30492c6dd23b713003197f378c7df68b65/data/.DS_Store -------------------------------------------------------------------------------- /data/cascadeClassifier.txt: -------------------------------------------------------------------------------- 1 | 8 2 | 4 0.507175 3 | 0 8 20 30 -0.359593 0.168139 0.128429 0.0500019 0.278004 0.112702 -0.138898 -0.00123301 0.201154 0.307577 0.245603 -0.111773 -0.0109768 0.203608 -0.0564578 -0.0215202 0.095214 0.208032 0.319649 -0.0951572 -0.19111 -0.185246 0.0292464 0.0378044 0.0417406 -0.0582106 0.123968 0.306425 0.222741 -0.0412855 0.212866 0.045826 0.0234087 4 | 20 0 40 20 -0.0993183 0.0154231 -0.170813 0.266289 -0.0814961 -0.0257754 0.0795825 0.320839 -0.218228 0.124429 0.0462424 -0.0713423 -0.00829158 0.0788605 -0.0338962 0.0116684 -0.00445853 -0.108481 -0.0715571 0.178786 0.231159 -0.0308938 -0.0289002 0.0880318 0.186511 0.300366 0.247873 -0.232104 -0.364099 -0.362693 -0.178358 0.176247 -0.072362 5 | 0 0 40 20 -0.181522 0.0372686 0.0291435 0.0285497 0.0876193 0.0102889 -0.0299387 0.0314655 0.0685195 -0.0314048 0.0611647 0.117547 -0.0368222 -0.209555 0.144075 0.0951549 0.0655656 0.330661 0.351931 -0.193426 -0.359123 0.0452908 0.244819 -0.175597 -0.359123 -0.136961 -0.165013 0.252834 0.304812 0.099339 0.0465817 0.0682139 0.0136863 6 | 8 8 20 30 -0.353141 0.259153 0.286968 -0.149303 -0.0322963 0.0456567 -0.0681416 0.036441 0.232315 0.0984322 0.144887 -0.0498762 0.268708 0.209378 -0.0677844 -0.161367 0.219082 0.0835215 6.04756e-006 0.249265 0.163714 -0.0742528 -0.0685105 0.229229 0.0491831 0.309446 0.244516 -0.0677036 -0.204498 0.0218611 0.0869947 0.0356375 -0.173034 7 | 8 | 4 0.489683 9 | 4 8 30 20 -0.286726 -0.0237679 -0.139003 0.0357271 0.224666 0.204132 -0.0967802 0.0433742 0.126365 0.16342 0.149294 -0.13685 -0.297535 0.036858 0.214934 0.202266 0.0283493 0.0947439 0.155522 -0.0856717 -0.134323 0.154863 0.232629 -0.110399 -0.102889 -0.302226 -0.301861 0.18525 0.302285 0.161989 0.060991 0.00569456 0.155812 10 | 8 4 12 18 -0.344338 0.0598853 -0.0765459 0.349926 0.304556 0.248375 0.173918 -0.0872134 -0.126546 0.232795 0.0796251 0.0918951 -0.00422765 0.00689119 -0.0779652 0.184134 0.00562018 -0.00496651 0.143342 -0.0282139 0.187536 -0.0669503 -0.20637 -0.0205052 0.233764 0.205656 0.195528 -0.305215 -0.0066716 0.145348 -0.0445885 -0.249013 0.0674026 11 | 20 20 20 20 -0.131017 -0.0113266 -0.013239 0.185442 0.12111 0.0110295 0.127629 -0.0204003 -0.0269157 0.202446 0.151924 -0.128455 -0.310094 -0.139432 -0.0308167 0.0304799 -0.104737 -0.114983 -0.0629965 0.16078 0.193244 -0.0488536 -0.116067 0.0743813 0.170445 0.30072 0.26222 -0.136326 -0.268842 -0.350017 -0.2778 0.300875 0.160353 12 | 16 0 12 24 -0.328614 -0.144955 -0.197597 0.12664 -0.0965862 -0.212797 -0.0521935 0.185381 -0.227959 0.106887 -0.110054 0.0676273 0.0767115 0.358213 0.12979 0.0364869 -0.213069 0.30908 0.251531 -0.104918 -0.00505632 0.145153 0.0351957 0.0880433 0.119813 -0.0609272 0.0812291 0.259965 0.316298 -0.057757 0.122057 -0.0898008 0.131522 13 | 14 | 4 0.488712 15 | 4 0 40 20 -0.0919957 -0.219091 -0.276803 0.09001 0.120394 0.125377 0.0420575 0.154562 0.150409 0.0800062 0.128578 -0.296283 -0.352692 -0.0133781 0.146715 0.0762344 0.0188867 0.0490024 0.0645908 -0.195127 -0.233938 0.117011 0.167533 -0.0383378 -0.0635173 -0.352692 -0.350928 0.141627 0.159481 0.162023 0.140972 0.0896059 0.1151 16 | 28 0 24 12 -0.151764 -0.14136 -0.0345763 0.359054 0.269019 -0.0511534 0.0862612 0.197281 -0.0235772 0.340465 0.357769 -0.321892 -0.0880085 0.0749356 -0.10016 -0.282274 -0.109026 -0.0680141 -0.0500643 0.164303 0.097643 0.141432 0.0986346 -0.132917 -0.124829 0.119809 0.0645598 -0.175312 -0.175548 -0.0496006 -0.143953 0.146357 0.022847 17 | 0 20 20 20 -0.223475 0.132541 0.174064 -0.125524 -0.320947 -0.0667298 0.041751 -0.00992267 -0.098804 0.0335989 -0.00389866 0.201758 0.143897 -0.0234615 0.0797261 0.153152 0.0798391 0.301835 0.265678 -0.0920869 -0.169792 0.177971 0.274013 -0.267165 -0.347481 -0.0454768 -0.112282 0.108272 0.214742 0.244338 0.0993439 -0.116285 -0.0681153 18 | 0 0 6 24 0.00189935 0.243988 0.277686 -0.267446 -0.283723 -0.163387 -0.25689 -0.021889 0.228091 -0.235 -0.241646 0.35304 0.117759 0.00805924 0.0896609 -0.0878764 0.0510719 -0.239205 0.0137837 0.199488 -0.034473 -0.0426234 0.0890696 -0.258274 -0.259156 0.0393429 0.0187748 0.0838972 -0.0386316 -0.102853 -0.130301 0.0304256 0.0661349 19 | 20 | 11 0.500562 21 | 16 4 30 20 -0.346605 0.2464 0.23436 -0.229307 -0.321937 0.100754 0.175418 0.0742107 -0.0247097 -0.224333 -0.148268 0.15967 0.244843 0.129013 0.0918291 0.0604785 0.230322 -0.133739 -0.159559 0.229371 0.202754 0.114368 0.156968 0.166338 0.117706 0.15639 0.11855 -0.151561 -0.174078 0.0232208 0.0161727 0.0500643 -0.0107622 22 | 0 8 18 12 -0.248362 0.213957 0.160232 -0.0272569 0.00610056 0.0839336 0.0184162 -0.113228 -0.0942647 0.0719929 -0.107868 0.326481 0.355832 0.0289348 -0.0635148 -0.0315413 0.0758271 0.162391 0.259328 -0.190869 -0.288445 0.0451809 0.235615 -0.139217 -0.106576 0.118038 0.137365 0.0922976 -0.102715 -0.351225 -0.14937 0.196297 0.165179 23 | 20 8 30 20 -0.221091 0.159224 0.058722 0.0413889 0.189929 0.346941 0.146188 -0.1873 -0.244211 0.154293 0.0717609 -0.0974934 -0.0975289 -0.0179406 -0.0890791 0.113747 0.0290597 -0.17542 -0.151972 0.138323 0.307434 0.0408972 -0.113057 -0.0223947 0.248809 0.223429 0.250444 -0.103372 -0.269215 -0.25212 -0.0556975 0.240091 0.0602941 24 | 12 0 12 18 -0.350725 -0.0769412 -0.0557404 0.287073 0.0230446 0.00823636 0.147689 -0.053196 -0.308121 -0.234436 -0.303285 0.34929 0.245264 -0.0122943 -0.0546945 0.147664 0.00735194 0.19598 0.262152 0.00271067 0.0309456 -0.00561812 0.153834 0.051203 0.0879683 0.116867 0.0298137 0.160962 0.203412 0.0362125 -0.101631 0.199986 0.159704 25 | 0 28 12 24 -0.15 0.237497 0.107801 -0.144548 -0.210693 0.0850036 -0.00181229 -0.121797 -0.271254 -0.226178 -0.215315 0.297428 0.244004 0.0494057 0.12366 0.0395337 0.118261 0.13019 0.197856 -0.0074547 -0.0999798 0.151337 0.349295 -0.302844 -0.298295 -0.122923 -0.124745 0.0707806 0.0524016 0.136864 0.0919146 -0.0253115 -0.0409925 26 | 0 4 20 40 -0.370278 -0.0216801 0.166216 0.0873784 0.0916601 0.101133 0.215428 0.0615004 0.300593 0.164222 0.0857375 0.00538473 0.0890945 0.214797 0.111006 0.0989723 0.105805 0.0747669 -1.81878e-005 -0.0485214 -0.16683 -0.0942571 -0.0229704 0.370278 0.317976 0.109078 0.104615 -0.0492959 -0.2045 0.266313 0.305859 0.0509976 -0.131783 27 | 16 4 12 12 -0.0774259 0.208479 0.258217 -0.0420312 -0.126201 -0.0364822 0.0414582 -0.0659377 -0.105292 0.0202322 -0.00944028 0.16355 0.241801 -0.241168 -0.184584 0.146428 0.0677712 0.255377 0.241228 -0.352766 -0.124612 -0.0747156 -0.267036 0.0179486 0.0838067 0.168874 0.0477519 -0.308906 0.0105808 0.188873 -0.0848417 -0.337827 0.0499056 28 | 28 0 12 12 -0.0868713 -0.328849 -0.187516 0.117428 0.117018 0.164536 0.0763099 0.179433 -0.0931382 0.165756 0.15117 -0.202572 -0.130174 0.351021 0.101215 -0.285945 -0.258549 -0.220968 -0.103407 0.256994 0.315081 -0.161109 -0.111844 0.111912 0.0103489 0.129947 0.0898256 -0.0662535 0.0673252 -0.158056 -0.0910681 0.0391042 0.052294 29 | 28 28 12 12 0.0188162 -0.152734 0.0293583 0.206112 -0.0867642 0.12782 -0.0535637 -0.0677265 0.0399981 0.159396 0.276941 -0.151782 -0.313572 -0.175949 -0.106761 -0.0652095 -0.0708562 0.162909 0.117826 0.081095 -0.125885 -0.232332 -0.346837 0.130742 0.230689 0.133789 0.162033 -0.0781883 -0.107419 -0.292073 -0.290221 0.244905 0.127592 30 | 8 12 12 24 -0.375811 -0.0174387 -0.0177869 -0.135922 0.00903038 -0.0196359 -0.0716177 0.134419 0.375811 -0.0210086 0.0580564 -0.157925 -0.0262162 0.375811 0.273515 -0.075196 0.0536528 0.149496 0.094582 0.189421 0.176977 0.0530718 -0.0146651 0.281083 0.0982853 0.231982 0.246177 0.106733 0.0180672 0.0936492 0.278503 0.060474 0.052729 31 | 0 0 24 6 -0.0273608 0.0821286 -0.0446033 -0.147537 -0.146453 -0.329566 -0.0123025 0.128055 0.348904 0.234769 0.127543 0.081653 0.348904 -0.0447911 -0.119891 0.0443899 -0.303728 -0.0598588 -0.160024 -0.0938144 -0.120388 0.108828 0.308678 -0.321429 0.0375206 0.0696869 0.00224067 0.0284993 -0.295515 0.0350871 0.0969523 -0.0770352 -0.0779225 32 | 33 | 12 0.497427 34 | 4 0 40 20 -0.271064 -0.129554 -0.202714 0.268208 0.280923 0.10775 0.0313935 0.106078 0.0736866 0.213506 0.269907 -0.183969 -0.324967 -0.0436285 0.147041 0.0620238 -0.0326638 0.162631 0.182594 -0.0376046 -0.120092 -0.00224906 0.128268 -0.0312025 -0.0964052 -0.25713 -0.24701 0.244375 0.281112 0.0887359 0.0141938 0.0723361 0.103742 35 | 20 16 20 20 -0.324734 0.294547 0.216558 0.237114 0.208047 0.159193 0.107366 -0.109301 -0.232769 0.128086 0.00832281 0.0451656 -0.172478 -0.0538625 0.0139115 0.156917 -0.184695 0.0384542 0.112051 0.169376 0.14968 0.06298 0.0852978 -0.0444691 0.0490919 0.253779 0.28185 -0.130237 -0.22867 -0.217894 -0.114185 0.22854 0.178315 36 | 8 4 12 24 -0.356361 -0.0634368 -0.0791345 0.182128 0.143773 0.109568 0.198892 -0.0700947 -0.0220684 0.0489699 -0.0412777 0.178228 0.145984 0.135818 0.0621221 0.325761 0.158068 0.103716 0.210801 -0.286355 0.0471016 -0.00509897 -0.265688 -0.0442144 0.335304 0.111512 -0.0256076 -0.219382 0.102637 0.29747 -0.115548 -0.151449 0.0995363 37 | 0 8 30 20 -0.178551 0.0913792 0.117326 -0.0373887 -0.0271932 0.0309849 0.0487832 -0.0897086 -0.085013 0.355742 0.310352 -0.0785361 -0.114333 -0.0844645 -0.14219 0.230666 0.140521 0.247527 0.240104 -0.15928 -0.253864 0.166242 0.25774 -0.192574 -0.321598 -0.16801 -0.136185 0.0742989 0.21005 0.164693 -0.0351495 -0.0185845 0.0629479 38 | 8 0 12 18 -0.288669 -0.25146 -0.209683 0.223017 0.133422 0.0312764 0.263863 -0.102652 0.0124145 -0.11614 -0.190595 0.171427 0.0467508 -0.0750314 -0.0387213 0.107554 -0.0640026 0.00753012 -0.0269267 0.35508 0.306282 0.0890053 0.108515 -0.0663318 -0.00027945 0.35508 0.295529 -0.236015 -0.0822912 0.0288799 -0.0937358 -0.0242157 0.12323 39 | 16 28 12 24 -0.189673 -0.29189 -0.0709571 0.350059 0.271272 0.0619018 -0.147983 0.195782 0.0767337 0.0801159 0.109946 -0.0103297 -0.154737 -0.0662952 0.0642548 -0.0554374 0.036993 -0.135306 -0.111575 0.0365612 0.0231982 -0.0141758 -0.0214738 0.0976744 0.183695 0.221105 0.111125 -0.0424265 -0.164195 -0.289163 -0.345932 0.34708 0.227497 40 | 0 16 24 12 0.0268079 0.0396889 0.114492 -0.0266056 -0.265453 -0.039721 0.13553 -0.0936007 -0.121478 -0.124589 -0.151461 0.216243 0.167935 -0.355688 -0.355688 0.15709 0.236838 0.24446 0.126471 -0.110926 -0.206321 -0.00270478 0.221975 -0.112806 -0.355688 0.210806 0.14784 -0.0267661 0.0314845 0.0614428 -0.0108984 -0.102121 -0.104047 41 | 12 0 40 10 -0.377735 0.23824 0.261313 0.0877716 -0.0797137 -0.00835802 0.293576 0.0652553 -0.0257275 0.131098 0.344153 -0.143469 -0.0533644 0.0575939 0.117823 0.0746699 0.262752 -0.0106354 -0.0984038 0.198224 0.290796 0.253971 0.029988 0.198831 -0.0533535 0.00948482 0.0740748 0.0935356 0.0918893 0.220487 0.163582 0.047849 0.150098 42 | 28 8 12 12 -0.126485 -0.22484 0.100564 0.203933 0.326273 0.0414935 -0.059262 0.0432824 -0.0261086 0.207407 0.260046 -0.163084 0.0798698 -0.191112 -0.183039 0.148653 -0.0273799 -0.280427 -0.202682 0.148453 0.0802211 0.33632 0.194253 -0.150723 -0.0909467 0.0085385 -0.00364751 -0.303363 -0.138208 -0.0411324 -0.10233 0.200769 0.165516 43 | 16 0 6 24 0.080976 0.0359464 0.1401 0.174824 -0.132536 -0.119003 -0.263483 -0.0474807 -0.105269 -0.177099 -0.265302 0.136726 0.0461379 -0.098618 -0.205534 0.073757 -0.103215 -0.25305 -0.278213 0.182705 0.0761604 0.162743 0.00547431 0.0530362 -0.0108112 0.0672201 0.162526 -0.197403 -0.209045 0.358267 0.0339476 -0.269885 -0.316606 44 | 0 28 12 24 -0.172546 0.186628 0.122718 -0.128761 -0.199862 0.0501401 -0.112258 0.0697911 0.00978351 -0.0223731 -0.21416 0.356319 0.150417 -0.0762529 -0.0363487 0.145771 0.163307 0.219491 0.175551 -0.0267573 -0.00462231 0.0314989 0.324988 -0.356319 -0.312037 -0.260772 -0.0933571 0.0149835 -0.0535189 0.182889 0.231 -0.0438307 0.0551526 45 | 32 16 24 6 -0.046273 -0.0760343 0.203314 0.204724 0.186031 -0.0683528 -0.0944569 0.175031 -0.201563 0.236234 0.301948 -0.142245 -0.350407 -0.19337 0.0473501 -0.0725593 -0.27747 0.103371 0.17572 0.192925 -0.191402 0.0326149 -0.0980565 -0.0820645 0.00794565 0.209749 0.24653 0.00570766 -0.136523 -0.247766 -0.182503 0.114115 0.057387 46 | 47 | 12 0.494217 48 | 4 8 20 20 -0.350114 -0.023392 -0.116595 0.14089 0.350114 0.197126 -0.115137 0.0161087 0.162557 0.311529 0.295901 -0.306125 -0.280004 0.0828579 0.0240478 0.017277 0.0287732 0.135523 0.239205 -0.072818 -0.126021 -0.168983 -0.0318473 0.0748753 0.0892865 -0.0914888 0.0129376 0.210305 0.185903 0.0386759 0.166132 0.0603828 0.0816007 49 | 20 16 20 20 -0.305171 0.275763 0.250403 0.21732 0.15181 -0.00305113 0.0870038 -0.060972 -0.180267 0.159278 0.0873264 0.0175999 -0.0730725 0.0130306 0.0148139 0.0476278 -0.0794145 -0.0983501 -0.102408 0.344982 0.284974 -0.0148805 -0.0322935 0.0569539 0.141157 0.303042 0.282452 -0.114085 -0.208085 -0.228147 -0.203625 0.150856 0.086775 50 | 24 0 24 6 -0.322346 -0.255549 -0.355782 0.355782 0.220901 -0.139889 -0.0515119 0.27079 -0.105667 0.0327626 0.110244 0.355782 0.238562 0.0179007 0.00282076 0.132445 0.0341768 0.0462684 -0.0204139 -0.0245571 -0.0056198 0.261905 0.17474 -0.166816 -0.0821977 0.0586865 0.114381 0.0214783 0.0322451 -0.115689 0.107043 0.0702096 0.105872 51 | 0 8 30 20 -0.145257 0.0591194 0.10682 -0.0135948 0.00426894 -0.0217504 0.052901 -0.140989 -0.0572538 0.095878 0.171993 0.139192 0.13776 -0.200788 -0.110515 0.062712 0.223466 0.273362 0.294822 -0.15406 -0.353198 0.103017 0.247999 -0.184306 -0.353198 -0.189416 -0.135244 0.135421 0.312607 0.148005 -0.00601531 -0.10057 0.0172064 52 | 8 0 24 6 -0.347822 -0.291924 -0.256025 0.312236 0.216657 0.0604635 0.194246 -0.0834702 0.00459995 0.305514 0.133144 0.181512 0.236388 0.15208 0.170867 -0.0487316 -0.0360566 -0.0279864 -0.0635481 -0.06072 0.105931 0.07271 -0.0631185 -0.0285741 0.204921 0.161547 0.158238 0.0324198 0.0418159 -0.200216 -0.174554 0.234481 0.13524 53 | 20 20 20 20 -0.13472 0.0614852 -0.0527151 0.151573 0.0466993 0.150653 0.00133469 0.0223401 -0.0343905 0.245624 0.21159 -0.109649 -0.351236 -0.056878 0.159105 -0.114496 -0.225453 -0.18784 -0.0590177 0.148145 0.196825 -0.0785802 -0.0955774 0.0898566 0.281209 0.24167 0.251985 -0.125181 -0.24876 -0.321401 -0.183613 0.176768 0.113888 54 | 16 0 40 10 -0.361034 0.334979 0.20275 -0.0324434 -0.0853723 0.0301845 0.0421697 0.236312 -0.0458499 0.32812 0.23111 -0.250706 -0.168794 0.332085 0.117965 0.0430496 0.0838108 -0.109094 -0.0137497 0.16407 0.234564 0.0620449 0.146128 0.0493254 0.0890013 -0.101334 -0.0889906 0.211311 0.162014 0.103667 0.110429 0.0115413 0.0967582 55 | 0 4 24 12 0.0451015 0.240316 0.272003 -0.202632 -0.0392098 0.0281714 -0.174782 -0.152276 -0.0554882 -0.194126 -0.339712 0.258546 0.351487 -0.149729 0.0338817 0.0812344 -0.0312354 0.0708347 0.115788 -0.296882 -0.351487 -0.0950585 0.010032 -0.0792962 -0.0305238 0.00294667 0.00407758 0.219318 0.000834375 -0.251255 -0.124802 0.0483294 -0.0746947 56 | 12 0 12 24 -0.279076 -0.125609 -0.161619 0.200119 0.0303237 -0.0612717 -0.00509071 -0.00655398 -0.352814 -0.10269 -0.101 0.137073 0.129846 0.303076 0.0187939 0.0627639 -0.0438054 0.334997 0.282611 -0.140358 0.0441249 0.0822126 -0.0112898 -0.169411 0.0816664 0.0188293 0.0890317 0.367435 0.367435 -0.0532864 -0.0819672 -0.0309335 0.0232551 57 | 0 28 12 24 -0.189819 0.226814 0.200004 -0.147554 -0.118167 0.0991041 -0.0234189 -0.0816154 -0.0927647 -0.138793 -0.185974 0.300482 0.262065 0.033766 0.107072 0.0907754 0.11436 0.138958 0.157678 0.0142451 -0.100276 0.148171 0.357802 -0.357802 -0.357802 -0.185709 -0.0272484 0.0860602 0.0556406 0.0997465 0.0964185 -0.152961 -0.0708586 58 | 28 0 24 12 -0.0261245 -0.240536 -0.0312289 0.237712 0.206684 -0.138881 -0.0383652 0.171022 -0.06053 0.301209 0.291115 -0.203054 -0.0280476 0.0384242 -0.00430804 -0.160924 -0.145178 -0.131348 -0.0845734 0.221469 0.179261 0.165776 0.0853075 -0.265835 -0.192982 0.127937 0.0854628 -0.174423 -0.219367 -0.210165 -0.256173 0.22434 0.0335937 59 | 8 12 12 24 -0.357471 0.0226532 0.1966 -0.204673 -0.0198847 -0.17648 -0.166915 -0.0371053 0.357471 0.0912041 0.123838 -0.198569 -0.0757071 0.296168 0.0750395 -0.0232845 0.0572527 0.280497 0.188108 0.100131 0.123509 0.123491 0.0226841 0.211321 0.0587783 0.244072 0.297259 0.069033 -0.109892 -0.042628 0.224891 0.0751963 -0.00529795 60 | 61 | 11 0.501896 62 | 16 0 40 10 -0.36408 0.15258 0.101424 0.0833005 -0.0168811 -0.0318756 0.108278 0.282904 0.0554205 0.215939 0.174879 -0.132414 -0.156742 0.0626217 0.0380281 0.141287 0.111724 -0.0430678 0.0120495 0.309095 0.297873 -0.057141 0.0687419 0.122787 0.160774 -0.204319 -0.241025 0.291239 0.313324 0.0605657 -0.0491229 0.133712 0.144125 63 | 0 4 24 12 -0.104746 0.224605 0.248393 -0.133856 -0.0209492 0.0321207 -0.0403092 -0.107036 -0.00765716 -0.138525 -0.240074 0.337817 0.378319 0.117782 0.0198304 -0.0715649 0.00718726 0.196546 0.221081 -0.298745 -0.378319 -0.0923024 0.0718807 -0.0300791 -0.111142 0.100297 0.162202 -0.0873994 -0.0497534 -0.200603 -0.207689 -0.00442005 0.0482951 64 | 16 0 12 18 -0.295388 -0.243615 -0.323047 0.176882 0.177516 -0.0861459 -0.0859016 0.00951936 -0.107609 -0.128942 -0.119096 0.231251 0.168713 0.116795 0.0481264 0.024705 -0.077268 0.305531 0.334282 -0.110468 0.0550536 0.174956 0.125566 -0.0781699 0.0436398 0.117653 0.126008 0.345192 0.289499 -0.0572135 -0.0528493 -0.0221917 0.0247499 65 | 20 20 20 20 -0.153247 0.112604 0.0481857 0.234072 0.183201 0.0162154 0.0569281 -0.0403809 -0.0960467 0.251192 0.235157 -0.182951 -0.347035 -0.0176958 0.0939955 -0.0510897 -0.179406 -0.037729 0.0231931 0.198943 0.149829 -0.113341 -0.110877 0.0904338 0.127925 0.263406 0.233778 -0.174944 -0.218249 -0.294214 -0.268934 0.220564 0.0956089 66 | 8 16 18 12 -0.369861 0.136318 0.072119 0.0385841 0.133256 -0.0399827 -0.20782 0.146931 0.173086 0.236429 0.249394 0.180126 -0.057215 0.0498329 0.252934 0.245661 -0.0470899 0.0364667 0.221979 0.0851342 0.110113 0.145054 0.198451 -0.097796 -0.0126808 -0.137273 0.0176917 0.316977 0.205807 0.189215 0.297858 -0.0313011 0.0457967 67 | 0 28 12 12 0.0680039 0.153091 0.244866 -0.253471 -0.363248 0.114377 0.0709097 -0.167637 -0.266593 0.175088 -0.169145 0.16867 -0.0356424 0.0105527 -0.0742993 -0.0674443 0.121645 0.252896 0.15706 0.0179341 -0.0370604 -0.0677263 0.0306654 -0.264124 -0.263253 0.161304 0.152278 -0.00832874 -0.0453746 0.019808 0.0433295 -0.316185 -0.291823 68 | 8 0 20 30 -0.360511 0.0200571 -0.00238614 0.209716 -0.0610175 -0.0551026 0.337889 0.267478 -0.0212667 0.0805933 0.0439167 0.175794 0.0938906 0.139751 0.113276 0.300163 0.0839932 0.192218 0.205927 -0.142312 -0.130947 -0.12014 -0.206225 0.209475 0.351974 -0.0605281 -0.129235 -0.018106 0.161138 0.174295 -0.104536 -0.0847706 0.0877826 69 | 20 8 30 20 -0.19336 0.177163 0.160357 0.122283 0.0536931 0.282664 0.227721 -0.129308 -0.259022 0.177385 0.0735432 -0.0345669 -0.0732241 -0.108036 -0.165991 0.245346 0.130737 -0.188396 -0.187826 0.223217 0.34733 -0.0590843 -0.100606 -0.0259392 0.146474 0.178043 0.219757 -0.172523 -0.298785 -0.155197 -0.00832206 0.044838 -0.00634061 70 | 8 0 12 24 -0.347245 -0.335461 -0.34073 0.222607 0.301418 0.0211971 0.114255 -0.125751 -0.011474 -0.170862 -0.110674 0.168967 0.177461 0.0216463 -0.0472234 0.17118 -0.0427571 0.134391 0.234953 0.0858471 0.236625 -0.0162319 0.0704797 -0.0665457 0.195661 0.0722552 0.173292 0.0443639 0.0478315 0.109872 -0.0936433 0.178325 0.242812 71 | 16 20 6 24 -0.147179 0.0630919 -0.0890157 0.374686 0.249938 0.0667531 -0.0338068 -0.195566 0.0592802 0.194606 0.18132 0.0137468 0.129485 -0.172793 -0.117614 0.0521887 0.124041 0.0745792 0.00678352 0.164526 0.0250539 0.0908096 0.184667 -0.254802 -0.374686 0.249393 0.227299 -0.12372 -0.374686 0.00257571 0.058177 0.0235778 -0.0256712 72 | 16 16 24 6 -0.314589 0.0439781 0.138951 -0.177242 -0.339968 0.00439803 0.22043 0.28143 0.249194 0.0497972 -0.0736346 0.15044 -0.072984 0.0464874 -0.0562933 0.0865363 0.0255786 -0.0191462 -0.112286 0.257071 0.0896218 0.154222 0.0525398 0.183625 0.27004 -0.313622 -0.296188 0.135173 0.10456 0.177458 0.125705 -0.00200204 0.0281244 73 | 74 | 13 0.498783 75 | 4 4 30 20 -0.229091 -0.100362 -0.2005 0.130066 0.211229 0.178427 -0.0105611 0.118665 0.10109 0.295598 0.292984 -0.363277 -0.363277 0.0729639 0.154106 0.079804 -0.00453108 0.135464 0.171996 -0.17434 -0.157159 0.0252913 0.0651952 -0.00984708 0.0372692 -0.239464 -0.195049 0.192376 0.150013 0.0768058 0.140118 0.068458 0.0378611 76 | 20 16 20 20 -0.302525 0.142191 0.173323 0.240842 0.229552 0.0191278 0.140736 -0.11273 -0.221602 0.119987 0.0223615 0.0883591 -0.134353 -0.0239459 0.0726378 0.110461 -0.1396 0.133245 0.113511 0.23332 0.214139 -0.0344954 -0.0237653 0.0109188 0.0347429 0.299776 0.284661 -0.0422085 -0.157119 -0.309522 -0.248648 0.248886 0.162429 77 | 0 4 24 12 -0.0381498 0.283527 0.248006 -0.192572 -0.0377365 -0.0557831 -0.151403 -0.0905202 -0.0356861 -0.0404909 -0.20216 0.288795 0.290414 -0.0677802 0.0568397 -0.0229307 -0.0713544 0.0948624 0.146839 -0.35098 -0.33379 0.0710056 0.0429645 -0.106932 0.0257461 -0.137289 -0.0335366 0.153568 0.0425041 -0.326807 -0.138437 0.259589 0.160992 78 | 8 8 12 24 -0.378982 0.306829 0.254928 0.0304111 0.0904394 -0.0360663 -0.0581571 -0.0325614 0.313936 0.141864 0.169162 0.0509442 0.249444 0.359817 -0.028818 0.0298694 0.113568 0.0208818 0.0657478 0.0389383 0.0440995 0.0118994 -0.007708 0.24439 0.270077 0.0123836 -0.0256775 -0.054612 0.00356089 0.31011 0.26324 -0.0625163 0.00846372 79 | 0 24 12 24 -0.222395 0.0672499 0.12025 -0.0477767 -0.130475 0.198355 0.212679 -0.152851 -0.234095 -0.177315 -0.129644 0.147458 0.153709 0.151886 0.00407515 0.0222618 0.0725264 0.208887 0.197135 -0.0948499 -0.111825 0.160049 0.248679 -0.248937 -0.270979 -0.235237 -0.236685 0.239103 0.254784 0.128803 0.0086207 0.0753848 0.185758 80 | 16 0 6 24 0.0730163 0.0386967 0.0797237 0.0678749 -0.205872 -0.0744704 -0.0115581 -0.12152 -0.321905 -0.174076 -0.253687 0.124199 0.0700606 -0.133011 -0.201751 0.163209 -0.0485111 -0.262089 -0.308364 0.251792 0.198507 0.0943075 -0.0258436 0.0113415 -0.108174 0.196588 0.167019 -0.141389 -0.175448 0.209571 -0.00571164 -0.253796 -0.299698 81 | 12 12 12 24 -0.336782 0.0789678 0.112904 -0.27942 -0.245367 0.0485067 0.0522871 0.0478996 0.245285 -0.0728972 0.00328219 0.0335131 0.19419 0.0715489 0.00499987 -0.00210138 0.0838325 0.258329 0.108185 0.330446 0.314097 -0.0276721 -0.0954354 0.143433 0.0553743 0.347122 0.315476 -0.0672877 -0.121526 0.0355355 0.114856 -0.109308 -0.0998654 82 | 20 20 20 20 -0.0662569 0.0283931 -0.137111 0.15169 0.0875735 -0.0607412 -0.0305409 0.160088 0.0212801 0.19173 0.144318 -0.134025 -0.351618 -0.0357132 0.131315 -0.131979 -0.183278 -0.0671661 0.0695825 0.0731253 0.0711527 -0.165081 -0.0929893 0.0618314 0.212811 0.273312 0.267798 -0.158973 -0.336936 -0.351618 -0.195013 0.272278 0.0996006 83 | 4 4 12 24 -0.356675 0.019497 0.117836 0.286384 0.275671 0.0534012 0.170231 -0.00710427 -0.0718629 0.267715 0.322308 -0.0293407 -0.0565582 -0.031858 0.0498118 0.112767 0.0183026 0.0229094 -0.106487 0.141465 0.277437 0.180264 -0.129345 -0.136349 0.102999 0.293138 0.243207 -0.105962 0.0243751 0.250964 0.0918212 -0.198436 -0.042904 84 | 0 0 6 24 -0.0928533 0.19549 0.130855 -0.172327 -0.30826 -0.268513 -0.124287 0.0528794 0.351067 -0.127708 -0.252429 0.24992 0.106267 0.0352341 0.0757421 -0.00812923 0.139801 -0.317259 -0.0954179 0.264929 0.178775 0.0178959 0.00659988 -0.138013 -0.159935 -0.0250608 -0.178045 0.195575 0.192797 0.133338 -0.0981471 -0.0189815 0.12154 85 | 0 16 24 6 0.0385782 -0.133513 -0.154937 0.16485 0.115046 -0.011692 0.235721 -0.103248 -0.108457 0.21825 0.145522 -0.0611039 -0.357613 -0.0131616 -0.132178 -0.0430153 -0.0934175 0.120632 0.0225865 -0.155457 -0.319005 0.134062 0.0963147 -0.0912014 -0.0953387 0.292065 0.274691 -0.0601385 -0.082206 -0.0576181 0.197094 -0.26853 -0.357613 86 | 0 8 12 24 -0.278565 0.146123 0.137407 0.304141 0.347757 0.121629 0.180915 -0.136458 -0.293986 0.323808 0.332708 -0.08198 0.0579564 0.0282133 -0.186334 0.0766941 -0.00227364 -0.0571502 0.00137349 -0.18906 -0.000387721 0.0529434 0.00536383 -0.0204336 0.156085 0.0463233 0.116395 -0.00960852 -0.158167 -0.179148 0.0603636 0.23662 0.200001 87 | 32 16 24 6 0.0577473 -0.298664 -0.281051 0.266062 0.0455574 0.00035151 -0.0135557 0.301201 -0.028636 0.0596 0.0848259 -0.032205 -0.258337 0.0618552 0.00312378 -0.121183 -0.184822 0.0357844 0.270088 -0.0531704 -0.164134 -0.016061 0.0503472 -0.129345 -0.0667124 0.191182 0.180473 -0.0590233 -0.071379 -0.360236 -0.360236 0.221879 0.0868195 -------------------------------------------------------------------------------- /data/outColor1.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MachineLP/cnn_faceDetection/10872c30492c6dd23b713003197f378c7df68b65/data/outColor1.mp4 -------------------------------------------------------------------------------- /data/outColor2.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MachineLP/cnn_faceDetection/10872c30492c6dd23b713003197f378c7df68b65/data/outColor2.mp4 -------------------------------------------------------------------------------- /data/resultMatrix.txt: -------------------------------------------------------------------------------- 1 | 25 3 0 0 1 1 2 | 2 27 0 0 0 0 3 | 0 0 30 1 0 1 4 | 0 0 1 28 2 0 5 | 1 0 0 0 27 3 6 | 0 0 0 1 0 29 7 | -------------------------------------------------------------------------------- /data/zInput12/theanocnn.json: -------------------------------------------------------------------------------- 1 | [[[[0.1579788173043373, 0.2961204466666364, 0.28052473452509413, 0.5822940516366423, 0.23810391721900345, -0.18805271798528092, 0.3146650823401803, 0.5014556627270617, -0.4721984747535301, -0.013835434495267014, -0.10912522787862454, 0.03544907182826434, -0.5292658229872349, -1.0394350028967787, -1.0908152507138793, -0.9913887610119967, 1.5013740304639245, -0.3740580600739958, -0.20015490029215668, 0.11883279079213156, -0.11218523119003894, 0.5817701691204245, 0.4050745862166843, 0.05025088716044678, 0.5136682626537493], [0.6688310522561846, 0.146718806265588, -0.3647473281388782, -0.38416767222913484, 0.25676375900993403, 1.1697592423125427, -0.17037731832706143, 0.1473627506205251, -0.07370328114220753, 0.8539706192860157, 1.1519737725860706, 0.4092907675386512, 0.5262466489965649, 0.20702942768787955, 0.6891512439380896, 0.35389094127487325, 0.5427539111954495, -0.6122955943988614, 0.6000489485017794, 0.5771266707088482, 0.40331926552535186, -0.2816343684364563, 0.4820877852488716, -0.29316183489736625, 0.16199586509359176]], [-0.4370692627954934, -2.0589014322643617]], [[[-0.48963591314475763, -1.1704027996297208, -0.00875929118851474, 0.06653122925810545, -0.4933454937964717, -0.8886569381250906, -0.43581307312592854, -0.5369922214935475], [0.48963591314475774, 1.1704027996297217, 0.00875929118851474, -0.0665312292581056, 0.4933454937964713, 0.8886569381250897, 0.4358130731259282, 0.5369922214935475]], [0.7342387374322045, -0.7342387374322038]]] -------------------------------------------------------------------------------- /data/zInput20/theanocnn.json: -------------------------------------------------------------------------------- 1 | [[[[1.942323227521379, 1.6344067369856827, 1.0141819807392078, 1.1310550585873418, 1.7117012610542, -0.24284751642910338, -0.30949706347125067, -0.2283990427289676, -0.8662084116541944, 0.7789345885255776, 0.18681186388614504, -0.44927674627342823, -0.018752105786115837, -1.0972116100847242, -0.8904160235863825, -2.7809806397476504, -2.46484462708447, -2.8083734377120217, -1.9241069184842396, 0.1505409072775627, 2.2112556556393526, 1.5063184093169835, 1.753687886140495, 0.34689453775739537, 1.2550582619897206], [1.625037636203617, -0.5714643626614894, -1.8687694029985311, -3.939469013233547, -6.209397364979733, 0.2467112818589018, -1.0615777394045325, 1.47772568024536, 4.110198415536089, 4.55605638564367, 1.0623097155303738, 0.7356993391200247, -0.4545336237127385, -0.8391349993009636, -1.0792827210230884, 0.6685605960281255, 0.8119193763857344, -0.21064725355065267, 0.27762498455414447, 0.6519431868304306, -0.12642772064833613, 0.14454681730138916, 0.8335164296476318, 0.1600515193886391, 1.0256430618655539]], [-1.937708014038304, -1.5388614698081702]], [[[-0.056196787653649494, -0.5906331102852002, -0.18975034469347973, -0.28592784940879273, 0.6492228508791698, 0.1676898836347293, 0.4479400592452021, 0.5022019425416557, 0.47468175794084494, -0.39530046600456026, -0.5888043043740578, 0.32961196105450546, 0.48267764475452, -0.3760410929044946, -0.5549173719672085, 0.25485971631979026, -0.3403232219374212, 0.44286014681065455, -0.28482691008183564, -0.18758999563446505, -0.8329800602162615, 0.2603172053510445, -0.7341312070789388, -0.47356497559792804, 0.23449573486428626, -0.0016274137564284109, -0.09753301052591332, 0.40784059932118855, 0.0007526822697131558, -0.6282986650419908, -0.37990191210993185, 0.37047692405784066], [0.0561967876536496, 0.5906331102852003, 0.1897503446934797, 0.2859278494087931, -0.6492228508791696, -0.16768988363472956, -0.44794005924520214, -0.5022019425416561, -0.4746817579408449, 0.3953004660045603, 0.5888043043740573, -0.3296119610545055, -0.48267764475452, 0.37604109290449467, 0.5549173719672087, -0.2548597163197901, 0.34032322193742137, -0.4428601468106544, 0.2848269100818351, 0.18758999563446474, 0.8329800602162611, -0.2603172053510441, 0.7341312070789383, 0.4735649755979278, -0.23449573486428654, 0.001627413756428382, 0.09753301052591337, -0.40784059932118866, -0.0007526822697131347, 0.6282986650419906, 0.3799019121099316, -0.370476924057841]], [2.294155429214866, -2.2941554292148623]]] -------------------------------------------------------------------------------- /data/zInput24/theanocnn.json: -------------------------------------------------------------------------------- 1 | [[[[-0.0013492353702092691, -0.30225785163351326, -0.6032477836556043, -0.3280587922546115, 0.25500504767135657, 0.9629545154309812, 1.4624325173020751, 1.7486705987617153, 1.0111238321030511, 1.1970083427132114, 1.3318436382398564, 0.748358897446316, 1.0083073859033738, 0.3230122854465798, -0.6230591427374722, -2.3042441552825057, -2.872763545562979, -3.9455794680831957, -2.589817013395963, -0.592026411714205, 0.8457634536311359, 0.8721067548917225, 1.7009193199403114, 0.7108804789196536, 0.7119733253292257], [1.0294777031672278, 1.701576726321337, 0.7643690296731365, -2.1989445333163022, -3.5572832198864006, 0.5532241426029691, -0.0010424505647128534, 0.19060944430319227, -0.841699761485703, 0.20173602547607758, 0.7796996744060596, 0.6128033625764033, 0.3393717532490747, -0.4018431152326931, -0.1283143112004536, 0.3104061937195179, 0.9963445356302851, -0.03897233384464926, 0.08848370169558618, -0.342548241197508, 0.5843732631181454, 0.5538230277537854, 0.6900521326356991, -0.2998931590273716, 0.012695947095889447]], [-1.2431093962512167, -1.1786487819582263]], [[[-0.15284699806294394, -0.5703539206866449, 0.181771558035712, -0.3643463405300111, -0.312927201800944, 0.18650435649988192, 0.022557116826057183, 0.7256111468827519, 0.24723225285193298, 0.10913310750978863, 0.4845521734901893, -0.054238091631719304, -0.5054541743292827, -0.20115802447134304, 0.46283711661448745, 0.4052154816717093, -0.09542783781816946, -0.6417470607447102, -0.3599066861824806, 0.45483597349699434, 0.519527655439504, -0.06195835392587051, -0.5284512252899455, -0.30198724768363006, 0.352972966038185, 0.2597023658397933, 0.6935912425564739, 0.1040980081085055, -0.19487651801869488, 0.10563653998217504, -0.6478143134777876, -0.46733346148513694, -0.6022883921105181, -0.7335151562436539, -0.10607961708011666, 0.10821683185429117, -0.2277594679072588, -0.029831928748730478, 0.12412244593493442, -0.1428821510211233, 0.08516659838453487, -0.07821443035064346, 0.1622401909067941, 0.4327308787968827, -0.0034441474469255073, -0.1179258480655713, -0.1610904354248086, -0.06814044593080683, -0.15849762179478222, -0.19595700157137533], [0.15284699806294405, 0.5703539206866449, -0.18177155803571204, 0.36434634053001114, 0.3129272018009438, -0.18650435649988187, -0.022557116826057152, -0.7256111468827516, -0.24723225285193304, -0.10913310750978863, -0.4845521734901892, 0.0542380916317192, 0.5054541743292824, 0.20115802447134293, -0.46283711661448734, -0.4052154816717091, 0.09542783781816946, 0.6417470607447088, 0.35990668618248073, -0.45483597349699423, -0.5195276554395043, 0.06195835392587051, 0.5284512252899451, 0.30198724768362994, -0.3529729660381852, -0.25970236583979317, -0.6935912425564739, -0.10409800810850552, 0.194876518018695, -0.10563653998217522, 0.6478143134777875, 0.46733346148513644, 0.6022883921105194, 0.7335151562436529, 0.10607961708011676, -0.10821683185429101, 0.2277594679072587, 0.029831928748730346, -0.12412244593493428, 0.14288215102112314, -0.08516659838453496, 0.0782144303506436, -0.16224019090679417, -0.43273087879688266, 0.003444147446925484, 0.11792584806557117, 0.16109043542480866, 0.06814044593080675, 0.15849762179478208, 0.19595700157137508]], [2.1889834246797166, -2.1889834246797144]]] -------------------------------------------------------------------------------- /data/zInput40/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MachineLP/cnn_faceDetection/10872c30492c6dd23b713003197f378c7df68b65/data/zInput40/.DS_Store -------------------------------------------------------------------------------- /data/zInput40/参数1/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MachineLP/cnn_faceDetection/10872c30492c6dd23b713003197f378c7df68b65/data/zInput40/参数1/.DS_Store -------------------------------------------------------------------------------- /data/zInput40/参数2/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MachineLP/cnn_faceDetection/10872c30492c6dd23b713003197f378c7df68b65/data/zInput40/参数2/.DS_Store -------------------------------------------------------------------------------- /data/zInput40/参数3/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MachineLP/cnn_faceDetection/10872c30492c6dd23b713003197f378c7df68b65/data/zInput40/参数3/.DS_Store -------------------------------------------------------------------------------- /featuremap.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MachineLP/cnn_faceDetection/10872c30492c6dd23b713003197f378c7df68b65/featuremap.cpp -------------------------------------------------------------------------------- /featuremap.h: -------------------------------------------------------------------------------- 1 | #ifndef FEATUREMAP_H 2 | #define FEATUREMAP_H 3 | 4 | #include 5 | #include 6 | using std::vector; 7 | 8 | class FeatureMap 9 | { 10 | public: 11 | FeatureMap(int iInputImageNumber, int iInputImageWidth, int iFeatureMapNumber, int iKernelWidth); 12 | ~FeatureMap(); 13 | void Forward_propagation(double* ); 14 | void Back_propagation(double* , double* , double ); 15 | 16 | 17 | void Convolute(double *pdInputData); 18 | 19 | int GetFeatureMapSize() 20 | { 21 | return m_iFeatureMapSize; 22 | } 23 | 24 | int GetFeatureMapWidth() 25 | { 26 | return m_iFeatureMapWidth; 27 | } 28 | 29 | double* GetFeatureMapValue() 30 | { 31 | assert(m_pdOutputValue != NULL); 32 | return m_pdOutputValue; 33 | } 34 | 35 | void SetWeigh(const vector &vecWeigh); 36 | void PrintOutputData(); 37 | 38 | double **m_ppdWeigh; 39 | double *m_pdBias; 40 | 41 | private: 42 | int m_iInputImageNumber; 43 | int m_iInputImageWidth; 44 | int m_iInputImageSize; 45 | int m_iFeatureMapNumber; 46 | int m_iFeatureMapWidth; 47 | int m_iFeatureMapSize; 48 | int m_iKernelWidth; 49 | 50 | // double m_dBias; 51 | double *m_pdOutputValue; 52 | }; 53 | 54 | #endif // FEATUREMAP_H 55 | -------------------------------------------------------------------------------- /head/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MachineLP/cnn_faceDetection/10872c30492c6dd23b713003197f378c7df68b65/head/.DS_Store -------------------------------------------------------------------------------- /head/libopencv_calib3d.2.4.13.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MachineLP/cnn_faceDetection/10872c30492c6dd23b713003197f378c7df68b65/head/libopencv_calib3d.2.4.13.dylib -------------------------------------------------------------------------------- /head/libopencv_calib3d.2.4.dylib: -------------------------------------------------------------------------------- 1 | libopencv_calib3d.2.4.13.dylib -------------------------------------------------------------------------------- /head/libopencv_calib3d.dylib: -------------------------------------------------------------------------------- 1 | libopencv_calib3d.2.4.dylib -------------------------------------------------------------------------------- /head/libopencv_contrib.2.4.13.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MachineLP/cnn_faceDetection/10872c30492c6dd23b713003197f378c7df68b65/head/libopencv_contrib.2.4.13.dylib -------------------------------------------------------------------------------- /head/libopencv_contrib.2.4.dylib: -------------------------------------------------------------------------------- 1 | libopencv_contrib.2.4.13.dylib -------------------------------------------------------------------------------- /head/libopencv_contrib.dylib: -------------------------------------------------------------------------------- 1 | libopencv_contrib.2.4.dylib -------------------------------------------------------------------------------- /head/libopencv_core.2.4.13.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MachineLP/cnn_faceDetection/10872c30492c6dd23b713003197f378c7df68b65/head/libopencv_core.2.4.13.dylib -------------------------------------------------------------------------------- /head/libopencv_core.2.4.dylib: -------------------------------------------------------------------------------- 1 | libopencv_core.2.4.13.dylib -------------------------------------------------------------------------------- /head/libopencv_core.dylib: -------------------------------------------------------------------------------- 1 | libopencv_core.2.4.dylib -------------------------------------------------------------------------------- /head/libopencv_features2d.2.4.13.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MachineLP/cnn_faceDetection/10872c30492c6dd23b713003197f378c7df68b65/head/libopencv_features2d.2.4.13.dylib -------------------------------------------------------------------------------- /head/libopencv_features2d.2.4.dylib: -------------------------------------------------------------------------------- 1 | libopencv_features2d.2.4.13.dylib -------------------------------------------------------------------------------- /head/libopencv_features2d.dylib: -------------------------------------------------------------------------------- 1 | libopencv_features2d.2.4.dylib -------------------------------------------------------------------------------- /head/libopencv_flann.2.4.13.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MachineLP/cnn_faceDetection/10872c30492c6dd23b713003197f378c7df68b65/head/libopencv_flann.2.4.13.dylib -------------------------------------------------------------------------------- /head/libopencv_flann.2.4.dylib: -------------------------------------------------------------------------------- 1 | libopencv_flann.2.4.13.dylib -------------------------------------------------------------------------------- /head/libopencv_flann.dylib: -------------------------------------------------------------------------------- 1 | libopencv_flann.2.4.dylib -------------------------------------------------------------------------------- /head/libopencv_gpu.2.4.13.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MachineLP/cnn_faceDetection/10872c30492c6dd23b713003197f378c7df68b65/head/libopencv_gpu.2.4.13.dylib -------------------------------------------------------------------------------- /head/libopencv_gpu.2.4.dylib: -------------------------------------------------------------------------------- 1 | libopencv_gpu.2.4.13.dylib -------------------------------------------------------------------------------- /head/libopencv_gpu.dylib: -------------------------------------------------------------------------------- 1 | libopencv_gpu.2.4.dylib -------------------------------------------------------------------------------- /head/libopencv_highgui.2.4.13.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MachineLP/cnn_faceDetection/10872c30492c6dd23b713003197f378c7df68b65/head/libopencv_highgui.2.4.13.dylib -------------------------------------------------------------------------------- /head/libopencv_highgui.2.4.dylib: -------------------------------------------------------------------------------- 1 | libopencv_highgui.2.4.13.dylib -------------------------------------------------------------------------------- /head/libopencv_highgui.dylib: -------------------------------------------------------------------------------- 1 | libopencv_highgui.2.4.dylib -------------------------------------------------------------------------------- /head/libopencv_imgproc.2.4.13.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MachineLP/cnn_faceDetection/10872c30492c6dd23b713003197f378c7df68b65/head/libopencv_imgproc.2.4.13.dylib -------------------------------------------------------------------------------- /head/libopencv_imgproc.2.4.dylib: -------------------------------------------------------------------------------- 1 | libopencv_imgproc.2.4.13.dylib -------------------------------------------------------------------------------- /head/libopencv_imgproc.dylib: -------------------------------------------------------------------------------- 1 | libopencv_imgproc.2.4.dylib -------------------------------------------------------------------------------- /head/libopencv_legacy.2.4.13.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MachineLP/cnn_faceDetection/10872c30492c6dd23b713003197f378c7df68b65/head/libopencv_legacy.2.4.13.dylib -------------------------------------------------------------------------------- /head/libopencv_legacy.2.4.dylib: -------------------------------------------------------------------------------- 1 | libopencv_legacy.2.4.13.dylib -------------------------------------------------------------------------------- /head/libopencv_legacy.dylib: -------------------------------------------------------------------------------- 1 | libopencv_legacy.2.4.dylib -------------------------------------------------------------------------------- /head/libopencv_ml.2.4.13.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MachineLP/cnn_faceDetection/10872c30492c6dd23b713003197f378c7df68b65/head/libopencv_ml.2.4.13.dylib -------------------------------------------------------------------------------- /head/libopencv_ml.2.4.dylib: -------------------------------------------------------------------------------- 1 | libopencv_ml.2.4.13.dylib -------------------------------------------------------------------------------- /head/libopencv_ml.dylib: -------------------------------------------------------------------------------- 1 | libopencv_ml.2.4.dylib -------------------------------------------------------------------------------- /head/libopencv_nonfree.2.4.13.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MachineLP/cnn_faceDetection/10872c30492c6dd23b713003197f378c7df68b65/head/libopencv_nonfree.2.4.13.dylib -------------------------------------------------------------------------------- /head/libopencv_nonfree.2.4.dylib: -------------------------------------------------------------------------------- 1 | libopencv_nonfree.2.4.13.dylib -------------------------------------------------------------------------------- /head/libopencv_nonfree.dylib: -------------------------------------------------------------------------------- 1 | libopencv_nonfree.2.4.dylib -------------------------------------------------------------------------------- /head/libopencv_objdetect.2.4.13.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MachineLP/cnn_faceDetection/10872c30492c6dd23b713003197f378c7df68b65/head/libopencv_objdetect.2.4.13.dylib -------------------------------------------------------------------------------- /head/libopencv_objdetect.2.4.dylib: -------------------------------------------------------------------------------- 1 | libopencv_objdetect.2.4.13.dylib -------------------------------------------------------------------------------- /head/libopencv_objdetect.dylib: -------------------------------------------------------------------------------- 1 | libopencv_objdetect.2.4.dylib -------------------------------------------------------------------------------- /head/libopencv_ocl.2.4.13.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MachineLP/cnn_faceDetection/10872c30492c6dd23b713003197f378c7df68b65/head/libopencv_ocl.2.4.13.dylib -------------------------------------------------------------------------------- /head/libopencv_ocl.2.4.dylib: -------------------------------------------------------------------------------- 1 | libopencv_ocl.2.4.13.dylib -------------------------------------------------------------------------------- /head/libopencv_ocl.dylib: -------------------------------------------------------------------------------- 1 | libopencv_ocl.2.4.dylib -------------------------------------------------------------------------------- /head/libopencv_photo.2.4.13.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MachineLP/cnn_faceDetection/10872c30492c6dd23b713003197f378c7df68b65/head/libopencv_photo.2.4.13.dylib -------------------------------------------------------------------------------- /head/libopencv_photo.2.4.dylib: -------------------------------------------------------------------------------- 1 | libopencv_photo.2.4.13.dylib -------------------------------------------------------------------------------- /head/libopencv_photo.dylib: -------------------------------------------------------------------------------- 1 | libopencv_photo.2.4.dylib -------------------------------------------------------------------------------- /head/libopencv_stitching.2.4.13.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MachineLP/cnn_faceDetection/10872c30492c6dd23b713003197f378c7df68b65/head/libopencv_stitching.2.4.13.dylib -------------------------------------------------------------------------------- /head/libopencv_stitching.2.4.dylib: -------------------------------------------------------------------------------- 1 | libopencv_stitching.2.4.13.dylib -------------------------------------------------------------------------------- /head/libopencv_stitching.dylib: -------------------------------------------------------------------------------- 1 | libopencv_stitching.2.4.dylib -------------------------------------------------------------------------------- /head/libopencv_superres.2.4.13.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MachineLP/cnn_faceDetection/10872c30492c6dd23b713003197f378c7df68b65/head/libopencv_superres.2.4.13.dylib -------------------------------------------------------------------------------- /head/libopencv_superres.2.4.dylib: -------------------------------------------------------------------------------- 1 | libopencv_superres.2.4.13.dylib -------------------------------------------------------------------------------- /head/libopencv_superres.dylib: -------------------------------------------------------------------------------- 1 | libopencv_superres.2.4.dylib -------------------------------------------------------------------------------- /head/libopencv_ts.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MachineLP/cnn_faceDetection/10872c30492c6dd23b713003197f378c7df68b65/head/libopencv_ts.a -------------------------------------------------------------------------------- /head/libopencv_video.2.4.13.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MachineLP/cnn_faceDetection/10872c30492c6dd23b713003197f378c7df68b65/head/libopencv_video.2.4.13.dylib -------------------------------------------------------------------------------- /head/libopencv_video.2.4.dylib: -------------------------------------------------------------------------------- 1 | libopencv_video.2.4.13.dylib -------------------------------------------------------------------------------- /head/libopencv_video.dylib: -------------------------------------------------------------------------------- 1 | libopencv_video.2.4.dylib -------------------------------------------------------------------------------- /head/libopencv_videostab.2.4.13.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MachineLP/cnn_faceDetection/10872c30492c6dd23b713003197f378c7df68b65/head/libopencv_videostab.2.4.13.dylib -------------------------------------------------------------------------------- /head/libopencv_videostab.2.4.dylib: -------------------------------------------------------------------------------- 1 | libopencv_videostab.2.4.13.dylib -------------------------------------------------------------------------------- /head/libopencv_videostab.dylib: -------------------------------------------------------------------------------- 1 | libopencv_videostab.2.4.dylib -------------------------------------------------------------------------------- /head/pkgconfig/opencv.pc: -------------------------------------------------------------------------------- 1 | # Package Information for pkg-config 2 | 3 | prefix=/usr/local/Cellar/opencv/2.4.13.1 4 | exec_prefix=${prefix} 5 | libdir=${exec_prefix}/lib 6 | includedir_old=${prefix}/include/opencv 7 | includedir_new=${prefix}/include 8 | 9 | Name: OpenCV 10 | Description: Open Source Computer Vision Library 11 | Version: 2.4.13.1 12 | Libs: -L${exec_prefix}/lib -lopencv_calib3d -lopencv_contrib -lopencv_core -lopencv_features2d -lopencv_flann -lopencv_gpu -lopencv_highgui -lopencv_imgproc -lopencv_legacy -lopencv_ml -lopencv_nonfree -lopencv_objdetect -lopencv_ocl -lopencv_photo -lopencv_stitching -lopencv_superres -lopencv_ts -lopencv_video -lopencv_videostab 13 | Cflags: -I${includedir_old} -I${includedir_new} 14 | -------------------------------------------------------------------------------- /head/python2.7/site-packages/cv.py: -------------------------------------------------------------------------------- 1 | from cv2.cv import * 2 | -------------------------------------------------------------------------------- /head/python2.7/site-packages/cv2.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MachineLP/cnn_faceDetection/10872c30492c6dd23b713003197f378c7df68b65/head/python2.7/site-packages/cv2.so -------------------------------------------------------------------------------- /hiddenLayer.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MachineLP/cnn_faceDetection/10872c30492c6dd23b713003197f378c7df68b65/hiddenLayer.cpp -------------------------------------------------------------------------------- /hiddenLayer.h: -------------------------------------------------------------------------------- 1 | #ifndef HIDDENLAYER_H 2 | #define HIDDENLAYER_H 3 | 4 | #include "neuralbase.h" 5 | 6 | class HiddenLayer: public NeuralBase 7 | { 8 | public: 9 | HiddenLayer(int n_i, int n_o); 10 | ~HiddenLayer(); 11 | 12 | double* Forward_propagation(double* input_data); 13 | 14 | void Back_propagation(double *pdInputData, double *pdNextLayerDelta, 15 | double** ppdnextLayerW, int iNextLayerOutNum, double dLr); 16 | 17 | 18 | 19 | }; 20 | 21 | #endif -------------------------------------------------------------------------------- /logisticRegression.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MachineLP/cnn_faceDetection/10872c30492c6dd23b713003197f378c7df68b65/logisticRegression.cpp -------------------------------------------------------------------------------- /logisticRegression.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef LOGISTICREGRESSIONLAYER 3 | #define LOGISTICREGRESSIONLAYER 4 | #include "neuralbase.h" 5 | 6 | typedef unsigned short WORD; 7 | 8 | class LogisticRegression: public NeuralBase 9 | { 10 | public: 11 | LogisticRegression(int n_i, int i_o, int); 12 | ~LogisticRegression(); 13 | 14 | double* Forward_propagation(double* input_data); 15 | void Softmax(double* x); 16 | void Train(double *pdTrain, WORD usLabel, double dLr); 17 | 18 | 19 | void SetOldWb(double ppdWeigh[][3], double arriBias[8]); 20 | int Predict(double *); 21 | 22 | void MakeLabels(int* piMax, double (*pplabels)[8]); 23 | }; 24 | 25 | void Test_lr(); 26 | void Testwb(); 27 | void Test_theano(const int m_iInput, const int m_iOut); 28 | #endif 29 | -------------------------------------------------------------------------------- /main.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // main.cpp 3 | // faceDetection-cnn 4 | // 5 | // Created by 刘鹏 on 2016/11/27. 6 | // Copyright © 2016年 刘鹏. All rights reserved. 7 | // 8 | #include 9 | #include 10 | #include 11 | #include 12 | // 新版本写在下面文件中: 13 | #include 14 | //#include "opencv2/features2d/features2d.hpp" 15 | #include 16 | 17 | #include 18 | #include 19 | 20 | #include "FDImage.h" 21 | #include "CCCascadeClassifier.h" 22 | #include 23 | #include 24 | #include 25 | 26 | using namespace std; 27 | using namespace cv; 28 | 29 | 30 | IplImage* cutImage(IplImage* src, CvRect rect) { 31 | cvSetImageROI(src, rect); 32 | IplImage* dst = cvCreateImage(cvSize(rect.width, rect.height), 33 | src->depth, 34 | src->nChannels); 35 | 36 | cvCopy(src,dst,0); 37 | cvResetImageROI(src); 38 | // imshow("dst",(Mat)dst); 39 | return dst; 40 | } 41 | 42 | // Function main 43 | int main() 44 | { 45 | 46 | FDImage* image; 47 | image = new FDImage; 48 | vector vFaceRect; 49 | vector faceBox; 50 | CCCascadeClassifier *cascade; 51 | cascade = new CCCascadeClassifier; 52 | //======================================================== 53 | // CvCapture  «“ª∏ˆΩ·ππ㨔√¿¥±£¥ÊÕºœÒ≤∂ªÒÀ˘–Ë“™µƒ–≈œ¢°£ 54 | // opencv÷π©¡Ω÷÷∑Ω Ω¥”Õ‚≤ø≤∂ªÒÕºœÒ£¨“ª÷÷ «¥”…„œÒÕ∑÷–£¨“ª÷÷ 55 | //  «Õ®π˝Ω‚¬Î ”∆µµ√µΩÕºœÒ°£¡Ω÷÷∑Ω Ω∂º±ÿ–Î¥”µ⁄“ª÷°ø™ º“ª÷°“ª÷° 56 | // µƒ∞¥À≥–ÚªÒ»°£¨“Ú¥À√øªÒ»°“ª÷°∫Û∂º“™±£¥Êœ‡”¶µƒ◊¥Ã¨∫Õ≤Œ ˝°£ 57 | // ±»»Á¥” ”∆µŒƒº˛÷–ªÒ»°£¨–Ë“™±£¥Ê ”∆µŒƒº˛µƒŒƒº˛√˚£¨œ‡”¶µƒ****** 58 | // ¿‡–Õ£¨œ¬“ª¥Œ»Áπ˚“™ªÒ»°Ω´–Ë“™Ω‚¬Îƒƒ“ª÷°µ»°£ ’‚–©–≈œ¢∂º±£¥Ê‘⁄ 59 | // CvCaptureΩ·ππ÷–£¨√øªÒ»°“ª÷°∫Û£¨’‚–©–≈œ¢∂ºΩ´±ª∏¸–¬£¨ªÒ»°œ¬“ª÷° 60 | // –Ë“™Ω´–¬–≈œ¢¥´∏¯ªÒ»°µƒapiΩ”ø⁄ 61 | //======================================================= 62 | CvCapture* capture = 0; 63 | //=========================================================== 64 | // IplImage  «Ω·ππÿ‡–Õ£¨”√¿¥±£¥Ê“ª÷°ÕºœÒµƒ–≈œ¢£¨“≤æÕ «“ª÷° 65 | // ÕºœÒµƒÀ˘”–œÒÀÿ÷µππ≥…µƒ“ª∏ˆæÿ’Û 66 | //=========================================================== 67 | IplImage *frame, *frame_copy = 0; 68 | IplImage *src; 69 | IplImage *pGrayImg; 70 | 71 | // ¥¥Ω®“ª∏ˆ¥∞ø⁄£¨”√°∞result°±◊˜Œ™¥∞ø⁄µƒ±Í ∂∑˚ 72 | cvNamedWindow( "result", 1 ); 73 | 74 | // ========================================== 75 | // ≥ı ºªØ“ª∏ˆ ”∆µ≤∂ªÒ≤Ÿ◊˜°£ 76 | // ∏ÊÀflµ◊≤„µƒ≤∂ªÒapiŒ“œÎ¥” Capture1.avi÷–≤∂ªÒÕº∆¨£¨ 77 | // µ◊≤„apiΩ´ºÏ≤‚≤¢—°‘Òœ‡”¶µƒ******≤¢◊ˆ∫√◊º±∏π§◊˜ 78 | //============================================== 79 | capture = cvCaptureFromFile("/Users/liupeng/Desktop/my/faceDetection-cnn/faceDetection-cnn/data/outColor2.mp4"); 80 | // ªÒ»°…„œÒÕ∑ 81 | // capture = cvCaptureFromCAM(0); 82 | 83 | // »Áπ˚ ≥ı ºªØ ß∞‹£¨ƒ«√¥captureŒ™ø’÷∏’Σ¨≥ÖÚÕ£÷𣨠84 | // ∑Ò‘ÚΩ¯»Î≤∂ªÒ—≠ª∑ 85 | if( capture ) 86 | { 87 | // ≤∂ªÒ—≠ª∑ 88 | while(1) 89 | { 90 | // µ˜”√cvGrabFrame,»√µ◊≤„apiΩ‚¬Î“ª÷°ÕºœÒ 91 | // »Áπ˚Ω‚¬Î ß∞‹£¨æÕÕÀ≥ˆ—≠ª∑ 92 | // »Áπ˚≥…𶣨ق¬ÎµƒÕºœÒ±£¥Ê‘⁄µ◊≤„apiµƒª∫¥Ê÷– 93 | if( !cvGrabFrame( capture )) 94 | break; 95 | 96 | // Ω´Ω‚¬Îµ√µΩÕºœÒ–≈œ¢¥”ª∫¥Ê÷–◊™ªª≥…IplImage∏Ò Ω∑≈‘⁄frame÷– 97 | // frame = cvRetrieveFrame( capture ); 98 | frame = cvQueryFrame(capture); 99 | 100 | // »Áπ˚ªÒ»°ª∫¥ÊªÚ◊™ªª ß∞‹£¨‘ÚÕÀ≥ˆ—≠ª∑ 101 | if( !frame ) 102 | break; 103 | 104 | Mat mFrame = (Mat)frame; 105 | // Apply the classifier to the frame 106 | if (!mFrame.empty()){ 107 | 108 | src = frame; 109 | cvShowImage( "image", src ); 110 | 111 | CvRect rect; 112 | int iX = 900; 113 | int iY = 200; 114 | 115 | rect.x = 200; 116 | rect.y = 0; 117 | rect.width = 200; 118 | rect.height = 200; 119 | 120 | /* Infrared ÕºœÒœ¬µƒ…Ë÷√ 121 | rect.x = 12; 122 | rect.y = 24; 123 | rect.width = 400; 124 | rect.height = 400; */ 125 | 126 | IplImage *temp = cutImage(src,rect); 127 | // imshow("aaaa",Mat(temp)); 128 | 129 | // µ˜’˚Õº∆¨µƒ¥Û–°°£ 130 | IplImage *imageresize; 131 | imageresize=cvCreateImage(cvSize(200,200),temp->depth,temp->nChannels); 132 | cvResize(temp,imageresize,CV_INTER_LINEAR); 133 | // imshow("img1", Mat(temp)); 134 | // waitKey(); 135 | 136 | pGrayImg=cvCreateImage(cvGetSize(imageresize),8,1); 137 | cvCvtColor(imageresize,pGrayImg,CV_RGB2GRAY); 138 | 139 | imshow("img2",Mat(pGrayImg)); 140 | // waitKey(); 141 | 142 | // Ω´IplImage∏Ò ΩµƒÕº∆¨◊™ªØŒ™FDImage∏Ò ΩµƒÕº∆¨ 143 | image->Load(pGrayImg); 144 | double t1, t2; 145 | //cascade->LoadDefaultCascade(); 146 | //if(cascade ==NULL) 147 | /// return; 148 | FDImage &im = *image; 149 | //if(cascade->count>0) 150 | { 151 | t1 = getTickCount(); 152 | //cascade->FaceDetect_ScaleImage(im); 153 | vFaceRect = cascade->FaceDetectWithRet_ScaleIamge(im,"E:/"); 154 | for (int ic = 0; ic < vFaceRect.size(); ic++) // Iterate through all current elements (detected faces) 155 | { 156 | if(vFaceRect[ic].x > 0) 157 | { 158 | float alpha = 1.0; 159 | Point pt1(200+vFaceRect[ic].x*alpha, vFaceRect[ic].y*alpha); // Display detected faces on main window - live stream from camera 160 | Point pt2((200+vFaceRect[ic].x+vFaceRect[ic].width)*alpha, (vFaceRect[ic].y+vFaceRect[ic].height)*alpha); 161 | Mat mF = (Mat)frame; 162 | rectangle(mF, pt1, pt2, Scalar(0, 255, 0), 2, 8, 0); 163 | } 164 | } 165 | } 166 | } 167 | else{ 168 | printf(" --(!) No captured frame -- Break!"); 169 | //break; 170 | } 171 | 172 | int c = waitKey(1); 173 | 174 | if (27 == char(c)){ 175 | // break; 176 | } 177 | 178 | // Ω´frame÷–µƒÕºœÒ–≈œ¢‘⁄¥∞ø⁄result÷–œ‘ æ 179 | cvShowImage( "gray", pGrayImg ); 180 | cvShowImage( "result", frame ); 181 | 182 | // ‘›Õ£“ªª·∂˘£¨»√ƒ„ø¥“ªœ¬ÕºœÒ 183 | cvWaitKey(1); 184 | 185 | } 186 | 187 | // ÕÀ≥ˆ≥ÖÚ÷Æ«∞“™«Â¿Ì“ªœ¬∂—’ª÷–µƒƒ⁄¥Ê£¨√‚µ√ƒ⁄¥Ê–π¬∂ 188 | //cvReleaseImage( &frame );◊¢“‚≤ª–Ë“™’‚扣¨“ÚŒ™frame «¥” ”∆µ÷–≤∂ªÒµƒ£¨√ª”–µ•∂¿∑÷≈‰ƒ⁄¥Ê£¨Œfi–Ë Õ∑≈£¨µ±capture  Õ∑≈µƒ ±∫Úframe◊‘»ªæÕ Õ∑≈¡À°£ 189 | 190 | // ÕÀ≥ˆ÷Æ«∞Ω· ¯µ◊≤„apiµƒ≤∂ªÒ≤Ÿ◊˜£¨√‚µ√À¸√«’º◊≈√©ø”≤ª¿≠ ∫ 191 | // ±»»Áª· πµ√±µƒ≥Öڌfi∑®∑√Œ “—æ≠±ªÀ¸√«¥Úø™µƒŒƒº˛ 192 | cvReleaseCapture( &capture ); 193 | 194 | } 195 | cvDestroyWindow("result"); 196 | 197 | return 0; 198 | } 199 | 200 | 201 | 202 | -------------------------------------------------------------------------------- /mlp.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MachineLP/cnn_faceDetection/10872c30492c6dd23b713003197f378c7df68b65/mlp.cpp -------------------------------------------------------------------------------- /mlp.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MachineLP/cnn_faceDetection/10872c30492c6dd23b713003197f378c7df68b65/mlp.h -------------------------------------------------------------------------------- /neuralNetwork.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MachineLP/cnn_faceDetection/10872c30492c6dd23b713003197f378c7df68b65/neuralNetwork.h -------------------------------------------------------------------------------- /neuralbase.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "neuralbase.h" 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | #include 9 | #include 10 | 11 | 12 | #include "util.h" 13 | 14 | using namespace std; 15 | 16 | 17 | NeuralBase::NeuralBase(int n_i, int n_o, int n_t):m_iInput(n_i), m_iOut(n_o), m_iSamplenum(n_t) 18 | { 19 | m_ppdW = new double* [m_iOut]; 20 | for(int i = 0; i < m_iOut; ++i) 21 | { 22 | m_ppdW[i] = new double [m_iInput]; 23 | } 24 | m_pdBias = new double [m_iOut]; 25 | 26 | double a = 1.0 / m_iInput; 27 | 28 | srand((unsigned)time(NULL)); 29 | for(int i = 0; i < m_iOut; ++i) 30 | { 31 | for(int j = 0; j < m_iInput; ++j) 32 | m_ppdW[i][j] = uniform(-a, a); 33 | m_pdBias[i] = uniform(-a, a); 34 | } 35 | 36 | m_pdDelta = new double [m_iOut]; 37 | m_pdOutdata = new double [m_iOut]; 38 | } 39 | 40 | NeuralBase::~NeuralBase() 41 | { 42 | Callbackwb(); 43 | delete[] m_pdOutdata; 44 | delete[] m_pdDelta; 45 | } 46 | void NeuralBase::Callbackwb() 47 | { 48 | _callbackwb(); 49 | } 50 | double NeuralBase::CalErrorRate(const vector &vecvalid, const vector &vecValidlabel) 51 | { 52 | int iErrorNumber = 0, iValidNumber = vecValidlabel.size(); 53 | for (int i = 0; i < iValidNumber; ++i) 54 | { 55 | int iResult = Predict(vecvalid[i]); 56 | if (iResult != vecValidlabel[i]) 57 | { 58 | ++iErrorNumber; 59 | } 60 | } 61 | 62 | cout << "the num of error is " << iErrorNumber << endl; 63 | double dErrorRate = (double)iErrorNumber / iValidNumber; 64 | cout << "the error rate of Train sample by softmax is " << setprecision(10) << dErrorRate * 100 << "%" << endl; 65 | 66 | return dErrorRate; 67 | } 68 | int NeuralBase::Predict(double *) 69 | { 70 | cout << "NeuralBase::Predict(double *)" << endl; 71 | return 0; 72 | } 73 | 74 | void NeuralBase::_callbackwb() 75 | { 76 | for(int i=0; i < m_iOut; i++) 77 | delete []m_ppdW[i]; 78 | delete[] m_ppdW; 79 | delete[] m_pdBias; 80 | } 81 | 82 | void NeuralBase::Printwb() 83 | { 84 | cout << "'****m_ppdW****\n"; 85 | for(int i = 0; i < m_iOut; ++i) 86 | { 87 | for(int j = 0; j < m_iInput; ++j) 88 | cout << m_ppdW[i][j] << ' '; 89 | cout << endl; 90 | } 91 | cout << "'****m_pdBias****\n"; 92 | for(int i = 0; i < m_iOut; ++i) 93 | { 94 | cout << m_pdBias[i] << ' '; 95 | } 96 | cout << endl; 97 | cout << "'****output****\n"; 98 | for(int i = 0; i < m_iOut; ++i) 99 | { 100 | cout << m_pdOutdata[i] << ' '; 101 | } 102 | cout << endl; 103 | 104 | } 105 | 106 | 107 | double* NeuralBase::Forward_propagation(double* input_data) 108 | { 109 | for(int i = 0; i < m_iOut; ++i) 110 | { 111 | m_pdOutdata[i] = 0.0; 112 | for(int j = 0; j < m_iInput; ++j) 113 | { 114 | m_pdOutdata[i] += m_ppdW[i][j]*input_data[j]; 115 | } 116 | m_pdOutdata[i] += m_pdBias[i]; 117 | } 118 | return m_pdOutdata; 119 | } 120 | 121 | void NeuralBase::Back_propagation(double* input_data, double* pdlabel, double dLr) 122 | { 123 | for(int i = 0; i < m_iOut; ++i) 124 | { 125 | m_pdDelta[i] = pdlabel[i] - m_pdOutdata[i] ; 126 | for(int j = 0; j < m_iInput; ++j) 127 | { 128 | m_ppdW[i][j] += dLr * m_pdDelta[i] * input_data[j] / m_iSamplenum; 129 | } 130 | m_pdBias[i] += dLr * m_pdDelta[i] / m_iSamplenum; 131 | } 132 | } 133 | void NeuralBase::MakeOneLabel(int imax, double *pdlabel) 134 | { 135 | for (int j = 0; j < m_iOut; ++j) 136 | pdlabel[j] = 0; 137 | pdlabel[imax] = 1.0; 138 | } 139 | void NeuralBase::Writewb(const char *szName) 140 | { 141 | savewb(szName, m_ppdW, m_pdBias, m_iOut, m_iInput); 142 | } 143 | long NeuralBase::Readwb(const char *szName, long dstartpos) 144 | { 145 | return loadwb(szName, m_ppdW, m_pdBias, m_iOut, m_iInput, dstartpos); 146 | } 147 | 148 | void NeuralBase::Setwb(vector &vpdw, vector &vdb) 149 | { 150 | assert(vpdw.size() == (DWORD)m_iOut); 151 | for (int i = 0; i < m_iOut; ++i) 152 | { 153 | delete []m_ppdW[i]; 154 | m_ppdW[i] = vpdw[i]; 155 | m_pdBias[i] = vdb[i]; 156 | } 157 | } 158 | 159 | void NeuralBase::TrainAllSample(const vector &vecTrain, const vector &vectrainlabel, double dLr) 160 | { 161 | for (int j = 0; j < m_iSamplenum; ++j) 162 | { 163 | Train(vecTrain[j], vectrainlabel[j], dLr); 164 | } 165 | } 166 | void NeuralBase::Train(double *x, WORD y, double dLr) 167 | { 168 | (void)x; 169 | (void)y; 170 | (void)dLr; 171 | cout << "NeuralBase::Train(double *x, WORD y, double dLr)" << endl; 172 | } 173 | 174 | void NeuralBase::PrintOutputData() 175 | { 176 | for (int i = 0; i < m_iOut; ++i) 177 | { 178 | cout << m_pdOutdata[i] << ' '; 179 | } 180 | cout << endl; 181 | 182 | 183 | } 184 | -------------------------------------------------------------------------------- /neuralbase.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MachineLP/cnn_faceDetection/10872c30492c6dd23b713003197f378c7df68b65/neuralbase.h -------------------------------------------------------------------------------- /poollayer.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MachineLP/cnn_faceDetection/10872c30492c6dd23b713003197f378c7df68b65/poollayer.cpp -------------------------------------------------------------------------------- /poollayer.h: -------------------------------------------------------------------------------- 1 | #ifndef POOLLAYER_H 2 | #define POOLLAYER_H 3 | #include 4 | using std::vector; 5 | class PoolLayer 6 | { 7 | public: 8 | PoolLayer(int iOutImageNumber, int iPoolWidth, int iFeatureMapWidth); 9 | ~PoolLayer(); 10 | void Convolute(double *pdInputData); 11 | void SetBias(const vector &vecBias); 12 | double* GetOutputData(); 13 | void PrintOutputData(); 14 | 15 | private: 16 | int m_iOutImageNumber; 17 | int m_iPoolWidth; 18 | int m_iFeatureMapWidth; 19 | int m_iPoolSize; 20 | int m_iOutImageEdge; 21 | int m_iOutImageSize; 22 | 23 | double *m_pdOutData; 24 | double *m_pdBias; 25 | }; 26 | 27 | #endif // POOLLAYER_H -------------------------------------------------------------------------------- /stdafx.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MachineLP/cnn_faceDetection/10872c30492c6dd23b713003197f378c7df68b65/stdafx.cpp -------------------------------------------------------------------------------- /stdafx.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MachineLP/cnn_faceDetection/10872c30492c6dd23b713003197f378c7df68b65/stdafx.h -------------------------------------------------------------------------------- /targetver.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MachineLP/cnn_faceDetection/10872c30492c6dd23b713003197f378c7df68b65/targetver.h -------------------------------------------------------------------------------- /util.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MachineLP/cnn_faceDetection/10872c30492c6dd23b713003197f378c7df68b65/util.cpp -------------------------------------------------------------------------------- /util.h: -------------------------------------------------------------------------------- 1 | #ifndef UTIL_H 2 | #define UTIL_H 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | using namespace std; 10 | 11 | 12 | typedef unsigned char BYTE; 13 | typedef unsigned short WORD; 14 | typedef unsigned int DWORD; 15 | 16 | double sigmoid(double x); 17 | double mytanh(double dx); 18 | 19 | typedef struct stShapeWb 20 | { 21 | stShapeWb(int w, int h):width(w), height(h){} 22 | int width; 23 | int height; 24 | }ShapeWb_S; 25 | 26 | void MakeOneLabel(int iMax, double *pdLabel, int m_iOut); 27 | 28 | double uniform(double _min, double _max); 29 | //void printArr(T *parr, int num); 30 | //void printArrDouble(double **pparr, int row, int col); 31 | void initArr(double *parr, int num); 32 | int getMaxIndex(double *pdarr, int num); 33 | void Printivec(const vector &ivec); 34 | void savewb(const char *szName, double **m_ppdW, double *m_pdBias, 35 | int irow, int icol); 36 | long loadwb(const char *szName, double **m_ppdW, double *m_pdBias, 37 | int irow, int icol, long dstartpos); 38 | 39 | void TestLoadJson(const char *pcfilename); 40 | bool LoadvtFromJson(vector &vecTrain, vector &vecLabel, const char *filename, const int m_iInput); 41 | bool LoadwbFromJson(vector &vecTrain, vector &vecLabel, const char *filename, const int m_iInput); 42 | bool LoadTestSampleFromJson(vector &vecTrain, vector &vecLabel, const char *filename, const int m_iInput); 43 | bool LoadwbByByte(vector &vecTrain, vector &vecLabel, const char *filename, const int m_iInput); 44 | bool LoadallwbByByte(vector< vector > &vvAllw, vector< vector > &vvAllb, const char *filename, 45 | const int m_iInput, const int ihidden, const int m_iOut); 46 | bool LoadWeighFromJson(vector< vector > &vvAllw, vector< vector > &vvAllb, 47 | const char *filename, const vector &vecSecondDimOfWeigh); 48 | void MakeCnnSample(double arr[2][64], double *pdImage, int iImageWidth, int iNumOfImage ); 49 | void MakeCnnWeigh(double *, int iNumOfKernel); 50 | template 51 | void printArr(T *parr, int num) 52 | { 53 | cout << "****printArr****" << endl; 54 | 55 | for (int i = 0; i < num; ++i) 56 | cout << parr[i] << ' '; 57 | cout << endl; 58 | } 59 | template 60 | void printArrDouble(T **pparr, int row, int col) 61 | { 62 | cout << "****printArrDouble****" << endl; 63 | for (int i = 0; i < row; ++i) 64 | { 65 | for (int j = 0; j < col; ++j) 66 | { 67 | cout << pparr[i][j] << ' '; 68 | } 69 | cout << endl; 70 | } 71 | } 72 | 73 | 74 | #endif 75 | --------------------------------------------------------------------------------