{"id":61,"date":"2019-10-27T07:29:00","date_gmt":"2019-10-27T07:29:00","guid":{"rendered":"https:\/\/www.wangliguang.cn\/?p=61"},"modified":"2019-10-27T07:29:00","modified_gmt":"2019-10-27T07:29:00","slug":"tensorflow%e4%ba%ba%e8%84%b8%e8%af%86%e5%88%ab%ef%bc%88tensorflowdlibopencv%ef%bc%89%e5%9f%ba%e4%ba%8e%e6%b7%b1%e5%ba%a6%e5%ad%a6%e4%b9%a0%e7%9a%84%e4%ba%ba%e8%84%b8%e8%af%86%e5%88%ab%e6%90%ad","status":"publish","type":"post","link":"https:\/\/wangliguang.cn\/?p=61","title":{"rendered":"TensorFlow\u4eba\u8138\u8bc6\u522b\uff08TensorFlow+Dlib+OpenCV\uff09\u57fa\u4e8e\u6df1\u5ea6\u5b66\u4e60\u7684\u4eba\u8138\u8bc6\u522b \u642d\u5efa\u5377\u79ef\u795e\u7ecf\u7f51\u7edc&#8211;\u7406\u8bba\u53ca\u4ee3\u7801\u8be6\u89e3\uff0c\u5305\u542b\u6587\u6863\u548c\u6e90\u4ee3\u7801"},"content":{"rendered":"<p><strong>\u672c\u6587\u6863\u4f5c\u8005\u4e3aLuke\uff08wlg\uff09\u3002<br \/>\n\u672c\u6587\u6863\u6700\u521d\u662f\u8bfe\u7a0b\u62a5\u544a\uff0c\u73b0\u505a\u4e86\u5c11\u91cf\u6539\u7f16\u4ec5\u4f9b\u5b66\u4e60\u4ea4\u6d41\u4f7f\u7528\u3002<br \/>\n\u672a\u7ecf\u5141\u8bb8\uff0c\u4e25\u7981\u590d\u5236\u3001\u8f6c\u8f7d\u6216\u5f15\u7528\u6587\u6863\u7684\u4efb\u4f55\u90e8\u5206\uff01\u7279\u6b64\u58f0\u660e\uff01<br \/>\n<\/strong><\/p>\n<h2>1 \u9879\u76ee\u6982\u8ff0<\/h2>\n<p>\u4eba\u8138\u8bc6\u522b\u5728\u73b0\u4ee3\u793e\u4f1a\u4e2d\u6709\u7740\u975e\u5e38\u5e7f\u6cdb\u7684\u5e94\u7528\u3002\u6b64\u6b21\u6570\u5b57\u56fe\u50cf\u5904\u7406\u8bfe\u7a0b\u4e2d\uff0c\u6211\u9009\u62e9\u505a\u4e00\u4e2a\u57fa\u4e8e\u6df1\u5ea6\u5b66\u4e60\u7684\u4eba\u8138\u8bc6\u522b\u7cfb\u7edf\u3002\u6211\u8bbe\u8ba1\u7684\u57fa\u4e8e\u6df1\u5ea6\u5b66\u4e60\u7684\u4eba\u8138\u8bc6\u522b\u7cfb\u7edf\uff0c\u901a\u8fc7\u6444\u50cf\u5934\u83b7\u53d6\u56fe\u7247\uff0c\u4f7f\u7528dlib\u5206\u7c7b\u5668\u5b9a\u4f4d\u4eba\u8138\uff0c\u4f7f\u7528\u5377\u79ef\u795e\u7ecf\u7f51\u7edc\u8fdb\u884c\u4eba\u8138\u8bc6\u522b\u3002\u6211\u8bbe\u8ba1\u7684\u7cfb\u7edf\u6709\u4e09\u4e2a\u8f93\u51fa\u7c7b\u522b\u3002\u9664\u4e86\u53ef\u4ee5\u8bc6\u522b\u6211\u548c\u53e6\u5916\u4e00\u4e2a\u540c\u5b66\u5916\uff0c\u6211\u8fd8\u5728\u7f51\u7edc\u4e0a\u7684LFW\u4eba\u8138\u56fe\u7247\u5e93\u4e2d\u4e0b\u8f7d\u4e86\u4e00\u5b9a\u7684\u56fe\u7247\uff0c\u6765\u4f5c\u4e3a\u7b2c\u4e09\u4e2a\u7c7b\u522b\u4e3a\u56fe\u7247\u6807\u8bb0\u6807\u7b7e\u3002\u5173\u4e8e\u7cfb\u7edf\u7684\u8be6\u7ec6\u8bbe\u8ba1\u601d\u8def\u548c\u5b9e\u73b0\u8fc7\u7a0b\u5c06\u5728\u4e0b\u9762\u51e0\u4e2a\u90e8\u5206\u8fdb\u884c\u8be6\u8ff0\u3002<\/p>\n<h2><a id=\"2__10\"><\/a>2 \u6a21\u5757\u529f\u80fd\u548c\u7ed3\u6784\u5212\u5206<\/h2>\n<p>\u6211\u5b9e\u73b0\u7684\u7cfb\u7edf\u5171\u5206\u4e3a\u6444\u50cf\u5934\u91c7\u96c6\u548c\u5904\u7406\u56fe\u7247\u6a21\u5757\u3001\u672c\u5730\u56fe\u7247\u5904\u7406\u6a21\u5757\u3001\u5377\u79ef\u795e\u7ecf\u7f51\u7edc\u642d\u5efa\u548c\u8bad\u7ec3\u6a21\u5757\u4ee5\u53ca\u6d4b\u8bd5\u6a21\u5757\u56db\u4e2a\u90e8\u5206\uff0c\u6bcf\u4e2a\u90e8\u5206\u4fdd\u5b58\u5728\u4e00\u4e2a.py\u6587\u4ef6\u4e2d\u3002<br \/>\n\u6444\u50cf\u5934\u91c7\u96c6\u548c\u5904\u7406\u56fe\u7247\u6a21\u5757\u4e3b\u8981\u8d1f\u8d23\u91c7\u96c6\u4eba\u8138\u56fe\u7247\uff0c\u901a\u8fc7\u8c03\u7528\u6444\u50cf\u5934\u622a\u53d6\u7167\u7247\uff0c\u5b9a\u4f4d\u4eba\u8138\uff0c\u6307\u5b9a\u89c4\u683c\u5316\uff0c\u5e76\u6700\u7ec8\u4fdd\u5b58\u4eba\u8138\u56fe\u7247\u3002<br \/>\n\u672c\u5730\u56fe\u7247\u5904\u7406\u6a21\u5757\u4e3b\u8981\u7528\u4e8e\u5904\u7406\u6211\u5728\u7f51\u7edc\u4e0a\u4e0b\u8f7d\u4e0b\u6765\u4f5c\u4e3a\u7b2c\u4e09\u4e2a\u5206\u7c7b\u7c7b\u522b\u4f7f\u7528\u7684\u56fe\u7247\uff0c\u5176\u4e3b\u8981\u529f\u80fd\u662f\u5c06\u56fe\u7247\u8bfb\u5165\uff0c\u4f7f\u7528dlib\u5b9a\u4f4d\u4eba\u8138\uff0c\u7136\u540e\u5c06\u4eba\u8138\u56fe\u7247\u4fdd\u5b58\u6210\u6211\u8bbe\u5b9a\u597d\u7684\u89c4\u683c\u4ee5\u4fbf\u4f7f\u7528\u3002<br \/>\n\u5377\u79ef\u795e\u7ecf\u7f51\u7edc\u642d\u5efa\u548c\u8bad\u7ec3\u6a21\u5757\u4e3b\u8981\u5b8c\u6210\u524d\u5411\u4f20\u64ad\u3001\u5212\u5206\u8bad\u7ec3\u96c6\u4e0e\u6d4b\u8bd5\u96c6\u3001\u53cd\u5411\u4f20\u64ad\u7b49\u529f\u80fd\uff0c\u662f\u6574\u4e2a\u7cfb\u7edf\u7684\u5173\u952e\u90e8\u5206\u3002<br \/>\n\u6d4b\u8bd5\u90e8\u5206\u4e3b\u8981\u6765\u8c03\u7528\u6444\u50cf\u5934\u6355\u83b7\u4eba\u8138\u56fe\u7247\uff0c\u7136\u540e\u8bfb\u5165\u4e4b\u524d\u4fdd\u5b58\u597d\u7684\u8bad\u7ec3\u6210\u719f\u7684\u7f51\u7edc\u8fdb\u884c\u8bc6\u522b\u3002<br \/>\n\u7cfb\u7edf\u7ed3\u6784\u5982\u4e0b\u56fe\u6240\u793a\uff1a<br \/>\n<img decoding=\"async\" src=\"https:\/\/img-blog.csdnimg.cn\/20190131173131367.png?x-oss-process=image\/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2hhcHB5d2xnMTIz,size_16,color_FFFFFF,t_70\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\"><br \/>\n\u56fe 1\u7cfb\u7edf\u7ed3\u6784<\/p>\n<h2><a id=\"3__19\"><\/a>3 \u9879\u76ee\u5b9e\u73b0<\/h2>\n<h3><a id=\"31__20\"><\/a>3.1 \u6837\u672c\u7684\u91c7\u96c6\u548c\u5904\u7406<\/h3>\n<p>\u6837\u672c\u7684\u91c7\u96c6\u548c\u5904\u7406\u4e3b\u8981\u96c6\u4e2d\u5728\u6444\u50cf\u5934\u91c7\u96c6\u548c\u5904\u7406\u56fe\u7247\u6a21\u5757\u3001\u672c\u5730\u56fe\u7247\u5904\u7406\u4e24\u4e2a\u6a21\u5757\u4e2d\u3002<br \/>\n\u9996\u5148\uff0c\u4f7f\u7528\u6444\u50cf\u5934\u91c7\u96c6\u548c\u5904\u7406\u56fe\u7247\u6a21\u5757\u6765\u91c7\u96c6\u548c\u5904\u7406\u6211\u548c\u53e6\u5916\u4e00\u4e2a\u540c\u5b66\u7684\u56fe\u7247\u3002\u4f7f\u7528OpenCV\u8c03\u7528\u6444\u50cf\u5934\uff0c\u7136\u540e\u622a\u53d6\u56fe\u7247\u5e76\u7070\u5ea6\u5316\uff0c\u4e4b\u540e\u4f7f\u7528dlib\u627e\u5230\u4eba\u8138\u5e76\u4ee5\u5408\u9002\u7684\u89c4\u683c\u4fdd\u5b58\u56fe\u7247\u3002\u5177\u4f53\u6d41\u7a0b\u5982\u4e0b\u56fe\u6240\u793a\uff1a<br \/>\n<img decoding=\"async\" src=\"https:\/\/img-blog.csdnimg.cn\/20190131173220615.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\"><br \/>\n\u56fe 2\u91c7\u96c6\u6d41\u7a0b<br \/>\n\u5728\u7f51\u4e0a\u4e0b\u8f7dLFW\u56fe\u7247\u5e93\u7684\u56fe\u7247\u5e76\u4e0d\u7b26\u5408\u6211\u60f3\u4f7f\u7528\u7684\u89c4\u683c\uff0c\u6240\u4ee5\u8bbe\u8ba1\u4e86\u672c\u5730\u7167\u7247\u5904\u7406\u6a21\u5757\u3002\u5728\u672c\u5730\u7167\u7247\u5904\u7406\u4e2d\uff0c\u6d41\u7a0b\u57fa\u672c\u548c\u4e0a\u9762\u4e00\u81f4\uff0c\u4e0d\u540c\u7684\u5730\u65b9\u5728\u4e8e\u8f93\u5165\u4e0d\u518d\u4ece\u6444\u50cf\u5934\u4e2d\u8bfb\u5165\uff0c\u800c\u662f\u672c\u5730\u7684\u56fe\u7247\u3002\u5177\u4f53\u6d41\u7a0b\u5982\u4e0b\u56fe\u6240\u793a\uff1a<br \/>\n<img decoding=\"async\" src=\"https:\/\/img-blog.csdnimg.cn\/20190131173243138.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\"><br \/>\n\u56fe 3\u672c\u5730\u56fe\u7247\u5904\u7406\u6d41\u7a0b<br \/>\n\u4e0b\u9762\u6765\u89e3\u91ca\u4e0e\u6837\u672c\u91c7\u96c6\u4e0e\u5904\u7406\u6709\u5173\u7684\u5173\u952e\u4ee3\u7801\u3002<br \/>\n\u9996\u5148\u4f7f\u7528**camera = cv2.VideoCapture(0)**\u6765\u6253\u5f00\u6444\u50cf\u5934\uff0c\u5728\u7ecf\u8fc7\u7070\u5ea6\u5316\u5904\u7406\u540e\uff0c\u4f7f\u7528dlib\u5206\u7c7b\u5668\u5b9a\u4f4d\u4eba\u8138\uff0c\u83b7\u53d6\u5230\u76f8\u5e94\u7684\u5750\u6807\u3002<br \/>\n<img decoding=\"async\" src=\"https:\/\/img-blog.csdnimg.cn\/20190131173252684.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\"><br \/>\n\u56fe 4\u5b9a\u4f4d\u4eba\u8138\u5750\u6807<br \/>\n\u83b7\u53d6\u5230\u4eba\u8138\u7684\u5de6\u4e0b\u89d2\u548c\u53f3\u4e0a\u89d2\u5750\u6807\u540e\uff0c\u5728\u901a\u8fc7\u6444\u50cf\u5934\u83b7\u53d6\u7684\u56fe\u7247\u4e2d\u628a\u4eba\u8138\u622a\u53d6\u51fa\u6765\uff0c\u4fdd\u5b58\u6210\u6211\u4eec\u60f3\u8981\u7684\u89c4\u683c\u3002\u53ef\u901a\u8fc7\u4ee3\u7801face = img[x1:y1,x2:y2]\uff0cface = cv2.resize(face, (size,size))\u6765\u5b8c\u6210\u3002<br \/>\n\u5728\u5b8c\u6210\u5bf9\u56fe\u7247\u7684\u91c7\u96c6\u548c\u5904\u7406\u540e\uff0c\u63a5\u4e0b\u6765\u8fdb\u884c\u795e\u7ecf\u7f51\u7edc\u7684\u642d\u5efa\u5de5\u4f5c\u3002<br \/>\n<strong>\u672c\u6587\u6863\u4f5c\u8005\u4e3aLuke\uff08wlg\uff09\u3002<br \/>\n<\/strong><\/p>\n<h3><a id=\"32__41\"><\/a>3.2 \u5377\u79ef\u795e\u7ecf\u7f51\u7edc\u7684\u6784\u5efa\u548c\u8bad\u7ec3<\/h3>\n<h4><a id=\"321__42\"><\/a>3.2.1 \u5377\u79ef\u3001\u6c60\u5316\u3001\u6fc0\u6d3b\u548c\u820d\u5f03<\/h4>\n<p>\u5377\u79ef\u5c42\u5728\u6574\u4e2a\u7f51\u7edc\u4e2d\u5177\u6709\u91cd\u8981\u7684\u4f5c\u7528\uff0c\u7528\u6765\u63d0\u53d6\u6837\u672c\u7684\u7279\u5f81\u5e76\u8fdb\u884c\u5904\u7406\uff0c\u9009\u62e9\u597d\u5377\u79ef\u5c42\u5bf9\u6574\u4e2a\u5377\u79ef\u795e\u7ecf\u7f51\u7edc\u8bc6\u522b\u7684\u51c6\u786e\u7387\u6709\u91cd\u8981\u7684\u5f71\u54cd\u3002\u5728\u9009\u62e9\u5377\u79ef\u6838\u7684\u65f6\u5019\uff0c\u4e00\u822c\u91c7\u7528\u201c\u5c0f\u5377\u79ef\u6838\uff0c\u591a\u5377\u79ef\u5c42\u6570\u201d\u7684\u539f\u5219\u3002\u56e0\u6b64\uff0c\u6211\u6700\u7ec8\u91c7\u7528\u4e86\u5728\u56fe\u50cf\u8bc6\u522b\u4e2d\u975e\u5e38\u5e38\u7528\u7684\u4e09\u5c42\u5377\u79ef\u7684\u7ed3\u6784\u3002\u5377\u79ef\u6838\u5927\u5c0f\u91c7\u75283\u4e583\uff0c\u5728\u884c\u548c\u5217\u4e0a\u7684\u79fb\u52a8\u6b65\u957f\u5747\u5b9a\u4e3a1\u3002\u4e3a\u4e86\u4fdd\u8bc1\u6837\u672c\u5728\u7ecf\u8fc7\u5377\u79ef\u5c42\u540e\u89c4\u683c\u4e0d\u53d8\uff0c\u65b9\u4fbf\u4e0b\u4e00\u6b65\u5904\u7406\uff0c\u6211\u4f7f\u7528\u4e86\u201c\u5168\u96f6\u586b\u5145\u201d\uff0c\u4e5f\u5c31\u662f\u5728\u6837\u672c\u5916\u9762\u52a0\u4e00\u5c42\u201c0\u201d\u3002<br \/>\n\u5728\u6bcf\u4e00\u5c42\u5377\u79ef\u5c42\u540e\uff0c\u6211\u90fd\u8fde\u63a5\u4e86\u4e00\u4e2a\u6c60\u5316\u5c42\uff0c\u91c7\u7528\u6700\u5927\u6c60\u5316\u6765\u8fdb\u884c\u4e0b\u91c7\u6837\u3002\u6211\u5c06\u6c60\u5316\u5c42\u7684\u5206\u8fa8\u7387\u5b9a\u4e3a2\u4e582\uff0c\u4e5f\u5c31\u662f\u5c06\u5377\u79ef\u540e\u7684\u6837\u672c\u5206\u6210\u4e86\u5f88\u591a\u4e2a2\u4e582\u7684\u5c0f\u533a\u57df\uff0c\u5728\u6bcf\u4e2a\u5c0f\u533a\u57df\u91cc\u91c7\u96c6\u6700\u5927\u503c\uff0c\u7136\u540e\u5408\u5e76\u8d77\u6765\u4f5c\u4e3a\u6c60\u5316\u5c42\u7684\u8f93\u51fa\u7ed3\u679c\u3002\u7528\u4e8e\u6c60\u5316\u7684\u539f\u56e0\uff0c\u867d\u7136\u5377\u79ef\u8fc7\u540e\u6837\u672c\u89c4\u683c\u5e76\u6ca1\u6709\u53d1\u751f\u53d8\u5316\uff0c\u4f46\u662f\u6c60\u5316\u4f1a\u4f7f\u6837\u672c\u7684\u957f\u5bbd\u51cf\u5c0f\u4e00\u534a\u3002<br \/>\n\u5728\u5b8c\u6210\u6c60\u5316\u540e\uff0c\u6211\u53c8\u8ba9\u6837\u672c\u8fc7\u4e86\u4e00\u6b21\u6fc0\u6d3b\u51fd\u6570\u3002\u6fc0\u6d3b\u51fd\u6570\u7684\u4f5c\u7528\u662f\u7ed9\u795e\u7ecf\u7f51\u7edc\u52a0\u5165\u4e00\u4e9b\u975e\u7ebf\u6027\u7684\u56e0\u7d20\uff0c\u4f7f\u5f97\u795e\u7ecf\u7f51\u7edc\u53ef\u4ee5\u66f4\u597d\u7684\u89e3\u51b3\u5206\u7c7b\u95ee\u9898\u3002\u5728\u9009\u62e9\u6fc0\u6d3b\u51fd\u6570\u7684\u65f6\u5019\uff0c\u6211\u91c7\u7528\u4e86relu\u51fd\u6570\u3002\u6211\u7ecf\u8fc7\u67e5\u9605\u6587\u732e\u53d1\u73b0\uff0c\u5f53\u524d\u5f88\u591a\u6587\u732e\u90fd\u63a8\u8350\u4f7f\u7528relu\u51fd\u6570\uff0c\u539f\u56e0\u662f\u5b83\u7684\u8ba1\u7b97\u4ee3\u4ef7\u5c0f\u5e76\u4e14\u80fd\u591f\u51cf\u8f7b\u68af\u5ea6\u6d88\u5931\u7684\u95ee\u9898\u3002\u4e3a\u4e86\u51cf\u5c0f\u8bad\u7ec3\u65f6\u95f4\uff0c\u6211\u6700\u7ec8\u9009\u62e9\u4e86\u4f7f\u7528relu\u51fd\u6570\u3002<br \/>\n<img decoding=\"async\" src=\"https:\/\/img-blog.csdnimg.cn\/2019013117351345.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\"><br \/>\n\u56fe 5relu\u51fd\u6570\u793a\u610f\u56fe<br \/>\n\u5728\u5b8c\u6210\u6fc0\u6d3b\u5f80\u4e0b\u4e00\u5c42\u7f51\u7edc\u8f93\u5165\u524d\uff0c\u6211\u53c8\u5f15\u5165\u4e86\u820d\u5f03\u3002\u5f15\u5165\u820d\u5f03\u7684\u539f\u56e0\u5728\u4e8e\uff0c\u6211\u4eec\u6784\u9020\u7684\u7f51\u7edc\u9700\u8981\u8bad\u7ec3\u7684\u53c2\u6570\u666e\u904d\u5f88\u5927\uff0c\u800c\u4e14\u5f88\u5bb9\u6613\u4ea7\u751f\u8fc7\u62df\u5408\u7684\u95ee\u9898\u3002\u4e3a\u4e86\u589e\u5f3a\u6a21\u578b\u7684\u6cdb\u5316\u6027\uff0c\u53ef\u4ee5\u901a\u8fc7\u820d\u5f03\uff0c\u968f\u673a\u7684\u8ba9\u67d0\u4e9b\u53c2\u6570\u4e0d\u53c2\u4e0e\u8bad\u7ec3\u3002\u4f46\u662f\uff0c\u820d\u5f03\u4ec5\u4ec5\u662f\u9488\u5bf9\u8bad\u7ec3\u9636\u6bb5\u800c\u8a00\u7684\uff0c\u5728\u6a21\u578b\u771f\u5b9e\u4f7f\u7528\u7684\u65f6\u5019\uff0c\u6240\u6709\u7684\u53c2\u6570\u90fd\u662f\u8981\u53c2\u4e0e\u5230\u8ba1\u7b97\u4e2d\u6765\u7684\u3002<br \/>\n\u6700\u7ec8\uff0c\u8fd9\u4e00\u90e8\u5206\u7684\u7f51\u7edc\u7ed3\u6784\u5982\u4e0b\u56fe\u6240\u793a\uff1a<br \/>\n<img decoding=\"async\" src=\"https:\/\/img-blog.csdnimg.cn\/20190131173522782.png?x-oss-process=image\/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2hhcHB5d2xnMTIz,size_16,color_FFFFFF,t_70\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\"><br \/>\n\u56fe 6\u7ed3\u6784\u793a\u610f<br \/>\n\u5728\u6211\u8bbe\u8ba1\u7684\u7f51\u7edc\u7ed3\u6784\u4e2d\uff0c\u9996\u5148\u5c06\u51c6\u5907\u597d\u7684\u6837\u672c\u8f93\u5165\uff0864<em>64<\/em>3\uff09\uff0c\u7ecf\u8fc7\u5377\u79ef\u540e\uff0c\u6837\u672c\u89c4\u683c\u4e0d\u53d8\uff0c\u4f46\u662f\u901a\u9053\u6570\u75313\u53d8\u4e3a\u4e8632\u3002\u7136\u540e\u7ecf\u8fc7\u6c60\u5316\u5c42\u65f6\uff0c\u6837\u672c\u7684\u957f\u5bbd\u5404\u51cf\u534a\uff0c\u6240\u4ee5\u5728\u7ecf\u8fc7\u7b2c\u4e00\u5c42\u5377\u79ef\u548c\u6c60\u5316\u540e\uff0c\u6837\u672c\u89c4\u683c\u53d8\u4e3a\u4e8632<em>32<\/em>32\u3002\u5176\u4ed6\u5c42\u7684\u8ba1\u7b97\u65b9\u6cd5\u4e0e\u7b2c\u4e00\u5c42\u5b8c\u5168\u76f8\u540c\u3002\u5728\u7ecf\u8fc7\u4e86\u7b2c\u4e8c\u5c42\u5377\u79ef\u6838\u6c60\u5316\u540e\uff0c\u6837\u672c\u89c4\u683c\u53d8\u4e3a\u4e8616<em>16<\/em>32\u3002\u5728\u7ecf\u8fc7\u4e86\u7b2c\u4e09\u5c42\u5377\u79ef\u6838\u6c60\u5316\u8fc7\u540e\uff0c\u6837\u672c\u7684\u89c4\u683c\u53d8\u4e3a\u4e868<em>8<\/em>64\uff0c\u5e76\u4f5c\u4e3a\u8f93\u5165\u8fdb\u5165\u5230\u5168\u8fde\u63a5\u795e\u7ecf\u7f51\u7edc\u4e2d\u3002<br \/>\n\u4ee3\u7801\u4e0a\uff0c\u914d\u7f6e\u5377\u79ef\u5c42\u3001\u6c60\u5316\u5c42\u4ee5\u53ca\u4f7f\u7528\u6fc0\u6d3b\u51fd\u6570\u548c\u5f15\u5165\u820d\u5f03\uff0c\u90fd\u53ef\u4ee5\u901a\u8fc7\u8c03\u7528TensorFlow\u91cc\u7684\u51fd\u6570\u5b9e\u73b0\uff0c\u4e3a\u4e86\u65b9\u4fbf\u8d77\u89c1\uff0c\u53ef\u4ee5\u81ea\u5df1\u5b9a\u4e49\u51fd\u6570\uff0c\u5728\u91cc\u9762\u518d\u8c03\u7528TensorFlow\u7684\u51fd\u6570\uff0c\u8fd9\u6837\u53ea\u9700\u8981\u5728\u81ea\u5df1\u7684\u51fd\u6570\u91cc\u628aTensorFlow\u9700\u8981\u7684\u53c2\u6570\u914d\u7f6e\u597d\uff0c\u4ee5\u540e\u53ea\u9700\u8981\u8c03\u7528\u81ea\u5df1\u7684\u51fd\u6570\u4f20\u6837\u672c\u548c\u5f85\u4f18\u5316\u53c2\u6570\u5c31\u53ef\u4ee5\u4e86\u3002\u5177\u4f53\u5982\u4e0b\u6240\u793a\uff1a<br \/>\n<img decoding=\"async\" src=\"https:\/\/img-blog.csdnimg.cn\/20190131173559131.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\"><br \/>\n<img decoding=\"async\" src=\"https:\/\/img-blog.csdnimg.cn\/20190131173604955.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\"><br \/>\n<img decoding=\"async\" src=\"https:\/\/img-blog.csdnimg.cn\/20190131173609670.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\"><br \/>\n\u56fe 7\u81ea\u5df1\u5305\u88c5\u597d\u521b\u5efa\u5377\u79ef\u3001\u6c60\u5316\u3001\u820d\u5f03\u7684\u51fd\u6570<\/p>\n<h4><a id=\"322__59\"><\/a>3.2.2 \u5168\u8fde\u63a5\u795e\u7ecf\u7f51\u7edc<\/h4>\n<p>\u5728\u5168\u8fde\u63a5\u795e\u7ecf\u7f51\u7edc\u4e2d\uff0c\u6211\u4e3b\u8981\u8bbe\u7f6e\u4e86\u4e00\u5c42\u9690\u85cf\u5c42\u548c\u4e00\u5c42\u8f93\u51fa\u5c42\u3002\u6839\u636e\u6211\u67e5\u9605\u7684\u6587\u732e\uff0c\u589e\u52a0\u9690\u85cf\u5c42\u7684\u5c42\u6570\u53ef\u4ee5\u964d\u4f4e\u7f51\u7edc\u8bef\u5dee\uff0c\u4f46\u662f\u540c\u65f6\u589e\u52a0\u4e86\u7f51\u7edc\u7684\u590d\u6742\u6027\uff0c\u5bb9\u6613\u4f7f\u7f51\u7edc\u4ea7\u751f\u8fc7\u62df\u5408\u7684\u503e\u5411\uff0c\u56e0\u6b64\u5f80\u5f80\u901a\u8fc7\u589e\u52a0\u9690\u85cf\u5c42\u8282\u70b9\u4e2a\u6570\u6765\u83b7\u5f97\u8f83\u4f4e\u7684\u8bef\u5dee\u6bd4\u589e\u52a0\u5c42\u6570\u8981\u597d\u4e00\u4e9b\u3002<br \/>\n\u4e3a\u4e86\u786e\u5b9a\u8bbe\u7f6e\u591a\u5c11\u4e2a\u9690\u85cf\u5c42\u8282\u70b9\u8f83\u597d\uff0c\u6211\u8fdb\u884c\u4e86\u4e00\u4e9b\u5c1d\u8bd5\uff0c\u5206\u522b\u5c1d\u8bd5\u4e86256\u3001512\u30011024\u4e09\u79cd\u9690\u85cf\u5c42\u8282\u70b9\u60c5\u51b5\u4e0b\u7f51\u7edc\u5728\u6d4b\u8bd5\u96c6\u4e0a\u7684\u51c6\u786e\u7387\u3002<br \/>\n\u4e3a\u4e86\u63a7\u5236\u53d8\u91cf\uff0c\u5c06\u8f93\u5165\u6837\u672c\u786e\u5b9a\u4e3a6000\uff0c\u5176\u4e2d\u6211\u3001\u6211srf\u7684\u642d\u6863\u4ee5\u53ca\u7b2c\u4e09\u5206\u7c7b\u56fe\u7247\u54042000\u5f20\u3002\u8bad\u7ec3\u96c6\u548c\u6d4b\u8bd5\u96c6\u7684\u6bd4\u4f8b\u8bbe\u7f6e\u4e3a95:5\uff0cbatch_size\u8bbe\u7f6e\u4e3a100\u4e2a\u6837\u672c\uff0c\u6267\u884c400\u4e2abatch_size\u540e\u505c\u6b62\u3002<br \/>\n256\u3001512\u30011024\u4e2a\u9690\u85cf\u5c42\u8282\u70b9\u4e0b\u7684\u6d4b\u8bd5\u96c6\u51c6\u786e\u7387\u548closs\u5982\u4e0b\u56fe\u6240\u793a\uff1a<br \/>\n\u2026<br \/>\n\u8bf7\u8fdb\u5165github\u94fe\u63a5\u83b7\u53d6\u6e90\u4ee3\u7801\u548c\u5168\u6587\uff1ahttps:\/\/github.com\/lukegood\/DIY_Face_recognition_system<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u672c\u6587\u6863\u4f5c\u8005\u4e3aLuke\uff08wlg\uff09\u3002 \u672c\u6587\u6863\u6700\u521d\u662f\u8bfe\u7a0b\u62a5\u544a\uff0c\u73b0\u505a\u4e86\u5c11\u91cf\u6539\u7f16\u4ec5\u4f9b\u5b66\u4e60\u4ea4\u6d41\u4f7f\u7528\u3002 \u672a\u7ecf\u5141\u8bb8\uff0c\u4e25\u7981\u590d\u5236\u3001&hellip; <a href=\"https:\/\/wangliguang.cn\/?p=61\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb <span class=\"screen-reader-text\">TensorFlow\u4eba\u8138\u8bc6\u522b\uff08TensorFlow+Dlib+OpenCV\uff09\u57fa\u4e8e\u6df1\u5ea6\u5b66\u4e60\u7684\u4eba\u8138\u8bc6\u522b \u642d\u5efa\u5377\u79ef\u795e\u7ecf\u7f51\u7edc&#8211;\u7406\u8bba\u53ca\u4ee3\u7801\u8be6\u89e3\uff0c\u5305\u542b\u6587\u6863\u548c\u6e90\u4ee3\u7801<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15,19],"tags":[37,41],"class_list":["post-61","post","type-post","status-publish","format-standard","hentry","category-15","category-19","tag-37","tag-41"],"_links":{"self":[{"href":"https:\/\/wangliguang.cn\/index.php?rest_route=\/wp\/v2\/posts\/61","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wangliguang.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wangliguang.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wangliguang.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wangliguang.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=61"}],"version-history":[{"count":0,"href":"https:\/\/wangliguang.cn\/index.php?rest_route=\/wp\/v2\/posts\/61\/revisions"}],"wp:attachment":[{"href":"https:\/\/wangliguang.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=61"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wangliguang.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=61"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wangliguang.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=61"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}