{"id":681,"date":"2024-04-09T08:00:46","date_gmt":"2024-04-09T00:00:46","guid":{"rendered":"https:\/\/www.zhoubin.asia\/?p=681"},"modified":"2024-04-09T07:22:47","modified_gmt":"2024-04-08T23:22:47","slug":"face-detectionscrfd","status":"publish","type":"post","link":"https:\/\/www.zhoubin.asia\/index.php\/2024\/04\/09\/face-detectionscrfd\/","title":{"rendered":"[Face Detection]SCRFD \u540e\u5904\u7406\u5b9e\u73b0"},"content":{"rendered":"<p>\u6700\u8fd1\u505a\u4e86\u4e00\u4e2a\u4eba\u8138\u68c0\u6d4b\u6a21\u578b SCRFD10g \u7684 Demo\uff0c\u8be5\u6a21\u578b\u7684 GitHub \u5730\u5740\u662f <a href=\"https:\/\/github.com\/deepinsight\/insightface\/tree\/master\/recognition\/scrfd\">SCRFD<\/a>\u3002\u5728\u8be5 Demo \u4e2d\uff0c\u9664\u4e86\u68c0\u6d4b\u4eba\u8138\u5916\uff0c\u8fd8\u5c06\u4eba\u8138\u5750\u6807 10 \u4e2a\u503c\u663e\u793a\u51fa\u6765\uff0c\u5305\u62ec 5 \u4e2a\u70b9\u30012 \u4e2a\u773c\u775b\u3001\u9f3b\u5c16\u548c 2 \u4e2a\u5634\u89d2\u3002<\/p>\n<p>\u91cd\u70b9\u5173\u6ce8\u6b64\u6a21\u578b\u7684 NMS \u540e\u5904\u7406\u90e8\u5206\uff0c\u7279\u522b\u662f\u6b64\u6a21\u578b\u5728 Hailo \u5e73\u53f0\u4e2d\u8fd0\u884c\u7684\u65f6\u5019\u540e\u5904\u7406\u90e8\u5206\u3002\u53ef\u4ee5\u901a\u8fc7 <code>hailortcli parse-hef scrfd10g.hef<\/code> \u67e5\u770b\u6b64\u6a21\u578b\u7684\u8f93\u51fa\u8282\u70b9\u3002<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-682\" src=\"https:\/\/www.zhoubin.asia\/wp-content\/uploads\/2024\/04\/scrfd10g.jpg\" alt=\"\" width=\"1109\" height=\"357\" \/><\/p>\n<p>\u660e\u663e\u5730\uff0c\u6a21\u578b\u4e0e YOLO \u6709\u7740\u7c7b\u4f3c\u7684 anchor \u8f93\u51fa\uff0c\u7279\u5f81\u56fe\u4e5f\u662f\u4e00\u6837\u7684 20&#215;20\u300140&#215;40 \u548c 80&#215;80\u3002\u5176\u4e2d\uff1a<\/p>\n<ul>\n<li><strong>scrfd_10g\/conv42<\/strong>\u3001<strong>scrfd_10g\/conv50<\/strong>\u3001<strong>scrfd_10g\/conv57<\/strong> \u4e3a 2 \u4e2a anchor \u7684\u6846\u5750\u6807\u3002<\/li>\n<li><strong>scrfd_10g\/conv41<\/strong>\u3001<strong>scrfd_10g\/conv49<\/strong>\u3001<strong>scrfd_10g\/conv56<\/strong> \u4e3a 2 \u4e2a anchor \u7684\u7f6e\u4fe1\u5ea6\u503c\u3002<\/li>\n<li><strong>scrfd_10g\/conv43<\/strong>\u3001<strong>scrfd_10g\/conv51<\/strong>\u3001<strong>scrfd_10g\/conv58<\/strong> \u4e3a 2 \u4e2a anchor \u7684\u5173\u952e\u70b9\u5750\u6807\u3002<\/li>\n<\/ul>\n<p>\u7c7b\u4f3c YOLO \u7684\u540e\u5904\u7406\uff0c\u6211\u4eec\u5c06 9 \u4e2a\u8f93\u51fa\u53e3\u6309\u7167\u7279\u5f81\u56fe\u8fdb\u884c\u5206 3 \u7ec4\uff0c\u6bcf\u7ec4\u91cc\u9762\u6709\u5206 3 \u7c7b\u5904\u7406\uff1a\u7f6e\u4fe1\u5ea6\u3001\u89e3\u7801\u6846\u3001\u89e3\u7801\u5173\u952e\u70b9\u3002\u8fd9\u91cc\u6211\u4eec\u5148\u901a\u8fc7\u51fd\u6570 <code>scrfd_conf_processing<\/code> \u901a\u8fc7\u7279\u5f81\u56fe\u533a\u5206\uff0c\u5c06\u53cd\u91cf\u5316\u540e\u7684\u7f6e\u4fe1\u5ea6\u5168\u90e8\u5f97\u5230\u5e76\u4f9d\u8d56\u9608\u503c\u6765\u7b5b\u9009\u6211\u4eec\u9700\u8981\u5904\u7406\u7684\u7d22\u5f15\uff08\u4fdd\u5b58\u5177\u4f53\u7279\u5f81\u56fe\u7684\u5bbd\u5ea6\u3001\u9ad8\u5ea6\u548c anchor \u503c\uff09\u3002<\/p>\n<p>\u7b2c\u4e8c\u6b65\uff0c\u6211\u4eec\u901a\u8fc7\u524d\u9762\u5f97\u5230\u7684\u7d22\u5f15\uff0c\u53bb\u6846\u7ec4\uff0c\u901a\u8fc7 <code>decodeBox<\/code> \u5f97\u5230\u6846\u503c\uff1a<\/p>\n<pre><code>float centor_x = (float)col\/map_size;\r\nfloat centor_y = (float)row\/map_size;\r\nfloat scale = (float)1\/map_size;\r\nfloat x1 = centor_x - boxDetection[0] * scale;\r\nfloat y1 = centor_y - boxDetection[1] * scale;\r\nfloat x2 = centor_x + boxDetection[2] * scale;\r\nfloat y2 = centor_y + boxDetection[3] * scale;<\/code><\/pre>\n<p>\u540c\u6837\u7684\u539f\u7406\uff0c\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7 <code>decodeLandmark<\/code> \u8ba1\u7b97\u51fa 5 \u4e2a\u70b9\u7684\u5173\u952e\u70b9\u5750\u6807\uff1a<\/p>\n<pre><code>for (int i = 0; i &lt; NUM_LANDMARKS; i += 2) {\r\n  x1 = centor_x + landmarkDetection[i] * scale;\r\n  y1 = centor_y + landmarkDetection[i+1] * scale;\r\n}<\/code><\/pre>\n<p>\u6700\u540e\uff0c\u5c06\u5f97\u5230\u7684\u8d85\u8fc7\u9608\u503c\u7684\u6240\u6709\u5750\u6807\u505a\u4e00\u6b21 IOU \u7b5b\u9009\uff0c\u5c31\u53ef\u4ee5\u5f97\u5230\u6211\u4eec\u6700\u7ec8\u5e0c\u671b\u5f97\u5230\u7684\u5750\u6807\u7ed3\u679c\u4e86\u3002<\/p>\n<p>\u6574\u4e2a\u6765\u770b\uff0cSCRFD \u7684\u540e\u5904\u7406\u8fd8\u662f\u633a\u7b80\u5355\u7684\uff0c\u56e0\u4e3a\u5176\u53ea\u6709\u4e00\u4e2a face \u7c7b\u522b\uff0c\u4e0d\u50cf YOLO \u4e00\u6837\u6709 80 \u4e2a\u7c7b\u522b\uff0c\u5e76\u4e14\u5176\u8f93\u51fa\u53e3\u5c06\u7f6e\u4fe1\u5ea6\u3001\u6846\u4ee5\u53ca\u5173\u952e\u70b9\u62c6\u5206\u51fa\u6765\u5206\u522b\u8f93\u51fa\uff0c\u800c\u6ca1\u6709\u5408\u5e76\u5728\u4e00\u8d77\u9700\u8981\u81ea\u884c\u7ec4\u5408\u3002\u518d\u6b21\u5176\u901a\u8fc7\u4e2d\u5fc3\u70b9\u4e0e scale \u5f97\u5230\u6846\u548c\u5173\u952e\u70b9\u7684\u65b9\u5f0f\u4e5f\u975e\u5e38\u7b80\u5355\uff0c\u76f4\u63a5\u505a\u4e00\u6b21\u4e2d\u5fc3\u70b9\u52a0\u51cf\u8fd0\u7b97\u5373\u53ef\u3002<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6700\u8fd1\u505a\u4e86\u4e00\u4e2a\u4eba\u8138\u68c0\u6d4b\u6a21\u578b SCRFD10g \u7684 Demo\uff0c\u8be5\u6a21\u578b\u7684 GitHub \u5730\u5740\u662f SCRFD\u3002\u5728\u8be5 D [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"footnotes":""},"categories":[15,1],"tags":[],"class_list":["post-681","post","type-post","status-publish","format-standard","hentry","category-ai","category-tech"],"_links":{"self":[{"href":"https:\/\/www.zhoubin.asia\/index.php\/wp-json\/wp\/v2\/posts\/681","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.zhoubin.asia\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.zhoubin.asia\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.zhoubin.asia\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.zhoubin.asia\/index.php\/wp-json\/wp\/v2\/comments?post=681"}],"version-history":[{"count":1,"href":"https:\/\/www.zhoubin.asia\/index.php\/wp-json\/wp\/v2\/posts\/681\/revisions"}],"predecessor-version":[{"id":683,"href":"https:\/\/www.zhoubin.asia\/index.php\/wp-json\/wp\/v2\/posts\/681\/revisions\/683"}],"wp:attachment":[{"href":"https:\/\/www.zhoubin.asia\/index.php\/wp-json\/wp\/v2\/media?parent=681"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.zhoubin.asia\/index.php\/wp-json\/wp\/v2\/categories?post=681"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.zhoubin.asia\/index.php\/wp-json\/wp\/v2\/tags?post=681"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}