{"id":310380,"date":"2020-09-23T15:00:55","date_gmt":"2020-09-23T15:00:55","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=310380"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=310380","title":{"rendered":"3D ML. \u0427\u0430\u0441\u0442\u044c 4: \u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433"},"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\/company\/itmai\/blog\/520268\/\">\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/po\/tj\/tt\/potjttneldjjyeyigqy5euqkcsk.jpeg\"><\/p>\n<p>  <\/p>\n<p>\u0412 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u0437\u0430\u043c\u0435\u0442\u043a\u0430\u0445 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0435\u0440\u0438\u0438 \u043c\u044b \u0443\u0436\u0435 \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043b\u0438 \u043f\u043e\u043d\u044f\u0442\u0438\u0435 <strong><em>\u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430<\/em><\/strong>. \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043f\u0440\u0438\u0448\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0437\u044a\u044f\u0441\u043d\u0438\u0442\u044c \u0447\u0442\u043e \u044d\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u0438 \u0441 \u0447\u0435\u043c \u044d\u0442\u043e \u0435\u0434\u044f\u0442.<\/p>\n<p>  <\/p>\n<p>\u041c\u044b \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043e \u0442\u043e\u043c, \u043f\u043e\u0447\u0435\u043c\u0443 \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430 \u043d\u0435 \u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0440\u0443\u0435\u043c, \u0437\u0430\u0447\u0435\u043c \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u0432 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 <strong><em>3D ML<\/em><\/strong> \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0435\u0433\u043e \u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0440\u0443\u0435\u043c\u044b\u043c \u0438 \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u043e \u0441 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u044b\u043c \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u043e\u043c. \u041a\u0430\u043a\u0438\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u043f\u043e\u0434\u0445\u043e\u0434\u044b \u043a \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e \u0442\u0430\u043a\u0438\u0445 \u0441\u0438\u0441\u0442\u0435\u043c, \u0438 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u2014 <strong><em>SoftRasterizer<\/em><\/strong> \u0438 \u0435\u0433\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0432 <strong><em>PyTorch 3D<\/em><\/strong>. \u0412 \u043a\u043e\u043d\u0446\u0435, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u044d\u0442\u043e\u0439 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438, \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u0432\u0441\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0438 \u201c\u041c\u043e\u043d\u044b \u041b\u0438\u0437\u044b\u201d \u041b\u0435\u043e\u043d\u0430\u0440\u0434\u043e \u0414\u0430 \u0412\u0438\u043d\u0447\u0438 \u0442\u0430\u043a, \u0435\u0441\u043b\u0438 \u0431\u044b \u043a\u0430\u0440\u0442\u0438\u043d\u0430 \u0431\u044b\u043b\u0430 \u043d\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u0440\u0443\u043a\u043e\u0439 \u043c\u0430\u0441\u0442\u0435\u0440\u0430, \u0430 \u043e\u0442\u0440\u0435\u043d\u0434\u0435\u0440\u0435\u043d\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043d\u043e\u0439 \u0433\u0440\u0430\u0444\u0438\u043a\u0438.<\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<p>\u0421\u0435\u0440\u0438\u044f 3D ML \u043d\u0430 \u0425\u0430\u0431\u0440\u0435:<\/p>\n<p>  <\/p>\n<ol>\n<li><a href=\"https:\/\/habr.com\/ru\/company\/itmai\/blog\/503358\/\">\u0424\u043e\u0440\u043c\u044b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f 3D \u0434\u0430\u043d\u043d\u044b\u0445<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/company\/itmai\/blog\/504416\/\">\u0424\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u043e\u0442\u0435\u0440\u044c \u0432 3D ML<\/a> <\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/company\/itmai\/blog\/516404\/\">\u0414\u0430\u0442\u0430\u0441\u0435\u0442\u044b \u0438 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0438 \u0432 3D ML<\/a><\/li>\n<li>\u0414\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433<\/li>\n<\/ol>\n<p>  <\/p>\n<p><a href=\"https:\/\/github.com\/phygitalism\/3DML-Habr-paper\">\u0420\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439<\/a> \u043d\u0430 GitHub \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0435\u0440\u0438\u0438 \u0437\u0430\u043c\u0435\u0442\u043e\u043a.<\/p>\n<p>  <\/p>\n<p>\u0417\u0430\u043c\u0435\u0442\u043a\u0430 \u043e\u0442 \u043f\u0430\u0440\u0442\u043d\u0435\u0440\u0430 IT-\u0446\u0435\u043d\u0442\u0440\u0430 \u041c\u0410\u0418 \u0438 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0442\u043e\u0440\u0430 \u043c\u0430\u0433\u0438\u0441\u0442\u0435\u0440\u0441\u043a\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u201c<a href=\"https:\/\/priem.mai.ru\/master\/programs\/item\/index.php?id=103770\">VR\/AR &amp; AI<\/a>\u201d \u2014 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 <a href=\"http:\/\/phygitalism.com\/\">PHYGITALISM<\/a>.<\/p>\n<p>  <\/p>\n<h2 id=\"rendering-pipeline-forward-and-inverse\">Rendering pipeline: forward and inverse<\/h2>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ik\/jo\/kw\/ikjokwktwukchc4vko-gmqmhaam.png\"><\/p>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c \u0432\u0441\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0437\u0430\u0434\u0430\u0447\u0438, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043a\u0430\u043a-\u0442\u043e \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0441 3D \u043c\u043e\u0434\u0435\u043b\u044f\u043c\u0438, \u0442\u043e \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u0438\u0445 \u043d\u0430 \u0434\u0432\u0430 \u043a\u043b\u0430\u0441\u0441\u0430 \u0437\u0430\u0434\u0430\u0447:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u0417\u0430\u0434\u0430\u0447\u0438, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0438\u0437 3D \u0441\u0446\u0435\u043d\u044b \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 (\u0442\u0430\u043a\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u043d\u0435\u0441\u0442\u0438 \u043a \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u044b\u043c \u0437\u0430\u0434\u0430\u0447\u0430\u043c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043d\u043e\u0439 \u0433\u0440\u0430\u0444\u0438\u043a\u0435) \u0442.\u043d. forward rendering;<\/li>\n<li>\u0417\u0430\u0434\u0430\u0447\u0438, \u0433\u0434\u0435 \u043f\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044e \u043d\u0430\u043c \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b 3D \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 (\u0442\u0430\u043a\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u043e\u0442\u043d\u043e\u0441\u044f\u0442\u0441\u044f \u0441\u043a\u043e\u0440\u0435\u0435 \u043a \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043d\u043e\u043c\u0443 \u0437\u0440\u0435\u043d\u0438\u044e) \u0442.\u043d. inverse rendering.<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u0414\u043e \u043d\u0435\u0434\u0430\u0432\u043d\u0435\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0434\u0432\u0430 \u044d\u0442\u0438\u0445 \u043a\u043b\u0430\u0441\u0441\u0430 \u0437\u0430\u0434\u0430\u0447 \u043e\u0431\u044b\u0447\u043d\u043e \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u043b\u0438\u0441\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0434\u0440\u0443\u0433 \u043e\u0442 \u0434\u0440\u0443\u0433\u0430, \u043d\u043e \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u0432\u0441\u0435 \u0447\u0430\u0449\u0435 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0438\u043c\u0435\u0442\u044c \u0434\u0435\u043b\u043e \u0441 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432 \u043e\u0431\u0435 \u0441\u0442\u043e\u0440\u043e\u043d\u044b (\u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u044d\u0442\u043e \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f).<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/j-\/i7\/df\/j-i7dfwhhylxwhha7ydtmjxtwby.png\"><br \/>  <em>\u0420\u0438\u0441.1 \u0418\u0437 \u043f\u0440\u0435\u0437\u0435\u043d\u0442\u0430\u0446\u0438\u0438 TensorFlow Graphics (<a href=\"https:\/\/github.com\/tensorflow\/graphics\">github page<\/a>).<\/em><\/p>\n<p>  <\/p>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0442\u0430\u043a\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438, \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0443 <em>\u201c3D mesh reconstruction from single image\u201d<\/em>, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u044b \u0443\u0436\u0435 \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043b\u0438 \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u0437\u0430\u043c\u0435\u0442\u043a\u0430\u0445. \u0421 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, \u044d\u0442\u0443 \u0437\u0430\u0434\u0430\u0447\u0443 \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0448\u0430\u0442\u044c \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0443 \u0440\u0430\u0441\u0441\u043e\u0433\u043b\u0430\u0441\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u044c\u044e \u0438 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043f\u043e\u0442\u0435\u0440\u044c \u0434\u043b\u044f 3D \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 (\u0437\u0430\u043c\u0435\u0442\u043a\u0430 \u21162 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0435\u0440\u0438\u0438). \u0421 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, \u043c\u043e\u0436\u043d\u043e \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c 3D \u043e\u0431\u044a\u0435\u043a\u0442 \u0441\u043d\u0430\u0447\u0430\u043b\u0430, \u0430 \u043f\u043e\u0441\u043b\u0435 \u0435\u0433\u043e \u043e\u0442\u0440\u0435\u043d\u0434\u0435\u0440\u0435\u043d\u043d\u0443\u044e \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0442\u044c \u0441 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435\u043c-\u043e\u0431\u0440\u0430\u0437\u0446\u043e\u043c (\u043f\u0440\u0438\u043c\u0435\u0440 \u043d\u0430 \u0440\u0438\u0441.2).<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/-j\/ar\/ml\/-jarmlajnufu-mz4scbdrbuxee4.gif\"><br \/>  <em>\u0420\u0438\u0441.2 \u041c\u043e\u0434\u0435\u043b\u044c \u0434\u0435\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043c\u0435\u0448\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u043e\u0434\u0443\u043b\u044f \u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430 SoftRas (<a href=\"https:\/\/github.com\/ShichenLiu\/SoftRas\">github page<\/a>).<\/em><\/p>\n<p>  <\/p>\n<p>\u0414\u0430\u043b\u0435\u0435, \u043f\u0440\u0438 \u0440\u0430\u0437\u0433\u043e\u0432\u043e\u0440\u0435 \u043f\u0440\u043e \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433, \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 3D \u0441\u0446\u0435\u043d\u044b:<\/p>\n<p>  <\/p>\n<ul>\n<li>3D \u043e\u0431\u044a\u0435\u043a\u0442, \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c\u044b\u0439 \u0441\u0432\u043e\u0438\u043c \u043c\u0435\u0448\u0435\u043c;<\/li>\n<li>\u043a\u0430\u043c\u0435\u0440\u0430 \u0441 \u043d\u0430\u0431\u043e\u0440\u043e\u043c \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a (\u043f\u043e\u0437\u0438\u0446\u0438\u044f, \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435, \u0440\u0430\u0441\u0442\u0432\u043e\u0440 \u0438 \u0442.\u0434.);<\/li>\n<li>\u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0438 \u0441\u0432\u0435\u0442\u0430 \u0438 \u0438\u0445 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0438;<\/li>\n<li>\u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0435 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0438 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u043d\u0430 \u0441\u0446\u0435\u043d\u0435, \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c\u044b\u0435 \u043c\u0430\u0442\u0440\u0438\u0446\u0430\u043c\u0438 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0439.<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u041f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u043f\u0440\u044f\u043c\u043e\u0433\u043e \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u043c \u0441\u043e\u0447\u0435\u0442\u0430\u043d\u0438\u0438 \u044d\u0442\u0438\u0445 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442, \u0430 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0438 \u044d\u0442\u0438\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u043f\u043e \u0433\u043e\u0442\u043e\u0432\u043e\u043c\u0443 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044e.<\/p>\n<p>  <\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043e \u0442\u043e\u043c, \u0438\u0437 \u043a\u0430\u043a\u0438\u0445 \u044d\u0442\u0430\u043f\u043e\u0432 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d \u043f\u0440\u044f\u043c\u043e\u0433\u043e \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430 \u0438 \u043f\u043e\u0447\u0435\u043c\u0443 \u043e\u043d \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0440\u0443\u0435\u043c\u044b\u043c.<\/p>\n<p>  <\/p>\n<h2 id=\"why-is-rendering-not-differentiable\">Why is rendering not differentiable?<\/h2>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/wr\/cc\/wd\/wrccwdy2yij6soxgijmatk9kiyy.png\"><br \/>  <em>\u0420\u0438\u0441.3 \u0421\u0445\u0435\u043c\u0430 \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430 \u0438 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430 \u043c\u0435\u0442\u043e\u0434\u043e\u043c Soft Rasterizer [1]. \u0417\u0434\u0435\u0441\u044c: <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/94d\/13e\/e0a\/94d13ee0aadd7f17977e0d279af38d42.svg\" alt=\"$M$\" data-tex=\"inline\"><\/math> \u2014 \u043c\u0435\u0448 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u043d\u0430 \u0441\u0446\u0435\u043d\u0435, <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/c3d\/2f2\/c44\/c3d2f2c44fc42edea27de7f8f67b4829.svg\" alt=\"$P$\" data-tex=\"inline\"><\/math> \u2014 \u043c\u043e\u0434\u0435\u043b\u044c \u043a\u0430\u043c\u0435\u0440\u044b, <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a5a\/4e0\/afa\/a5a4e0afaec84939dbfda220172b2be0.svg\" alt=\"$L$\" data-tex=\"inline\"><\/math> \u2014 \u043c\u043e\u0434\u0435\u043b\u044c \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430 \u043e\u0441\u0432\u0435\u0449\u0435\u043d\u0438\u044f, <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/493\/c1c\/008\/493c1c008018df9bed4910321f29ff00.svg\" alt=\"$A$\" data-tex=\"inline\"><\/math> \u2014 \u043c\u043e\u0434\u0435\u043b\u044c \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u044b, <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/1e8\/0c3\/b30\/1e80c3b3087c0a57b68ad11261a9ec2b.svg\" alt=\"$N$\" data-tex=\"inline\"><\/math> \u2014 \u043a\u0430\u0440\u0442\u0430 \u043d\u043e\u0440\u043c\u0430\u043b\u0435\u0439 \u0434\u043b\u044f \u043c\u0435\u0448\u0430, <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/274\/25a\/3cd\/27425a3cdf6cdf9dea5baa307429b5a7.svg\" alt=\"$Z$\" data-tex=\"inline\"><\/math> \u2014 \u043a\u0430\u0440\u0442\u0430 \u0433\u043b\u0443\u0431\u0438\u043d\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c\u043e\u0433\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f, <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/d07\/cc5\/b26\/d07cc5b26db621faab45e0e0b54ede62.svg\" alt=\"$U$\" data-tex=\"inline\"><\/math> \u2014 \u043c\u0430\u0442\u0440\u0438\u0446\u0430 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f 3D \u0432 2D \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043f\u043b\u043e\u0441\u043a\u043e\u0433\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f, <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/b8b\/97c\/656\/b8b97c6567171cc2b6a7f303a0fa8b0a.svg\" alt=\"$F$\" data-tex=\"inline\"><\/math> \u2014 \u0440\u0430\u0441\u0442\u0435\u0440\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435, <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/c5e\/2ea\/3b6\/c5e2ea3b63d255f7a483773fe1d664b2.svg\" alt=\"$D$\" data-tex=\"inline\"><\/math> \u2014 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u043d\u044b\u0435 \u043a\u0430\u0440\u0442\u044b \u043c\u0435\u0442\u043e\u0434\u0430 Soft Rasterizer, <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a54\/722\/4a9\/a547224a955d8edc22119a0067e564e2.svg\" alt=\"$I,\\bar I$\" data-tex=\"inline\"><\/math> \u2014 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u044b\u043c \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u043e\u043c \u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u043c SoftRas \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e. \u041a\u0440\u0430\u0441\u043d\u044b\u0435 \u0431\u043b\u043e\u043a\u0438 \u2014 \u043d\u0435\u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0440\u0443\u0435\u043c\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438, \u0441\u0438\u043d\u0438\u0438 \u2014 \u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0440\u0443\u0435\u043c\u044b\u0435.<\/em><\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0443 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0437\u0430\u0438\u043c\u043e\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u0445 \u044d\u0442\u0430\u043f\u043e\u0432 (\u044d\u0442\u0430\u043f\u044b \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u044b \u043d\u0430 \u0440\u0438\u0441.3 \u2014 \u0432\u0440\u0435\u0445\u043d\u044f\u044f \u043b\u0438\u043d\u0438\u044f \u0432 \u043f\u0440\u0430\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438). \u041a\u0430\u043a\u0438\u0435-\u0442\u043e \u044d\u0442\u0430\u043f\u044b, \u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0443 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043e\u0441\u0432\u0435\u0449\u0435\u043d\u0438\u044f \u0438 \u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u043a\u0430\u043c\u0435\u0440\u044b, \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0440\u0443\u0435\u043c\u044b\u043c\u0438, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0432 \u043d\u0438\u0445 \u0443\u0447\u0430\u0441\u0442\u0432\u0443\u044e\u0442 \u043d\u0435\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 (\u0441\u043c. <a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%97%D0%B0%D1%82%D0%B5%D0%BD%D0%B5%D0%BD%D0%B8%D0%B5_%D0%BF%D0%BE_%D0%A4%D0%BE%D0%BD%D0%B3%D1%83\">\u043c\u043e\u0434\u0435\u043b\u044c \u0424\u043e\u043d\u0433\u0430<\/a>, \u043d\u0430 \u0425\u0430\u0431\u0440\u0435 \u043e \u043d\u0435\u0439 \u0438 \u043c\u043e\u0434\u0435\u043b\u044f\u0445 \u043e\u0441\u0432\u0435\u0449\u0435\u043d\u0438\u044f \u043f\u0438\u0441\u0430\u043b\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/333932\/\">\u0437\u0434\u0435\u0441\u044c<\/a> \u0438 <a href=\"https:\/\/habr.com\/ru\/post\/353054\/\">\u0437\u0434\u0435\u0441\u044c<\/a>), \u043d\u043e \u0434\u0432\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 \u044d\u0442\u0430\u043f\u0430 \u043d\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0440\u0443\u0435\u043c\u044b\u043c\u0438. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c\u0441\u044f \u043f\u043e\u0447\u0435\u043c\u0443.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/nn\/y3\/ct\/nny3ctxycu9q7whvyzhztbbejh0.png\"><\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u0434\u0432\u0430 \u044d\u0442\u0430\u043f\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043f\u043e \u0441\u0443\u0442\u0438 \u0438 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u043c\u0438 \u2014 \u044d\u0442\u043e <a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%A0%D0%B0%D1%81%D1%82%D0%B5%D1%80%D0%B8%D0%B7%D0%B0%D1%86%D0%B8%D1%8F\">\u0440\u0430\u0441\u0442\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u044f<\/a> \u0438 <a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%A8%D1%8D%D0%B9%D0%B4%D0%B8%D0%BD%D0%B3\">\u0448\u0435\u0439\u0434\u0438\u043d\u0433<\/a>. (\u041f\u0440\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u044d\u0442\u0438\u0445 \u044d\u0442\u0430\u043f\u043e\u0432 \u043d\u0430 JavaScript \u043d\u0430 \u0425\u0430\u0431\u0440\u0435 \u043f\u0438\u0441\u0430\u043b\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/342708\/\">\u0437\u0434\u0435\u0441\u044c<\/a>). <\/p>\n<p>  <\/p>\n<p>\u0413\u0440\u0443\u0431\u043e \u0433\u043e\u0432\u043e\u0440\u044f, \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u043d\u0435\u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0440\u0443\u0435\u043c\u043e\u0441\u0442\u0438 \u0440\u0430\u0441\u0442\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0442\u0430\u043a: \u201c\u043f\u0438\u043a\u0441\u0435\u043b\u0438 \u2014 \u0434\u0438\u0441\u043a\u0440\u0435\u0442\u043d\u044b\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b, \u0441 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u044b\u043c \u0446\u0432\u0435\u0442\u043e\u043c, \u0430 \u0438\u0441\u0445\u043e\u0434\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0435\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u0430, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0438 \u043f\u0440\u043e\u0435\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0438\u0437 3D \u0432 2D \u0447\u0430\u0441\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0442\u0435\u0440\u044f\u0435\u0442\u0441\u044f\u201d.<\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u043e\u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043c \u0434\u0432\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 \u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0440\u0443\u0435\u043c\u043e\u0441\u0442\u044c\u044e \u043f\u0440\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0438 \u0446\u0432\u0435\u0442\u0430 \u0438 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u044f.<\/p>\n<p>  <\/p>\n<h3 id=\"problema-1-nedifferenciruemost-cveta-po-glubine\">\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u21161 (\u043d\u0435\u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0440\u0443\u0435\u043c\u043e\u0441\u0442\u044c \u0446\u0432\u0435\u0442\u0430 \u043f\u043e \u0433\u043b\u0443\u0431\u0438\u043d\u0435)<\/h3>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ku\/g9\/kv\/kug9kvvfu6fardr4hqzxqwszvdg.png\"><\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0447\u0442\u043e \u0432\u0434\u043e\u043b\u044c \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043b\u0443\u0447\u0430, \u043f\u0440\u043e\u0445\u043e\u0434\u044f\u0449\u0435\u0433\u043e \u0447\u0435\u0440\u0435\u0437 \u043f\u0438\u043a\u0441\u0435\u043b\u044c, \u0435\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043b\u0438\u0433\u043e\u043d\u043e\u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0446\u0432\u0435\u0442\u043e\u0432, \u043a\u0430\u043a \u043d\u0430 \u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0432\u044b\u0448\u0435. \u0415\u0441\u043b\u0438 \u043f\u0440\u0438\u0434\u0430\u0442\u044c \u043c\u0430\u043b\u044b\u0439 \u0441\u0434\u0432\u0438\u0433 \u043f\u043e\u043b\u0438\u0433\u043e\u043d\u043e\u0432 \u0434\u0440\u0443\u0433 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u0440\u0443\u0433\u0430, \u043c\u043e\u0436\u0435\u0442 \u0441\u043b\u0443\u0447\u0438\u0442\u044c\u0441\u044f \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f, \u043a\u043e\u0433\u0434\u0430 \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0438\u043c \u043f\u043e\u043b\u0438\u0433\u043e\u043d\u043e\u043c \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043f\u043e\u043b\u0438\u0433\u043e\u043d \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u0446\u0432\u0435\u0442\u0430 \u0438 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0440\u0435\u0437\u043a\u043e \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0446\u0432\u0435\u0442, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0443\u0436\u043d\u043e \u0440\u0430\u0437\u0443\u043a\u0440\u0430\u0448\u0438\u0432\u0430\u0442\u044c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043f\u0438\u043a\u0441\u0435\u043b\u044c. \u041d\u0430 \u043f\u0440\u0430\u0432\u043e\u043c \u0433\u0440\u0430\u0444\u0438\u043a\u0435 \u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0430 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u0446\u0432\u0435\u0442\u0430 \u043f\u0438\u043a\u0441\u0435\u043b\u044f (\u0432 \u0431\u0430\u0440\u0438\u0446\u0435\u043d\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u0430\u0445) \u043e\u0442 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0434\u043e \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0435\u0433\u043e \u043f\u0438\u043a\u0441\u0435\u043b\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438. \u0418\u0437 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u043c\u0430\u043b\u043e\u043c\u0443 \u043f\u0440\u0438\u0440\u0430\u0449\u0435\u043d\u0438\u044e \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0434\u043e \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0435\u0433\u043e \u043f\u043e\u043b\u0438\u0433\u043e\u043d\u0430 \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0441\u043a\u0430\u0447\u043a\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u043e\u043c\u0443 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044e \u0432 \u0446\u0432\u0435\u0442\u0435, \u0447\u0442\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u043d\u0435\u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0440\u0443\u0435\u043c\u043e\u0441\u0442\u0438 \u0432 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u0441\u043c\u044b\u0441\u043b\u0435.<\/p>\n<p>  <\/p>\n<h3 id=\"problema-2-nedifferenciruemost-cveta-pri-sdvigah\">\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u21162 (\u043d\u0435\u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0440\u0443\u0435\u043c\u043e\u0441\u0442\u044c \u0446\u0432\u0435\u0442\u0430 \u043f\u0440\u0438 \u0441\u0434\u0432\u0438\u0433\u0430\u0445)<\/h3>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/td\/lq\/s6\/tdlqs6prqprteio4wxcrjoif6rw.png\"><\/p>\n<p>  <\/p>\n<p>\u0412\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043d\u0435\u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0440\u0443\u0435\u043c\u043e\u0441\u0442\u0438 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u0430 \u043f\u0435\u0440\u0432\u043e\u0439, \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u043b\u0438\u0433\u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u043e\u0434\u0438\u043d, \u0430 \u0434\u0432\u0438\u0433\u0430\u0442\u044c \u043c\u044b \u0435\u0433\u043e \u0431\u0443\u0434\u0435\u043c \u043d\u0435 \u0432\u0434\u043e\u043b\u044c \u043b\u0443\u0447\u0430, \u043f\u0440\u043e\u0445\u043e\u0434\u044f\u0449\u0435\u0433\u043e \u0447\u0435\u0440\u0435\u0437 \u0434\u0430\u043d\u043d\u044b\u0439 \u043f\u0438\u043a\u0441\u0435\u043b\u044c, \u0430 \u0432 \u0441\u0442\u043e\u0440\u043e\u043d\u0443 \u043e\u0442 \u044d\u0442\u043e\u0433\u043e \u043b\u0443\u0447\u0430. \u041e\u043f\u044f\u0442\u044c \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u043c \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e, \u043a\u043e\u0433\u0434\u0430 \u043c\u0430\u043b\u043e\u043c\u0443 \u043f\u0440\u0438\u0440\u0430\u0449\u0435\u043d\u0438\u044e \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u043f\u043e\u043b\u0438\u0433\u043e\u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0441\u043a\u0430\u0447\u043e\u043a \u0432 \u0446\u0432\u0435\u0442\u0435 \u043f\u0438\u043a\u0441\u0435\u043b\u044f.<\/p>\n<p>  <\/p>\n<h2 id=\"make-it-differentiable---soft-rasterizer\">Make it differentiable! \u2014 Soft Rasterizer<\/h2>\n<p>  <\/p>\n<p>\u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430 \u043d\u0435\u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0440\u0443\u0435\u043c\u044b\u0439, \u043d\u043e \u0435\u0441\u043b\u0438 \u0431\u044b \u043e\u043d \u0442\u0430\u043a\u043e\u0432\u044b\u043c \u044f\u0432\u043b\u044f\u043b\u0441\u044f, \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u0440\u0435\u0448\u0430\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447 \u0432 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 3D ML \u2014 \u043c\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443, \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043a\u0430\u043a \u0435\u0435 \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0448\u0438\u0442\u044c. <\/p>\n<p>  <\/p>\n<p>\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044b \u043a \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0440\u0443\u0435\u043c\u043e\u0433\u043e \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u043b\u0435\u0434\u0438\u0442\u044c \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043f\u043e\u0434\u0431\u043e\u0440\u043a\u0435 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0439:<\/p>\n<p>  <\/p>\n<ul>\n<li>Loper, M.M. and Black, M.J., 2014, September. <a href=\"https:\/\/link.springer.com\/content\/pdf\/10.1007\/978-3-319-10584-0_11.pdf\">OpenDR: An approximate differentiable renderer.<\/a> In European Conference on Computer Vision (pp. 154-169). Springer, Cham.<\/li>\n<li>Kato, H., Ushiku, Y. and Harada, T., 2018. <a href=\"https:\/\/openaccess.thecvf.com\/content_cvpr_2018\/papers\/Kato_Neural_3D_Mesh_CVPR_2018_paper.pdf\">Neural 3d mesh renderer.<\/a> In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (pp. 3907-3916). <\/li>\n<li>Li, T.M., Aittala, M., Durand, F. and Lehtinen, J., 2018. <a href=\"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3272127.3275109\">Differentiable monte carlo ray tracing through edge sampling.<\/a> ACM Transactions on Graphics (TOG), 37(6), pp.1-11. <\/li>\n<li>Liu, S., Li, T., Chen, W. and Li, H., 2019. Soft rasterizer: A differentiable renderer for image-based 3d reasoning. In Proceedings of the IEEE International Conference on Computer Vision (pp. 7708-7717).<\/li>\n<li>Chen, W., Ling, H., Gao, J., Smith, E., Lehtinen, J., Jacobson, A. and Fidler, S., 2019. <a href=\"https:\/\/papers.nips.cc\/paper\/9156-learning-to-predict-3d-objects-with-an-interpolation-based-differentiable-renderer.pdf\">Learning to predict 3d objects with an interpolation-based differentiable renderer.<\/a> In Advances in Neural Information Processing Systems (pp. 9609-9619).<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u041f\u043e\u0434\u0445\u043e\u0434\u044b \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u044b \u043d\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u0438\u0434\u0435\u044f\u0445 \u0438 \u043f\u0440\u0438\u0435\u043c\u0430\u0445. \u041c\u044b \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u043e\u0434\u043d\u043e\u043c, <strong><em>Soft Rasterizer<\/em><\/strong>, \u043f\u043e \u0434\u0432\u0443\u043c \u043f\u0440\u0438\u0447\u0438\u043d\u0430\u043c: \u0432\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u0438\u0434\u0435\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u0430 \u0438 \u043b\u0435\u0433\u043a\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c\u0430 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e, \u0432\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u0434\u0430\u043d\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d \u0432\u043d\u0443\u0442\u0440\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 <a href=\"https:\/\/github.com\/facebookresearch\/pytorch3d\">PyTorch 3D<\/a> [6].<\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u0430\u0441\u043f\u0435\u043a\u0442\u0430\u043c\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430 \u044d\u0442\u0438\u043c \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 [1], \u043c\u044b \u0436\u0435 \u043e\u0442\u043c\u0435\u0442\u0438\u043c \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043c\u043e\u043c\u0435\u043d\u0442\u044b.<\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u21162, \u0430\u0432\u0442\u043e\u0440\u044b \u043c\u0435\u0442\u043e\u0434\u0430 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u201c\u0440\u0430\u0437\u043c\u044b\u0442\u0438\u0435\u201d \u0433\u0440\u0430\u043d\u0438\u0446\u044b \u043f\u043e\u043b\u0438\u0433\u043e\u043d\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u043d\u0435\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u043e\u0439 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0446\u0432\u0435\u0442\u0430 \u043f\u0438\u043a\u0441\u0435\u043b\u044f \u043e\u0442 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442 \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u0438\u0433\u043e\u043d\u0430.<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/zt\/sm\/ea\/ztsmeauz4kkk-liu8ahcewbypmk.png\"><br \/>  \u0420\u0430\u0437\u043c\u044b\u0442\u0438\u0435 \u0433\u0440\u0430\u043d\u0438\u0446 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442 \u0432\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0433\u043b\u0430\u0434\u043a\u043e\u0439 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f73\/033\/137\/f73033137219f1ed5cf05d19b8522132.svg\" alt=\"$D_j^i$\" data-tex=\"inline\"><\/math>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0439 \u0438\u043b\u0438 \u0432\u043d\u0435\u0448\u043d\u0435\u0439 \u0442\u043e\u0447\u043a\u0438 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/08b\/a9c\/561\/08ba9c56140cf603308f9b84a26dc818.svg\" alt=\"$p_i$\" data-tex=\"inline\"><\/math> \u0441\u0442\u0430\u0432\u0438\u0442 \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u0447\u0438\u0441\u043b\u043e \u043e\u0442 0 \u0434\u043e 1 \u2014 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u043d\u043e\u0441\u0442\u0438 \u043a \u0434\u0430\u043d\u043d\u043e\u043c\u0443 \u043f\u043e\u043b\u0438\u0433\u043e\u043d\u0443 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/105\/404\/a9a\/105404a9ab323e02240c7aca44e8fcb3.svg\" alt=\"$f_j$\" data-tex=\"inline\"><\/math> (\u0447\u0435\u043c-\u0442\u043e \u043f\u043e\u0445\u043e\u0436\u0435 \u043d\u0430 \u043f\u043e\u0434\u0445\u043e\u0434 \u043d\u0435\u0447\u0435\u0442\u043a\u043e\u0439 \u043b\u043e\u0433\u0438\u043a\u0438). \u0417\u0434\u0435\u0441\u044c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/bd2\/53a\/dd0\/bd253add01b6a626f79861899c5e7d73.svg\" alt=\"$\\sigma$\" data-tex=\"inline\"><\/math> \u2014 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0440\u0430\u0437\u043c\u044b\u0442\u0438\u044f (\u0447\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/bd2\/53a\/dd0\/bd253add01b6a626f79861899c5e7d73.svg\" alt=\"$\\sigma$\" data-tex=\"inline\"><\/math>, \u0442\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0440\u0430\u0437\u043c\u044b\u0442\u0438\u0435), <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/19a\/87d\/656\/19a87d6565a254099cb740404df62387.svg\" alt=\"$d(i,j)$\" data-tex=\"inline\"><\/math> \u2014 \u043a\u0440\u0430\u0442\u0447\u0430\u0439\u0448\u0435\u0435 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0432 \u043f\u0440\u043e\u0435\u043a\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u043f\u043b\u043e\u0441\u043a\u043e\u0441\u0442\u0438 \u043e\u0442 \u043f\u0440\u043e\u0435\u043a\u0446\u0438\u0438 \u0442\u043e\u0447\u043a\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/08b\/a9c\/561\/08ba9c56140cf603308f9b84a26dc818.svg\" alt=\"$p_i$\" data-tex=\"inline\"><\/math> \u0434\u043e \u0433\u0440\u0430\u043d\u0438\u0446\u044b \u043f\u0440\u043e\u0435\u043a\u0446\u0438\u0438 \u043f\u043e\u043b\u0438\u0433\u043e\u043d\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/105\/404\/a9a\/105404a9ab323e02240c7aca44e8fcb3.svg\" alt=\"$f_j$\" data-tex=\"inline\"><\/math> (\u0434\u0430\u043d\u043d\u043e\u0435 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043e\u0431\u044b\u0447\u043d\u043e \u0432\u044b\u0431\u0438\u0440\u0430\u044e\u0442 \u0415\u0432\u043a\u043b\u0438\u0434\u043e\u0432\u044b\u043c, \u043d\u043e \u0430\u0432\u0442\u043e\u0440\u044b \u043c\u0435\u0442\u043e\u0434\u0430 \u043e\u0442\u043c\u0435\u0447\u0430\u044e\u0442, \u0447\u0442\u043e \u0437\u0434\u0435\u0441\u044c \u0435\u0441\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0440 \u0434\u043b\u044f \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432 \u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0431\u0430\u0440\u0438\u0446\u0435\u043d\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0438\u043b\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/946\/300\/b09\/946300b0916cef6130271e972a775fdf.svg\" alt=\"$l_1$\" data-tex=\"inline\"><\/math> \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u0438\u0445 \u043c\u0435\u0442\u043e\u0434\u0430), <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/719\/cf9\/aaf\/719cf9aafb3f4d2856c5c33b105acb30.svg\" alt=\"$\\delta_j^i$\" data-tex=\"inline\"><\/math> \u2014 \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0440\u0430\u0432\u043d\u0430 1 \u0435\u0441\u043b\u0438 \u0442\u043e\u0447\u043a\u0430 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432\u043d\u0443\u0442\u0440\u0438 \u043f\u043e\u043b\u0438\u0433\u043e\u043d\u0430 \u0438 -1 \u0435\u0441\u043b\u0438 \u0432\u043d\u0435 (\u043d\u0430 \u0433\u0440\u0430\u043d\u0438\u0446\u0435 \u043f\u043e\u043b\u0438\u0433\u043e\u043d\u0430 \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/dd8\/a86\/2f5\/dd8a862f53583925b661220cb68f577b.svg\" alt=\"$\\delta$\" data-tex=\"inline\"><\/math> \u043d\u0443\u043b\u0435\u043c, \u043e\u0434\u043d\u0430\u043a\u043e \u044d\u0442\u043e \u0432\u0441\u0435 \u0440\u0430\u0432\u043d\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043d\u0430 \u0433\u0440\u0430\u043d\u0438\u0446\u0435 \u043f\u043e\u043b\u0438\u0433\u043e\u043d\u0430 \u0434\u0430\u043d\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0440\u0430\u0437\u0440\u044b\u0432\u043d\u0430, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043b\u044f \u0442\u043e\u0447\u0435\u043a \u0433\u0440\u0430\u043d\u0438\u0446 \u043e\u043d\u0430 \u043d\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f), <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/e7b\/769\/09c\/e7b76909c36b30efb388faa9ff45c00e.svg\" alt=\"$sigmoid$\" data-tex=\"inline\"><\/math> \u2014 \u0441\u0438\u0433\u043c\u043e\u0438\u0434\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0447\u0430\u0441\u0442\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0432 \u0433\u043b\u0443\u0431\u043e\u043a\u043e\u043c \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0438. <\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u21161, \u0430\u0432\u0442\u043e\u0440\u044b \u043c\u0435\u0442\u043e\u0434\u0430 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u201c\u0441\u043c\u0435\u0448\u0435\u043d\u0438\u0435\u201d \u0446\u0432\u0435\u0442\u043e\u0432 k \u2014 \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0438\u0445 \u043f\u043e\u043b\u0438\u0433\u043e\u043d\u043e\u0432 (blending).<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/es\/hb\/1t\/eshb1t77eoigxww-xp7u162qvfk.png\"><br \/>  \u041a\u043e\u0440\u043e\u0442\u043a\u043e \u044d\u0442\u043e\u0442 \u043f\u0440\u0438\u0435\u043c \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c: \u0434\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0438\u0442\u043e\u0433\u043e\u0432\u043e\u0433\u043e \u0446\u0432\u0435\u0442\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/bf8\/3b5\/32c\/bf83b532cd867d34004f8eded8c5c79a.svg\" alt=\"$i$\" data-tex=\"inline\"><\/math>-\u0433\u043e \u043f\u0438\u043a\u0441\u0435\u043b\u044f <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/1ff\/8a9\/2c3\/1ff8a92c3cb0c7e6c45a9956e6bfd02a.svg\" alt=\"$(I^i)$\" data-tex=\"inline\"><\/math>, \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u044f\u0442 \u043d\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u0441\u0443\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0446\u0432\u0435\u0442\u043e\u0432\u044b\u0445 \u043a\u0430\u0440\u0442 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/7fd\/8c0\/2bb\/7fd8c02bb55b227d68098b31e7fa78e8.svg\" alt=\"$C^i_j$\" data-tex=\"inline\"><\/math> \u0434\u043b\u044f k \u2014 \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0438\u0445 \u043f\u043e\u043b\u0438\u0433\u043e\u043d\u043e\u0432 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/3f7\/8a0\/a06\/3f78a0a066c932f875db8cc83a9c1319.svg\" alt=\"$(j =1,..,k)$\" data-tex=\"inline\"><\/math>, \u043f\u0440\u0438\u0447\u0435\u043c \u0446\u0432\u0435\u0442\u043e\u0432\u044b\u0435 \u043a\u0430\u0440\u0442\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442 \u043f\u0443\u0442\u0435\u043c \u0438\u043d\u0442\u0435\u0440\u043f\u043e\u043b\u044f\u0446\u0438\u0438 \u0431\u0430\u0440\u0438\u0446\u0435\u043d\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442 \u0446\u0432\u0435\u0442\u0430 \u0432\u0435\u0440\u0448\u0438\u043d \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u043b\u0438\u0433\u043e\u043d\u043e\u0432. \u0418\u043d\u0434\u0435\u043a\u0441 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/302\/c72\/04e\/302c7204ea9987e698a70307646abd71.svg\" alt=\"$b$\" data-tex=\"inline\"><\/math> \u0432 \u0444\u043e\u0440\u043c\u0443\u043b\u0435 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u0444\u043e\u043d\u043e\u0432\u044b\u0439 \u0446\u0432\u0435\u0442 (background colour), \u0430 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/8d6\/920\/4ef\/8d69204ef28e65155268d23f61f8ed01.svg\" alt=\"$\\mathcal{A}_{S}$\" data-tex=\"inline\"><\/math> \u2014 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u0430\u0433\u0440\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0446\u0432\u0435\u0442\u0430. <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/dbf\/c73\/4c7\/dbfc734c7c9d0258aa7105ad1de009c7.svg\" alt=\"$z^i_j$\" data-tex=\"inline\"><\/math> \u2014 \u0433\u043b\u0443\u0431\u0438\u043d\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/bf8\/3b5\/32c\/bf83b532cd867d34004f8eded8c5c79a.svg\" alt=\"$i$\" data-tex=\"inline\"><\/math>-\u0433\u043e \u043f\u0438\u043a\u0441\u0435\u043b\u044f \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/b82\/8e2\/475\/b828e2475a3a56280b895f35eb250ea2.svg\" alt=\"$j$\" data-tex=\"inline\"><\/math>-\u0433\u043e \u043f\u043e\u043b\u0438\u0433\u043e\u043d\u0430, \u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/fbc\/f2a\/da4\/fbcf2ada4d2c9c0d4c2e64f59ffe82c0.svg\" alt=\"$\\gamma$\" data-tex=\"inline\"><\/math> \u2014 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0441\u043c\u0435\u0448\u0438\u0432\u0430\u043d\u0438\u044f (\u0447\u0435\u043c \u043e\u043d \u043c\u0435\u043d\u044c\u0448\u0435, \u0442\u0435\u043c \u0441\u0438\u043b\u044c\u043d\u0435\u0435 \u043f\u0440\u0435\u0432\u0430\u043b\u0438\u0440\u0443\u0435\u0442 \u0446\u0432\u0435\u0442 \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0435\u0433\u043e \u043f\u043e\u043b\u0438\u0433\u043e\u043d\u0430).<\/p>\n<p>  <\/p>\n<p>\u0418\u0442\u043e\u0433\u043e\u0432\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 Soft Rasterizer, \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u043a\u043e\u043c\u0431\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u044d\u0442\u0438\u0445 \u0434\u0432\u0443\u0445 \u0438\u0434\u0435\u0439, \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0433\u043e \u043f\u043b\u0430\u0432\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u044b\u0442\u0438\u044f \u0433\u0440\u0430\u043d\u0438\u0446\u044b \u0438 \u0446\u0432\u0435\u0442\u0430.<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/vv\/t5\/ld\/vvt5ldiqn_ujativcp6-0lid-py.png\"><br \/>  <em>\u0420\u0438\u0441.4 \u0421\u0445\u0435\u043c\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430 \u0432 PyTorch 3D (\u0441\u043b\u0430\u0439\u0434 \u0438\u0437 <a href=\"https:\/\/www.youtube.com\/watch?v=eCDBA_SbxCE\">\u043f\u0440\u0435\u0437\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430<\/a>).<\/em><\/p>\n<p>  <\/p>\n<p>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f Soft Rasterizer \u0432\u043d\u0443\u0442\u0440\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 PyTorch 3D \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0430 \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u0438 \u0443\u0434\u043e\u0431\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043a\u0430\u043a \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 PyTorch, \u0442\u0430\u043a \u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438 CUDA. \u041f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439 [<a href=\"https:\/\/github.com\/ShichenLiu\/SoftRas\">github page<\/a>], \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f 4-\u0445 \u043a\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 (\u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0434\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439), \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430\u0435\u0442 \u0440\u0430\u0441\u0445\u043e\u0434 \u043f\u0430\u043c\u044f\u0442\u0438 \u0437\u0430 \u0441\u0447\u0435\u0442 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 (\u043a\u0430\u0442\u0430 \u0433\u043b\u0443\u0431\u0438\u043d\u044b, \u043a\u0430\u0440\u0442\u0430 \u043d\u043e\u0440\u043c\u0430\u043b\u0435\u0439, \u0440\u0435\u043d\u0434\u0435\u0440 \u0442\u0435\u043a\u0441\u0442\u0443\u0440, \u043a\u0430\u0440\u0442\u0430 \u0435\u0432\u043a\u043b\u0438\u0434\u043e\u0432\u044b\u0445 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0439) \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c k \u0441\u043b\u043e\u0435\u0432 \u0438 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0438\u0445 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/w3\/3a\/y0\/w33ay02pkqxrpx9drg8lwjecc8q.png\"><br \/>  <em>\u0420\u0438\u0441.5 \u0421\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a \u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430 \u0432 PyTorch 3D (\u0441\u043b\u0430\u0439\u0434 \u0438\u0437 <a href=\"https:\/\/www.youtube.com\/watch?v=eCDBA_SbxCE\">\u043f\u0440\u0435\u0437\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430<\/a>).<\/em><\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438 \u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0435\u043d\u0434\u0435\u0440\u0430 \u043c\u043e\u0436\u043d\u043e \u043a\u0430\u043a \u0432 PyTorch 3D, \u0442\u0430\u043a \u0432 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 \u0441 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 <a href=\"https:\/\/github.com\/ShichenLiu\/SoftRas\">Soft Rasterizer<\/a>. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c <a href=\"https:\/\/github.com\/ShichenLiu\/SoftRas\/blob\/master\/examples\/demo_render.py\">\u043f\u0440\u0438\u043c\u0435\u0440<\/a>, \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u0443\u044e\u0449\u0438\u0439 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u0438\u0442\u043e\u0433\u043e\u0432\u043e\u0439 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u043e\u0442\u0440\u0435\u043d\u0434\u0435\u0440\u0435\u043d\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u043e\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0435\u043d\u0434\u0435\u0440\u0430 \\sigma, \\gamma.<\/p>\n<p>  <\/p>\n<p>\u0423\u0434\u043e\u0431\u043d\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u044d\u0442\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439 \u0432 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u043c \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0438 anaconda, \u0442\u0430\u043a \u043a\u0430\u043a \u0434\u0430\u043d\u043d\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0443\u0436\u0435 \u043d\u0435 \u0441 \u0441\u0430\u043c\u043e\u0439 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 pytorch 1.1.0. \u0422\u0430\u043a\u0436\u0435 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0447\u0442\u043e \u0432\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0432\u0438\u0434\u0435\u043e\u043a\u0430\u0440\u0442\u0430 \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 CUDA.<\/p>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0418\u043c\u043f\u043e\u0440\u0442 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0438 \u0437\u0430\u0434\u0430\u043d\u0438\u0435 \u043f\u0443\u0442\u0435\u0439 \u0434\u043e \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\">import matplotlib.pyplot as plt import os import tqdm import numpy as np import imageio import soft_renderer as sr  input_file = 'path\/to\/input\/file' output_dir = 'path\/to\/output\/dir'<\/code><\/pre>\n<\/div><\/div>\n<p>  <\/p>\n<p>\u0417\u0430\u0434\u0430\u0434\u0438\u043c \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043a\u0430\u043c\u0435\u0440\u044b \u0434\u043b\u044f \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430, \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043c \u043c\u0435\u0448 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0441 \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u0430\u043c\u0438 (\u0435\u0441\u0442\u044c \u043c\u043e\u0434 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0431\u0435\u0437 \u0442\u0435\u043a\u0441\u0442\u0443\u0440, \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0443\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c <code>texture_type=\u2019vertex\u2019<\/code>), \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u043d\u0434\u0435\u0440 \u0438 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u0434\u043b\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432.<\/p>\n<p>  <\/p>\n<pre><code class=\"python\"># camera settings camera_distance = 2.732 elevation = 30 azimuth = 0  # load from Wavefront .obj file mesh = sr.Mesh.from_obj(                          input_file,                           load_texture=True,                           texture_res=5,                           texture_type='surface')  # create renderer with SoftRas renderer = sr.SoftRenderer(camera_mode='look_at')  os.makedirs(args.output_dir, exist_ok=True)<\/code><\/pre>\n<p>  <\/p>\n<p>\u0421\u043d\u0430\u0447\u0430\u043b\u0430, \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u043d\u0430\u0448\u0443 \u043c\u043e\u0434\u0435\u043b\u044c \u0441 \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u0442\u043e\u0440\u043e\u043d \u0438 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043e\u0442\u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043c \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044e \u043f\u0440\u043e\u043b\u0435\u0442\u0430 \u043a\u0430\u043c\u0435\u0440\u044b \u043f\u043e \u043a\u0440\u0443\u0433\u0443 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0440\u0435\u043d\u0434\u0435\u0440\u0430.<\/p>\n<p>  <\/p>\n<pre><code class=\"python\"> # draw object from different view loop = tqdm.tqdm(list(range(0, 360, 4))) writer = imageio.get_writer(                             os.path.join(output_dir, 'rotation.gif'),                               mode='I')  for num, azimuth in enumerate(loop):     # rest mesh to initial state     mesh.reset_()     loop.set_description('Drawing rotation')     renderer.transform.set_eyes_from_angles(                                             camera_distance,                                              elevation,                                              azimuth)     images = renderer.render_mesh(mesh)     image = images.detach().cpu().numpy()[0].transpose((1, 2, 0))     writer.append_data((255*image).astype(np.uint8)) writer.close()<\/code><\/pre>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0438\u0433\u0440\u0430\u0435\u043c\u0441\u044f \u0441\u043e \u0441\u0442\u0435\u043f\u0435\u043d\u044c\u044e \u0440\u0430\u0437\u043c\u044b\u0442\u0438\u044f \u0433\u0440\u0430\u043d\u0438\u0446\u044b \u0438 \u0441\u0442\u0435\u043f\u0435\u043d\u044c\u044e \u0441\u043c\u0435\u0448\u0435\u043d\u0438\u044f \u0446\u0432\u0435\u0442\u043e\u0432. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0431\u0443\u0434\u0435\u043c \u0432 \u0446\u0438\u043a\u043b\u0435 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0440\u0430\u0437\u043c\u044b\u0442\u0438\u044f <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/bd2\/53a\/dd0\/bd253add01b6a626f79861899c5e7d73.svg\" alt=\"$\\sigma$\" data-tex=\"inline\"><\/math> \u0438 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0441\u043c\u0435\u0448\u0435\u043d\u0438\u044f \u0446\u0432\u0435\u0442\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/fbc\/f2a\/da4\/fbcf2ada4d2c9c0d4c2e64f59ffe82c0.svg\" alt=\"$\\gamma$\" data-tex=\"inline\"><\/math>.<\/p>\n<p>  <\/p>\n<pre><code class=\"python\"># draw object from different sigma and gamma loop = tqdm.tqdm(list(np.arange(-4, -2, 0.2))) renderer.transform.set_eyes_from_angles(camera_distance, elevation, 45) writer = imageio.get_writer(                             os.path.join(output_dir, 'bluring.gif'),                              mode='I')  for num, gamma_pow in enumerate(loop):     # rest mesh to initial state     mesh.reset_()     renderer.set_gamma(10**gamma_pow)     renderer.set_sigma(10**(gamma_pow - 1))     loop.set_description('Drawing blurring')     images = renderer.render_mesh(mesh)     image = images.detach().cpu().numpy()[0].transpose((1, 2, 0))     writer.append_data((255*image).astype(np.uint8)) writer.close()  # save to textured obj mesh.reset_() mesh.save_obj(               os.path.join(args.output_dir, 'saved_spot.obj'),                save_texture=True)<\/code><\/pre>\n<p>  <\/p>\n<p>\u0418\u0442\u043e\u0433\u043e\u0432\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u043a\u043e\u0440\u043e\u0432\u044b (<a href=\"https:\/\/dl.fbaipublicfiles.com\/pytorch3d\/data\/cow_mesh\/cow.obj\">cow.obj<\/a>, <a href=\"https:\/\/dl.fbaipublicfiles.com\/pytorch3d\/data\/cow_mesh\/cow.mtl\">cow.mtl<\/a>, <a href=\"https:\/\/dl.fbaipublicfiles.com\/pytorch3d\/data\/cow_mesh\/cow_texture.png\">cow.png<\/a> \u2014 \u0443\u0434\u043e\u0431\u043d\u043e \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0442\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <a href=\"https:\/\/habr.com\/ru\/company\/ruvds\/blog\/346640\/\">wget<\/a>) \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/rk\/sl\/jq\/rksljq08_ua0vxcc2dfuccrtpty.gif\"><\/p>\n<p>  <\/p>\n<h2 id=\"neural-rendering\">Neural rendering<\/h2>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/dm\/ff\/3l\/dmff3lgga24hqopz8qpmbrm4kc0.png\"><br \/>  \u0414\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433 \u043a\u0430\u043a \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0434\u043b\u044f 3D ML, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043e\u0447\u0435\u043d\u044c \u043c\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0445 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440 \u0433\u043b\u0443\u0431\u043e\u043a\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0432 \u043e\u0431\u043b\u0430\u0441\u0442\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0430 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f <strong><em>\u043d\u0435\u0439\u0440\u043e\u043d\u043d\u044b\u0439 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433 (neural rendering)<\/em><\/strong>. \u041d\u0435\u0439\u0440\u043e\u043d\u043d\u044b\u0439 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0440\u0435\u0448\u0430\u0442\u044c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u0434\u0430\u0447, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u043e\u0439 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430: \u043e\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u043d\u0430 \u0444\u043e\u0442\u043e \u0438 \u0432 \u0432\u0438\u0434\u0435\u043e\u043f\u043e\u0442\u043e\u043a \u0434\u043e \u0441\u0432\u0435\u0440\u0445\u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432.<\/p>\n<p>  <\/p>\n<p>\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043c\u044b \u043e\u0441\u0442\u0430\u0432\u0438\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430 \u043a \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430 \u0437\u0430 \u0441\u043a\u043e\u0431\u043a\u0430\u043c\u0438 \u043f\u043e\u0432\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u044f, \u043e\u0434\u043d\u0430\u043a\u043e \u043f\u043e\u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c \u0432\u0441\u0435\u043c \u0437\u0430\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u0432\u0448\u0438\u043c\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0438:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u0431\u043e\u043b\u044c\u0448\u0430\u044f \u043e\u0431\u0437\u043e\u0440\u043d\u0430\u044f <a href=\"https:\/\/arxiv.org\/pdf\/2004.03805.pdf\">\u0441\u0442\u0430\u0442\u044c\u044f<\/a> SOTA \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440 \u0432 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430 [7] \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043f\u0440\u043e\u0448\u0435\u0434\u0448\u0435\u0439 <a href=\"http:\/\/cvpr2020.thecvf.com\/\">CVPR 2020<\/a>;<\/li>\n<li>\u0432\u0438\u0434\u0435\u043e \u0441 \u0437\u0430\u043f\u0438\u0441\u044c\u044e <a href=\"https:\/\/www.youtube.com\/watch?v=LCTYRqW-ne8\">\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0439<\/a> \u0438 <a href=\"https:\/\/www.youtube.com\/watch?v=JlyGNvbGKB8\">\u0434\u043d\u0435\u0432\u043d\u043e\u0439<\/a> \u0441\u0435\u0441\u0441\u0438\u0435\u0439 \u043f\u043e \u043d\u0435\u0439\u0442\u0440\u043e\u043d\u043d\u043e\u043c\u0443 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0443 \u0441 <a href=\"http:\/\/cvpr2020.thecvf.com\/\">CVPR 2020<\/a>, \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0438 \u0431\u044b\u043b\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u0438\u0437 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e \u043f\u0443\u043d\u043a\u0442\u0430;<\/li>\n<li>\u0432\u0438\u0434\u0435\u043e\u043b\u0435\u043a\u0446\u0438\u044f <a href=\"https:\/\/www.youtube.com\/watch?v=BCZ56MU-KhQ\">MIT DL Neural rendering<\/a> \u0441 \u043a\u0440\u0430\u0442\u043a\u0438\u043c \u043e\u0431\u0437\u043e\u0440\u043e\u043c \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u0432 \u0438 \u0432\u0432\u0435\u0434\u0435\u043d\u0438\u0438 \u0432 \u0442\u0435\u043c\u0443;<\/li>\n<li><a href=\"https:\/\/towardsdatascience.com\/differentiable-rendering-d00a4b0f14be\">\u0437\u0430\u043c\u0435\u0442\u043a\u0430<\/a> \u043d\u0430 Medium \u043d\u0430 \u0442\u0435\u043c\u0443 \u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430 \u0438 \u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439;<\/li>\n<li><a href=\"https:\/\/www.youtube.com\/watch?v=tGJ4tEwhgo8\">\u0432\u0438\u0434\u0435\u043e<\/a> \u0441 youtube \u043a\u0430\u043d\u0430\u043b\u0430 two minute papers \u043d\u0430 \u0434\u0430\u043d\u043d\u0443\u044e \u0442\u0435\u043c\u0443.<\/li>\n<\/ul>\n<p>  <\/p>\n<h2 id=\"experiment-mona-liza-reconstruction\">Experiment: Mona Liza reconstruction<\/h2>\n<p>  <\/p>\n<p>\u0420\u0430\u0437\u0431\u0435\u0440\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430 \u0434\u043b\u044f \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 3D \u0441\u0446\u0435\u043d\u044b \u043f\u043e \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c\u0443 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044e \u0447\u0435\u043b\u043e\u0432\u0435\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043b\u0438\u0446\u0430, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0432 \u043f\u0443\u043b\u0435 <a href=\"https:\/\/github.com\/BachiLi\/redner\/wiki\">\u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432<\/a> \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 <a href=\"https:\/\/github.com\/BachiLi\/redner\">redner<\/a>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u0438\u0434\u0435\u0439, \u0438\u0437\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0445 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 [ <a href=\"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3272127.3275109\">4<\/a> ].<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/lt\/ir\/02\/ltir02k5_ezfcotgigflucaxbss.png\"><\/p>\n<p>  <\/p>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u043c <a href=\"https:\/\/nbviewer.jupyter.org\/github\/BachiLi\/redner\/blob\/master\/tutorials\/3dmm.ipynb\">\u043f\u0440\u0438\u043c\u0435\u0440\u0435<\/a>, \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442.\u043d. <a href=\"https:\/\/gravis.dmi.unibas.ch\/publications\/Sigg99\/morphmod2.pdf\">3D morphable model<\/a> [8] \u2014 \u0442\u0435\u0445\u043d\u0438\u043a\u0443 \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0442\u0440\u0435\u0445\u043c\u0435\u0440\u043d\u043e\u0433\u043e \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0447\u0435\u043b\u043e\u0432\u0435\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043b\u0438\u0446\u0430, \u0441\u0442\u0430\u0432\u0448\u0443\u044e \u0443\u0436\u0435 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0432 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 3D. \u0422\u0435\u0445\u043d\u0438\u043a\u0430 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0430 \u043d\u0430 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0442\u0430\u043a\u043e\u0433\u043e \u043a\u0440\u044b\u0442\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 3D \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0435 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0438, \u0441\u043e\u0447\u0435\u0442\u0430\u044e\u0449\u0438\u0435 \u0444\u0438\u0437\u0438\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0447\u0435\u043b\u043e\u0432\u0435\u0447\u0435\u0441\u043a\u0438\u0445 \u043b\u0438\u0446 (\u0435\u0441\u043b\u0438 \u0442\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0440\u0430\u0437\u0438\u0442\u044c\u0441\u044f, \u0442\u043e \u044d\u0442\u043e \u0441\u0432\u043e\u0435\u043e\u0431\u0440\u0430\u0437\u043d\u044b\u0439 Word2Vec \u043e\u0442 \u043c\u0438\u0440\u0430 3D \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0447\u0435\u043b\u043e\u0432\u0435\u0447\u0435\u0441\u043a\u0438\u0445 \u043b\u0438\u0446).<\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u043c \u0432\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0434\u0430\u0442\u0430\u0441\u0435\u0442 <a href=\"http:\/\/gravis.dmi.unibas.ch\/PMM\/data\/overview\/\">Basel face model (2017 version)<\/a>. \u0424\u0430\u0439\u043b <code>model2017-1_bfm_nomouth.h5<\/code> \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0432 \u0440\u0430\u0431\u043e\u0447\u0435\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u043a\u043e\u0434\u043e\u043c.<\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0438 \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u043b\u0438\u0446.<\/p>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\">import torch import pyredner import h5py import urllib import time  from matplotlib.pyplot import imshow %matplotlib inline  import matplotlib.pyplot as plt from IPython.display import display, clear_output from matplotlib import animation  from IPython.display import HTML<\/code><\/pre>\n<\/div><\/div>\n<p>  <\/p>\n<pre><code class=\"python\"># Load the Basel face model with h5py.File(r'model2017-1_bfm_nomouth.h5', 'r') as hf:     shape_mean = torch.tensor(hf['shape\/model\/mean'],                                device = pyredner.get_device())     shape_basis = torch.tensor(hf['shape\/model\/pcaBasis'],                                 device = pyredner.get_device())     triangle_list = torch.tensor(hf['shape\/representer\/cells'],                                   device = pyredner.get_device())     color_mean = torch.tensor(hf['color\/model\/mean'],                                device = pyredner.get_device())     color_basis = torch.tensor(hf['color\/model\/pcaBasis'],                                 device = pyredner.get_device())<\/code><\/pre>\n<p>  <\/p>\n<p>\u041c\u043e\u0434\u0435\u043b\u044c \u043b\u0438\u0446\u0430 \u0432 \u0442\u0430\u043a\u043e\u043c \u043f\u043e\u0434\u0445\u043e\u0434\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0430 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u043d\u0430 \u0431\u0430\u0437\u0438\u0441\u043d\u044b\u0439 \u0432\u0435\u043a\u0442\u043e\u0440 \u0444\u043e\u0440\u043c\u044b \u2014 <code>shape_basis<\/code> (\u0432\u0435\u043a\u0442\u043e\u0440 \u0434\u043b\u0438\u043d\u044b 199 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434\u043e\u043c <a href=\"https:\/\/habr.com\/ru\/post\/304214\/\">PCA<\/a>), \u0431\u0430\u0437\u0438\u0441\u043d\u044b\u0439 \u0432\u0435\u043a\u0442\u043e\u0440 \u0446\u0432\u0435\u0442\u0430 \u2014 <code>color_basis<\/code> (\u0432\u0435\u043a\u0442\u043e\u0440 \u0434\u043b\u0438\u043d\u044b 199 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434\u043e\u043c <a href=\"https:\/\/habr.com\/ru\/post\/304214\/\">PCA<\/a>), \u0442\u0430\u043a\u0436\u0435 \u0438\u043c\u0435\u0435\u043c \u0443\u0441\u0440\u0435\u0434\u043d\u0435\u043d\u043d\u044b\u0439 \u0432\u0435\u043a\u0442\u043e\u0440 \u0444\u043e\u0440\u043c\u044b \u0438 \u0446\u0432\u0435\u0442\u0430 \u2014 <code>shape_mean<\/code>, <code>color_mean<\/code>. \u0412 <code>triangle_list<\/code> \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u044f \u0443\u0441\u0440\u0435\u0434\u043d\u0435\u043d\u043d\u043e\u0433\u043e \u043b\u0438\u0446\u0430 \u0432 \u0444\u043e\u0440\u043c\u0435 \u043f\u043e\u043b\u0438\u0433\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438.<\/p>\n<p>  <\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043c\u043e\u0434\u0435\u043b\u044c, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043d\u0430 \u0432\u0445\u043e\u0434 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0432\u0435\u043a\u0442\u043e\u0440\u044b \u0441\u043a\u0440\u044b\u0442\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0446\u0432\u0435\u0442\u0430 \u0438 \u0444\u043e\u0440\u043c\u044b \u043b\u0438\u0446\u0430, \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043a\u0430\u043c\u0435\u0440\u044b \u0438 \u043e\u0441\u0432\u0435\u0449\u0435\u043d\u0438\u044f \u0432 \u0441\u0446\u0435\u043d\u0435, \u0430 \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u0431\u0443\u0434\u0435\u0442 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0442\u0440\u0435\u043d\u0434\u0435\u0440\u0435\u043d\u043d\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435.<\/p>\n<p>  <\/p>\n<pre><code class=\"python\">indices = triangle_list.permute(1, 0).contiguous()  def model(         cam_pos,          cam_look_at,          shape_coeffs,          color_coeffs,          ambient_color,          dir_light_intensity):     vertices = (shape_mean + shape_basis @ shape_coeffs).view(-1, 3)     normals = pyredner.compute_vertex_normal(vertices, indices)     colors = (color_mean + color_basis @ color_coeffs).view(-1, 3)     m = pyredner.Material(use_vertex_color = True)     obj = pyredner.Object(vertices = vertices,                            indices = indices,                            normals = normals,                            material = m,                            colors = colors)     cam = pyredner.Camera(position = cam_pos,                           # Center of the vertices                                                     look_at = cam_look_at,                           up = torch.tensor([0.0, 1.0, 0.0]),                           fov = torch.tensor([45.0]),                           resolution = (256, 256))     scene = pyredner.Scene(camera = cam, objects = [obj])     ambient_light = pyredner.AmbientLight(ambient_color)     dir_light = pyredner.DirectionalLight(torch.tensor([0.0, 0.0, -1.0]),                                            dir_light_intensity)     img = pyredner.render_deferred(scene = scene,                                     lights = [ambient_light, dir_light])     return img<\/code><\/pre>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043a\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0443\u0441\u0440\u0435\u0434\u043d\u0435\u043d\u043d\u043e\u0435 \u043b\u0438\u0446\u043e. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0437\u0430\u0434\u0430\u0434\u0438\u043c \u043f\u0435\u0440\u0432\u043e\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043e\u0441\u0432\u0435\u0449\u0435\u043d\u0438\u044f \u0438 \u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u043a\u0430\u043c\u0435\u0440\u044b \u0438 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u043d\u0430\u0448\u0435\u0439 \u043c\u043e\u0434\u0435\u043b\u044c\u044e. \u0422\u0430\u043a\u0436\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043c \u0446\u0435\u043b\u0435\u0432\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435, \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0438 \u0432\u0437\u0433\u043b\u044f\u043d\u0435\u043c \u043d\u0430 \u043d\u0435\u0433\u043e:<\/p>\n<p>  <\/p>\n<pre><code class=\"python\"> cam_pos = torch.tensor([-0.2697, -5.7891, 373.9277]) cam_look_at = torch.tensor([-0.2697, -5.7891, 54.7918]) img = model(cam_pos,              cam_look_at,              torch.zeros(199, device = pyredner.get_device()),             torch.zeros(199, device = pyredner.get_device()),             torch.ones(3),              torch.zeros(3))  imshow(torch.pow(img, 1.0\/2.2).cpu())  face_url = 'https:\/\/raw.githubusercontent.com\/BachiLi\/redner\/master\/tutorials\/mona-lisa-cropped-256.png'  urllib.request.urlretrieve(face_url, 'target.png') target = pyredner.imread('target.png').to(pyredner.get_device())  imshow(torch.pow(target, 1.0\/2.2).cpu())<\/code><\/pre>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/wy\/he\/yt\/wyheytbyy92rimmsxmmmbkgckj0.jpeg\"><br \/>  \u0417\u0430\u0434\u0430\u0434\u0438\u043c \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0435\u043c \u043f\u044b\u0442\u0430\u0442\u044c\u0441\u044f \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0434\u043b\u044f \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u043a\u0430\u0440\u0442\u0438\u043d\u044b.<\/p>\n<p>  <\/p>\n<pre><code class=\"python\"># Set requires_grad=True since we want to optimize them later cam_pos = torch.tensor([-0.2697, -5.7891, 373.9277],                         requires_grad=True) cam_look_at = torch.tensor([-0.2697, -5.7891, 54.7918],                             requires_grad=True) shape_coeffs = torch.zeros(199, device = pyredner.get_device(),                             requires_grad=True) color_coeffs = torch.zeros(199, device = pyredner.get_device(),                             requires_grad=True) ambient_color = torch.ones(3, device = pyredner.get_device(),                             requires_grad=True) dir_light_intensity = torch.zeros(3, device = pyredner.get_device(),                                    requires_grad=True)  # Use two different optimizers for different learning rates optimizer = torch.optim.Adam(                              [                               shape_coeffs,                                color_coeffs,                                ambient_color,                                dir_light_intensity],                               lr=0.1) cam_optimizer = torch.optim.Adam([cam_pos, cam_look_at], lr=0.5)<\/code><\/pre>\n<p>  <\/p>\n<p>\u041e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u0442\u044c, \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0446\u0438\u043a\u043b \u0438 \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u044f\u0449\u0435\u0435 \u0441 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 \u043e\u0448\u0438\u0431\u043a\u0438 (\u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e \u043f\u043e\u043f\u0438\u043a\u0441\u0435\u043b\u044c\u043d\u044b\u0439 MSE + \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0438\u0447\u043d\u044b\u0435 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u0438\u0437\u0430\u0442\u043e\u0440\u044b \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432) \u0438 \u0441 \u0441\u0430\u043c\u043e\u0439 3D \u043c\u043e\u0434\u0435\u043b\u044c\u044e.<\/p>\n<p>  <\/p>\n<pre><code class=\"python\">plt.figure() imgs, losses = [], []  # Run 500 Adam iterations num_iters = 500 for t in range(num_iters):     optimizer.zero_grad()     cam_optimizer.zero_grad()     img = model(cam_pos, cam_look_at, shape_coeffs,                  color_coeffs, ambient_color, dir_light_intensity)     # Compute the loss function. Here it is L2 plus a regularization      # term to avoid coefficients to be too far from zero.     # Both img and target are in linear color space,      # so no gamma correction is needed.      loss = (img - target).pow(2).mean()     loss = loss           + 0.0001 * shape_coeffs.pow(2).mean()           + 0.001 * color_coeffs.pow(2).mean()     loss.backward()      optimizer.step()     cam_optimizer.step()      ambient_color.data.clamp_(0.0)     dir_light_intensity.data.clamp_(0.0)      # Plot the loss     f, (ax_loss, ax_diff_img, ax_img) = plt.subplots(1, 3)     losses.append(loss.data.item())      # Only store images every 10th iterations     if t % 10 == 0:         # Record the Gamma corrected image         imgs.append(torch.pow(img.data, 1.0\/2.2).cpu())      clear_output(wait=True)     ax_loss.plot(range(len(losses)), losses, label='loss')     ax_loss.legend()     ax_diff_img.imshow((img -target).pow(2).sum(dim=2).data.cpu())     ax_img.imshow(torch.pow(img.data.cpu(), 1.0\/2.2))     plt.show()<\/code><\/pre>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/xa\/5i\/to\/xa5itog_xtl6s9-puvqw5bp59gk.png\"><br \/>  \u0427\u0442\u043e\u0431\u044b \u043b\u0443\u0447\u0448\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u043b\u043e \u0441\u043e \u0441\u0446\u0435\u043d\u043e\u0439 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u0435\u043c \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044e \u0438\u0437 \u043d\u0430\u0448\u0438\u0445 \u043b\u043e\u0433\u043e\u0432:<\/p>\n<p>  <\/p>\n<pre><code class=\"python\">fig = plt.figure()  # Clamp to avoid complains im = plt.imshow(imgs[0].clamp(0.0, 1.0), animated=True)  def update_fig(i):     im.set_array(imgs[i].clamp(0.0, 1.0))     return im, anim = animation.FuncAnimation(fig, update_fig,                                 frames=len(imgs), interval=50, blit=True) HTML(anim.to_jshtml())<\/code><\/pre>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/77\/z3\/py\/77z3pybmz2ohnevfoillumbefnm.gif\"><\/p>\n<p>  <\/p>\n<h2 id=\"conclusions\">Conclusions<\/h2>\n<p>  <\/p>\n<p>\u0414\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433 \u2014 \u043d\u043e\u0432\u043e\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435 \u0438 \u0432\u0430\u0436\u043d\u043e\u0435 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u0430 \u0441\u0442\u044b\u043a\u0435 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043d\u043e\u0439 \u0433\u0440\u0430\u0444\u0438\u043a\u0438, \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043d\u043e\u0433\u043e \u0437\u0440\u0435\u043d\u0438\u044f \u0438 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f. \u0414\u0430\u043d\u043d\u0430\u044f \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044f \u0441\u0442\u0430\u043b\u0430 \u043e\u0441\u043d\u043e\u0432\u043e\u0439 \u0434\u043b\u044f \u043c\u043d\u043e\u0433\u0438\u0445 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440 \u0432 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u0442 \u0433\u0440\u0430\u043d\u0438\u0446\u044b \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043d\u043e\u0439 \u0433\u0440\u0430\u0444\u0438\u043a\u0438 \u0438 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u0437\u0440\u0435\u043d\u0438\u044f.<\/p>\n<p>  <\/p>\n<p>\u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0433\u043b\u0443\u0431\u043e\u043a\u043e\u0433\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 <a href=\"https:\/\/github.com\/NVIDIAGameWorks\/kaolin\">Kaolin<\/a>, <a href=\"https:\/\/github.com\/facebookresearch\/pytorch3d\">PyTorch 3D<\/a>, <a href=\"https:\/\/github.com\/tensorflow\/graphics\">TensorFlow Graphics<\/a>), \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433 \u043a\u0430\u043a \u0441\u043e\u0441\u0442\u0430\u0432\u043d\u0443\u044e \u0447\u0430\u0441\u0442\u044c. \u0422\u0430\u043a\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0449\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430 (<a href=\"https:\/\/github.com\/ShichenLiu\/SoftRas\">Soft Rasterizer<\/a>, <a href=\"https:\/\/github.com\/BachiLi\/redner\">redner<\/a>). \u0421 \u0438\u0445 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432, \u0432\u0440\u043e\u0434\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0441 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043b\u0438\u0446\u0430 \u0438 \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u044b \u043f\u043e\u0440\u0442\u0440\u0435\u0442\u0430 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430.<\/p>\n<p>  <\/p>\n<p>\u0412 \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0435\u043c \u0431\u0443\u0434\u0443\u0449\u0435\u043c, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043e\u0436\u0438\u0434\u0430\u0442\u044c \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u043e\u0432\u044b\u0445 \u0442\u0435\u0445\u043d\u0438\u043a \u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0434\u043b\u044f \u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430 \u0438 \u0438\u0445 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0443\u0436\u0435 \u0437\u0430\u0432\u0442\u0440\u0430 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u0441\u043f\u043e\u0441\u043e\u0431 \u0434\u0435\u043b\u0430\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0441\u0442\u0438\u0447\u043d\u0443\u044e \u0433\u0440\u0430\u0444\u0438\u043a\u0443 \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438\u043b\u0438 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c 2D \u0438 3D \u043a\u043e\u043d\u0442\u0435\u043d\u0442 \u043f\u0440\u0438\u0435\u043c\u043b\u0435\u043c\u043e\u0433\u043e \u0434\u043b\u044f \u043b\u044e\u0434\u0435\u0439 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u044d\u0442\u043e\u0439 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438. \u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0441\u043b\u0435\u0434\u0438\u0442\u044c \u0437\u0430 \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u0435\u043c \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0438 \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u0435\u043c\u0441\u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043e \u0432\u0441\u0435\u0445 \u043d\u043e\u0432\u0438\u043d\u043a\u0430\u0445 \u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0445 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u0445.<\/p>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">References<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<ol>\n<li>Liu, S., Li, T., Chen, W. and Li, H., 2019. Soft rasterizer: A differentiable renderer for image-based 3d reasoning. In Proceedings of the IEEE International Conference on Computer Vision (pp. 7708-7717). [ <a href=\"https:\/\/openaccess.thecvf.com\/content_ICCV_2019\/papers\/Liu_Soft_Rasterizer_A_Differentiable_Renderer_for_Image-Based_3D_Reasoning_ICCV_2019_paper.pdf\">paper<\/a> ]<\/li>\n<li>Loper, M.M. and Black, M.J., 2014, September. OpenDR: An approximate differentiable renderer. In European Conference on Computer Vision (pp. 154-169). Springer, Cham. [ <a href=\"https:\/\/link.springer.com\/content\/pdf\/10.1007\/978-3-319-10584-0_11.pdf\">paper<\/a> ]<\/li>\n<li>Kato, H., Ushiku, Y. and Harada, T., 2018. Neural 3d mesh renderer. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (pp. 3907-3916). [ <a href=\"https:\/\/openaccess.thecvf.com\/content_cvpr_2018\/papers\/Kato_Neural_3D_Mesh_CVPR_2018_paper.pdf\">paper<\/a> ]<\/li>\n<li>Li, T.M., Aittala, M., Durand, F. and Lehtinen, J., 2018. Differentiable monte carlo ray tracing through edge sampling. ACM Transactions on Graphics (TOG), 37(6), pp.1-11. [ <a href=\"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3272127.3275109\">paper<\/a> ]<\/li>\n<li>Chen, W., Ling, H., Gao, J., Smith, E., Lehtinen, J., Jacobson, A. and Fidler, S., 2019. Learning to predict 3d objects with an interpolation-based differentiable renderer. In Advances in Neural Information Processing Systems (pp. 9609-9619). [ <a href=\"https:\/\/papers.nips.cc\/paper\/9156-learning-to-predict-3d-objects-with-an-interpolation-based-differentiable-renderer.pdf\">paper<\/a> ]<\/li>\n<li>Ravi, N., Reizenstein, J., Novotny, D., Gordon, T., Lo, W.Y., Johnson, J. and Gkioxari, G., 2020. Accelerating 3D Deep Learning with PyTorch3D. arXiv preprint arXiv:2007.08501. [ <a href=\"https:\/\/arxiv.org\/pdf\/2007.08501.pdf\">paper<\/a> ] [ <a href=\"https:\/\/github.com\/facebookresearch\/pytorch3d\">github<\/a> ]<\/li>\n<li>Tewari, A., Fried, O., Thies, J., Sitzmann, V., Lombardi, S., Sunkavalli, K., Martin-Brualla, R., Simon, T., Saragih, J., Nie\u00dfner, M. and Pandey, R., 2020. State of the Art on Neural Rendering. arXiv preprint arXiv:2004.03805. [ <a href=\"https:\/\/arxiv.org\/pdf\/2004.03805.pdf\">paper<\/a> ]<\/li>\n<li>Blanz, V. and Vetter, T., 1999, July. A morphable model for the synthesis of 3D faces. In Proceedings of the 26th annual conference on Computer graphics and interactive techniques (pp. 187-194). [ <a href=\"https:\/\/gravis.dmi.unibas.ch\/publications\/Sigg99\/morphmod2.pdf\">paper<\/a> ][ <a href=\"http:\/\/gravis.dmi.unibas.ch\/PMM\/\">project page<\/a> ]<\/li>\n<\/ol>\n<p>  <\/div>\n<\/p><\/div>\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\/itmai\/blog\/520268\/\"> https:\/\/habr.com\/ru\/company\/itmai\/blog\/520268\/<\/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\/company\/itmai\/blog\/520268\/\">\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/po\/tj\/tt\/potjttneldjjyeyigqy5euqkcsk.jpeg\"><\/p>\n<p>  <\/p>\n<p>\u0412 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u0437\u0430\u043c\u0435\u0442\u043a\u0430\u0445 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0435\u0440\u0438\u0438 \u043c\u044b \u0443\u0436\u0435 \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043b\u0438 \u043f\u043e\u043d\u044f\u0442\u0438\u0435 <strong><em>\u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430<\/em><\/strong>. \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043f\u0440\u0438\u0448\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0437\u044a\u044f\u0441\u043d\u0438\u0442\u044c \u0447\u0442\u043e \u044d\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u0438 \u0441 \u0447\u0435\u043c \u044d\u0442\u043e \u0435\u0434\u044f\u0442.<\/p>\n<p>  <\/p>\n<p>\u041c\u044b \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043e \u0442\u043e\u043c, \u043f\u043e\u0447\u0435\u043c\u0443 \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430 \u043d\u0435 \u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0440\u0443\u0435\u043c, \u0437\u0430\u0447\u0435\u043c \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u0432 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 <strong><em>3D ML<\/em><\/strong> \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0435\u0433\u043e \u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0440\u0443\u0435\u043c\u044b\u043c \u0438 \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u043e \u0441 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u044b\u043c \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u043e\u043c. \u041a\u0430\u043a\u0438\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u043f\u043e\u0434\u0445\u043e\u0434\u044b \u043a \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e \u0442\u0430\u043a\u0438\u0445 \u0441\u0438\u0441\u0442\u0435\u043c, \u0438 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u2014 <strong><em>SoftRasterizer<\/em><\/strong> \u0438 \u0435\u0433\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0432 <strong><em>PyTorch 3D<\/em><\/strong>. \u0412 \u043a\u043e\u043d\u0446\u0435, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u044d\u0442\u043e\u0439 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438, \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u0432\u0441\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0438 \u201c\u041c\u043e\u043d\u044b \u041b\u0438\u0437\u044b\u201d \u041b\u0435\u043e\u043d\u0430\u0440\u0434\u043e \u0414\u0430 \u0412\u0438\u043d\u0447\u0438 \u0442\u0430\u043a, \u0435\u0441\u043b\u0438 \u0431\u044b \u043a\u0430\u0440\u0442\u0438\u043d\u0430 \u0431\u044b\u043b\u0430 \u043d\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u0440\u0443\u043a\u043e\u0439 \u043c\u0430\u0441\u0442\u0435\u0440\u0430, \u0430 \u043e\u0442\u0440\u0435\u043d\u0434\u0435\u0440\u0435\u043d\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043d\u043e\u0439 \u0433\u0440\u0430\u0444\u0438\u043a\u0438.<\/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-310380","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/310380","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=310380"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/310380\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=310380"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=310380"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=310380"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}