{"id":299267,"date":"2020-02-26T09:00:08","date_gmt":"2020-02-26T09:00:08","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=299267"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=299267","title":{"rendered":"\u0412\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0447\u043d\u0430\u044f \u0432 OpenCV"},"content":{"rendered":"\n<div class=\"post__text post__text-html\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/company\/intel\/blog\/489906\/\">\n<p>\u0411\u044b\u043b\u043e \u043b\u0438 \u0443 \u0432\u0430\u0441 \u0442\u0430\u043a\u043e\u0435, \u0447\u0442\u043e \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442-\u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0435 \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u043b\u0430\u0441\u044c \u043a\u0430\u043a\u0430\u044f-\u043d\u0438\u0431\u0443\u0434\u044c \u0432\u0435\u0449\u044c, \u043d\u043e \u043d\u0435 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u043f\u043e\u043a\u0443\u043f\u0430\u0442\u044c \u0435\u0435, \u043d\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0438\u0432? \u041a\u043e\u043d\u0435\u0447\u043d\u043e \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0430\u0445 \u0435\u0441\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u0438\u0442\u044c \u043e\u0434\u0435\u0436\u0434\u0443 \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u043a\u0430\u0437\u0430 \u043f\u0435\u0440\u0435\u0434 \u043e\u043f\u043b\u0430\u0442\u043e\u0439. \u041e\u0434\u043d\u0430\u043a\u043e \u043f\u043e \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0435 \u043a\u0430\u0436\u0434\u044b\u0439 \u0433\u043e\u0434 \u0434\u043e\u043b\u044f \u043e\u043d\u043b\u0430\u0439\u043d-\u0437\u0430\u043a\u0430\u0437\u043e\u0432 \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442-\u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0430\u0445 \u043e\u0434\u0435\u0436\u0434\u044b \u0438 \u043e\u0431\u0443\u0432\u0438 \u0440\u0430\u0441\u0442\u0435\u0442, \u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u0440\u0430\u0441\u0442\u0435\u0442 \u0438 \u0434\u043e\u043b\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u043e\u0432, \u043e\u043d\u0430 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 50\u201370% \u2014 \u044d\u0442\u043e \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u0435 \u0437\u0430\u0442\u0440\u0430\u0442\u044b \u043d\u0430 \u043b\u043e\u0433\u0438\u0441\u0442\u0438\u043a\u0443, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043e\u043d\u043b\u0430\u0439\u043d-\u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0447\u043d\u0443\u044e. \u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u044c\u0442\u0435, \u0432\u044b \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442\u0435 \u0441\u0432\u043e\u044e \u0444\u043e\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u044e, \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442\u0435 \u043e\u0434\u0435\u0436\u0434\u0443 \u0438 \u043e\u043d\u0430 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u043d\u0430 \u0432\u0430\u0448\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435. \u0423\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0447\u043d\u044b\u0435 \u043e\u0431\u0443\u0432\u0438, \u043e\u043d\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0443\u0441\u043f\u0435\u0448\u043d\u043e. \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043d\u0430\u0437\u0430\u0434 \u043d\u0430\u0441 \u0437\u0430\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u043b\u0430 \u044d\u0442\u0430 \u0442\u0435\u043c\u0430, \u043a\u0430\u043a \u043e\u0431\u0441\u0442\u043e\u044f\u0442 \u0434\u0435\u043b\u0430 \u0441 \u043e\u0434\u0435\u0436\u0434\u043e\u0439? \u0422\u0430\u043a\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u0442\u043e\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442, \u043d\u043e \u0443\u0441\u043f\u0435\u0448\u043d\u044b\u0445 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u043c\u0435\u043d\u044c\u0448\u0435, \u0432\u043e \u043c\u043d\u043e\u0433\u0438\u0445 \u0438\u0437 \u043d\u0438\u0445 \u043a\u0440\u043e\u043c\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 \u043d\u0430\u0439\u0442\u0438 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0443\u0434\u0430\u0435\u0442\u0441\u044f, \u043e \u0440\u0430\u0431\u043e\u0447\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043c\u0435\u0447\u0442\u0430\u0442\u044c. \u041c\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u044d\u0442\u043e \u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043e\u0434\u043d\u0443 \u0438\u0437 \u0441\u0435\u0442\u0435\u0439 \u0432 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 OpenCV. \u0427\u0442\u043e \u0438\u0437 \u044d\u0442\u043e\u0433\u043e \u0432\u044b\u0448\u043b\u043e \u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0432 <a href=\"https:\/\/github.com\/opencv\/opencv\/blob\/master\/samples\/dnn\/virtual_try_on.py\">virtual_try_on.py<\/a> sample.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ph\/hw\/si\/phhwsiuhezrbjmvfpwx5npufclo.png\"><\/p>\n<p>  <\/p>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043d\u0435 \u0438\u0434\u0435\u0430\u043b\u0435\u043d, \u043d\u043e \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0445\u043e\u0440\u043e\u0448\u0438\u043c.<\/p>\n<p>  <\/p>\n<p>\u0425\u043e\u0442\u0438\u0442\u0435 \u0443\u0437\u043d\u0430\u0442\u044c \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0447\u043d\u0430\u044f \u0438 \u0441 \u043a\u0430\u043a\u0438\u043c\u0438 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u043c\u044b \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0438\u0441\u044c \u043f\u0440\u0438 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u043c\u043e\u0434\u0435\u043b\u0438 \u0432 OpenCV \u2014 \u0434\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434 \u043a\u0430\u0442!<\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<p>\u041c\u044b \u0432\u044b\u0431\u0440\u0430\u043b\u0438 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u0443\u044e \u0441\u0435\u0442\u044c 2019 \u0433\u043e\u0434\u0430 <a href=\"https:\/\/arxiv.org\/pdf\/1807.07688\">CP-VTON<\/a> \u0441 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0445\u043e\u0440\u043e\u0448\u0438\u043c \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u044b\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c. \u041f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 \u0430\u043d\u0430\u043b\u043e\u0433\u0430\u043c\u0438 CP-VTON \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0430 \u0442\u0435\u043c, \u0447\u0442\u043e \u043e\u043d\u0430 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0442\u043e\u0447\u043d\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0444\u043e\u0440\u043c\u0443 \u043e\u0434\u0435\u0436\u0434\u044b \u0432 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0438, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0435 \u043d\u0435 \u0442\u0435\u0440\u044f\u044e\u0442\u0441\u044f \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043e\u0434\u0435\u0436\u0434\u044b (\u0440\u0438\u0441\u0443\u043d\u043e\u043a, \u043b\u043e\u0433\u043e\u0442\u0438\u043f \u0438 \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u0430). \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0435 \u0441\u0435\u0442\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 3D \u043c\u043e\u0434\u0435\u043b\u0438 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430, \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f 3D-\u0441\u043a\u0430\u043d\u0435\u0440. \u042d\u0442\u043e\u0442 \u0444\u0430\u043a\u0442 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0441\u043e\u043a\u0440\u0430\u0449\u0430\u0435\u0442 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c\u043e\u0441\u0442\u0438 \u043c\u043e\u0434\u0435\u043b\u0438. \u0422\u0430\u043a\u0436\u0435 \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u043f\u043b\u044e\u0441\u043e\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u043a\u043e\u0434\u0430 \u043d\u0430 github. \u041d\u043e \u0430\u0432\u0442\u043e\u0440\u044b CP-VTON \u0432 <a href=\"https:\/\/github.com\/sergeywong\/cp-vton\">\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438<\/a> \u043f\u0440\u0438\u0432\u043e\u0434\u044f\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u0434\u043b\u044f \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043a\u0438 \u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043d\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u043e\u0439 \u0434\u0435\u043c\u043a\u0438, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0441\u0435\u0442\u044c \u043d\u0430 \u0441\u0432\u043e\u0438\u0445 \u0444\u043e\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u044f\u0445.<br \/>  \u041c\u044b \u043d\u0430\u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0441\u0435\u0442\u044c \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0438 \u0432\u044b\u043b\u043e\u0436\u0438\u043b\u0438 \u0435\u0435 \u0432 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f. <\/p>\n<p>  <\/p>\n<h2 id=\"princip-raboty\">\u041f\u0440\u0438\u043d\u0446\u0438\u043f \u0440\u0430\u0431\u043e\u0442\u044b<\/h2>\n<p>  <\/p>\n<p>\u041c\u043e\u0434\u0435\u043b\u044c CP-VTON \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0434\u0432\u0443\u0445 \u043f\u043e\u0434\u043c\u043e\u0434\u0443\u043b\u0435\u0439: GMM (Geometric Matching Module) \u2014 \u043c\u043e\u0434\u0443\u043b\u044c \u0434\u043b\u044f \u0434\u0435\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e\u0434\u0435\u0436\u0434\u044b \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u0441 \u043f\u043e\u0437\u043e\u0439 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430 \u0438 TOM (Try-On Module) \u2014 \u043c\u043e\u0434\u0443\u043b\u044c \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0430 \u0434\u0435\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u043e\u0434\u0435\u0436\u0434\u044b \u043d\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430. <\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043a\u0438 GMM \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0442\u0440\u043e\u0439\u043a\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/1e5\/045\/f63\/1e5045f639b6cf1f41efbbb416b0d736.svg\" alt=\"$(I, c, c_t )$\" data-tex=\"inline\"><\/math>, \u0430 \u0434\u043b\u044f TOM \u2014 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/978\/a8e\/58c\/978a8e58c0c8422612817dac29e95946.svg\" alt=\"$(I, \\hat{c}, I_t)$\" data-tex=\"inline\"><\/math>, <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/64b\/eb7\/37a\/64beb737a23fb5cb0a455f0e9213f2a4.svg\" alt=\"$I$\" data-tex=\"inline\"><\/math> \u2014 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430, <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/e1a\/229\/081\/e1a229081e8db6ee98dfb79797b987dd.svg\" alt=\"$c$\" data-tex=\"inline\"><\/math> \u2014 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043e\u0434\u0435\u0436\u0434\u044b, <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/bab\/644\/351\/bab6443514c51620fd2f50a21588b04b.svg\" alt=\"$\\hat{c}$\" data-tex=\"inline\"><\/math> \u2014 \u0432\u044b\u0445\u043e\u0434 GMM, <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/054\/4a4\/479\/0544a4479e3c5a0260c13aa556b9bd10.svg\" alt=\"$I_t$\" data-tex=\"inline\"><\/math> \u2014 ground truth (\u0447\u0435\u043b\u043e\u0432\u0435\u043a \u0432 \u043e\u0434\u0435\u0436\u0434\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/e1a\/229\/081\/e1a229081e8db6ee98dfb79797b987dd.svg\" alt=\"$c$\" data-tex=\"inline\"><\/math>), <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f7e\/ab5\/000\/f7eab5000a19720375a5604c4e631f03.svg\" alt=\"$c_t$\" data-tex=\"inline\"><\/math> \u2014 ground truth (\u0434\u0435\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u043e\u0434\u0435\u0436\u0434\u0430, \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c \u043c\u0430\u0441\u043a\u0438 \u043e\u0434\u0435\u0436\u0434\u044b \u043d\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/054\/4a4\/479\/0544a4479e3c5a0260c13aa556b9bd10.svg\" alt=\"$I_t$\" data-tex=\"inline\"><\/math>). \u041d\u043e \u0442\u0430\u043a\u0438\u0435 \u0442\u0440\u043e\u0439\u043a\u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0442\u044f\u0436\u0435\u043b\u043e \u0441\u043e\u0431\u0440\u0430\u0442\u044c, \u043e\u0431\u044b\u0447\u043d\u043e \u0435\u0441\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/054\/4a4\/479\/0544a4479e3c5a0260c13aa556b9bd10.svg\" alt=\"$I_t$\" data-tex=\"inline\"><\/math> \u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/e1a\/229\/081\/e1a229081e8db6ee98dfb79797b987dd.svg\" alt=\"$c$\" data-tex=\"inline\"><\/math>. \u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u044d\u0442\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u043b\u043e\u0441\u044c \u0432 \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u0440\u0430\u0431\u043e\u0442 <a href=\"https:\/\/arxiv.org\/pdf\/1711.08447.pdf\">VITON<\/a>, \u0430\u0432\u0442\u043e\u0440\u044b \u0441\u0442\u0430\u0442\u044c\u0438 \u0432\u043c\u0435\u0441\u0442\u043e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/64b\/eb7\/37a\/64beb737a23fb5cb0a455f0e9213f2a4.svg\" alt=\"$I$\" data-tex=\"inline\"><\/math> \u043d\u0430 \u0432\u0445\u043e\u0434 \u0441\u0435\u0442\u0438 \u043f\u043e\u0434\u0430\u0432\u0430\u043b\u0438 \u0442\u0435\u043d\u0437\u043e\u0440 \u0441 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/839\/f25\/c27\/839f25c2746382debd4f08ea25ad5ecf.svg\" alt=\"$p$\" data-tex=\"inline\"><\/math>. \u041f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/839\/f25\/c27\/839f25c2746382debd4f08ea25ad5ecf.svg\" alt=\"$p$\" data-tex=\"inline\"><\/math> \u043f\u0440\u0435\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043b\u0430\u0441\u044c \u0446\u0435\u043b\u044c \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0435, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u043b\u0438\u0446\u043e, \u0432\u043e\u043b\u043e\u0441\u044b, \u0444\u043e\u0440\u043c\u0443 \u0442\u0435\u043b\u0430 \u0438 \u043f\u043e\u0437\u0443, \u043d\u043e \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u044f \u0432\u043b\u0438\u044f\u043d\u0438\u0435 \u0441\u0442\u0430\u0440\u043e\u0439 \u043e\u0434\u0435\u0436\u0434\u044b (\u0446\u0432\u0435\u0442, \u0444\u043e\u0440\u043c\u0430, \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u0430). \u042d\u0442\u043e\u0442 \u043f\u043e\u0434\u0445\u043e\u0434 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0435 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0441\u0435\u0442\u0438 \u044d\u0442\u0430\u043b\u043e\u043d\u043d\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430 \u0432 \u0436\u0435\u043b\u0430\u0435\u043c\u043e\u0439 \u043e\u0434\u0435\u0436\u0434\u0435. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, GMM \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043d\u0430 \u0432\u0445\u043e\u0434 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/106\/fc0\/15a\/106fc015a2653cdb8d51e0bac02b9dc1.svg\" alt=\"$(p, c)$\" data-tex=\"inline\"><\/math> \u0438 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0434\u0435\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u043e\u0434\u0435\u0436\u0434\u0443 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/bab\/644\/351\/bab6443514c51620fd2f50a21588b04b.svg\" alt=\"$\\hat{c}$\" data-tex=\"inline\"><\/math>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043a\u0438 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0441 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f7e\/ab5\/000\/f7eab5000a19720375a5604c4e631f03.svg\" alt=\"$c_t$\" data-tex=\"inline\"><\/math>. TOM \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043d\u0430 \u0432\u0445\u043e\u0434 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/2db\/cca\/af6\/2dbccaaf69a3016dec440f5e54590593.svg\" alt=\"$(p, \\hat{c})$\" data-tex=\"inline\"><\/math>, \u0430 \u0432\u044b\u0445\u043e\u0434 \u0441\u0435\u0442\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/249\/c9d\/589\/249c9d5896890326a5b266c1040e7642.svg\" alt=\"$I_o$\" data-tex=\"inline\"><\/math> \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0441 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/054\/4a4\/479\/0544a4479e3c5a0260c13aa556b9bd10.svg\" alt=\"$I_t$\" data-tex=\"inline\"><\/math>.<\/p>\n<p>  <\/p>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u043e\u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0442\u0435\u043d\u0437\u043e\u0440\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/839\/f25\/c27\/839f25c2746382debd4f08ea25ad5ecf.svg\" alt=\"$p$\" data-tex=\"inline\"><\/math>. \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u043c\u0430\u0441\u043a\u0438 \u0442\u0435\u043b\u0430 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430, \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u0442\u043e\u0447\u0435\u043a \u043f\u043e\u0437\u044b \u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0433\u043e\u043b\u043e\u0432\u044b. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u043e \u0444\u043e\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0438\u0441\u043a \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u0442\u043e\u0447\u0435\u043a \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0435\u0442\u0438 <a href=\"https:\/\/github.com\/CMU-Perceptual-Computing-Lab\/openpose\">OpenPose<\/a>. \u0414\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0431\u0438\u043d\u0430\u0440\u043d\u043e\u0439 \u043c\u0430\u0441\u043a\u0438 \u0442\u0435\u043b\u0430 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u043e\u0434\u0435\u0436\u0434\u044b \u0438 \u0447\u0430\u0441\u0442\u0435\u0439 \u0442\u0435\u043b\u0430. \u042d\u0442\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u0440\u0435\u0448\u0430\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u043e\u0434\u0435\u043b\u0438 <a href=\"https:\/\/arxiv.org\/pdf\/1804.01984.pdf\">LIP_JPPNet<\/a>. \u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0435\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u0432 OpenCV \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0441\u044f (\u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u044b\u0439) sample <a href=\"https:\/\/github.com\/opencv\/opencv\/blob\/master\/samples\/dnn\/human_parsing.py\">human_parsing.py<\/a>.<\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u043c\u0430\u0441\u043a\u0438 \u0442\u0435\u043b\u0430 \u0431\u0435\u0440\u0443\u0442\u0441\u044f \u0432\u0441\u0435 \u043d\u0435\u043d\u0443\u043b\u0435\u0432\u044b\u0435 \u043f\u0438\u043a\u0441\u0435\u043b\u0438, \u0434\u043b\u044f \u043c\u0430\u0441\u043a\u0438 \u0433\u043e\u043b\u043e\u0432\u044b \u2014 \u043f\u0438\u043a\u0441\u0435\u043b\u0438, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u0430\u043c: \u043b\u0438\u0446\u043e, \u0441\u043e\u043b\u043d\u0446\u0435\u0437\u0430\u0449\u0438\u0442\u043d\u044b\u0435 \u043e\u0447\u043a\u0438, \u0433\u043e\u043b\u043e\u0432\u043d\u043e\u0439 \u0443\u0431\u043e\u0440 \u0438 \u0432\u043e\u043b\u043e\u0441\u044b. \u0417\u0430\u0442\u0435\u043c \u043c\u0430\u0441\u043a\u0430 \u0442\u0435\u043b\u0430 \u0440\u0430\u0437\u043c\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u0430 \u043c\u0430\u0441\u043a\u0430 \u0433\u043e\u043b\u043e\u0432\u044b \u043d\u0430\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0432\u0445\u043e\u0434\u043d\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435.<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/zc\/z5\/yd\/zcz5yd4mri1tjefo1_ky9n82aoi.png\" alt=\"preprocessing\"><\/p>\n<p>  <\/p>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0440\u0430\u0431\u043e\u0442\u0443 \u043c\u043e\u0434\u0443\u043b\u0435\u0439.<\/p>\n<p>  <\/p>\n<p>GMM \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0444\u043e\u0440\u043c\u044b \u0436\u0435\u043b\u0430\u0435\u043c\u043e\u0439 \u043e\u0434\u0435\u0436\u0434\u044b \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u0441 \u043f\u043e\u0437\u043e\u0439 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430. \u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u0435\u0442\u044c \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u0442 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438 \u0438\u0437 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043e\u0434\u0435\u0436\u0434\u044b \u0438 \u0442\u0435\u043d\u0437\u043e\u0440\u0430 \u0441 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e, \u043d\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/d2f\/e5c\/3bc\/d2fe5c3bc54c285144ce0f535ec019fe.svg\" alt=\"$L_2-\u043d\u043e\u0440\u043c\u0443$\" data-tex=\"inline\"><\/math>. \u0412\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u044f \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u0435\u043a\u0442\u043e\u0440\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f. \u041f\u043e \u043d\u0435\u043c\u0443 \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043f\u043e\u0441\u0442\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441\u0435\u0442\u043a\u0430 \u0434\u0435\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043e\u0434\u0435\u0436\u0434\u044b. \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0431\u0438\u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0438\u043d\u0442\u0435\u0440\u043f\u043e\u043b\u044f\u0446\u0438\u0438 \u043e\u0434\u0435\u0436\u0434\u044b \u043f\u043e \u0443\u0437\u043b\u0430\u043c \u0441\u0435\u0442\u043a\u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0444\u043e\u0440\u043c\u0430 \u043e\u0434\u0435\u0436\u0434\u044b, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0430\u044f \u043f\u043e\u0437\u0435 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430. \u0414\u043b\u044f \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0439 \u0434\u0435\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e\u0434\u0435\u0436\u0434\u044b <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/bab\/644\/351\/bab6443514c51620fd2f50a21588b04b.svg\" alt=\"$\\hat{c}$\" data-tex=\"inline\"><\/math> \u0441 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f7e\/ab5\/000\/f7eab5000a19720375a5604c4e631f03.svg\" alt=\"$c_t$\" data-tex=\"inline\"><\/math> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/775\/69b\/0b5\/77569b0b542e7106b20f175213a24763.svg\" alt=\"$L_1-loss$\" data-tex=\"inline\"><\/math>.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/hw\/er\/qe\/hwerqehwxjvyyytowzqfp_3l64g.png\" alt=\"gmm\"><\/p>\n<p>  <\/p>\n<p>\u041c\u043e\u0434\u0443\u043b\u044c TOM \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u0442 \u0434\u0435\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u043e\u0434\u0435\u0436\u0434\u0443 \u043d\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0441 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u043e\u043c. \u0421\u0435\u0442\u044c \u0431\u0430\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043d\u0430 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435 Unet. \u0414\u0430\u043d\u043d\u0430\u044f \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u0431\u044b\u043b\u0430 \u0432\u044b\u0431\u0440\u0430\u043d\u0430, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043f\u0440\u0438 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u043c \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0435 \u0434\u0435\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u043e\u0434\u0435\u0436\u0434\u044b \u043d\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043d\u0435\u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043d\u0430 \u0441\u0442\u044b\u043a\u0430\u0445 \u0438 \u043c\u0435\u0441\u0442\u0430\u0445 \u0441\u043e\u043f\u0440\u0438\u043a\u043e\u0441\u043d\u043e\u0432\u0435\u043d\u0438\u044f \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430 \u0438 \u043e\u0434\u0435\u0436\u0434\u044b. Unet \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0437\u0431\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u043e\u0442 \u044d\u0442\u043e\u0433\u043e, \u0434\u0435\u043b\u0430\u044f \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u044b \u0431\u043e\u043b\u0435\u0435 \u043f\u043b\u0430\u0432\u043d\u044b\u043c\u0438. \u041e\u0434\u043d\u0430\u043a\u043e \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e \u0432\u044b\u0440\u043e\u0432\u043d\u044f\u0442\u044c \u043e\u0434\u0435\u0436\u0434\u0443 \u043f\u043e \u0444\u0438\u0433\u0443\u0440\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u0430\u0436\u0435 \u043d\u0435\u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u043e\u0434\u0435\u0436\u0434\u044b \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u0437\u044b \u043c\u043e\u0436\u0435\u0442 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u044b\u0445\u043e\u0434 Unet \u0440\u0430\u0437\u043c\u044b\u0442\u044b\u043c. \u0421\u0435\u0442\u044c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0441\u0432\u0435\u0440\u0442\u043e\u043a \u0438 \u043f\u0443\u043b\u0438\u043d\u0433\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u044e\u0442 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438. \u0410 \u043f\u043e\u0442\u043e\u043c \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e Upsample \u0438 \u0441\u0432\u0435\u0440\u0442\u043e\u043a. \u041a\u043e\u0434\u0438\u0440\u043e\u0432\u0449\u0438\u043a (encoder) \u0432 \u0441\u0435\u0442\u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u043d\u044b\u043c VGG-19. \u0427\u0442\u043e\u0431\u044b \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043d\u0435 \u0431\u044b\u043b\u043e \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0440\u0430\u0437\u043c\u044b\u0442\u044b\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043f\u043e\u0434\u0445\u043e\u0434. Unet \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043e\u0431\u0440\u0430\u0437 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/126\/169\/ecb\/126169ecb9184d5a7dd84d284e35868a.svg\" alt=\"$I_r$\" data-tex=\"inline\"><\/math> \u0438 \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u043e\u043d\u043d\u0443\u044e \u043c\u0430\u0441\u043a\u0443 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/94d\/13e\/e0a\/94d13ee0aadd7f17977e0d279af38d42.svg\" alt=\"$M$\" data-tex=\"inline\"><\/math>. \u0417\u0430\u0442\u0435\u043c \u043c\u0430\u0441\u043a\u0430 \u043a\u043e\u043c\u0431\u0438\u043d\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441 \u0434\u0435\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u043e\u0434\u0435\u0436\u0434\u043e\u0439 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/e1a\/229\/081\/e1a229081e8db6ee98dfb79797b987dd.svg\" alt=\"$c$\" data-tex=\"inline\"><\/math> \u0438 \u043d\u0430\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/126\/169\/ecb\/126169ecb9184d5a7dd84d284e35868a.svg\" alt=\"$I_r$\" data-tex=\"inline\"><\/math>, \u0441\u043a\u043e\u043c\u0431\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0441 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u043c\u0430\u0441\u043a\u043e\u0439 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/691\/11a\/755\/69111a7550b5ec5e0a7b5e6bcb3bb9da.svg\" alt=\"$(1 - M)$\" data-tex=\"inline\"><\/math> \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0438\u0440\u0443\u044e\u0449\u0435\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/249\/c9d\/589\/249c9d5896890326a5b266c1040e7642.svg\" alt=\"$I_o$\" data-tex=\"inline\"><\/math>.<\/p>\n<p>  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/e09\/480\/373\/e094803736124a85bc972fc603c19c01.svg\" alt=\"$I_o=M\\odot c + (1 - M)\\odot I_r$\" data-tex=\"display\"><\/math><\/p>\n<p>  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/671\/469\/35c\/67146935cf5aba0e5a807a03b1a373cb.svg\" alt=\"$\\odot$\" data-tex=\"inline\"><\/math> \u2014 \u0437\u043d\u0430\u043a \u043f\u043e\u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043d\u043e\u0433\u043e \u043c\u0430\u0442\u0440\u0438\u0447\u043d\u043e\u0433\u043e \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/hl\/fn\/pe\/hlfnpepqe0u6txqjkfpof3qgbpm.png\" alt=\"tom\"><\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0438 \u0441\u0435\u0442\u0438 \u0433\u043b\u0430\u0432\u043d\u0430\u044f \u0446\u0435\u043b\u044c Try-On \u043c\u043e\u0434\u0443\u043b\u044f \u2014 \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u043d\u0435\u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u044f <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/249\/c9d\/589\/249c9d5896890326a5b266c1040e7642.svg\" alt=\"$I_o$\" data-tex=\"inline\"><\/math> \u0441 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/054\/4a4\/479\/0544a4479e3c5a0260c13aa556b9bd10.svg\" alt=\"$I_t$\" data-tex=\"inline\"><\/math>. \u041f\u0440\u0438 \u043f\u043e\u043f\u0438\u043a\u0441\u0435\u043b\u044c\u043d\u043e\u043c \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u0435\u0442\u0438 \u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0438\u0437 \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0438 \u043c\u0430\u043b\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u043e\u0442\u0435\u0440\u044c \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u043c\u044b\u0442\u044b\u043c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u043c. \u0410 \u043f\u043e\u0445\u043e\u0436\u0438\u043c \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u043c, \u043d\u043e \u0441 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u0441\u0434\u0432\u0438\u0433\u0430\u043c\u0438, \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u043e\u0442\u0435\u0440\u044c. \u0427\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u044d\u0442\u0438\u0445 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u044e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/775\/69b\/0b5\/77569b0b542e7106b20f175213a24763.svg\" alt=\"$L_1- loss$\" data-tex=\"inline\"><\/math> \u0441 <a href=\"https:\/\/arxiv.org\/pdf\/1603.08155.pdf\">perceptual loss<\/a>. \u041a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u0438\u0437 \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0438 \u0438 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0435 \u0441\u0435\u0442\u0438 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u044e\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043b\u043e\u0435\u0432 \u0441\u0435\u0442\u0438 VGG \u0438 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0435\u0432\u044b\u0435 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0438\u043d\u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043d\u044b \u043a \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u043c\u0443 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044e \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435. \u0422\u0430\u043a\u0436\u0435 VGG \u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u0430 \u043a \u0440\u0435\u0437\u043a\u0438\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u043c \u044f\u0440\u043a\u043e\u0441\u0442\u0438 \u043f\u0438\u043a\u0441\u0435\u043b\u0435\u0439 \u2014 \u044d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0443\u0441\u0442\u0440\u0430\u043d\u0438\u0442\u044c \u0440\u0430\u0437\u043c\u044b\u0442\u043e\u0441\u0442\u044c \u0432 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0438, \u0441\u0434\u0435\u043b\u0430\u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u043e\u0442\u0435\u0440\u044c \u043d\u0430 \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430\u0445.<\/p>\n<p>  <\/p>\n<h2 id=\"realizaciya-v-opencv\">\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0432 OpenCV<\/h2>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u0435\u0442\u0438 \u043a\u0440\u043e\u043c\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430 \u0438 \u043e\u0434\u0435\u0436\u0434\u044b \u0442\u0430\u043a\u0436\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0441 \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0435\u0439 \u0447\u0430\u0441\u0442\u0435\u0439 \u0442\u0435\u043b\u0430 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430 \u0438 \u043e\u0434\u0435\u0436\u0434\u044b \u043d\u0430 \u043d\u0435\u043c \u0438 \u0444\u0430\u0439\u043b \u0441 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u043c\u0438 \u0442\u043e\u0447\u043a\u0430\u043c\u0438 \u0442\u0435\u043b\u0430 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430. \u0410\u0432\u0442\u043e\u0440\u044b \u0441\u0442\u0430\u0442\u044c\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 json \u0444\u0430\u0439\u043b\u044b \u0441 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u043c\u0438 \u0442\u043e\u0447\u043a\u0430\u043c\u0438 \u0442\u0435\u043b\u0430 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0435\u0442\u0438 OpenPose \u0438\u0437 Caffe, \u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0441 \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0435\u0439 \u0438\u0437 \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0438 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 LIP.<\/p>\n<p>  <\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0434\u0435\u043c\u043e \u0443\u0434\u043e\u0431\u043d\u044b\u043c \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f, \u043f\u043e\u0438\u0441\u043a \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u0442\u043e\u0447\u0435\u043a \u0438 \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e \u043c\u044b \u0434\u0435\u043b\u0430\u0435\u043c \u043d\u0430 \u043b\u0435\u0442\u0443, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043d\u0430 \u0432\u0445\u043e\u0434 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0444\u043e\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u044f \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430 \u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043d\u043e\u0432\u043e\u0439 \u043e\u0434\u0435\u0436\u0434\u044b.<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">python3 virtual_try_on.py -i person_img.jpg -c cloth.jpg<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u0438 \u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0441\u0435\u0442\u0438 \u0432 OpenCV \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0443\u0431\u0440\u0430\u0442\u044c \u0432\u0441\u044e \u043f\u0440\u0435\u0434\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0447\u0435\u0440\u0435\u0437 PIL. \u0422\u0443\u0442 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0438 \u0447\u0443\u0434\u0435\u0441\u0430 \u0441 \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0435\u0439. \u0412 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0435 LIP \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u043f\u043e\u043b\u0443\u0442\u043e\u043d\u043e\u0432\u044b\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f, \u0433\u0434\u0435 \u0438\u043d\u0442\u0435\u043d\u0441\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u043f\u0438\u043a\u0441\u0435\u043b\u044f \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043a\u043b\u0430\u0441\u0441\u0443 \u043e\u0431\u044a\u0435\u043a\u0442\u0430. \u0410 \u043f\u0440\u0438 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0438 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 \u0434\u043b\u044f CP-VTON \u044d\u0442\u0438 \u0436\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0443\u0436\u0435 \u0446\u0432\u0435\u0442\u043d\u044b\u0435. \u0427\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u0442\u0440\u0435\u0445\u043a\u0430\u043d\u0430\u043b\u044c\u043d\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435, \u043d\u043e \u043f\u043e\u0442\u043e\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u043e\u0434\u043d\u043e\u043a\u0430\u043d\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u043c\u0438:<\/p>\n<p>  <\/p>\n<pre><code class=\"python\">shape = (segm &gt; 0).astype(np.float32) head  = (segm == 1).astype(np.float32) + \\         (segm == 2).astype(np.float32) + \\         (segm == 4).astype(np.float32) + \\         (segm == 13).astype(np.float32) cloth = (segm == 5).astype(np.float32) + \\         (segm == 6).astype(np.float32) + \\         (segm == 7).astype(np.float32)<\/code><\/pre>\n<p>  <\/p>\n<p>\u041e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e PIL \u043c\u043e\u0436\u0435\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0446\u0432\u0435\u0442\u043d\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0438 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0443, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043e\u043d\u043e \u0431\u044b\u043b\u043e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043e. \u041f\u0435\u0440\u0435\u0432\u043e\u0434 \u043b\u0435\u0439\u0431\u043b\u043e\u0432 \u0432 \u0446\u0432\u0435\u0442\u0430 \u043b\u0435\u0436\u0430\u043b \u0432 human_colormap.mat. \u041a\u0430\u043a \u0438\u0445 \u043e\u0442\u0442\u0443\u0434\u0430 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c? Matlab \u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043d\u0435 \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c. \u041a \u0441\u0447\u0430\u0441\u0442\u044c\u044e, scipy \u0438\u043c\u0435\u0435\u0442 \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a \u0442\u0430\u043a\u0438\u0445 \u0444\u0430\u0439\u043b\u043e\u0432. \u041f\u043e\u0442\u0440\u0430\u0442\u0438\u0432 \u043d\u0435\u043c\u043d\u043e\u0433\u043e (\u043c\u043d\u043e\u0433\u043e) \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0430 \u044d\u0442\u0438 \u043c\u0430\u0445\u0438\u043d\u0430\u0446\u0438\u0438 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0438\u0437\u0432\u043b\u0435\u0447\u044c \u0438\u0437 \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043c\u0430\u0441\u043a\u0443 \u0442\u0435\u043b\u0430 \u0438 \u0433\u043e\u043b\u043e\u0432\u044b.<\/p>\n<p>  <\/p>\n<p>\u0414\u0430\u043b\u044c\u0448\u0435 \u2013 \u0431\u043e\u043b\u044c\u0448\u0435. \u0414\u043b\u044f \u0440\u0430\u0437\u043c\u044b\u0442\u0438\u044f \u043c\u0430\u0441\u043a\u0438 \u0435\u0435 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u044e\u0442 \u0432 16 \u0440\u0430\u0437, \u0437\u0430\u0442\u0435\u043c \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0442 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u044b.<\/p>\n<p>  <\/p>\n<pre><code class=\"python\">mask = mask.resize((width \/\/ 16, height \/\/ 16), Image.BILINEAR) mask = mask.resize((width, height), Image.BILINEAR)<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043c\u0430\u0441\u043a\u0443 \u0432 \u043e\u0442\u0442\u0435\u043d\u043a\u0430\u0445 \u0441\u0435\u0440\u043e\u0433\u043e. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0431\u0438\u043b\u0438\u043d\u0435\u0439\u043d\u0443\u044e \u0438\u043d\u0442\u0435\u0440\u043f\u043e\u043b\u044f\u0446\u0438\u044e. \u041a\u0430\u0436\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u0440\u043e\u0449\u0435 \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0435 \u0432 OpenCV. \u0417\u0430\u043c\u0435\u043d\u0438\u043b\u0438 PIL resize \u043d\u0430 cv.resize \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0441\u043e\u0432\u0441\u0435\u043c \u0434\u0440\u0443\u0433\u043e\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442.<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/dg\/2h\/ss\/dg2hssxuigwj2s7grc9ja0humag.jpeg\"> <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/6v\/bs\/zp\/6vbszpfhzfnr_d17k6wc76pzjak.jpeg\"><br \/>  \u0421\u043b\u0435\u0432\u0430 \u043c\u0430\u0441\u043a\u0430, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u0430\u044f \u0447\u0435\u0440\u0435\u0437 PIL resize, \u0441\u043f\u0440\u0430\u0432\u0430 \u2014 cv.resize.<\/p>\n<p>  <\/p>\n<p>\u041c\u0430\u0441\u043a\u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438\u0441\u044c \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0435 \u043f\u043e\u0445\u043e\u0436\u0438, \u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u0435\u0442\u0438? \u0412 \u043e\u0431\u0449\u0435\u043c \u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u0441\u0430\u043c\u0438.<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ux\/ud\/0x\/uxud0x1nalslqajcfpdj65l8eyg.jpeg\" alt=\"mask_pil\"> <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/z5\/5x\/yy\/z55xyyajx9hj1jxarrgui4s3krw.jpeg\" alt=\"mask_ocv\"><br \/>  \u0421\u043b\u0435\u0432\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u043c\u0430\u0441\u043a\u0438 \u0441 PIL resize, \u0441\u043f\u0440\u0430\u0432\u0430 \u2014 cv.resize.<\/p>\n<p>  <\/p>\n<p>\u0412\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0433\u0440\u0443\u0441\u0442\u043d\u043e\u0432\u0430\u0442\u043e, \u043d\u0435 \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u0442\u0430\u043a \u0443\u0440\u043e\u0434\u043e\u0432\u0430\u0442\u044c \u043b\u044e\u0434\u044f\u043c \u0440\u0443\u043a\u0438. \u0427\u0442\u043e \u0436\u0435 \u044d\u0442\u043e \u0437\u0430 \u0431\u0438\u043b\u0438\u043d\u0435\u0439\u043d\u0430\u044f \u0438\u043d\u0442\u0435\u0440\u043f\u043e\u043b\u044f\u0446\u0438\u044f \u0442\u0430\u043a\u0430\u044f? \u0418\u0437\u0440\u044f\u0434\u043d\u043e \u043f\u043e\u0433\u0443\u0433\u043b\u0438\u0432, \u0442\u0430\u043a \u0438 \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0430\u0439\u0442\u0438. \u041e\u0441\u0442\u0430\u0432\u0430\u043b\u0441\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439, \u043d\u043e \u0432\u0435\u0440\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u2013 \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u043d\u0430 \u0421. \u0422\u0430\u043c \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u0447\u0442\u043e bilinear resize \u0432\u043e\u0432\u0441\u0435 \u043d\u0435 \u043f\u043e\u0445\u043e\u0436 \u043d\u0430 bilinear, \u0430 \u0441\u043a\u043e\u0440\u0435\u0435 area. \u0420\u0430\u0437\u043c\u0435\u0440 \u044f\u0434\u0440\u0430 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 scale factor, \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044f\u0434\u0440\u043e \u0438\u043c\u0435\u043b\u043e \u0440\u0430\u0437\u043c\u0435\u0440 33 = 16 * 2 + 1, \u0432 \u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u0430\u043a \u0432 OpenCV \u044f\u0434\u0440\u043e \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u2013 3. \u041e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0441 \u044d\u0442\u0438\u043c \u043c\u044b \u0437\u0430\u043c\u0435\u0442\u0438\u043b\u0438, \u0447\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0438\u043a\u0441\u0435\u043b\u0435\u0439 \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438 \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u0438 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u0432, \u0430 \u043f\u0440\u0438 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442\u0441\u044f \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u043b\u0438\u0437\u043a\u0438. \u041d\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0442\u0438\u043f\u0430 \u0438\u043d\u0442\u0435\u0440\u043f\u043e\u043b\u044f\u0446\u0438\u0438 \u0432\u0441\u0435 \u0440\u0430\u0432\u043d\u043e \u043d\u0435 \u043f\u043e\u043c\u043e\u0433\u043b\u043e \u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430. \u0421\u043c\u043e\u0442\u0440\u0438\u043c \u0434\u0430\u043b\u044c\u0448\u0435. \u041a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u044b \u0438\u043d\u0442\u0435\u0440\u043f\u043e\u043b\u044f\u0446\u0438\u0438 \u0441\u0447\u0438\u0442\u0430\u044e\u0442\u0441\u044f \u043e\u0447\u0435\u043d\u044c \u0441\u0442\u0440\u0430\u043d\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442\u0441\u044f \u043d\u0435 \u0441\u0438\u043c\u043c\u0435\u0442\u0440\u0438\u0447\u043d\u044b. \u042d\u0442\u043e \u043d\u0430\u043c \u0443\u0436\u0435 \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u0443\u0434\u0430\u0432\u0430\u043b\u043e\u0441\u044c \u0441\u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043a\u043b\u0430\u0441\u0441 \u0441 \u0442\u0430\u043a\u0438\u043c \u0442\u0438\u043f\u043e\u043c \u0438\u043d\u0442\u0435\u0440\u043f\u043e\u043b\u044f\u0446\u0438\u0438:<\/p>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0431\u0438\u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0438\u043d\u0442\u0435\u0440\u043f\u043e\u043b\u044f\u0446\u0438\u0438 \u0438\u0437 PIL<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\">class BilinearFilter(object):     &quot;&quot;&quot;     PIL bilinear resize implementation     image = image.resize((image_width \/\/ 16, image_height \/\/ 16), Image.BILINEAR)     &quot;&quot;&quot;     def _precompute_coeffs(self, inSize, outSize):         filterscale = max(1.0, inSize \/ outSize)         ksize = int(np.ceil(filterscale)) * 2 + 1          kk = np.zeros(shape=(outSize * ksize, ), dtype=np.float32)         bounds = np.empty(shape=(outSize * 2, ), dtype=np.int32)          centers = (np.arange(outSize) + 0.5) * filterscale + 0.5         bounds[::2] = np.where(centers - filterscale &lt; 0, 0, centers - filterscale)         bounds[1::2] = np.where(centers + filterscale &gt; inSize, inSize, centers + filterscale) - bounds[::2]         xmins = bounds[::2] - centers + 1          points = np.array([np.arange(row) + xmins[i] for i, row in enumerate(bounds[1::2])]) \/ filterscale         for xx in range(0, outSize):             point = points[xx]             bilinear = np.where(point &lt; 1.0, 1.0 - abs(point), 0.0)             ww = np.sum(bilinear)             kk[xx * ksize : xx * ksize + bilinear.size] = np.where(ww == 0.0, bilinear, bilinear \/ ww)         return bounds, kk, ksize      def _resample_horizontal(self, out, img, ksize, bounds, kk):         for yy in range(0, out.shape[0]):             for xx in range(0, out.shape[1]):                 xmin = bounds[xx * 2 + 0]                 xmax = bounds[xx * 2 + 1]                 k = kk[xx * ksize : xx * ksize + xmax]                 out[yy, xx] = np.round(np.sum(img[yy, xmin : xmin + xmax] * k))      def _resample_vertical(self, out, img, ksize, bounds, kk):         for yy in range(0, out.shape[0]):             ymin = bounds[yy * 2 + 0]             ymax = bounds[yy * 2 + 1]             k = kk[yy * ksize: yy * ksize + ymax]             out[yy] = np.round(np.sum(img[ymin : ymin + ymax, 0:out.shape[1]] * k[:, np.newaxis], axis=0))      def imaging_resample(self, img, xsize, ysize):         height, width, *args = img.shape         bounds_horiz, kk_horiz, ksize_horiz = self._precompute_coeffs(width, xsize)         bounds_vert, kk_vert, ksize_vert    = self._precompute_coeffs(height, ysize)          out_hor = np.empty((img.shape[0], xsize), dtype=np.uint8)         self._resample_horizontal(out_hor, img, ksize_horiz, bounds_horiz, kk_horiz)         out = np.empty((ysize, xsize), dtype=np.uint8)         self._resample_vertical(out, out_hor, ksize_vert, bounds_vert, kk_vert)         return out<\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <\/p>\n<h2 id=\"rezultaty\">\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b<\/h2>\n<p>  <\/p>\n<p>\u0412 \u043e\u0431\u0449\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0441\u044f \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d \u0438\u0437 4 \u0441\u0435\u0442\u0435\u0439, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u0438\u0437 \u0440\u0430\u0437\u043d\u044b\u0445 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u0432, \u043d\u043e \u0434\u0440\u0443\u0436\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0445 \u0432 OpenCV. \u041f\u0440\u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0441\u0435\u0442\u0438 \u043d\u0430 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u0444\u043e\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u044f\u0445 \u043c\u044b \u0437\u0430\u043c\u0435\u0442\u0438\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0435\u0439 \u0441\u0435\u0442\u0438. \u0412 \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043e\u0447\u043d\u043e\u043c \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0435 \u0431\u044b\u043b\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0434\u0435\u0432\u0443\u0448\u0435\u043a, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0435\u0442\u044c \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0445\u043e\u0440\u043e\u0448\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 \u043c\u0443\u0436\u0447\u0438\u043d\u0430\u043c\u0438. \u0420\u0443\u043a\u0438 \u0443 \u043d\u0438\u0445 \u0441\u0442\u0430\u043d\u043e\u0432\u044f\u0442\u0441\u044f \u0431\u043e\u043b\u0435\u0435 \u0436\u0435\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435, \u0430 \u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u043e\u0442 \u0433\u043e\u043b\u043e\u0432\u044b \u043a \u0442\u0435\u043b\u0443 \u0438\u043c\u0435\u0435\u0442 \u043e\u0447\u0435\u043d\u044c \u044f\u0440\u043a\u0443\u044e \u0433\u0440\u0430\u043d\u0438\u0446\u0443. \u0422\u0430\u043a\u0436\u0435 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0444\u043e\u0442\u043e \u0441 \u0441\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435\u043c \u0441\u0442\u043e\u0440\u043e\u043d \u043f\u0440\u043e\u043f\u043e\u0440\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 256 \u043d\u0430 192, \u0438\u043d\u0430\u0447\u0435 \u0441\u0435\u0442\u044c \u043f\u0440\u0438\u0431\u0430\u0432\u0438\u0442 \u043f\u0430\u0440\u0443 \u043a\u0438\u043b\u043e\u0433\u0440\u0430\u043c\u043c\u043e\u0432. \u041c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u043a\u0430\u0434\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0432 sample \u0434\u043e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u0441\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u0448\u0438\u0440\u0438\u043d\u043e\u0439 \u0438 \u0432\u044b\u0441\u043e\u0442\u043e\u0439. \u041b\u0443\u0447\u0448\u0435 \u0447\u0442\u043e\u0431\u044b \u043a\u0440\u043e\u043c\u0435 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0431\u044b\u043b\u043e, \u0430 \u043e\u0434\u0435\u0436\u0434\u0430 \u043d\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0438 \u0434\u043e\u043b\u0436\u043d\u0430 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u0431\u0435\u043b\u043e\u043c \u0444\u043e\u043d\u0435 \u0431\u0435\u0437 \u043a\u0430\u043a\u0438\u0445-\u043b\u0438\u0431\u043e \u0443\u0437\u043e\u0440\u043e\u0432 \u0438 \u043d\u0430\u0434\u043f\u0438\u0441\u0435\u0439, \u0438\u043d\u0430\u0447\u0435 \u044d\u0442\u0438 \u0447\u0430\u0441\u0442\u0438 \u0442\u043e\u0436\u0435 \u0431\u0443\u0434\u0443\u0442 \u0432\u043e\u0441\u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c\u0441\u044f \u043a\u0430\u043a \u043e\u0434\u0435\u0436\u0434\u0430.<\/p>\n<p>  <\/p>\n<p>P.S. \u0412 \u043c\u0430\u0435 2020 \u0433\u043e\u0434\u0430 OpenCV \u043e\u0442\u043c\u0435\u0447\u0430\u0435\u0442 \u0441\u0432\u043e\u0435 20-\u043b\u0435\u0442\u0438\u0435. \u041c\u044b \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u043c \u0432 \u044d\u0442\u043e\u043c \u0433\u043e\u0434\u0443 \u043f\u0438\u0441\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u0441\u0442\u0430\u0442\u0435\u0439 \u0438 \u043f\u0440\u0438\u0434\u0443\u043c\u044b\u0432\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u0435 \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438. \u0421\u043b\u0435\u0434\u0438\u0442\u0435 \u0437\u0430 \u043d\u043e\u0432\u043e\u0441\u0442\u044f\u043c\u0438!<\/p>\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\/company\/intel\/blog\/489906\/\"> https:\/\/habr.com\/ru\/company\/intel\/blog\/489906\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/company\/intel\/blog\/489906\/\">\n<p>\u0411\u044b\u043b\u043e \u043b\u0438 \u0443 \u0432\u0430\u0441 \u0442\u0430\u043a\u043e\u0435, \u0447\u0442\u043e \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442-\u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0435 \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u043b\u0430\u0441\u044c \u043a\u0430\u043a\u0430\u044f-\u043d\u0438\u0431\u0443\u0434\u044c \u0432\u0435\u0449\u044c, \u043d\u043e \u043d\u0435 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u043f\u043e\u043a\u0443\u043f\u0430\u0442\u044c \u0435\u0435, \u043d\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0438\u0432? \u041a\u043e\u043d\u0435\u0447\u043d\u043e \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0430\u0445 \u0435\u0441\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u0438\u0442\u044c \u043e\u0434\u0435\u0436\u0434\u0443 \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u043a\u0430\u0437\u0430 \u043f\u0435\u0440\u0435\u0434 \u043e\u043f\u043b\u0430\u0442\u043e\u0439. \u041e\u0434\u043d\u0430\u043a\u043e \u043f\u043e \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0435 \u043a\u0430\u0436\u0434\u044b\u0439 \u0433\u043e\u0434 \u0434\u043e\u043b\u044f \u043e\u043d\u043b\u0430\u0439\u043d-\u0437\u0430\u043a\u0430\u0437\u043e\u0432 \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442-\u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0430\u0445 \u043e\u0434\u0435\u0436\u0434\u044b \u0438 \u043e\u0431\u0443\u0432\u0438 \u0440\u0430\u0441\u0442\u0435\u0442, \u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u0440\u0430\u0441\u0442\u0435\u0442 \u0438 \u0434\u043e\u043b\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u043e\u0432, \u043e\u043d\u0430 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 50\u201370% \u2014 \u044d\u0442\u043e \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u0435 \u0437\u0430\u0442\u0440\u0430\u0442\u044b \u043d\u0430 \u043b\u043e\u0433\u0438\u0441\u0442\u0438\u043a\u0443, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043e\u043d\u043b\u0430\u0439\u043d-\u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0447\u043d\u0443\u044e. \u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u044c\u0442\u0435, \u0432\u044b \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442\u0435 \u0441\u0432\u043e\u044e \u0444\u043e\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u044e, \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442\u0435 \u043e\u0434\u0435\u0436\u0434\u0443 \u0438 \u043e\u043d\u0430 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u043d\u0430 \u0432\u0430\u0448\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435. \u0423\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0447\u043d\u044b\u0435 \u043e\u0431\u0443\u0432\u0438, \u043e\u043d\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0443\u0441\u043f\u0435\u0448\u043d\u043e. \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043d\u0430\u0437\u0430\u0434 \u043d\u0430\u0441 \u0437\u0430\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u043b\u0430 \u044d\u0442\u0430 \u0442\u0435\u043c\u0430, \u043a\u0430\u043a \u043e\u0431\u0441\u0442\u043e\u044f\u0442 \u0434\u0435\u043b\u0430 \u0441 \u043e\u0434\u0435\u0436\u0434\u043e\u0439? \u0422\u0430\u043a\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u0442\u043e\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442, \u043d\u043e \u0443\u0441\u043f\u0435\u0448\u043d\u044b\u0445 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u043c\u0435\u043d\u044c\u0448\u0435, \u0432\u043e \u043c\u043d\u043e\u0433\u0438\u0445 \u0438\u0437 \u043d\u0438\u0445 \u043a\u0440\u043e\u043c\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 \u043d\u0430\u0439\u0442\u0438 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0443\u0434\u0430\u0435\u0442\u0441\u044f, \u043e \u0440\u0430\u0431\u043e\u0447\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043c\u0435\u0447\u0442\u0430\u0442\u044c. \u041c\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u044d\u0442\u043e \u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043e\u0434\u043d\u0443 \u0438\u0437 \u0441\u0435\u0442\u0435\u0439 \u0432 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 OpenCV. \u0427\u0442\u043e \u0438\u0437 \u044d\u0442\u043e\u0433\u043e \u0432\u044b\u0448\u043b\u043e \u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0432 <a href=\"https:\/\/github.com\/opencv\/opencv\/blob\/master\/samples\/dnn\/virtual_try_on.py\">virtual_try_on.py<\/a> sample.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ph\/hw\/si\/phhwsiuhezrbjmvfpwx5npufclo.png\"><\/p>\n<p>  <\/p>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043d\u0435 \u0438\u0434\u0435\u0430\u043b\u0435\u043d, \u043d\u043e \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0445\u043e\u0440\u043e\u0448\u0438\u043c.<\/p>\n<p>  <\/p>\n<p>\u0425\u043e\u0442\u0438\u0442\u0435 \u0443\u0437\u043d\u0430\u0442\u044c \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0447\u043d\u0430\u044f \u0438 \u0441 \u043a\u0430\u043a\u0438\u043c\u0438 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u043c\u044b \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0438\u0441\u044c \u043f\u0440\u0438 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u043c\u043e\u0434\u0435\u043b\u0438 \u0432 OpenCV \u2014 \u0434\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434 \u043a\u0430\u0442!<\/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-299267","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/299267","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=299267"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/299267\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=299267"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=299267"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=299267"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}