{"id":305770,"date":"2020-06-23T09:00:29","date_gmt":"2020-06-23T09:00:29","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=305770"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=305770","title":{"rendered":"\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043a\u0430\u0441\u043a\u0430\u0434\u043e\u0432 \u0425\u0430\u0430\u0440\u0430"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/504288\/\">\n<p>\u0418\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u0443\u0435\u043c\u043e\u0435 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u2014 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u0430\u044f \u0442\u0435\u043c\u0430 \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u0433\u043e\u0434\u044b. \u0412\u043e \u043c\u043d\u043e\u0433\u043e\u043c \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e \u044d\u0442\u043e\u0439 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438 \u0432 \u043c\u0435\u0434\u0438\u0446\u0438\u043d\u0435, \u0442\u0440\u0430\u043d\u0441\u043f\u043e\u0440\u0442\u0435 \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u043e\u0431\u043b\u0430\u0441\u0442\u044f\u0445, \u0433\u0434\u0435 \u0446\u0435\u043d\u0430 \u043e\u0448\u0438\u0431\u043a\u0438 \u0432\u0435\u043b\u0438\u043a\u0430, \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c, \u043a\u0430\u043a \u043c\u043e\u0434\u0435\u043b\u044c \u0443\u0441\u0442\u0440\u043e\u0435\u043d\u0430 \u0438 \u0447\u0435\u043c &quot;\u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0443\u0435\u0442\u0441\u044f&quot; \u043f\u0440\u0438 \u043f\u0440\u0438\u043d\u044f\u0442\u0438\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u0439.<\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u043e\u0441\u0442\u043e\u0442\u0430 \u043e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043c\u043e\u0434\u0435\u043b\u0438. \u041a\u0443\u0434\u0430 \u043f\u0440\u043e\u0449\u0435 \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0434\u0435\u0440\u0435\u0432\u043e \u043f\u0440\u0438\u043d\u044f\u0442\u0438\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u0439, \u0447\u0435\u043c \u0438\u0437\u0432\u043b\u0435\u0447\u044c \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0438\u0437 \u0432\u0435\u0441\u043e\u0432 \u043f\u043e\u043b\u043d\u043e\u0441\u0432\u044f\u0437\u043d\u043e\u0439 \u043d\u0435\u0439\u0440\u043e\u043d\u043a\u0438. \u041a \u0441\u0447\u0430\u0441\u0442\u044c\u044e, <a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%9F%D1%80%D0%B8%D0%B7%D0%BD%D0%B0%D0%BA%D0%B8_%D0%A5%D0%B0%D0%B0%D1%80%D0%B0\" rel=\"nofollow\">\u043a\u0430\u0441\u043a\u0430\u0434\u044b \u0425\u0430\u0430\u0440\u0430<\/a> \u0438\u043c\u0435\u044e\u0442 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0438 \u043c\u043e\u0436\u043d\u043e, \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044f \u0438\u0445 \u043a \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044e, \u0443\u0437\u043d\u0430\u0442\u044c, \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043c\u043e\u0434\u0435\u043b\u044c.<\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<h2 id=\"parsing-xml-fayla\">\u041f\u0430\u0440\u0441\u0438\u043d\u0433 xml-\u0444\u0430\u0439\u043b\u0430<\/h2>\n<p>  <\/p>\n<p>\u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u043d\u0430\u0447\u0430\u043b\u0430. OpenCV \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 \u043a\u0430\u0441\u043a\u0430\u0434\u0430\u043c\u0438, \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u043c\u0438 \u0432 xml. \u0410\u0432\u0442\u043e\u0440 <a href=\"https:\/\/habr.com\/ru\/company\/recognitor\/blog\/228195\/\">\u0441\u0442\u0430\u0442\u044c\u0438<\/a> \u043f\u043e\u043c\u043e\u0433 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f, \u043a\u0430\u043a \u044d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b \u0443\u0441\u0442\u0440\u043e\u0435\u043d. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c.<\/p>\n<p>  <\/p>\n<p>\u0421\u043f\u0435\u0440\u0432\u0430 \u0438\u0434\u0435\u0442 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043a\u0430\u0441\u043a\u0430\u0434\u0430. \u0411\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <a href=\"https:\/\/raw.githubusercontent.com\/opencv\/opencv\/master\/data\/haarcascades\/haarcascade_frontalface_default.xml\" rel=\"nofollow\">\u0434\u0435\u0442\u0435\u043a\u0442\u043e\u0440 \u043b\u0438\u0446<\/a> \u0438\u0437 OpenCV. <code>stageType<\/code> \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043d\u0430\u043c, \u0447\u0442\u043e \u043a\u0430\u0441\u043a\u0430\u0434\u044b \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0431\u0443\u0441\u0442\u0438\u043d\u0433\u043e\u043c. <code>featureType<\/code> \u2014 \u0442\u0438\u043f \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432, \u0430 <code>height<\/code> \u0438 <code>width<\/code> \u2014 \u0432\u044b\u0441\u043e\u0442\u0430 \u0438 \u0448\u0438\u0440\u0438\u043d\u0430 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430\u043c\u0438. <code>maxWeakCount<\/code> \u2014 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u043b\u0430\u0431\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u0432 \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u0435 \u043a\u0430\u0441\u043a\u0430\u0434\u0430. <code>stageNum<\/code> \u2014 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0443\u0440\u043e\u0432\u043d\u0435\u0439.<\/p>\n<p>  <\/p>\n<pre><code class=\"xml\">&lt;opencv_storage&gt; &lt;cascade type_id=&quot;opencv-cascade-classifier&quot;&gt;&lt;stageType&gt;BOOST&lt;\/stageType&gt;   &lt;featureType&gt;HAAR&lt;\/featureType&gt;   &lt;height&gt;24&lt;\/height&gt;   &lt;width&gt;24&lt;\/width&gt;   &lt;stageParams&gt;     &lt;maxWeakCount&gt;211&lt;\/maxWeakCount&gt;&lt;\/stageParams&gt;   &lt;featureParams&gt;     &lt;maxCatCount&gt;0&lt;\/maxCatCount&gt;&lt;\/featureParams&gt;   &lt;stageNum&gt;25&lt;\/stageNum&gt;<\/code><\/pre>\n<p>  <\/p>\n<p>\u0427\u0442\u043e \u0437\u0430 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438 \u0438 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u044b? \u041f\u0440\u0438\u0437\u043d\u0430\u043a\u0438 \u2014 \u044d\u0442\u043e \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0441\u0432\u0435\u0440\u0442\u043a\u0438 (\u043c\u0430\u0441\u043a\u0438), \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u043a \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044e. <\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/vj\/a2\/6w\/vja26wwnwcjh6iq_ztsefs2zcxe.png\"><br \/>  <em>\u0418\u0437 \u043f\u0438\u043a\u0441\u0435\u043b\u0435\u0439 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f, \u043d\u0430\u0445\u043e\u0434\u044f\u0449\u0438\u0445\u0441\u044f \u043f\u043e\u0434 \u0431\u0435\u043b\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u044c\u044e, \u0432\u044b\u0447\u0438\u0442\u0430\u044e\u0442\u0441\u044f \u043f\u0438\u043a\u0441\u0435\u043b\u0438, \u043d\u0430\u0445\u043e\u0434\u044f\u0449\u0438\u0435\u0441\u044f \u043f\u043e\u0434 \u0447\u0435\u0440\u043d\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u044c\u044e<\/em><\/p>\n<p>  <\/p>\n<p>\u041a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u044b \u2014 \u044d\u0442\u043e \u0440\u0435\u0448\u0430\u044e\u0449\u0438\u0435 \u0434\u0435\u0440\u0435\u0432\u044c\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0441\u043b\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043e\u0442 \u0441\u0432\u0435\u0440\u0442\u043e\u043a \u0432\u044b\u0434\u0430\u044e\u0442 \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0447\u0438\u0441\u0435\u043b\u043a\u0438. \u0418 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0441\u0443\u043c\u043c\u044b \u044d\u0442\u0438\u0445 \u0447\u0438\u0441\u0435\u043b\u043e\u043a \u043a\u0430\u0441\u043a\u0430\u0434 \u0440\u0435\u0448\u0430\u0435\u0442, \u0435\u0441\u0442\u044c \u043b\u0438 \u043d\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0438 \u043d\u0443\u0436\u043d\u044b\u0439 \u043f\u0440\u0435\u0434\u043c\u0435\u0442.<\/p>\n<p>  <\/p>\n<p><em>\u0423\u0440\u043e\u0432\u043d\u0438<\/em> (<code>stages<\/code>) \u2014 \u044d\u0442\u043e \u0433\u0440\u0443\u043f\u043f\u044b \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u0432. \u041a\u0430\u0436\u0434\u044b\u0439 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u0441\u043c\u043e\u0442\u0440\u0438\u0442 \u043d\u0430 \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u044e \u0441\u0432\u043e\u0438\u0445 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u0432 \u0438 \u0433\u043e\u0432\u043e\u0440\u0438\u0442, \u043d\u0443\u0436\u043d\u043e \u043b\u0438 \u0443\u0442\u043e\u0447\u043d\u0438\u0442\u044c \u0441\u0432\u043e\u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u0438\u044f (\u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0443\u0440\u043e\u0432\u0435\u043d\u044c) \u0438\u043b\u0438 \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043d\u0430 \u043d\u0435\u043c \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435\u0442.<\/p>\n<p>  <\/p>\n<pre><code class=\"xml\">&lt;stages&gt;     &lt;_&gt;       &lt;maxWeakCount&gt;9&lt;\/maxWeakCount&gt;       &lt;stageThreshold&gt;-5.0425500869750977e+00&lt;\/stageThreshold&gt;       &lt;weakClassifiers&gt;         &lt;_&gt;           &lt;internalNodes&gt;             0 -1 0 -3.1511999666690826e-02&lt;\/internalNodes&gt;           &lt;leafValues&gt;             2.0875380039215088e+00 -2.2172100543975830e+00&lt;\/leafValues&gt;&lt;\/_&gt;<\/code><\/pre>\n<p>  <\/p>\n<p><code>stageThreshold<\/code> \u2014 \u043f\u043e\u0440\u043e\u0433, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u0435\u043e\u0434\u043e\u043b\u0435\u0442\u044c \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430\u043c \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0443\u0440\u043e\u0432\u0435\u043d\u044c. \u0421\u0430\u043c\u0438 \u0436\u0435 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u044b \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 \u0442\u0435\u0433\u0435 <code>weakClassifiers<\/code>. <code>internalNodes<\/code> \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e\u0431 \u0443\u0437\u043b\u0430\u0445 \u0434\u0435\u0440\u0435\u0432\u0430. \u041f\u0435\u0440\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <code>0<\/code> \u2014 \u0438\u043d\u0434\u0435\u043a\u0441 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u043d\u043e\u0434\u044b. \u0412\u0442\u043e\u0440\u043e\u0435 \u2014 <code>-1<\/code> \u2014 \u0438\u043d\u0434\u0435\u043a\u0441 \u043d\u043e\u0434\u044b, \u0432 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0439\u0442\u0438, \u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u043f\u043e \u043b\u0438\u0441\u0442\u044c\u044f\u043c \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0435\u0442\u0441\u044f, \u043a\u043e\u0433\u0434\u0430 \u0438\u043d\u0434\u0435\u043a\u0441 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043c\u0435\u043d\u044c\u0448\u0435 <code>0<\/code>. (\u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435, \u0442\u0430\u043c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u0430\u044f \u0441\u0445\u0435\u043c\u0430 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u043e\u0432, \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 <a href=\"https:\/\/github.com\/opencv\/opencv\/blob\/0cf479dd5ce8602040716811240bb7595de4ba9e\/modules\/objdetect\/src\/cascadedetect.hpp#L556\" rel=\"nofollow\">\u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0430\u0445 OpenCV<\/a>.) \u0417\u0430\u0442\u0435\u043c \u0438\u0434\u0443\u0442 \u043d\u043e\u043c\u0435\u0440 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0430 <code>0<\/code> (\u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 \u2014 \u0434\u0430\u043b\u044c\u0448\u0435 \u0432 \u0444\u0430\u0439\u043b\u0435) \u0438 \u043f\u043e\u0440\u043e\u0433\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0434\u0435\u0440\u0435\u0432\u0430 <code>-3.1511999666690826e-02<\/code>.<\/p>\n<p>  <\/p>\n<p>\u0412 <code>leafValues<\/code> \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u043b\u0438\u0441\u0442\u044c\u044f\u0445 \u0434\u0435\u0440\u0435\u0432\u0430. \u041f\u0435\u0440\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <code>2.0875380039215088e+00<\/code> \u2014 \u043b\u0435\u0432\u044b\u0439 \u043b\u0438\u0441\u0442, \u043e\u043d \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f, \u0435\u0441\u043b\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u0432\u0435\u0440\u0442\u043a\u0438 \u043c\u0435\u043d\u044c\u0448\u0435 \u043f\u043e\u0440\u043e\u0433\u0430 \u0434\u0435\u0440\u0435\u0432\u0430, \u0432\u0442\u043e\u0440\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <code>-2.2172100543975830e+00<\/code> \u2014 \u043f\u0440\u0430\u0432\u044b\u0439 \u043b\u0438\u0441\u0442 \u2014 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f, \u0435\u0441\u043b\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u0432\u0435\u0440\u0442\u043a\u0438 \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u043e\u0440\u043e\u0433\u0430.<\/p>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438:<\/p>\n<p>  <\/p>\n<pre><code class=\"xml\">&lt;features&gt;     &lt;_&gt;       &lt;rects&gt;         &lt;_&gt;           6 4 12 9 -1.&lt;\/_&gt;         &lt;_&gt;           6 7 12 3 3.&lt;\/_&gt;&lt;\/rects&gt;&lt;\/_&gt;<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412 \u0442\u0435\u0433\u0435 <code>rects<\/code> \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0438, \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0449\u0438\u0435 \u0441\u0432\u0435\u0440\u0442\u043a\u0443. \u041f\u0435\u0440\u0432\u044b\u0435 4 \u0447\u0438\u0441\u043b\u0430 \u2014 <code>x1<\/code>, <code>y1<\/code>, <code>x2<\/code>, <code>y2<\/code> \u2014 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u043f\u043e\u043b\u043e\u0436\u043d\u044b\u0445 \u0432\u0435\u0440\u0448\u0438\u043d \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430, \u043f\u044f\u0442\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u2014 \u0435\u0433\u043e &quot;\u0446\u0432\u0435\u0442&quot;. \u0415\u0441\u043b\u0438 \u0447\u0438\u0441\u043b\u043e \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 (<code>-1<\/code>), \u0442\u043e \u043f\u0438\u043a\u0441\u0435\u043b\u0438 \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430 \u0432\u044b\u0447\u0438\u0442\u0430\u044e\u0442\u0441\u044f, \u0435\u0441\u043b\u0438 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 (<code>3<\/code>) \u2014 \u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u044e\u0442\u0441\u044f. <\/p>\n<p>  <\/p>\n<p>\u0421 \u0444\u0430\u0439\u043b\u043e\u043c \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0438\u0441\u044c, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0430\u0440\u0441\u0438\u0442\u044c:<\/p>\n<p>  <\/p>\n<pre><code class=\"python\"># \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 from lxml import etree from multiprocessing import Pool, cpu_count import time  import numpy as np from scipy.signal import convolve2d import matplotlib.pyplot as plt import cv2<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"python\">cascade_path = &quot;haarcascade_frontalface_default.xml&quot;  with open(cascade_path) as f:     xml = f.read()<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"python\">root = etree.fromstring(xml)  cascade = root.find(&quot;cascade&quot;) width = int(cascade.find(&quot;width&quot;).text) height = int(cascade.find(&quot;height&quot;).text) features = cascade.find(&quot;features&quot;).getchildren()<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"python\"># \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043c\u0430\u0441\u0441\u0438\u0432 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 feature_matrices = np.zeros((len(features), height, width)) for i, feature in enumerate(features):     cur_matrix = np.zeros((height, width))     for rect in feature.find(&quot;rects&quot;).getchildren():         line = rect.text.strip().split(&quot; &quot;)         x1, y1, x2, y2 = map(int, line[:4])         x1, x2 = min(x1, x2), max(x1, x2)         y1, y2 = min(y1, y2), max(y1, y2)         c = float(line[4])          cur_matrix[y1:y2+1, x1:x2+1] = c      feature_matrices[i] = cur_matrix<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"python\"># \u0432\u044b\u0432\u0435\u0434\u0435\u043c \u043f\u0435\u0440\u0432\u044b\u0439 \u043f\u0440\u0438\u0437\u043d\u0430\u043a plt.imshow(feature_matrices[0], cmap=&quot;gray&quot;) &gt;&gt;&gt;<\/code><\/pre>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/vj\/a2\/6w\/vja26wwnwcjh6iq_ztsefs2zcxe.png\"><\/p>\n<p>  <\/p>\n<pre><code class=\"python\"># \u043f\u0430\u0440\u0441\u0438\u043c \u0443\u0440\u043e\u0432\u043d\u0438 \u043a\u0430\u0441\u043a\u0430\u0434\u0430 \u0432 \u043d\u043e\u0432\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 stages = cascade.find(&quot;stages&quot;) stages_list = [] for stage in stages.getchildren():     if type(stage) == etree._Element:         threshold = float(stage.find(&quot;stageThreshold&quot;).text)         clfs = stage.find(&quot;weakClassifiers&quot;)          classifiers = []         for clf in clfs:             internal_nodes = clf.find(&quot;internalNodes&quot;).text.strip().split(&quot; &quot;)             feature_num = int(internal_nodes[2])             feature_thresh = float(internal_nodes[3])              leafs = clf.find(&quot;leafValues&quot;).text.strip().split(&quot; &quot;)             less_leaf = float(leafs[0])             greater_leaf = float(leafs[1])              classifiers.append([feature_num, feature_thresh, less_leaf, greater_leaf])          stages_list.append([threshold, classifiers])<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"python\">len(stages_list) &gt;&gt;&gt; 25<\/code><\/pre>\n<p>  <\/p>\n<h2 id=\"otrisovka-klassifikatorov\">\u041e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u0430 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u0432<\/h2>\n<p>  <\/p>\n<p>\u0418\u0442\u0430\u043a, \u0443 \u043d\u0430\u0441 25 \u0443\u0440\u043e\u0432\u043d\u0435\u0439. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0430\u043b\u043e\u0436\u0438\u043c \u0438\u0445 \u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443:<\/p>\n<p>  <\/p>\n<pre><code class=\"python\">image = cv2.imread(&quot;photo.jpg&quot;, 0) image_height, image_width = image.shape[:2] plt.imshow(image) &gt;&gt;&gt;<\/code><\/pre>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/jm\/s4\/ac\/jms4acspljvhjmrhhkewegyeggi.png\"><br \/>  <em>\u041a\u0438\u0441\u043b\u043e\u0442\u043d\u044b\u0439 \u0428\u0435\u0440\u043b\u043e\u043a<\/em><\/p>\n<p>  <\/p>\n<pre><code class=\"python\">for stage in stages_list:     # \u0434\u0435\u043b\u0430\u0435\u043c \u043a\u043e\u043f\u0438\u044e \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0440\u0438\u0441\u043e\u0432\u0430\u0442\u044c     image_copy = image.copy()      for classifier in stage[1]:         feature_num, thresh, less, greater = classifier          # \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0441\u0432\u0435\u0440\u0442\u043a\u0438         # \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0438 \u043f\u0435\u0440\u0435\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435\u043c \u0432 numpy, \u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0434\u043e\u043b\u044c\u0448\u0435         activation_map = convolve2d(image, feature_matrices[feature_num], mode=&quot;valid&quot;)          # \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043b\u0438\u0441\u0442\u043e\u0432 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c, \u043a\u0430\u043a\u043e\u0439 \u043b\u0438\u0441\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0435\u0439 \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438         # \u0438 \u0435\u0441\u043b\u0438 \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u043c \u0432 \u044d\u0442\u043e\u0442 \u043b\u0438\u0441\u0442, \u0442\u043e \u0441\u0447\u0438\u0442\u0430\u0435\u043c, \u0447\u0442\u043e \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043b\u0441\u044f         if greater &gt; less:             activation_map[activation_map &lt; thresh] = 0         else:             activation_map[activation_map &gt; thresh] = 0          # \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c 5 \u043d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0439 \u043f\u043e \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435         k = 5         flatten_activation_map = activation_map.flatten()         top_indices = np.argpartition(flatten_activation_map, -k)[-k:]          # \u0444\u0438\u043b\u044c\u0442\u0440\u0443\u0435\u043c \u043d\u0443\u043b\u0435\u0432\u044b\u0435 \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438         top_indices = top_indices[flatten_activation_map[top_indices] &gt; 0]          for top_index in top_indices:             i, j = np.unravel_index(top_index, activation_map.shape)              image_part = image[i:i+height, j:j+width].astype(np.uint8)             rectangle = np.ones(image_part.shape, dtype=np.uint8) * 255              # \u043f\u043e\u043b\u0443\u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u044b\u0439 \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a \u0442\u0430\u043c, \u0433\u0434\u0435 \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043b\u0441\u044f \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440             res = cv2.addWeighted(image_part, 0.5, rectangle, 0.5, 1.0)             image_copy[i:i+height, j:j+width] = res      plt.figure()     plt.imshow(image_copy, cmap=&quot;gray&quot;)     plt.show()<\/code><\/pre>\n<p>  <\/p>\n<p>\u041a\u043e\u0434 \u0432\u044b\u0432\u0435\u0434\u0435\u0442 25 \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u043f\u0440\u0438\u043a\u0440\u0435\u043f\u043b\u044e \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 2:<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/x-\/xn\/hm\/x-xnhmujjhmbtpxa-khuiqgvoju.png\"><\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/cx\/ye\/gb\/cxyegbbyxx5jd2nag4dfqgxdttc.png\"><\/p>\n<p>  <\/p>\n<p>\u0412 \u043d\u043e\u0443\u0442\u0431\u0443\u043a\u0435 \u043f\u043e\u0441\u043b\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438 \u043d\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u0440\u0430\u0437\u043c\u0435\u0440\u0430\u0445 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438:<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/gi\/rc\/mo\/gircmoolt2ae5vbncnnhc3vvy8w.png\"><\/p>\n<p>  <\/p>\n<h2 id=\"kuda-kopat-dalshe\">\u041a\u0443\u0434\u0430 \u043a\u043e\u043f\u0430\u0442\u044c \u0434\u0430\u043b\u044c\u0448\u0435?<\/h2>\n<p>  <\/p>\n<p>\u042f \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u043d\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u044b\u0445 \u043a\u0430\u0441\u043a\u0430\u0434\u043e\u0432 (\u0442\u043e \u0435\u0441\u0442\u044c \u0434\u0435\u0440\u0435\u0432\u044c\u0435\u0432 \u0441 \u043e\u0434\u043d\u043e\u0439 \u043d\u043e\u0434\u043e\u0439 \u0438 \u0434\u0432\u0443\u043c\u044f \u043b\u0438\u0441\u0442\u0430\u043c\u0438), \u043d\u043e \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c. \u0410 \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c, \u043a\u0430\u043a\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u0432\u0435\u0440\u0442\u043a\u0438 \u043f\u0440\u0438\u043d\u0435\u0441\u0435\u0442 \u043d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u044e, \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0441\u043f\u0430\u0440\u0441\u0438\u0442\u044c \u0434\u0435\u0440\u0435\u0432\u043e \u0438 \u0432\u044b\u0442\u0430\u0449\u0438\u0442\u044c \u043e\u0442\u0442\u0443\u0434\u0430 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u043a \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 [\u0441\u0432\u0435\u0440\u0442\u043a\u0438].<\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u043c\u0438\u043c\u043e \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 \u0425\u0430\u0430\u0440\u0430 \u0435\u0441\u0442\u044c \u0438 \u0434\u0440\u0443\u0433\u0438\u0435. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, LBF \u0438\u043b\u0438 \u043e\u0431\u043e\u0431\u0449\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438 \u0425\u0430\u0430\u0440\u0430. \u0418\u0445 \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c. \u0422\u0430\u043a\u0436\u0435 \u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0441\u0430\u043c\u0438 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438 \u2014 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u043d\u0435 \u0431\u0435\u043b\u044b\u0439 \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a, \u0430 \u043c\u0430\u0442\u0440\u0438\u0446\u0443 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430 (\u0447\u0435\u0440\u043d\u043e-\u0431\u0435\u043b\u044b\u0435 \u043e\u0431\u043b\u0430\u0441\u0442\u0438).<\/p>\n<p>  <\/p>\n<p>\u0412\u0435\u0441\u044c \u043a\u043e\u0434 (\u043d\u043e\u0443\u0442\u0431\u0443\u043a \u0438 \u0441\u043a\u0440\u0438\u043f\u0442 \u0434\u043b\u044f \u0440\u0430\u0437\u0431\u043e\u0440\u0430 \u043e\u0434\u043d\u043e\u0433\u043e \u043a\u0430\u0441\u043a\u0430\u0434\u0430) \u043e\u0441\u0442\u0430\u0432\u043b\u044e \u043d\u0430 <a href=\"https:\/\/github.com\/evjeny\/haar_vizualization\" rel=\"nofollow\">Github&#8217;\u0435<\/a>, \u0442\u0430\u043a \u0447\u0442\u043e \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044f \u043d\u043e\u0432\u044b\u0435 \u0444\u0438\u0447\u0438.<\/p>\n<p>  <\/p>\n<h2 id=\"nemnogo-o-nas\">\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043e \u043d\u0430\u0441<\/h2>\n<p>  <\/p>\n<p>\u0415\u0449\u0435 \u0440\u0430\u0437 \u043f\u0440\u0438\u0432\u0435\u0442, \u043c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u0415\u0432\u0433\u0435\u043d\u0438\u0439. \u041e\u0431\u043e\u0436\u0430\u044e Data science (\u0438 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u2014 \u0443\u0447\u0438\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c\u043a\u0438 *^*) \u0438 \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0441\u044c \u0438\u043c \u043f\u043e\u043b\u0442\u043e\u0440\u0430 \u0433\u043e\u0434\u0430. \u042d\u0442\u043e\u0442 \u043f\u043e\u0441\u0442 \u0441\u043e\u0437\u0434\u0430\u043d \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u043d\u0430\u0448\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u0435 \u2014 FARADAY Lab. \u041c\u044b \u2014 \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u0435 \u0440\u043e\u0441\u0441\u0438\u0439\u0441\u043a\u0438\u0435 \u0441\u0442\u0430\u0440\u0442\u0430\u043f\u0435\u0440\u044b \u0438 \u0445\u043e\u0442\u0438\u043c \u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0441 \u0412\u0430\u043c\u0438 \u0442\u0435\u043c, \u0447\u0442\u043e \u0443\u0437\u043d\u0430\u0435\u043c \u0441\u0430\u043c\u0438.<\/p>\n<p>  <\/p>\n<p>\u0423\u0434\u0430\u0447\u0438 c:<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ms\/1u\/a8\/ms1ua8wsr4u5h1opv3ylaonfq2k.png\"><\/p>\n<p>  <\/p>\n<h3 id=\"poleznye-ssylki\">\u041f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0441\u0441\u044b\u043b\u043a\u0438:<\/h3>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/github.com\/evjeny\/haar_vizualization\" rel=\"nofollow\">\u0420\u0435\u043f\u043e \u0441 \u043d\u043e\u0443\u0442\u0431\u0443\u043a\u043e\u043c \u0438 \u043a\u043e\u0434\u043e\u043c<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/company\/recognitor\/blog\/228195\/\">\u0421\u0442\u0430\u0442\u044c\u044f \u043f\u0440\u043e \u0440\u0430\u0431\u043e\u0442\u0443 \u043a\u0430\u0441\u043a\u0430\u0434\u043e\u0432 \u0425\u0430\u0430\u0440\u0430<\/a><\/li>\n<li><a href=\"https:\/\/sites.google.com\/site\/5kk73gpu2012\/assignment\/viola-jones-face-detection#TOC-Image-Pyramid\" rel=\"nofollow\">\u0415\u0449\u0435 \u0441\u0442\u0430\u0442\u044c\u044f \u043f\u0440\u043e \u043e\u0431\u0449\u0438\u0435 \u043c\u043e\u043c\u0435\u043d\u0442\u044b \u0432 \u0434\u0435\u0442\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438<\/a><\/li>\n<li><a href=\"https:\/\/stackoverflow.com\/questions\/20801015\/recommended-values-for-opencv-detectmultiscale-parameters\" rel=\"nofollow\">\u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044f detectMultiscale \u0432 OpenCV<\/a><\/li>\n<li><a href=\"https:\/\/stackoverflow.com\/questions\/41887868\/haar-cascade-for-face-detection-xml-file-code-explanation-opencv\" rel=\"nofollow\">\u041a\u0430\u043a \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0434\u0435\u0440\u0435\u0432\u043e \u0432 \u043a\u0430\u0441\u043a\u0430\u0434\u0435<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/opencv\/opencv\/blob\/0cf479dd5ce8602040716811240bb7595de4ba9e\/modules\/objdetect\/src\/cascadedetect.hpp#L556\" rel=\"nofollow\">\u0418\u0441\u0445\u043e\u0434\u043d\u0438\u043a \u0434\u0435\u0442\u0435\u043a\u0442\u043e\u0440\u0430 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043a\u0430\u0441\u043a\u0430\u0434\u043e\u0432; \u043f\u043e \u043d\u0435\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u0431\u043e\u043b\u0435\u0435 \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u043e \u0438\u0437\u0443\u0447\u0438\u0442\u044c \u0434\u0435\u0440\u0435\u0432\u044c\u044f-\u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u044b<\/a><\/li>\n<\/ul>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/504288\/\"> https:\/\/habr.com\/ru\/post\/504288\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/504288\/\">\n<p>\u0418\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u0443\u0435\u043c\u043e\u0435 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u2014 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u0430\u044f \u0442\u0435\u043c\u0430 \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u0433\u043e\u0434\u044b. \u0412\u043e \u043c\u043d\u043e\u0433\u043e\u043c \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e \u044d\u0442\u043e\u0439 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438 \u0432 \u043c\u0435\u0434\u0438\u0446\u0438\u043d\u0435, \u0442\u0440\u0430\u043d\u0441\u043f\u043e\u0440\u0442\u0435 \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u043e\u0431\u043b\u0430\u0441\u0442\u044f\u0445, \u0433\u0434\u0435 \u0446\u0435\u043d\u0430 \u043e\u0448\u0438\u0431\u043a\u0438 \u0432\u0435\u043b\u0438\u043a\u0430, \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c, \u043a\u0430\u043a \u043c\u043e\u0434\u0435\u043b\u044c \u0443\u0441\u0442\u0440\u043e\u0435\u043d\u0430 \u0438 \u0447\u0435\u043c &quot;\u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0443\u0435\u0442\u0441\u044f&quot; \u043f\u0440\u0438 \u043f\u0440\u0438\u043d\u044f\u0442\u0438\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u0439.<\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u043e\u0441\u0442\u043e\u0442\u0430 \u043e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043c\u043e\u0434\u0435\u043b\u0438. \u041a\u0443\u0434\u0430 \u043f\u0440\u043e\u0449\u0435 \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0434\u0435\u0440\u0435\u0432\u043e \u043f\u0440\u0438\u043d\u044f\u0442\u0438\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u0439, \u0447\u0435\u043c \u0438\u0437\u0432\u043b\u0435\u0447\u044c \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0438\u0437 \u0432\u0435\u0441\u043e\u0432 \u043f\u043e\u043b\u043d\u043e\u0441\u0432\u044f\u0437\u043d\u043e\u0439 \u043d\u0435\u0439\u0440\u043e\u043d\u043a\u0438. \u041a \u0441\u0447\u0430\u0441\u0442\u044c\u044e, <a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%9F%D1%80%D0%B8%D0%B7%D0%BD%D0%B0%D0%BA%D0%B8_%D0%A5%D0%B0%D0%B0%D1%80%D0%B0\" rel=\"nofollow\">\u043a\u0430\u0441\u043a\u0430\u0434\u044b \u0425\u0430\u0430\u0440\u0430<\/a> \u0438\u043c\u0435\u044e\u0442 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0438 \u043c\u043e\u0436\u043d\u043e, \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044f \u0438\u0445 \u043a \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044e, \u0443\u0437\u043d\u0430\u0442\u044c, \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043c\u043e\u0434\u0435\u043b\u044c.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-305770","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/305770","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=305770"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/305770\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=305770"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=305770"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=305770"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}