{"id":386159,"date":"2024-06-29T06:32:55","date_gmt":"2024-06-29T06:32:55","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=386159"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2024-06-29T06:32:55","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=386159","title":{"rendered":"<span>\u041e\u0431\u0437\u043e\u0440 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440 image-to-image translation<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f8c\/90c\/792\/f8c90c792e4624fdeae139c0498d9066.png\" alt=\"\" title=\"\" width=\"1400\" height=\"1000\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f8c\/90c\/792\/f8c90c792e4624fdeae139c0498d9066.png\"\/><\/figure>\n<p>\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440! \u042f \u0440\u0430\u0431\u043e\u0442\u0430\u044e \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u043e\u043c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043d\u043e\u0433\u043e \u0437\u0440\u0435\u043d\u0438\u044f \u0432 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u0438\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u043b\u043b\u0435\u043a\u0442\u0430 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u041d\u043e\u0440\u043d\u0438\u043a\u0435\u043b\u044c. \u041c\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u0438 \u0432\u043d\u0435\u0434\u0440\u044f\u0435\u043c \u043c\u043e\u0434\u0435\u043b\u0438 \u0441 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043d\u0430 \u043d\u0430\u0448\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u043f\u043b\u043e\u0449\u0430\u0434\u043a\u0438.<\/p>\n<p>\u0412 \u0441\u043a\u043e\u0443\u043f \u043d\u0430\u0448\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442 \u043a\u0430\u043a \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0435 (\u0438\u043b\u0438 \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0435) \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u043c (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0444\u043b\u043e\u0442\u0430\u0446\u0438\u044f \u0438\u043b\u0438 \u043f\u043b\u0430\u0432\u043a\u0430), \u0442\u0430\u043a \u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043f\u0440\u043e\u043c\u044b\u0448\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u0437\u0440\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e \u0441\u0443\u0442\u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0438\u0437 \u0441\u0435\u0431\u044f \u043e\u0434\u043d\u0443 \u0438\u0437 \u0440\u0430\u0437\u043d\u043e\u0432\u0438\u0434\u043d\u043e\u0441\u0442\u0435\u0439 \u0434\u0430\u0442\u0447\u0438\u043a\u043e\u0432.<\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043f\u0440\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u0441\u0435\u0442\u0435\u0439 \u0434\u043b\u044f \u0437\u0430\u0434\u0430\u0447\u0438 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0438\u0437 \u043e\u0434\u043d\u043e\u0433\u043e \u0434\u043e\u043c\u0435\u043d\u0430 \u0432 \u0434\u0440\u0443\u0433\u043e\u0439 (image-to-image translation). \u0412 \u043a\u043e\u043d\u0446\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443, \u0434\u043b\u044f \u0447\u0435\u0433\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u043c\u044b \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c \u0441\u0438\u043d\u0442\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0430\u043c \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0434\u043e\u0441\u0442\u0438\u0447\u044c. \u041d\u043e \u043f\u0435\u0440\u0435\u0434 \u043f\u043e\u0433\u0440\u0443\u0436\u0435\u043d\u0438\u0435\u043c \u0432 \u0434\u0430\u043d\u043d\u0443\u044e \u0442\u0435\u043c\u0443 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 <a href=\"https:\/\/habr.com\/ru\/post\/348000\/\"><u>\u0441\u0432\u0451\u0440\u0442\u043e\u0447\u043d\u0430\u044f \u0441\u0435\u0442\u044c<\/u><\/a>, <a href=\"https:\/\/arxiv.org\/abs\/1505.04597\"><u>U-Net<\/u><\/a> \u0438 <a href=\"https:\/\/habr.com\/ru\/post\/332000\/\"><u>\u0433\u0435\u043d\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u0430\u044f \u0441\u0435\u0442\u044c<\/u><\/a>. \u0415\u0441\u043b\u0438 \u0436\u0435 \u0412\u044b \u0433\u043e\u0442\u043e\u0432\u044b, \u043f\u043e\u0435\u0445\u0430\u043b\u0438.<\/p>\n<p>\u041a\u0430\u0436\u0434\u043e\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u0432 \u0442\u043e\u0439 \u0438\u043b\u0438 \u0438\u043d\u043e\u0439 \u0441\u0442\u0435\u043f\u0435\u043d\u0438 \u0438\u043d\u0434\u0438\u0432\u0438\u0434\u0443\u0430\u043b\u044c\u043d\u043e. \u041a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u043d\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u043f\u043b\u043e\u0449\u0430\u0434\u043a\u0430\u0445 \u043c\u043e\u0433\u0443\u0442 \u0441\u0438\u043b\u044c\u043d\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u0440\u0435\u043c\u044f, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0443\u0445\u043e\u0434\u0438\u0442 \u043d\u0430 \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0443 \u0434\u0430\u043d\u043d\u044b\u0445. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u043f\u043e \u0431\u0438\u043d\u0430\u0440\u043d\u043e\u0439 \u043c\u0430\u0441\u043a\u0435.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ef5\/9c4\/587\/ef59c458731087d896ab70824bbc0445.png\" alt=\"\u0421\u043b\u0435\u0432\u0430 - \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440 \u0441 \u0434\u0440\u043e\u0431\u043b\u0451\u043d\u044b\u043c \u0444\u0430\u0439\u043d\u0448\u0442\u0435\u0439\u043d\u043e\u043c, \u0441\u043f\u0440\u0430\u0432\u0430 - \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043c\u0430\u0441\u043a\u0430\" title=\"\u0421\u043b\u0435\u0432\u0430 - \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440 \u0441 \u0434\u0440\u043e\u0431\u043b\u0451\u043d\u044b\u043c \u0444\u0430\u0439\u043d\u0448\u0442\u0435\u0439\u043d\u043e\u043c, \u0441\u043f\u0440\u0430\u0432\u0430 - \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043c\u0430\u0441\u043a\u0430\" width=\"1600\" height=\"500\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ef5\/9c4\/587\/ef59c458731087d896ab70824bbc0445.png\"\/><\/p>\n<div><figcaption>\u0421\u043b\u0435\u0432\u0430 &#8212; \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440 \u0441 \u0434\u0440\u043e\u0431\u043b\u0451\u043d\u044b\u043c \u0444\u0430\u0439\u043d\u0448\u0442\u0435\u0439\u043d\u043e\u043c, \u0441\u043f\u0440\u0430\u0432\u0430 &#8212; \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043c\u0430\u0441\u043a\u0430<\/figcaption><\/div>\n<\/figure>\n<p>\u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u043d\u0430 2 \u0442\u0438\u043f\u0430: supervised \u0438 unsupervised. \u0414\u043b\u044f supervised \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u0432\u0445\u043e\u0434\u043d\u0430\u044f \u043c\u0430\u0441\u043a\u0430 \u0438 \u0446\u0435\u043b\u0435\u0432\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0434\u0440\u0443\u0433 \u0434\u0440\u0443\u0433\u0443, \u043a\u0430\u043a \u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435 \u0432\u044b\u0448\u0435. \u0414\u043b\u044f unsupervised \u0442\u0430\u043a\u043e\u0433\u043e \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f. \u0412 \u043e\u0431\u043e\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \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\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u043b\u043e\u0441\u044c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043c\u0430\u0441\u043a\u0438 (\u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432), \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0441\u0442\u0438\u043b\u044c \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u043b \u0441 \u0446\u0435\u043b\u0435\u0432\u044b\u043c.<\/p>\n<h2>Supervised image-to-image translation<\/h2>\n<h3>pix2pix<\/h3>\n<p>[<a href=\"https:\/\/arxiv.org\/abs\/1611.07004\"><u>\u0421\u0442\u0430\u0442\u044c\u044f<\/u><\/a>, <a href=\"https:\/\/github.com\/junyanz\/pytorch-CycleGAN-and-pix2pix\"><u>\u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f<\/u><\/a>]<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/8d9\/4bf\/8cf\/8d94bf8cfecae674c4b0164158f4727f.png\" alt=\"\u041e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 pix2pix\" title=\"\u041e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 pix2pix\" width=\"904\" height=\"333\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8d9\/4bf\/8cf\/8d94bf8cfecae674c4b0164158f4727f.png\"\/><\/p>\n<div><figcaption>\u041e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 pix2pix<\/figcaption><\/div>\n<\/figure>\n<h4>\u041f\u0440\u043e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443<\/h4>\n<p>\u0413\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 U-Net \u043f\u043e\u0434\u043e\u0431\u043d\u0443\u044e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443, \u043d\u0430 \u0432\u0445\u043e\u0434 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u043e\u0434\u0430\u0451\u0442\u0441\u044f \u0431\u0438\u043d\u0430\u0440\u043d\u0430\u044f \u043c\u0430\u0441\u043a\u0430. \u0414\u0438\u0441\u043a\u0440\u0438\u043c\u0438\u043d\u0430\u0442\u043e\u0440 &#8212; \u044d\u0442\u043e \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0442\u0438\u043f\u0430 PatchGAN, \u043d\u0430 \u0432\u0445\u043e\u0434 \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043f\u043e\u0434\u0430\u044e\u0442\u0441\u044f \u0431\u0438\u043d\u0430\u0440\u043d\u0430\u044f \u043c\u0430\u0441\u043a\u0430 \u0438 \u0446\u0435\u043b\u0435\u0432\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435.<\/p>\n<p>\u041a\u0430\u043a \u0438 \u0432 \u0437\u0430\u0434\u0430\u0447\u0435 \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438, \u0432 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u043d\u0443\u0436\u043d\u044b skip connections \u0438\u0437 \u044d\u043d\u043a\u043e\u0434\u0435\u0440 \u0431\u043b\u043e\u043a\u043e\u0432 \u0432 \u0434\u0435\u043a\u043e\u0434\u0435\u0440 \u0431\u043b\u043e\u043a\u0438. \u041d\u043e \u0435\u0441\u0442\u044c \u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0442\u043b\u0438\u0447\u0438\u044f \u043e\u0442 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440 \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438.<\/p>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0440\u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0438 \u0413\u0410\u041d\u043e\u0432 \u0434\u043b\u044f \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u044f \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0438 <a href=\"https:\/\/arxiv.org\/abs\/1511.06434\"><u>\u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f<\/u><\/a> \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 max pooling \u043d\u0430 \u0441\u0432\u0451\u0440\u0442\u043a\u0438 \u0441\u043e \u0441\u0442\u0440\u0430\u0439\u0434\u043e\u043c. \u0410 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0433\u0438\u043f\u0435\u0440\u0431\u043e\u043b\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0442\u0430\u043d\u0433\u0435\u043d\u0441, \u0442.\u043a. \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043c\u044b \u0437\u0430\u0442\u0435\u043c \u043f\u043e\u0434\u0430\u0451\u043c \u043d\u0430 \u0432\u0445\u043e\u0434 \u0434\u0438\u0441\u043a\u0440\u0438\u043c\u0438\u043d\u0430\u0442\u043e\u0440\u0443, \u0442.\u0435. \u043c\u0430\u0442. \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u0435 \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u043d\u0443\u043b\u0435\u0432\u044b\u043c, \u0430 \u0434\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u044f \u0435\u0434\u0438\u043d\u0438\u0447\u043d\u043e\u0439.<\/p>\n<p>PatchGAN &#8212; \u044d\u0442\u043e \u0441\u0432\u0451\u0440\u0442\u043e\u0447\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u0435\u0442 \u043a\u0430\u0436\u0434\u044b\u0439 \u043f\u0430\u0442\u0447 (\u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u043b\u0438 \u0444\u0435\u0439\u043a\u043e\u0432\u044b\u0439). \u0420\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043e \u044d\u0442\u043e <a href=\"https:\/\/github.com\/junyanz\/pytorch-CycleGAN-and-pix2pix\/blob\/master\/models\/networks.py#L538\">\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c<\/a>.<\/p>\n<details class=\"spoiler\">\n<summary>NLayerDiscriminator<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">import functools  import torch.nn as nn   class NLayerDiscriminator(nn.Module):     \"\"\"Defines a PatchGAN discriminator\"\"\"      def __init__(self, input_nc, ndf=64, n_layers=3, norm_layer=nn.BatchNorm2d):         \"\"\"Construct a PatchGAN discriminator         Parameters:             input_nc (int)  -- the number of channels in input images             ndf (int)       -- the number of filters in the last conv layer             n_layers (int)  -- the number of conv layers in the discriminator             norm_layer      -- normalization layer         \"\"\"         super(NLayerDiscriminator, self).__init__()         if type(norm_layer) == functools.partial:  # no need to use bias as BatchNorm2d has affine parameters             use_bias = norm_layer.func == nn.InstanceNorm2d         else:             use_bias = norm_layer == nn.InstanceNorm2d          kw = 4         padw = 1         sequence = [nn.Conv2d(input_nc, ndf, kernel_size=kw, stride=2, padding=padw), nn.LeakyReLU(0.2, True)]         nf_mult = 1         nf_mult_prev = 1         for n in range(1, n_layers):  # gradually increase the number of filters             nf_mult_prev = nf_mult             nf_mult = min(2 ** n, 8)             sequence += [                 nn.Conv2d(ndf * nf_mult_prev, ndf * nf_mult, kernel_size=kw, stride=2, padding=padw, bias=use_bias),                 norm_layer(ndf * nf_mult),                 nn.LeakyReLU(0.2, True)             ]          nf_mult_prev = nf_mult         nf_mult = min(2 ** n_layers, 8)         sequence += [             nn.Conv2d(ndf * nf_mult_prev, ndf * nf_mult, kernel_size=kw, stride=1, padding=padw, bias=use_bias),             norm_layer(ndf * nf_mult),             nn.LeakyReLU(0.2, True)         ]          sequence += [nn.Conv2d(ndf * nf_mult, 1, kernel_size=kw, stride=1, padding=padw)]  # output 1 channel prediction map         self.model = nn.Sequential(*sequence)      def forward(self, input):         \"\"\"Standard forward.\"\"\"         return self.model(input)       <\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0412 \u0434\u0438\u0441\u043a\u0440\u0438\u043c\u0438\u043d\u0430\u0442\u043e\u0440\u0435 ReLU \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438 \u0437\u0430\u043c\u0435\u043d\u0435\u043d\u044b \u043d\u0430 LeakyRELU, \u0443\u0434\u0430\u043b\u0435\u043d\u044b \u0432\u0441\u0435 fully connected \u0441\u043b\u043e\u0438, \u0430 \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u043d\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u043e\u0439 \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438, \u0442.\u0435. \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043d\u0438\u0447\u0435\u043c \u043d\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u044b. <em>\u0422\u0435\u043e\u0440\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a gradient explosion, \u043e\u0434\u043d\u0430\u043a\u043e \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e.<\/em><\/p>\n<h4>\u041f\u0440\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u0438 \u0431\u043e\u0440\u044c\u0431\u0443 \u0441 \u0437\u0430\u0442\u0443\u0445\u0430\u043d\u0438\u0435\u043c \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u043e\u0432<\/h4>\n<p>\u041c\u043e\u0434\u0435\u043b\u0438 \u043e\u0431\u0443\u0447\u0430\u044e\u0442\u0441\u044f \u0432 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e-\u0441\u043e\u0441\u0442\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435. \u0422.\u0435. \u0446\u0435\u043b\u044c \u0434\u0438\u0441\u043a\u0440\u0438\u043c\u0438\u043d\u0430\u0442\u043e\u0440\u0430 &#8212; \u043d\u0430\u0443\u0447\u0438\u0442\u044c\u0441\u044f \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043e\u0442 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445, \u0446\u0435\u043b\u044c \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 &#8212; \u043d\u0430\u0443\u0447\u0438\u0442\u044c\u0441\u044f \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u0438\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f, \u0447\u0442\u043e \u0434\u0438\u0441\u043a\u0440\u0438\u043c\u0438\u043d\u0430\u0442\u043e\u0440 \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u0442 \u0438\u0445 \u043e\u0442\u043b\u0438\u0447\u0438\u0442\u044c \u043e\u0442 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\\min\\limits_{G} \\max\\limits_{D} V(D, G)=\\mathbb{E}_{x\\sim p_{data}(x)}[logD(x)] + \\mathbb{E}_{z\\sim p_{z}(z)}[log(1-D(G(z)))].\" alt=\"\\min\\limits_{G} \\max\\limits_{D} V(D, G)=\\mathbb{E}_{x\\sim p_{data}(x)}[logD(x)] + \\mathbb{E}_{z\\sim p_{z}(z)}[log(1-D(G(z)))].\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/46c\/766\/6fe\/46c7666fe4f3e8b8a548e1a6cfc27fc6.svg\" width=\"580\" height=\"33\"\/><\/p>\n<p>\u0422\u0430\u043a\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f minimax game. \u0412 \u044d\u0442\u043e\u0439 \u0438\u0433\u0440\u0435 \u0434\u0438\u0441\u043a\u0440\u0438\u043c\u0438\u043d\u0430\u0442\u043e\u0440 \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u043a\u0440\u043e\u0441\u0441-\u044d\u043d\u0442\u0440\u043e\u043f\u0438\u044e \u043c\u0435\u0436\u0434\u0443 \u0446\u0435\u043b\u0435\u0432\u044b\u043c \u043a\u043b\u0430\u0441\u0441\u043e\u043c \u0438 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u043c \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435\u043c \u0430 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442 \u043c\u0430\u043a\u0441\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u043a\u0440\u043e\u0441\u0441-\u044d\u043d\u0442\u0440\u043e\u043f\u0438\u044e. \u042d\u0442\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u0442\u043e\u043c\u0443, \u0447\u0442\u043e, \u043a\u043e\u0433\u0434\u0430 \u0434\u0438\u0441\u043a\u0440\u0438\u043c\u0438\u043d\u0430\u0442\u043e\u0440 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u043e \u043e\u0442\u043a\u043b\u043e\u043d\u044f\u0435\u0442 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f, \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u044b \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 <a href=\"https:\/\/arxiv.org\/abs\/1701.00160\"><u>\u0437\u0430\u0442\u0443\u0445\u0430\u044e\u0442<\/u><\/a>.<\/p>\n<p>\u041e\u0434\u0438\u043d \u0438\u0437 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u0434\u043b\u044f \u0431\u043e\u0440\u044c\u0431\u044b \u0441 \u0437\u0430\u0442\u0443\u0445\u0430\u043d\u0438\u0435\u043c \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u043e\u0432 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 &#8212; non-saturating game, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u044b\u043b <a href=\"https:\/\/arxiv.org\/abs\/1701.00160\"><u>\u043d\u0430\u0439\u0434\u0435\u043d<\/u><\/a> \u044d\u0432\u0440\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043f\u0443\u0442\u0451\u043c:<\/p>\n<p>\u0412\u043c\u0435\u0441\u0442\u043e \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\\mathbb{E}_{z\\sim p_{z}(z)}[log(1-D(G(z)))]\" alt=\"\\mathbb{E}_{z\\sim p_{z}(z)}[log(1-D(G(z)))]\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8cf\/d9f\/863\/8cfd9f863c98f48e637df65c36db712b.svg\" width=\"219\" height=\"25\"\/><\/p>\n<p> \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u043c\u0430\u043a\u0441\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u0435\u043c <\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\\mathbb{E}_{z}logD(G(z))\" alt=\"\\mathbb{E}_{z}logD(G(z))\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8f4\/743\/20a\/8f474320ae72c4c6b68e2631e5ec9456.svg\" width=\"118\" height=\"22\"\/><\/p>\n<p>\u0410\u0432\u0442\u043e\u0440\u044b pix2pix \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 non-saturating game.<\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043e\u043d\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442 \u043a \u043b\u043e\u0441\u0441-\u0444\u0443\u043d\u043a\u0446\u0438\u0438 (L2 loss \u0434\u0430\u0451\u0442 \u0431\u043e\u043b\u0435\u0435 \u0440\u0430\u0437\u043c\u044b\u0442\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b):<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\\mathcal{L}_{L1}(G)=   \\mathbb{E}_{x, y,z}[\\|y - G(x, z)\\|_{1}].\" alt=\"\\mathcal{L}_{L1}(G)=   \\mathbb{E}_{x, y,z}[\\|y - G(x, z)\\|_{1}].\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/4c7\/0e4\/ac8\/4c70e4ac82cd7c29a42692261bbdf7c5.svg\" width=\"272\" height=\"23\"\/><\/p>\n<p>\u0418 L1 \u0438 L2 loss \u043c\u0435\u0436\u0434\u0443 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u043c \u0438 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0445\u043e\u0440\u043e\u0448\u043e \u0443\u043b\u0430\u0432\u043b\u0438\u0432\u0430\u044e\u0442 \u043d\u0438\u0437\u043a\u043e\u0447\u0430\u0441\u0442\u043e\u0442\u043d\u044b\u0435 \u0434\u0435\u0442\u0430\u043b\u0438, \u043d\u043e \u043d\u0435 \u0432\u044b\u0441\u043e\u043a\u043e\u0447\u0430\u0441\u0442\u043e\u0442\u043d\u044b\u0435 \u0434\u0435\u0442\u0430\u043b\u0438.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/d93\/24f\/7a9\/d9324f7a9f8099a45b2fca3ab03480e2.png\" alt=\"cGAN - non-saturating game; L1 - minimax game + L1 loss between real and fake images\" title=\"cGAN - non-saturating game; L1 - minimax game + L1 loss between real and fake images\" width=\"972\" height=\"646\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d93\/24f\/7a9\/d9324f7a9f8099a45b2fca3ab03480e2.png\"\/><\/p>\n<div><figcaption>cGAN &#8212; non-saturating game; L1 &#8212; minimax game + L1 loss between real and fake images<\/figcaption><\/div>\n<\/figure>\n<p>\u0414\u043b\u044f \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u044f \u0444\u043e\u043a\u0443\u0441\u0430 \u043d\u0430 \u0432\u044b\u0441\u043e\u043a\u043e\u0447\u0430\u0441\u0442\u043e\u0442\u043d\u044b\u0445 \u0434\u0435\u0442\u0430\u043b\u044f\u0445, \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443 \u0434\u0435\u043b\u044f\u0442 \u043d\u0430 \u043f\u0430\u0442\u0447\u0438, \u043a\u0430\u043a \u044d\u0442\u043e \u0438 \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u0432 PatchGAN.<\/p>\n<p>\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 pix2pix \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u0434\u043b\u044f supervised image-to-image translation. Pix2pixHD \u0438 SPADE, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0434\u0430\u043b\u044c\u0448\u0435, \u0443\u043b\u0443\u0447\u0448\u0430\u044e\u0442 \u0435\u0451 \u0438\u0434\u0435\u0438.<\/p>\n<h3>pix2pixHD<\/h3>\n<p>[<a href=\"https:\/\/arxiv.org\/abs\/1711.11585\"><u>\u0421\u0442\u0430\u0442\u044c\u044f<\/u><\/a>, <a href=\"https:\/\/github.com\/NVIDIA\/pix2pixHD\"><u>\u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f<\/u><\/a>]<\/p>\n<p>\u0414\u0430\u043d\u043d\u0430\u044f \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430, \u043a\u0430\u043a \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0438\u0437 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f, \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0430 \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u0431\u043e\u043b\u0435\u0435 \u0432\u044b\u0441\u043e\u043a\u043e\u0433\u043e \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f, \u0447\u0435\u043c \u0435\u0451 \u043f\u0440\u0435\u0434\u0448\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u0438\u0446\u0430.<\/p>\n<h4>\u041f\u0440\u043e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443<\/h4>\n<p>\u041c\u043e\u0436\u043d\u043e \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438:<\/p>\n<h3>Multi-scale discriminators<\/h3>\n<p>\u0418\u0441\u0445\u043e\u0434\u043d\u0430\u044f \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u0435\u0442\u0441\u044f \u0432 2 \u0438 4 \u0440\u0430\u0437\u0430 &#8212; \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c 3 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0440\u0430\u0437\u043d\u043e\u0433\u043e \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0430. \u041d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u043c\u0430\u0441\u0448\u0442\u0430\u0431 \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f \u0441\u0432\u043e\u0439 \u0434\u0438\u0441\u043a\u0440\u0438\u043c\u0438\u043d\u0430\u0442\u043e\u0440 PatchGAN, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u043c\u0435\u044e\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443. <a href=\"https:\/\/github.com\/forcesh\/pix2pixHD\/blob\/master\/models\/networks.py#L292\">\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f<\/a>.<\/p>\n<details class=\"spoiler\">\n<summary>MultiscaleDiscriminator<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">class MultiscaleDiscriminator(nn.Module):     def __init__(self, input_nc, ndf=64, n_layers=3, norm_layer=nn.BatchNorm2d,                   use_sigmoid=False, num_D=3, getIntermFeat=False):         super(MultiscaleDiscriminator, self).__init__()         self.num_D = num_D         self.n_layers = n_layers         self.getIntermFeat = getIntermFeat               for i in range(num_D):             netD = NLayerDiscriminator(input_nc, ndf, n_layers, norm_layer, use_sigmoid, getIntermFeat)             if getIntermFeat:                                                 for j in range(n_layers+2):                     setattr(self, 'scale'+str(i)+'_layer'+str(j), getattr(netD, 'model'+str(j)))                                                else:                 setattr(self, 'layer'+str(i), netD.model)          self.downsample = nn.AvgPool2d(3, stride=2, padding=[1, 1], count_include_pad=False)      def singleD_forward(self, model, input):         if self.getIntermFeat:             result = [input]             for i in range(len(model)):                 result.append(model[i](result[-1]))             return result[1:]         else:             return [model(input)]      def forward(self, input):                 num_D = self.num_D         result = []         input_downsampled = input         for i in range(num_D):             if self.getIntermFeat:                 model = [getattr(self, 'scale'+str(num_D-1-i)+'_layer'+str(j)) for j in range(self.n_layers+2)]             else:                 model = getattr(self, 'layer'+str(num_D-1-i))             result.append(self.singleD_forward(model, input_downsampled))             if i != (num_D-1):                 input_downsampled = self.downsample(input_downsampled)         return result<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<h3>Progressive generator<\/h3>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/082\/165\/b4d\/082165b4dd42a21e601de7cc80528cd2.png\" alt=\"\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 pix2pixHD\" title=\"\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 pix2pixHD\" width=\"1285\" height=\"395\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/082\/165\/b4d\/082165b4dd42a21e601de7cc80528cd2.png\"\/><\/p>\n<div><figcaption>\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 pix2pixHD<\/figcaption><\/div>\n<\/figure>\n<p>\u0421\u043f\u0435\u0440\u0432\u0430 \u0441\u0435\u0442\u044c G1 \u043e\u0431\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u043d\u0438\u0437\u043a\u043e\u043c \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0438, \u043f\u043e\u0442\u043e\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0441\u043b\u043e\u0438 G2 \u0438 \u043c\u043e\u0434\u0435\u043b\u044c \u0434\u043e\u043e\u0431\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0432\u044b\u0441\u043e\u043a\u043e\u043c \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0438.<\/p>\n<h4>\u041f\u0440\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435<\/h4>\n<h3>Feature matching + perceptual loss<\/h3>\n<p>\u0412\u043e \u0432\u0440\u0435\u043c\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0438\u0437 \u0434\u0438\u0441\u043a\u0440\u0438\u043c\u0438\u043d\u0430\u0442\u043e\u0440\u0430 \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u044e\u0442\u0441\u044f \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u044b\u0435 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438 \u0441 \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u043b\u043e\u0451\u0432 \u0438 \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f L1 loss \u043c\u0435\u0436\u0434\u0443 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0430\u043c\u0438 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0438 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e. <a href=\"https:\/\/github.com\/NVIDIA\/pix2pixHD\/blob\/master\/models\/pix2pixHD_model.py#L177\">\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f<\/a>.<\/p>\n<p>Perceptual loss \u043f\u043e\u0445\u043e\u0436 \u043d\u0430 Feature matching, \u043d\u043e \u0432\u043c\u0435\u0441\u0442\u043e \u0434\u0438\u0441\u043a\u0440\u0438\u043c\u0438\u043d\u0430\u0442\u043e\u0440\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u0435\u0434\u043e\u0431\u0443\u0447\u0435\u043d\u043d\u0430\u044f \u043d\u0430 Imagenet \u043c\u043e\u0434\u0435\u043b\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, VGG16 <em>(\u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f GAN\u043e\u0432 \u043e\u043d\u0430 \u043d\u0435 \u043e\u0431\u0443\u0447\u0430\u0435\u0442\u0441\u044f)<\/em>. <a href=\"https:\/\/github.com\/NVIDIA\/pix2pixHD\/blob\/master\/models\/pix2pixHD_model.py#L187\">\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f<\/a>.<\/p>\n<p>\u041e\u0431\u0435 \u043b\u043e\u0441\u0441-\u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0441\u0442\u0430\u0431\u0438\u043b\u0438\u0437\u0438\u0440\u0443\u044e\u0442 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435, \u0442.\u043a. \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c \u043f\u0440\u0430\u0432\u0434\u043e\u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u043d\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0430\u0445 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f.<\/p>\n<h3>Lsgan<\/h3>\n<p>\u0412\u043c\u0435\u0441\u0442\u043e cross-entropy \u0432 minimax game \u0441\u0447\u0438\u0442\u0430\u0435\u043c L2 loss [<a href=\"https:\/\/arxiv.org\/pdf\/1611.04076.pdf\"><u>lsgan<\/u><\/a>].<\/p>\n<h3>\u041f\u0440\u043e instance-wise \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044e. Boundary map<\/h3>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/963\/da8\/8e6\/963da88e6f4007927d9450b89559d8d6.png\" width=\"647\" height=\"219\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/963\/da8\/8e6\/963da88e6f4007927d9450b89559d8d6.png\"\/><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f9b\/e45\/7cf\/f9be457cf3d14038a69148c5f7c8747a.png\" alt=\"\u041f\u0440\u0438\u043c\u0435\u0440 (\u0440\u0438\u0441. (\u0430) \u0432\u043d\u0438\u0437\u0443) \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043f\u043e \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043c\u0430\u0441\u043a\u0435 \u0438 \u043f\u0440\u0438\u043c\u0435\u0440 (\u0440\u0438\u0441. (b) \u0432\u043d\u0438\u0437\u0443) \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043f\u043e \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043c\u0430\u0441\u043a\u0435 \u0438 boundary map\" title=\"\u041f\u0440\u0438\u043c\u0435\u0440 (\u0440\u0438\u0441. (\u0430) \u0432\u043d\u0438\u0437\u0443) \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043f\u043e \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043c\u0430\u0441\u043a\u0435 \u0438 \u043f\u0440\u0438\u043c\u0435\u0440 (\u0440\u0438\u0441. (b) \u0432\u043d\u0438\u0437\u0443) \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043f\u043e \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043c\u0430\u0441\u043a\u0435 \u0438 boundary map\" width=\"649\" height=\"234\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f9b\/e45\/7cf\/f9be457cf3d14038a69148c5f7c8747a.png\"\/><\/p>\n<div><figcaption>\u041f\u0440\u0438\u043c\u0435\u0440 (\u0440\u0438\u0441. (\u0430) \u0432\u043d\u0438\u0437\u0443) \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043f\u043e \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043c\u0430\u0441\u043a\u0435 \u0438 \u043f\u0440\u0438\u043c\u0435\u0440 (\u0440\u0438\u0441. (b) \u0432\u043d\u0438\u0437\u0443) \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043f\u043e \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043c\u0430\u0441\u043a\u0435 \u0438 boundary map<\/figcaption><\/div>\n<\/figure>\n<p>\u041a\u043e \u0432\u0445\u043e\u0434\u043d\u043e\u0439 \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043c\u0430\u0441\u043a\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f boundary map, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 instance-wise \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e. \u042d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0440\u0430\u0437\u043d\u044b\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u043d\u0435 \u0441\u043b\u0438\u0432\u0430\u043b\u0438\u0441\u044c \u0432 \u043e\u0434\u0438\u043d \u043e\u0431\u044a\u0435\u043a\u0442, \u043a\u0430\u043a \u043d\u0430 \u0440\u0438\u0441\u0443\u043d\u043a\u0435 \u0432\u044b\u0448\u0435.<\/p>\n<h4>\u041f\u0440\u043e instance-wise \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044e. Feature encoder network\u00a0\u00a0\u00a0\u00a0<\/h4>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/729\/d0e\/5b1\/729d0e5b1ff0e47d744ea6dc6948ad53.png\" alt=\"Instance-wise \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 Feature Encoder Network\" title=\"Instance-wise \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 Feature Encoder Network\" width=\"612\" height=\"463\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/729\/d0e\/5b1\/729d0e5b1ff0e47d744ea6dc6948ad53.png\"\/><\/p>\n<div><figcaption>Instance-wise \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 Feature Encoder Network<\/figcaption><\/div>\n<\/figure>\n<p>Feature Encoder Network \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 encoder-decoder \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443 (\u0431\u0435\u0437 skip-connections), \u0432\u044b\u0445\u043e\u0434 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u043e\u0434\u0430\u0451\u0442\u0441\u044f \u043d\u0430 \u0441\u043b\u043e\u0439 instance-wise average pooling.\u00a0 \u041d\u043e\u0432\u044b\u0439 \u0441\u043b\u043e\u0439 \u0443\u0441\u0440\u0435\u0434\u043d\u044f\u0435\u0442 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u0430 \u043f\u043e boundary map, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u0430\u044f \u043c\u0430\u0441\u043a\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043c\u0430\u0441\u043a\u0435.<\/p>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0438\u043d\u0444\u0435\u0440\u0435\u043d\u0441\u0430 \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0439 \u0438 \u0442\u043e\u0439 \u0436\u0435 \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043c\u0430\u0441\u043a\u0438 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f, \u043f\u043e\u0434\u0430\u0432\u0430\u044f \u043d\u0430 \u0432\u0445\u043e\u0434 \u0441\u0435\u0442\u0438 E, \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0438\u0437 \u043d\u0430\u0448\u0435\u0433\u043e \u043d\u0430\u0431\u043e\u0440\u0430 (instance-wise average pooling \u0443\u0441\u0440\u0435\u0434\u043d\u044f\u0435\u0442 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438, \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043c\u0430\u0441\u043a\u043e\u0439).<\/p>\n<p>\u00a0<a href=\"https:\/\/github.com\/NVIDIA\/pix2pixHD\/blob\/master\/models\/networks.py#L255\">\u042d\u043d\u043a\u043e\u0434\u0435\u0440 E <\/a>\u043e\u0431\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u043d\u043e \u0441 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u043c \u0438 \u0434\u0438\u0441\u043a\u0440\u0438\u043c\u0438\u043d\u0430\u0442\u043e\u0440\u043e\u043c.<\/p>\n<h3>SPADE<\/h3>\n<p>[<a href=\"https:\/\/arxiv.org\/abs\/1903.07291\"><u>\u0421\u0442\u0430\u0442\u044c\u044f<\/u><\/a>, <a href=\"https:\/\/github.com\/NVlabs\/SPADE\"><u>\u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f<\/u><\/a>]<\/p>\n<h4>\u041f\u0440\u043e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443<\/h4>\n<h3>Multi-sclae discriminators<\/h3>\n<p>\u041a\u0430\u043a \u0438 \u0432 pix2pixHD \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f Multi-scale discriminators.<\/p>\n<h3>Feature matching + perceptual loss<\/h3>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043a\u0430\u043a \u0438 \u0432 pix2pixHD.<\/p>\n<h3>SPADE generator<\/h3>\n<p><a href=\"https:\/\/github.com\/NVlabs\/SPADE\/blob\/master\/models\/networks\/generator.py#L15\"><u>\u0413\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440<\/u><\/a> \u0441\u0438\u043b\u044c\u043d\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u0434\u0432\u0443\u0445 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440. \u041d\u0430 \u0432\u0445\u043e\u0434 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0443 \u043f\u043e\u0434\u0430\u0451\u0442\u0441\u044f \u043b\u0438\u0431\u043e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0439 \u0432\u0435\u043a\u0442\u043e\u0440 (\u0435\u0441\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0441 <a href=\"https:\/\/habr.com\/ru\/post\/331552\/\"><u>VAE<\/u><\/a>) \u043b\u0438\u0431\u043e \u043c\u0430\u0441\u043a\u0430 \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u043d\u043e\u0439 \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p>\u0412 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0441 \u0430\u0432\u0442\u043e\u044d\u043d\u043a\u043e\u0434\u0435\u0440\u043e\u043c \u0432\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0441\u0435\u0442\u044c &#8212; \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u044d\u043d\u043a\u043e\u0434\u0435\u0440, \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0439 \u0432\u0435\u043a\u0442\u043e\u0440 (\u0432\u0445\u043e\u0434\u043d\u043e\u0439 \u0432\u0435\u043a\u0442\u043e\u0440 \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430). \u042d\u043d\u043a\u043e\u0434\u0435\u0440 \u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440, \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u044e\u0442 VAE.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ebc\/b4c\/3ef\/ebcb4c3ef40e123b65a4769089353b4d.png\" alt=\"\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 SPADE\" title=\"\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 SPADE\" width=\"1203\" height=\"352\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ebc\/b4c\/3ef\/ebcb4c3ef40e123b65a4769089353b4d.png\"\/><\/p>\n<div><figcaption>\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 SPADE<\/figcaption><\/div>\n<\/figure>\n<p>\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e SPADE Res \u0431\u043b\u043e\u043a\u043e\u0432, \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043d\u043e\u0432\u044b\u0439 \u0441\u043b\u043e\u0439 \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 &#8212; SPADE.<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/56d\/5b6\/e01\/56d5b6e01c5660d021f0a2fe365f58ac.png\" alt=\"Spatially-adaptive denormalization (SPADE)\" title=\"Spatially-adaptive denormalization (SPADE)\" width=\"493\" height=\"261\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/56d\/5b6\/e01\/56d5b6e01c5660d021f0a2fe365f58ac.png\"\/><\/p>\n<div><figcaption>Spatially-adaptive denormalization (SPADE)<\/figcaption><\/div>\n<\/figure>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e \u043d\u0430 \u0440\u0438\u0441\u0443\u043d\u043a\u0435 \u043c\u0430\u0441\u043a\u0430 \u043f\u0440\u043e\u0433\u043e\u043d\u044f\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u0441\u0432\u0451\u0440\u0442\u043a\u0438 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 <em>\u0433\u0430\u043c\u043c\u0430<\/em> \u0438 <em>\u0431\u0435\u0442\u0442\u0430<\/em> <em>(\u0412 BatchNorm2d\u00a0 \u043b\u0438\u0431\u043e InstanceNorm2d \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 affine=False)<\/em> [<a href=\"https:\/\/github.com\/NVlabs\/SPADE\/blob\/fecacc920c1367a038995c45a39c15f6521ca64f\/models\/networks\/normalization.py#L66\"><u>\u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f<\/u><\/a>].<\/p>\n<p>\u041a\u043e\u0433\u0434\u0430 \u043c\u044b \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c InstanceNorm2d \u043d\u0430 \u043e\u0434\u043d\u043e\u0442\u043e\u043d\u043d\u0443\u044e \u043c\u0430\u0441\u043a\u0443, \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u0441\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0442\u0435\u0440\u044f\u0435\u0442\u0441\u044f (\u0441\u043c. \u0440\u0438\u0441\u0443\u043d\u043e\u043a \u043d\u0438\u0436\u0435). \u0411\u043b\u043e\u043a SPADE \u044d\u0442\u043e \u0438\u0441\u043a\u043b\u044e\u0447\u0430\u0435\u0442.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/d05\/998\/983\/d059989838b98a6ea7a23afd714f96f0.png\" alt=\"\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043f\u043e \u043e\u0434\u043d\u043e\u0442\u043e\u043d\u043d\u043e\u0439 \u043c\u0430\u0441\u043a\u0435. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0443 pix2pixHD \u0438 SPADE\" title=\"\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043f\u043e \u043e\u0434\u043d\u043e\u0442\u043e\u043d\u043d\u043e\u0439 \u043c\u0430\u0441\u043a\u0435. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0443 pix2pixHD \u0438 SPADE\" width=\"783\" height=\"482\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d05\/998\/983\/d059989838b98a6ea7a23afd714f96f0.png\"\/><\/p>\n<div><figcaption>\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043f\u043e \u043e\u0434\u043d\u043e\u0442\u043e\u043d\u043d\u043e\u0439 \u043c\u0430\u0441\u043a\u0435. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0443 pix2pixHD \u0438 SPADE<\/figcaption><\/div>\n<\/figure>\n<h3>Spectral Norm<\/h3>\n<p>\u0410\u0432\u0442\u043e\u0440\u044b \u0442\u0430\u043a\u0436\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442 <a href=\"https:\/\/pytorch.org\/docs\/stable\/generated\/torch.nn.utils.spectral_norm.html\"><u>\u0441\u043f\u0435\u043a\u0442\u0440\u0430\u043b\u044c\u043d\u0443\u044e \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e<\/u><\/a> \u0432\u043e \u0432\u0441\u0435 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b &#8212; \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440, \u0434\u0438\u0441\u043a\u0440\u0438\u043c\u0438\u043d\u0430\u0442\u043e\u0440 \u0438 \u044d\u043d\u043a\u043e\u0434\u0435\u0440. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f \u0441\u0432\u0451\u0440\u0442\u043e\u043a \u0432 <a href=\"https:\/\/github.com\/NVlabs\/SPADE\/blob\/master\/models\/networks\/architecture.py#L35\"><u>SPADEResnetBlock<\/u><\/a> \u0438 <a href=\"https:\/\/github.com\/NVlabs\/SPADE\/blob\/master\/models\/networks\/normalization.py#L27\"><u>\u0441\u043b\u043e\u0451\u0432 \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438<\/u><\/a> Batch\/InstanceNorm.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\\textbf W_{SN}=\\frac{\\textbf W}{\\sigma(\\textbf W)}, \\sigma(\\textbf W) = \\max\\limits_{\\textbf h: \\textbf h\\ne0} \\frac {\\|\\textbf W \\textbf h\\|_{2}}{\\|\\textbf h\\|_{2}}.\" alt=\"\\textbf W_{SN}=\\frac{\\textbf W}{\\sigma(\\textbf W)}, \\sigma(\\textbf W) = \\max\\limits_{\\textbf h: \\textbf h\\ne0} \\frac {\\|\\textbf W \\textbf h\\|_{2}}{\\|\\textbf h\\|_{2}}.\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/5c4\/38a\/d75\/5c438ad752a963de0e7391d06b18620b.svg\" width=\"334\" height=\"51\"\/><\/p>\n<p>\u0421\u043f\u0435\u043a\u0442\u0440\u0430\u043b\u044c\u043d\u0430\u044f \u043d\u043e\u0440\u043c\u0430 (\u0441\u0438\u0433\u043c\u0430) \u043f\u043e \u0441\u0443\u0442\u0438 \u0438\u0437\u043c\u0435\u0440\u044f\u0435\u0442, \u043a\u0430\u043a \u0441\u0438\u043b\u044c\u043d\u043e \u043c\u0430\u0442\u0440\u0438\u0446\u0430 W \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0441\u0442\u044f\u043d\u0443\u0442\u044c \u043b\u044e\u0431\u043e\u0439 \u043d\u0435\u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u0432\u0435\u043a\u0442\u043e\u0440 h, \u0438 \u0440\u0430\u0432\u043d\u0430 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u043c\u0443 <a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%A1%D0%B8%D0%BD%D0%B3%D1%83%D0%BB%D1%8F%D1%80%D0%BD%D0%BE%D0%B5_%D1%80%D0%B0%D0%B7%D0%BB%D0%BE%D0%B6%D0%B5%D0%BD%D0%B8%D0%B5\"><u>\u0441\u0438\u043d\u0433\u0443\u043b\u044f\u0440\u043d\u043e\u043c\u0443 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e<\/u><\/a> \u043c\u0430\u0442\u0440\u0438\u0446\u044b W [<a href=\"https:\/\/jonathan-hui.medium.com\/machine-learning-linear-algebra-a5b1658f0151#1bfc\"><u>proof<\/u><\/a>].<\/p>\n<p><a href=\"https:\/\/arxiv.org\/abs\/1802.05957\"><u>\u0421\u043f\u0435\u043a\u0442\u0440\u0430\u043b\u044c\u043d\u0430\u044f \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f<\/u><\/a> <a href=\"https:\/\/jonathan-hui.medium.com\/gan-spectral-normalization-893b6a4e8f53\"><u>\u0441\u0442\u0430\u0431\u0438\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442<\/u><\/a> \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0413\u0410\u041d\u043e\u0432 \u0437\u0430 \u0441\u0447\u0451\u0442 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 <a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%9B%D0%B8%D0%BF%D1%88%D0%B8%D1%86%D0%B5%D0%B2%D0%BE_%D0%BE%D1%82%D0%BE%D0%B1%D1%80%D0%B0%D0%B6%D0%B5%D0%BD%D0%B8%D0%B5\"><u>\u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0443 \u041b\u0438\u043f\u0448\u0438\u0446\u0430<\/u><\/a> L = 1 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0441\u043b\u043e\u0435\u0432.<\/p>\n<h4>\u041f\u0440\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435<\/h4>\n<p>\u041e\u0431\u0443\u0447\u0430\u0435\u0442\u0441\u044f SPADE \u0442\u0430\u043a\u0438\u043c \u0436\u0435 \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043a\u0430\u043a \u0438 pix2pixHD, \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u043c\u0435\u0441\u0442\u043e LSGAN \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f <a href=\"https:\/\/en.wikipedia.org\/wiki\/Hinge_loss\"><u>Hinge loss<\/u><\/a>.<\/p>\n<h2>Unsupervised image-to-image translation<\/h2>\n<h3>Cycle-GAN<\/h3>\n<p>[<a href=\"https:\/\/arxiv.org\/abs\/1703.10593\"><u>C\u0442\u0430\u0442\u044c\u044f<\/u><\/a>, <a href=\"https:\/\/github.com\/junyanz\/pytorch-CycleGAN-and-pix2pix\/blob\/master\/models\/cycle_gan_model.py\"><u>\u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f<\/u><\/a>]<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/9bf\/460\/14f\/9bf46014f2f1ba4ca3e431381febaadc.png\" alt=\"(a) \u041f\u0435\u0440\u0435\u0432\u043e\u0434 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0438\u0437 \u0434\u043e\u043c\u0435\u043d\u0430 X \u0432 Y \u0438 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442, (b) cycle-consistency loss \u0434\u043b\u044f \u0434\u043e\u043c\u0435\u043d\u0430 X, (c) cycle-consistency loss \u0434\u043b\u044f \u0434\u043e\u043c\u0435\u043d\u0430 Y\" title=\"(a) \u041f\u0435\u0440\u0435\u0432\u043e\u0434 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0438\u0437 \u0434\u043e\u043c\u0435\u043d\u0430 X \u0432 Y \u0438 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442, (b) cycle-consistency loss \u0434\u043b\u044f \u0434\u043e\u043c\u0435\u043d\u0430 X, (c) cycle-consistency loss \u0434\u043b\u044f \u0434\u043e\u043c\u0435\u043d\u0430 Y\" width=\"1112\" height=\"506\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/9bf\/460\/14f\/9bf46014f2f1ba4ca3e431381febaadc.png\"\/><\/p>\n<div><figcaption>(a) \u041f\u0435\u0440\u0435\u0432\u043e\u0434 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0438\u0437 \u0434\u043e\u043c\u0435\u043d\u0430 X \u0432 Y \u0438 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442, (b) cycle-consistency loss \u0434\u043b\u044f \u0434\u043e\u043c\u0435\u043d\u0430 X, (c) cycle-consistency loss \u0434\u043b\u044f \u0434\u043e\u043c\u0435\u043d\u0430 Y<\/figcaption><\/div>\n<\/figure>\n<h4>\u041f\u0440\u043e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443<\/h4>\n<p>\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u0438 \u0434\u0438\u0441\u043a\u0440\u0438\u043c\u0438\u043d\u0430\u0442\u043e\u0440\u0430 \u0432 Cycle-GAN \u0442\u0430\u043a\u0438\u0435 \u0436\u0435, \u043a\u0430\u043a \u0438 \u0432 pix2pix. \u041c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0437\u0430\u0434\u0430\u0447\u0438 \u0438 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f.<\/p>\n<h4>\u041f\u0440\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435<\/h4>\n<p>\u041c\u044b \u0445\u043e\u0442\u0438\u043c \u043f\u0435\u0440\u0435\u0432\u0435\u0441\u0442\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0438\u0437 \u0434\u043e\u043c\u0435\u043d\u0430 X \u0432 \u0434\u043e\u043c\u0435\u043d Y, \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0432 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f. \u0418 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442, \u0438\u0437 \u0434\u043e\u043c\u0435\u043d\u0430 Y \u0432 X. \u0422.\u0435. \u0440\u0435\u0448\u0430\u0435\u043c \u0437\u0430\u0434\u0430\u0447\u0443 style transfer.<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u0434\u0432\u0430 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 G : X -> Y, F: Y -> X \u0438 \u0434\u0432\u0430 \u0434\u0438\u0441\u043a\u0440\u0438\u043c\u0438\u043d\u0430\u0442\u043e\u0440\u0430 Dx, Dy. \u041a\u0430\u0436\u0434\u0443\u044e \u043f\u0430\u0440\u0443 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u0438 \u0434\u0438\u0441\u043a\u0440\u0438\u043c\u0438\u043d\u0430\u0442\u043e\u0440\u0430 \u043e\u0431\u0443\u0447\u0430\u0435\u043c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0447\u0435\u0440\u0435\u0437 minimax game. \u0418 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0435\u0449\u0451 \u0434\u0432\u0435 \u043b\u043e\u0441\u0441-\u0444\u0443\u043d\u043a\u0446\u0438\u0438 <em>cycle consistency losses<\/em>, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u043b\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\\mathcal{L}_{cyc}(G, F)=   \\mathbb{E}_{x\\sim p_{data}(x)}[\\|F(G(x)) - x\\|_{1}] + \\mathbb{E}_{y\\sim p_{data}(y)}[\\|G(F(y)) - y\\|_{1}].\" alt=\"\\mathcal{L}_{cyc}(G, F)=   \\mathbb{E}_{x\\sim p_{data}(x)}[\\|F(G(x)) - x\\|_{1}] + \\mathbb{E}_{y\\sim p_{data}(y)}[\\|G(F(y)) - y\\|_{1}].\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/552\/d96\/ce9\/552d96ce9bfb50580c8249286ee7f456.svg\" width=\"593\" height=\"25\"\/><\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/431\/808\/ae2\/431808ae20621da7cd1fbb67a4a780b6.png\" alt=\"\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0438 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439\" title=\"\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0438 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439\" width=\"703\" height=\"772\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/431\/808\/ae2\/431808ae20621da7cd1fbb67a4a780b6.png\"\/><\/p>\n<div><figcaption>\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0438 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439<\/figcaption><\/div>\n<\/figure>\n<h3>UGATIT<\/h3>\n<p>[<a href=\"https:\/\/arxiv.org\/abs\/1907.10830\"><u>\u0421\u0442\u0430\u0442\u044c\u044f<\/u><\/a>, <a href=\"https:\/\/github.com\/znxlwm\/UGATIT-pytorch\"><u>\u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f<\/u><\/a>]<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/758\/096\/635\/758096635166b07c068fa9bd9f8cd8dc.png\" alt=\"\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 UGATIT\" title=\"\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 UGATIT\" width=\"743\" height=\"869\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/758\/096\/635\/758096635166b07c068fa9bd9f8cd8dc.png\"\/><\/p>\n<div><figcaption>\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 UGATIT<\/figcaption><\/div>\n<\/figure>\n<h4>\u041f\u0440\u043e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443<\/h4>\n<p>UGATIT \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u043f\u043e\u0445\u043e\u0436\u0430 \u043d\u0430 Cycle GAN. \u041e\u043d\u0430 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0434\u0432\u0443\u0445 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432 (\u043f\u043e \u043e\u0434\u043d\u043e\u043c\u0443 \u043d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u0434\u043e\u043c\u0435\u043d) \u0438 4 \u0434\u0438\u0441\u043a\u0440\u0438\u043c\u0438\u043d\u0430\u0442\u043e\u0440\u043e\u0432 (\u043f\u043e 2 \u043d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u0434\u043e\u043c\u0435\u043d).<\/p>\n<p>\u0414\u0438\u0441\u043a\u0440\u0438\u043c\u0438\u043d\u0430\u0442\u043e\u0440\u044b \u043e\u0434\u043d\u043e\u0433\u043e \u0434\u043e\u043c\u0435\u043d\u0430 &#8212; \u044d\u0442\u043e \u0434\u0432\u0430 PatchGAN \u0440\u0430\u0437\u043d\u043e\u0439 \u0433\u043b\u0443\u0431\u0438\u043d\u044b (\u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, <a href=\"https:\/\/github.com\/znxlwm\/UGATIT-pytorch\/blob\/master\/UGATIT.py#L112\"><u>\u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442\u0441\u044f<\/u><\/a> multi-scale \u0434\u0438\u0441\u043a\u0440\u0438\u043c\u0438\u043d\u0430\u0442\u043e\u0440).<\/p>\n<p>\u0413\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 <a href=\"https:\/\/github.com\/znxlwm\/UGATIT-pytorch\/blob\/b8c4251823673189999484d07e97fdcb9300e9e0\/networks.py#L6\"><u>Resnet-based \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443<\/u><\/a> (\u0431\u0435\u0437 skip connections).<\/p>\n<p>\u0412\u043d\u0443\u0442\u0440\u0438 <a href=\"https:\/\/github.com\/znxlwm\/UGATIT-pytorch\/blob\/b8c4251823673189999484d07e97fdcb9300e9e0\/networks.py#L133\"><u>Resnet \u0431\u043b\u043e\u043a\u0438<\/u><\/a> \u0441 <a href=\"https:\/\/github.com\/znxlwm\/UGATIT-pytorch\/blob\/b8c4251823673189999484d07e97fdcb9300e9e0\/networks.py#L157\"><u>AdaLIN<\/u><\/a> (adaptive layer instance normalization)<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"AdaLIN(a,\\gamma, \\beta) = \\gamma \\cdot  (\\rho\\cdot \\hat a_{I} + (1 - \\rho)\\cdot \\hat a_{L}) + \\beta,\" alt=\"AdaLIN(a,\\gamma, \\beta) = \\gamma \\cdot  (\\rho\\cdot \\hat a_{I} + (1 - \\rho)\\cdot \\hat a_{L}) + \\beta,\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ed7\/497\/11a\/ed749711aaed8a5cb3eed0cc000e42fe.svg\" width=\"411\" height=\"22\"\/><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\\hat a_{I}=\\frac{a - \\mu_{I}}{\\sqrt {\\sigma^2_{I} + \\epsilon}}, \\hat a_{L}=\\frac{a - \\mu_{L}}{\\sqrt {\\sigma^2_{L} + \\epsilon}},\" alt=\"\\hat a_{I}=\\frac{a - \\mu_{I}}{\\sqrt {\\sigma^2_{I} + \\epsilon}}, \\hat a_{L}=\\frac{a - \\mu_{L}}{\\sqrt {\\sigma^2_{L} + \\epsilon}},\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/0ab\/3f5\/c25\/0ab3f5c25952a033cbc26a6185811ae2.svg\" width=\"268\" height=\"63\"\/><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\\rho \\leftarrow clip_{[0,1]} (\\rho-\\tau\\ \\Delta\\rho),\" alt=\"\\rho \\leftarrow clip_{[0,1]} (\\rho-\\tau\\ \\Delta\\rho),\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/873\/231\/453\/8732314536338c961d7f965bb9974ad3.svg\" width=\"196\" height=\"25\"\/><\/p>\n<p>\u0433\u0434\u0435 \u03bcI , \u03bcL and \u03c3I , \u03c3L &#8212; \u044d\u0442\u043e channel-wise \u0438 layer-wise \u043c\u0430\u0442. \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u0435 \u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0435 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0439 \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0439 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u03b3 \u0438 \u03b2 &#8212; \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c\u044b\u0435 fully connected \u0441\u043b\u043e\u0435\u043c, \u03c4 &#8212; \u044d\u0442\u043e learning rate \u0438 \u2206\u03c1 &#8212; \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0439 \u043e\u043f\u0442\u0438\u043c\u0430\u0439\u0437\u0435\u0440\u043e\u043c. \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u03c1 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u044b \u043e\u0442\u0440\u0435\u0437\u043a\u043e\u043c [0, 1].<\/p>\n<h4>\u041f\u0440\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435<\/h4>\n<p>\u0412\u043d\u0443\u0442\u0440\u0438 \u0434\u0438\u0441\u043a\u0440\u0438\u043c\u0438\u043d\u0430\u0442\u043e\u0440\u0430 \u0435\u0441\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u043e\u043d\u043d\u0430\u044f \u0433\u043e\u043b\u043e\u0432\u0430. \u0415\u0439 \u043d\u0430 \u0432\u0445\u043e\u0434 \u043f\u043e\u0434\u0430\u044e\u0442\u0441\u044f 2D \u043a\u0430\u0440\u0442\u044b \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432, \u043f\u043e \u043d\u0438\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e avg_pooling \u0438 fully connected \u0441\u043b\u043e\u0451\u0432 \u0441\u0447\u0438\u0442\u0430\u044e\u0442\u0441\u044f \u0432\u0435\u0441\u0430 \u0438 \u0443\u043c\u043d\u043e\u0436\u0430\u044e\u0442\u0441\u044f \u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043a\u0430\u0440\u0442\u044b \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432.<\/p>\n<p>\u0412\u043e \u0432\u0440\u0435\u043c\u044f \u0438\u043d\u0444\u0435\u0440\u0435\u043d\u0441\u0430 \u043f\u043e \u044d\u0442\u0438\u043c \u043a\u0430\u0440\u0442\u0430\u043c \u0441\u0442\u0440\u043e\u044f\u0442\u0441\u044f class activation map (CAM; attention feature map; heatmap)<\/p>\n<p>\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 2d \u0442\u0435\u043d\u0437\u043e\u0440 \u0438 \u0435\u0441\u0442\u044c \u0432\u044b\u0445\u043e\u0434 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0433\u043e\u043b\u043e\u0432\u044b. \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c + 4 <a href=\"https:\/\/github.com\/znxlwm\/UGATIT-pytorch\/blob\/master\/UGATIT.py#L215\"><u>\u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043b\u043e\u0441\u0441\u0430<\/u><\/a> \u0434\u043b\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430:<\/p>\n<pre><code class=\"python\">G_ad_cam_loss_GA = self.MSE_loss(fake_GA_cam_logit, torch.ones_like(fake_GA_cam_logit).to(self.device)) G_ad_cam_loss_LA = self.MSE_loss(fake_LA_cam_logit, torch.ones_like(fake_LA_cam_logit).to(self.device))  G_ad_cam_loss_GB = self.MSE_loss(fake_GB_cam_logit, torch.ones_like(fake_GB_cam_logit).to(self.device)) G_ad_cam_loss_LB = self.MSE_loss(fake_LB_cam_logit, torch.ones_like(fake_LB_cam_logit).to(self.device))<\/code><\/pre>\n<p>\u0418 <a href=\"https:\/\/github.com\/znxlwm\/UGATIT-pytorch\/blob\/master\/UGATIT.py#L182\"><u>\u0434\u0438\u0441\u043a\u0440\u0438\u043c\u0438\u043d\u0430\u0442\u043e\u0440\u0430<\/u><\/a>:<\/p>\n<pre><code class=\"python\">D_ad_cam_loss_GA = self.MSE_loss(real_GA_cam_logit, torch.ones_like(real_GA_cam_logit).to(self.device)) + self.MSE_loss(fake_GA_cam_logit, torch.zeros_like(fake_GA_cam_logit).to(self.device)) D_ad_cam_loss_LA = self.MSE_loss(real_LA_cam_logit, torch.ones_like(real_LA_cam_logit).to(self.device)) + self.MSE_loss(fake_LA_cam_logit, torch.zeros_like(fake_LA_cam_logit).to(self.device))  D_ad_cam_loss_GB = self.MSE_loss(real_GB_cam_logit, torch.ones_like(real_GB_cam_logit).to(self.device)) + self.MSE_loss(fake_GB_cam_logit, torch.zeros_like(fake_GB_cam_logit).to(self.device)) D_ad_cam_loss_LB = self.MSE_loss(real_LB_cam_logit, torch.ones_like(real_LB_cam_logit).to(self.device)) + self.MSE_loss(fake_LB_cam_logit, torch.zeros_like(fake_LB_cam_logit).to(self.device))<\/code><\/pre>\n<p>\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043b\u043e\u0441\u0441\u044b (minimax game):<\/p>\n<pre><code class=\"python\">G_ad_loss_GA = self.MSE_loss(fake_GA_logit, torch.ones_like(fake_GA_logit).to(self.device)) G_ad_loss_LA = self.MSE_loss(fake_LA_logit, torch.ones_like(fake_LA_logit).to(self.device))  G_ad_loss_GB = self.MSE_loss(fake_GB_logit, torch.ones_like(fake_GB_logit).to(self.device)) G_ad_loss_LB = self.MSE_loss(fake_LB_logit, torch.ones_like(fake_LB_logit).to(self.device))  D_ad_loss_GA = self.MSE_loss(real_GA_logit, torch.ones_like(real_GA_logit).to(self.device)) + self.MSE_loss(fake_GA_logit, torch.zeros_like(fake_GA_logit).to(self.device)) D_ad_loss_LA = self.MSE_loss(real_LA_logit, torch.ones_like(real_LA_logit).to(self.device)) + self.MSE_loss(fake_LA_logit, torch.zeros_like(fake_LA_logit).to(self.device))  D_ad_loss_GB = self.MSE_loss(real_GB_logit, torch.ones_like(real_GB_logit).to(self.device)) + self.MSE_loss(fake_GB_logit, torch.zeros_like(fake_GB_logit).to(self.device)) D_ad_loss_LB = self.MSE_loss(real_LB_logit, torch.ones_like(real_LB_logit).to(self.device)) + self.MSE_loss(fake_LB_logit, torch.zeros_like(fake_LB_logit).to(self.device))<\/code><\/pre>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043a\u0430\u043a \u0438 \u0432 cycle gan \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f <em>cycle consistency losses<\/em><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"L^{s\\rightarrow t}_{cycle}=\\mathbb{E}_{x \\sim X_{s}}[|x-G_{t \\rightarrow s}(G_{s \\rightarrow t}(x))|_{1}].\" alt=\"L^{s\\rightarrow t}_{cycle}=\\mathbb{E}_{x \\sim X_{s}}[|x-G_{t \\rightarrow s}(G_{s \\rightarrow t}(x))|_{1}].\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/96d\/1d4\/7c0\/96d1d47c02b4414ca3637dc016db2e13.svg\" width=\"321\" height=\"28\"\/><\/p>\n<p>\u0418 identity loss (\u0434\u043b\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e):<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"L^{s\\rightarrow t}_{identity}=\\mathbb{E}_{x \\sim X_{t}}[|x-(G_{s \\rightarrow t}(x))|_{1}].\" alt=\"L^{s\\rightarrow t}_{identity}=\\mathbb{E}_{x \\sim X_{t}}[|x-(G_{s \\rightarrow t}(x))|_{1}].\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/949\/e52\/713\/949e52713e03c224251fa1c715404f9a.svg\" width=\"296\" height=\"28\"\/><\/p>\n<pre><code class=\"python\">fake_A2A, fake_A2A_cam_logit, _ = self.genB2A(real_A) fake_B2B, fake_B2B_cam_logit, _ = self.genA2B(real_B)  G_identity_loss_A = self.L1_loss(fake_A2A, real_A) G_identity_loss_B = self.L1_loss(fake_B2B, real_B)<\/code><\/pre>\n<p>\u0412 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u044b, \u043a\u0430\u043a \u0438 \u0432 \u0434\u0438\u0441\u043a\u0440\u0438\u043c\u0438\u043d\u0430\u0442\u043e\u0440\u044b, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0433\u043e\u043b\u043e\u0432\u044b, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u0438\u0442 \u043b\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0434\u043e\u043c\u0435\u043d\u0443 \u0410 \u0438\u043b\u0438 \u0434\u043e\u043c\u0435\u043d\u0443 B, \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430.<\/p>\n<pre><code class=\"python\">G_cam_loss_A = self.BCE_loss(fake_B2A_cam_logit, torch.ones_like(fake_B2A_cam_logit).to(self.device)) + self.BCE_loss(fake_A2A_cam_logit, torch.zeros_like(fake_A2A_cam_logit).to(self.device)) G_cam_loss_B = self.BCE_loss(fake_A2B_cam_logit, torch.ones_like(fake_A2B_cam_logit).to(self.device)) + self.BCE_loss(fake_B2B_cam_logit, torch.zeros_like(fake_B2B_cam_logit).to(self.device))<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e3e\/7d8\/029\/e3e7d802922939a066c2f812abd3e9cf.png\" alt=\"\u041f\u0440\u0438\u043c\u0435\u0440 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 CAM: (a) - \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435; (b) - CAM \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 (c-d) - CAM \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0438 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0434\u0438\u0441\u043a\u0440\u0438\u043c\u0438\u043d\u0430\u0442\u043e\u0440\u0430 (e) - \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0441 CAM \u0433\u043e\u043b\u043e\u0432\u043e\u0439; (f) - \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0431\u0435\u0437 CAM \u0433\u043e\u043b\u043e\u0432\u044b\" title=\"\u041f\u0440\u0438\u043c\u0435\u0440 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 CAM: (a) - \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435; (b) - CAM \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 (c-d) - CAM \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0438 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0434\u0438\u0441\u043a\u0440\u0438\u043c\u0438\u043d\u0430\u0442\u043e\u0440\u0430 (e) - \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0441 CAM \u0433\u043e\u043b\u043e\u0432\u043e\u0439; (f) - \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0431\u0435\u0437 CAM \u0433\u043e\u043b\u043e\u0432\u044b\" width=\"1000\" height=\"676\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e3e\/7d8\/029\/e3e7d802922939a066c2f812abd3e9cf.png\"\/><\/p>\n<div><figcaption>\u041f\u0440\u0438\u043c\u0435\u0440 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 CAM: (a) &#8212; \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435; (b) &#8212; CAM \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 (c-d) &#8212; CAM \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0438 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0434\u0438\u0441\u043a\u0440\u0438\u043c\u0438\u043d\u0430\u0442\u043e\u0440\u0430 (e) &#8212; \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0441 CAM \u0433\u043e\u043b\u043e\u0432\u043e\u0439; (f) &#8212; \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0431\u0435\u0437 CAM \u0433\u043e\u043b\u043e\u0432\u044b<\/figcaption><\/div>\n<\/figure>\n<p>\u0424\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u043b\u043e\u0441\u0441:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\\min\\limits_{G} \\max\\limits_{D} \\lambda_{1}L_{lsgan}+\\lambda_{2}L_{cycle} + \\lambda_{3}L_{identity} + \\lambda_{4}L_{cam}\" alt=\"\\min\\limits_{G} \\max\\limits_{D} \\lambda_{1}L_{lsgan}+\\lambda_{2}L_{cycle} + \\lambda_{3}L_{identity} + \\lambda_{4}L_{cam}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/23c\/4e3\/dfb\/23c4e3dfbeef3276cce8d57c6d0e32d1.svg\" width=\"427\" height=\"32\"\/><\/p>\n<h3>MUNIT<\/h3>\n<p>[<a href=\"https:\/\/arxiv.org\/abs\/1804.04732\"><u>\u0421\u0442\u0430\u0442\u044c\u044f<\/u><\/a>, <a href=\"https:\/\/github.com\/NVlabs\/MUNIT\"><u>\u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f<\/u><\/a>]<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/509\/e4a\/a26\/509e4aa261bc7f9b16615cf954898224.png\" alt=\"\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 MUNIT\" title=\"\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 MUNIT\" width=\"946\" height=\"521\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/509\/e4a\/a26\/509e4aa261bc7f9b16615cf954898224.png\"\/><\/p>\n<div><figcaption>\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 MUNIT<\/figcaption><\/div>\n<\/figure>\n<h4>\u041f\u0440\u043e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443<\/h4>\n<p>\u0414\u0430\u043d\u043d\u0430\u044f \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u0434\u0432\u0443\u0445 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445. \u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u043d\u0438\u0445, MUNIT \u043a\u043e\u0434\u0438\u0440\u0443\u0435\u0442 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0438 \u0441\u0442\u0438\u043b\u044c \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 Content and Style Encoder.<\/p>\n<p>Style Encoder \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 strided \u0441\u0432\u0451\u0440\u0442\u043e\u043a, global average pooling \u0438 fully connected \u0441\u043b\u043e\u044f. Instance Normalization \u0432 <a href=\"https:\/\/github.com\/NVlabs\/MUNIT\/blob\/a82e222bc359892bd0f522d7a0f1573f3ec4a485\/networks.py#L188\"><u>Style Encoder<\/u><\/a> \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f, \u0442.\u043a. \u043e\u043d \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0435 \u043c\u0430\u0442. \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u0435 \u0438 \u0434\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u044e \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0441\u0442\u0438\u043b\u0435.<\/p>\n<p><a href=\"https:\/\/github.com\/NVlabs\/MUNIT\/blob\/a82e222bc359892bd0f522d7a0f1573f3ec4a485\/networks.py#L206\"><u>Content encoder<\/u><\/a> \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0442\u0435\u0445 \u0436\u0435 \u0441\u0432\u0451\u0440\u0442\u043e\u043a \u0438 residual blocks.<\/p>\n<p><a href=\"https:\/\/github.com\/NVlabs\/MUNIT\/blob\/a82e222bc359892bd0f522d7a0f1573f3ec4a485\/networks.py#L223\"><u>\u0414\u0435\u043a\u043e\u0434\u0435\u0440<\/u><\/a> \u043f\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u043c\u0443 \u0438 \u0441\u0442\u0438\u043b\u044e \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435. \u041e\u043d \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0441\u0432\u0451\u0440\u0442\u043e\u043a \u0438 \u0438\u043d\u0442\u0435\u0440\u043f\u043e\u043b\u044f\u0446\u0438\u0438 (nearest-neighbor interpolation) \u0434\u043b\u044f \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u044f \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0438. \u0412\u043d\u0443\u0442\u0440\u0438 residual blocks \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f Adaptive Instance Normalization.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"AdaIN(z,\\gamma,\\beta) = \\gamma (\\frac{z-\\mu(z)}{\\sigma(z)}) + \\beta,\" alt=\"AdaIN(z,\\gamma,\\beta) = \\gamma (\\frac{z-\\mu(z)}{\\sigma(z)}) + \\beta,\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d55\/d13\/8e3\/d55d138e396003db532f4c34436f84a7.svg\" width=\"296\" height=\"51\"\/><\/p>\n<p>\u0433\u0434\u0435 z &#8212; \u044d\u0442\u043e \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u044f \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e \u0441\u0432\u0451\u0440\u0442\u043e\u0447\u043d\u043e\u0433\u043e \u0441\u043b\u043e\u044f, \u03bc \u0438 \u03c3 &#8212; \u044d\u0442\u043e channel-wise \u043c\u0430\u0442. \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u0435 \u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0435 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0435 \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0439, \u03b3 \u0438 \u03b2 &#8212; \u044d\u0442\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c\u044b\u0435 fully connected \u0441\u043b\u043e\u0435\u043c.<\/p>\n<p><a href=\"https:\/\/github.com\/NVlabs\/MUNIT\/blob\/a82e222bc359892bd0f522d7a0f1573f3ec4a485\/networks.py#L18\"><u>\u0414\u0438\u0441\u043a\u0440\u0438\u043c\u0438\u043d\u0430\u0442\u043e\u0440<\/u><\/a> &#8212; multi-scale \u0434\u0438\u0441\u043a\u0440\u0438\u043c\u0438\u043d\u0430\u0442\u043e\u0440 \u0441 LSGAN \u043b\u043e\u0441\u0441\u043e\u043c (\u0432 minimax game)<\/p>\n<h4>\u041f\u0440\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435<\/h4>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043a\u0430\u043a \u0438 \u0432 pix2pixHD \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f perceptual loss. \u041f\u0435\u0440\u0435\u0434 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435\u043c \u0434\u0438\u0441\u0442\u0430\u043d\u0446\u0438\u0438 \u043a \u044d\u043c\u0431\u044d\u0434\u0434\u0438\u043d\u0433\u0430\u043c \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f Instance Normalization, \u0447\u0442\u043e\u0431\u044b \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0441\u0442\u0438\u043b\u0435.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/559\/5d6\/6c4\/5595d66c4b99face208935a6aaefea4e.png\" alt=\"MUNIT \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0434\u0432\u0443\u0445 \u0430\u0432\u0442\u043e\u044d\u043d\u043a\u043e\u0434\u0435\u0440\u043e\u0432 (\u043a\u0440\u0430\u0441\u043d\u044b\u0435 \u0438 \u0441\u0438\u043d\u0438\u0435 \u0441\u0442\u0440\u0435\u043b\u043e\u0447\u043a\u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e)\" title=\"MUNIT \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0434\u0432\u0443\u0445 \u0430\u0432\u0442\u043e\u044d\u043d\u043a\u043e\u0434\u0435\u0440\u043e\u0432 (\u043a\u0440\u0430\u0441\u043d\u044b\u0435 \u0438 \u0441\u0438\u043d\u0438\u0435 \u0441\u0442\u0440\u0435\u043b\u043e\u0447\u043a\u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e)\" width=\"943\" height=\"632\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/559\/5d6\/6c4\/5595d66c4b99face208935a6aaefea4e.png\"\/><\/p>\n<div><figcaption>MUNIT \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0434\u0432\u0443\u0445 \u0430\u0432\u0442\u043e\u044d\u043d\u043a\u043e\u0434\u0435\u0440\u043e\u0432 (\u043a\u0440\u0430\u0441\u043d\u044b\u0435 \u0438 \u0441\u0438\u043d\u0438\u0435 \u0441\u0442\u0440\u0435\u043b\u043e\u0447\u043a\u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e)<\/figcaption><\/div>\n<\/figure>\n<p>MUNIT \u043e\u0431\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0438 \u043a\u0430\u043a \u0430\u0432\u0442\u043e\u044d\u043d\u043a\u043e\u0434\u0435\u0440 \u0438 \u043a\u0430\u043a GAN. \u0414\u043b\u044f \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0438\u0437 \u0434\u043e\u043c\u0435\u043d\u0430 \u0410 \u0432 B \u0438 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442 \u043e\u043d\u0438 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u044e\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 style \u0438 content \u044d\u043d\u043a\u043e\u0434\u0435\u0440. \u0423 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0434\u043e\u043c\u0435\u043d\u0430 \u0441\u0432\u043e\u0438 \u044d\u043d\u043a\u043e\u0434\u0435\u0440\u044b. \u0417\u0430\u0442\u0435\u043c, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0438\u0437 \u0434\u043e\u043c\u0435\u043d\u0430 B(\u04412 &#8212; \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435; s2 &#8212; \u0441\u0442\u0438\u043b\u044c), \u043d\u043e \u0441 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u044b\u043c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0438\u0437 \u0434\u043e\u043c\u0435\u043d\u0430 \u0410 (\u04411 &#8212; \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435; s1 &#8212; \u0441\u0442\u0438\u043b\u044c), \u043c\u044b \u0437\u0430\u043c\u0435\u043d\u044f\u0435\u043c s1 \u043d\u0430 s2 \u0438 \u043f\u0430\u0440\u0443 (\u04411, s2) \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0447\u0435\u0440\u0435\u0437 \u0434\u0435\u043a\u043e\u0434\u0435\u0440 \u0434\u043b\u044f \u0434\u043e\u043c\u0435\u043d\u0430 B. \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0434\u043b\u044f \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u0437 B \u0432 \u0410.<\/p>\n<p>\u0414\u043b\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f adversarial loss (minimax game), reconstruction loss (<em>cycle consistency losses<\/em>) \u0434\u043b\u044f \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439, \u043a\u0430\u043a \u0438 \u0432 \u0434\u0432\u0443\u0445 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u043c\u043e\u0434\u0435\u043b\u044f\u0445, \u0438 reconstruction loss \u0434\u043b\u044f \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e \u0438 \u0441\u0442\u0438\u043b\u044f.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\\min\\limits_{E_{1}, E_{2}, G_{1}, G_{2}} \\max\\limits_{D_{1}, D_{2}} \\mathcal{L}(E_{1}, E_{2}, G_{1}, G_{2}, D_{1}, D_{2}) =  \\mathcal{L}^{x_{1}}_{GAN} + \\mathcal{L}^{x_{2}}_{GAN} + \\lambda_{x}( \\mathcal{L}^{x_{1}}_{recon} +  \\mathcal{L}^{x_{2}}_{recon}) +  \\\\ \\lambda_{c}( \\mathcal{L}^{c_{1}}_{recon} +  \\mathcal{L}^{c_{2}}_{recon}) + \\lambda_{x}( \\mathcal{L}^{x_{1}}_{recon} + \\mathcal{L}^{x_{2}}_{recon})\" alt=\"\\min\\limits_{E_{1}, E_{2}, G_{1}, G_{2}} \\max\\limits_{D_{1}, D_{2}} \\mathcal{L}(E_{1}, E_{2}, G_{1}, G_{2}, D_{1}, D_{2}) =  \\mathcal{L}^{x_{1}}_{GAN} + \\mathcal{L}^{x_{2}}_{GAN} + \\lambda_{x}( \\mathcal{L}^{x_{1}}_{recon} +  \\mathcal{L}^{x_{2}}_{recon}) +  \\\\ \\lambda_{c}( \\mathcal{L}^{c_{1}}_{recon} +  \\mathcal{L}^{c_{2}}_{recon}) + \\lambda_{x}( \\mathcal{L}^{x_{1}}_{recon} + \\mathcal{L}^{x_{2}}_{recon})\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/1bd\/dd3\/d5f\/1bddd3d5f6ed472f085e2bdece0e2069.svg\" width=\"697\" height=\"63\"\/><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\" \\mathcal{L}^{x_{1}}_{recon} =\\mathbb{E}_{x_{1} \\sim p(x_{1})}[\\| G_{1}(E^{c}_{1}(x_{1}), E^{s}_{1}(x_{1})) - x_{1} \\|_{1}]\" alt=\" \\mathcal{L}^{x_{1}}_{recon} =\\mathbb{E}_{x_{1} \\sim p(x_{1})}[\\| G_{1}(E^{c}_{1}(x_{1}), E^{s}_{1}(x_{1})) - x_{1} \\|_{1}]\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d77\/fe8\/218\/d77fe82183186b926bfac98d677361d4.svg\" width=\"398\" height=\"25\"\/><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\" \\mathcal{L}^{c_{1}}_{recon} =\\mathbb{E}_{c_{1} \\sim p(c_{1}), s_{2} \\sim q(s_{2}))}[\\| E^c_{2}(G_{2}(c1, s2)) - c_{1} \\|_{1}]\" alt=\" \\mathcal{L}^{c_{1}}_{recon} =\\mathbb{E}_{c_{1} \\sim p(c_{1}), s_{2} \\sim q(s_{2}))}[\\| E^c_{2}(G_{2}(c1, s2)) - c_{1} \\|_{1}]\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/cd1\/ad9\/410\/cd1ad94107b3bc81ef526e82fd1f3885.svg\" width=\"412\" height=\"25\"\/><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\" \\mathcal{L}^{s_{2}}_{recon} =\\mathbb{E}_{c_{1} \\sim p(c_{1}), s_{2} \\sim q(s_{2}))}[\\| E^s_{2}(G_{2}(c1, s2)) - s_{2} \\|_{1}]\" alt=\" \\mathcal{L}^{s_{2}}_{recon} =\\mathbb{E}_{c_{1} \\sim p(c_{1}), s_{2} \\sim q(s_{2}))}[\\| E^s_{2}(G_{2}(c1, s2)) - s_{2} \\|_{1}]\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/521\/2d3\/b70\/5212d3b70deabeeee7973814b9d48894.svg\" width=\"413\" height=\"25\"\/><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\" \\mathcal{L}^{x_{2}}_{GAN} =\\mathbb{E}_{c_{1} \\sim p(c_{1}), s_{2} \\sim q(s_{2})}[log(1-D_{2}(G_{2}(c_{1}, s_{2})))] + \\mathbb{E}_{x_{2} \\sim p(x_{2})}[logD_{2}(x_{2})].\" alt=\" \\mathcal{L}^{x_{2}}_{GAN} =\\mathbb{E}_{c_{1} \\sim p(c_{1}), s_{2} \\sim q(s_{2})}[log(1-D_{2}(G_{2}(c_{1}, s_{2})))] + \\mathbb{E}_{x_{2} \\sim p(x_{2})}[logD_{2}(x_{2})].\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/bb2\/675\/7bf\/bb26757bf4221441ff99ecad2cb65c83.svg\" width=\"608\" height=\"25\"\/><\/p>\n<h2>\u0427\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0443 \u043d\u0430\u0441<\/h2>\n<p>\u0418 \u0442\u0430\u043a \u043c\u044b \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0438 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435, \u043d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b \u0432 image-to-image translation, \u0430 \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u043d\u0435 \u0431\u044b \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0437\u0430\u0447\u0435\u043c \u043c\u044b \u044d\u0442\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u043b\u0438 \u0443 \u0441\u0435\u0431\u044f \u0438 \u043a\u0430\u043a \u044d\u0442\u043e \u043d\u0430\u043c \u043f\u043e\u043c\u043e\u0433\u043b\u043e.<\/p>\n<h3>\u0414\u043b\u044f \u0447\u0435\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c<\/h3>\n<p>\u041d\u0435\u0440\u0435\u0434\u043a\u043e \u0443 \u043d\u0430\u0441 \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0437\u0430\u0434\u0430\u0447\u0430 &#8212; \u043e\u0431\u0443\u0447\u0438\u0442\u044c Unet\/LinkNet \u043c\u043e\u0434\u0435\u043b\u044c, \u0447\u0442\u043e\u0431\u044b \u0442\u043e\u0447\u043d\u043e \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u0438\u0445 \u0440\u0430\u0437\u043c\u0435\u0440\u044b. \u0420\u0430\u0437\u043c\u0435\u0442\u043a\u0430 \u0442\u0430\u043a\u0438\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u043a\u0440\u0430\u0439\u043d\u0435 \u043a\u0440\u043e\u043f\u043e\u0442\u043b\u0438\u0432\u043e\u0435 \u0437\u0430\u043d\u044f\u0442\u0438\u0435, \u0430 \u043d\u043e\u0432\u044b\u0435 \u0434\u043e\u043c\u0435\u043d\u044b \u043c\u043e\u0433\u0443\u0442 \u0441\u0438\u043b\u044c\u043d\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u0442\u0435\u0445, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u043c\u044b \u0443\u0436\u0435 \u0443\u043c\u0435\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f22\/353\/4b2\/f223534b2b6710e48727eb7177743960.png\" alt=\"\u0420\u0443\u0434\u0430 \u043d\u0430 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0435\" title=\"\u0420\u0443\u0434\u0430 \u043d\u0430 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0435\" width=\"1600\" height=\"1171\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f22\/353\/4b2\/f223534b2b6710e48727eb7177743960.png\"\/><\/p>\n<div><figcaption>\u0420\u0443\u0434\u0430 \u043d\u0430 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0435<\/figcaption><\/div>\n<\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/04e\/f5e\/f6c\/04ef5ef6cb8e80375862ec84192cd2b0.png\" alt=\"\u0424\u043b\u043e\u0442\u0430\u0446\u0438\u044f\" title=\"\u0424\u043b\u043e\u0442\u0430\u0446\u0438\u044f\" width=\"800\" height=\"600\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/04e\/f5e\/f6c\/04ef5ef6cb8e80375862ec84192cd2b0.png\"\/><\/p>\n<div><figcaption>\u0424\u043b\u043e\u0442\u0430\u0446\u0438\u044f<\/figcaption><\/div>\n<\/figure>\n<p>\u041a\u0430\u043a \u0432\u0430\u0440\u0438\u0430\u043d\u0442, \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c <a href=\"https:\/\/habr.com\/ru\/company\/vk\/blog\/426803\/\"><u>Domain Adaptation \u043c\u0435\u0442\u043e\u0434\u044b<\/u><\/a> (DA), \u043d\u043e \u0438\u043d\u043e\u0433\u0434\u0430 \u0434\u043e\u043c\u0435\u043d\u044b \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0441\u0438\u043b\u044c\u043d\u043e, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0440\u0443\u0434\u0430 \u0438 \u043f\u0443\u0437\u044b\u0440\u0438. \u0412 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 DA \u043d\u0435 \u043f\u043e\u043c\u043e\u0436\u0435\u0442. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u0437\u0430\u0445\u043e\u0442\u0435\u043b\u0438 \u043d\u0430\u0443\u0447\u0438\u0442\u044c\u0441\u044f \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0438\u043d\u0442\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043f\u043e \u0431\u0438\u043d\u0430\u0440\u043d\u043e\u0439 \u043c\u0430\u0441\u043a\u0435, \u0438\u043c\u0435\u044f \u0432\u0441\u0435\u0433\u043e \u043b\u0438\u0448\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0440\u0430\u0437\u043c\u0435\u0447\u0435\u043d\u043d\u044b\u0445 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 (~ 100).<\/p>\n<h3>\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043c\u0430\u0441\u043e\u043a<\/h3>\n<p>\u0414\u043e \u0441\u0438\u0445 \u043f\u043e\u0440 \u043c\u044b \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u043b\u0438 \u043f\u0440\u043e \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044e \u0441\u0430\u043c\u0438\u0445 \u043c\u0430\u0441\u043e\u043a, \u0445\u043e\u0442\u044f \u044d\u0442\u043e \u0442\u043e\u0436\u0435 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0432\u0430\u0436\u043d\u044b\u0439 \u044d\u0442\u0430\u043f \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u044b\u0445 \u0438 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439.<\/p>\n<p>\u041c\u044b \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b\u0438 \u043e\u0431\u0443\u0447\u0438\u0442\u044c <a href=\"https:\/\/arxiv.org\/abs\/1710.10196\"><u>ProgressiveGAN<\/u><\/a>, \u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u043f\u043b\u043e\u0445\u043e. \u0412 \u043c\u0430\u0441\u043a\u0430\u0445 \u0431\u044b\u043b\u043e \u043c\u0430\u043b\u043e \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u0438\u044f.<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/1da\/a09\/903\/1daa099034a57a9ca9f3cf0ce6dd3ff7.png\" alt=\"\u041f\u0440\u0438\u043c\u0435\u0440 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043c\u0430\u0441\u043e\u043a ProgressiveGAN\" title=\"\u041f\u0440\u0438\u043c\u0435\u0440 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043c\u0430\u0441\u043e\u043a ProgressiveGAN\" width=\"509\" height=\"251\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/1da\/a09\/903\/1daa099034a57a9ca9f3cf0ce6dd3ff7.png\"\/><\/p>\n<div><figcaption>\u041f\u0440\u0438\u043c\u0435\u0440 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043c\u0430\u0441\u043e\u043a ProgressiveGAN<\/figcaption><\/div>\n<\/figure>\n<p>\u041d\u0430\u0438\u043b\u0443\u0447\u0448\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438\u0441\u044c \u0441 \u043c\u0430\u0441\u043a\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u043c\u043e\u0434\u0435\u043b\u0438, \u0438 \u0441 \u0440\u0430\u043d\u0434\u043e\u043c\u043d\u043e \u0440\u0430\u0441\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u043c\u0438 \u043f\u043e \u043f\u0443\u0441\u0442\u043e\u043c\u0443 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044e \u043c\u0430\u0441\u043a\u0430\u043c\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 (\u0438\u0437 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u043d\u0430\u0431\u043e\u0440\u0430).<\/p>\n<h3>\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u043f\u043e \u043c\u0430\u0441\u043a\u0430\u043c<\/h3>\n<p>\u041c\u044b \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b\u0438 \u0432\u0441\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u043d\u043d\u044b\u0435 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b \u0438 \u043d\u0430\u0438\u043b\u0443\u0447\u0448\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0438 SPADE (\u0441\u0440\u0435\u0434\u0438 supervised \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440) \u0438 UGATIT (\u0441\u0440\u0435\u0434\u0438 unsupervised).<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/80f\/d56\/92a\/80fd5692a337b8c9a02b84618f997da2.png\" alt=\"\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 SPADE \u043d\u0430 \u043f\u043b\u043e\u0442\u043d\u043e\u0439 \u043c\u0430\u0441\u043a\u0435\" title=\"\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 SPADE \u043d\u0430 \u043f\u043b\u043e\u0442\u043d\u043e\u0439 \u043c\u0430\u0441\u043a\u0435\" width=\"1021\" height=\"507\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/80f\/d56\/92a\/80fd5692a337b8c9a02b84618f997da2.png\"\/><\/p>\n<div><figcaption>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 SPADE \u043d\u0430 \u043f\u043b\u043e\u0442\u043d\u043e\u0439 \u043c\u0430\u0441\u043a\u0435<\/figcaption><\/div>\n<\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/876\/3f3\/062\/8763f30625af30c6c6f55c13d6073f1f.png\" alt=\"\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 SPADE \u043d\u0430 \u0440\u0430\u0437\u0440\u044f\u0436\u0451\u043d\u043d\u043e\u0439 \u043c\u0430\u0441\u043a\u0435 (\u043d\u0430 \u0447\u0451\u0440\u043d\u043e\u043c \u0444\u043e\u043d\u0435 \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u044b)\" title=\"\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 SPADE \u043d\u0430 \u0440\u0430\u0437\u0440\u044f\u0436\u0451\u043d\u043d\u043e\u0439 \u043c\u0430\u0441\u043a\u0435 (\u043d\u0430 \u0447\u0451\u0440\u043d\u043e\u043c \u0444\u043e\u043d\u0435 \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u044b)\" width=\"1022\" height=\"502\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/876\/3f3\/062\/8763f30625af30c6c6f55c13d6073f1f.png\"\/><\/p>\n<div><figcaption>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 SPADE \u043d\u0430 \u0440\u0430\u0437\u0440\u044f\u0436\u0451\u043d\u043d\u043e\u0439 \u043c\u0430\u0441\u043a\u0435 (\u043d\u0430 \u0447\u0451\u0440\u043d\u043e\u043c \u0444\u043e\u043d\u0435 \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u044b)<\/figcaption><\/div>\n<\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/887\/a05\/013\/887a05013922622e5ff2484ed20b96e5.png\" alt=\"\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 SPADE; \u0441\u043b\u0435\u0432\u0430 - \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043c\u0430\u0441\u043a\u0430, \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f UNet; \u0432 \u0446\u0435\u043d\u0442\u0440\u0435 - \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435; \u0441\u043f\u0440\u0430\u0432\u0430 - \u0441\u0438\u043d\u0442\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435; \u0417\u0434\u0435\u0441\u044c \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0441\u0438\u043d\u0442\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0440\u0435\u0430\u043b\u0438\u0441\u0442\u0438\u0447\u043d\u043e \u0438, \u043f\u043b\u044e\u0441 \u043a \u044d\u0442\u043e\u043c\u0443, \u043e\u043d\u043e \u043b\u0443\u0447\u0448\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043c\u0430\u0441\u043a\u0435, \u0447\u0435\u043c \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0435\" title=\"\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 SPADE; \u0441\u043b\u0435\u0432\u0430 - \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043c\u0430\u0441\u043a\u0430, \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f UNet; \u0432 \u0446\u0435\u043d\u0442\u0440\u0435 - \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435; \u0441\u043f\u0440\u0430\u0432\u0430 - \u0441\u0438\u043d\u0442\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435; \u0417\u0434\u0435\u0441\u044c \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0441\u0438\u043d\u0442\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0440\u0435\u0430\u043b\u0438\u0441\u0442\u0438\u0447\u043d\u043e \u0438, \u043f\u043b\u044e\u0441 \u043a \u044d\u0442\u043e\u043c\u0443, \u043e\u043d\u043e \u043b\u0443\u0447\u0448\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043c\u0430\u0441\u043a\u0435, \u0447\u0435\u043c \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0435\" width=\"1535\" height=\"505\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/887\/a05\/013\/887a05013922622e5ff2484ed20b96e5.png\"\/><\/p>\n<div><figcaption>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 SPADE; \u0441\u043b\u0435\u0432\u0430 &#8212; \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043c\u0430\u0441\u043a\u0430, \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f UNet; \u0432 \u0446\u0435\u043d\u0442\u0440\u0435 &#8212; \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435; \u0441\u043f\u0440\u0430\u0432\u0430 &#8212; \u0441\u0438\u043d\u0442\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435; \u0417\u0434\u0435\u0441\u044c \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0441\u0438\u043d\u0442\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0440\u0435\u0430\u043b\u0438\u0441\u0442\u0438\u0447\u043d\u043e \u0438, \u043f\u043b\u044e\u0441 \u043a \u044d\u0442\u043e\u043c\u0443, \u043e\u043d\u043e \u043b\u0443\u0447\u0448\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043c\u0430\u0441\u043a\u0435, \u0447\u0435\u043c \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0435<\/figcaption><\/div>\n<\/figure>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/702\/bf3\/038\/702bf30384f46a32d9f238bb067ba4c8.png\" alt=\"\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 UGATIT \u043d\u0430 \u043f\u043b\u043e\u0442\u043d\u043e\u0439 \u043c\u0430\u0441\u043a\u0435\" title=\"\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 UGATIT \u043d\u0430 \u043f\u043b\u043e\u0442\u043d\u043e\u0439 \u043c\u0430\u0441\u043a\u0435\" width=\"508\" height=\"252\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/702\/bf3\/038\/702bf30384f46a32d9f238bb067ba4c8.png\"\/><\/p>\n<div><figcaption>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 UGATIT \u043d\u0430 \u043f\u043b\u043e\u0442\u043d\u043e\u0439 \u043c\u0430\u0441\u043a\u0435<\/figcaption><\/div>\n<\/figure>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/1cd\/f5b\/afc\/1cdf5bafc2affd3a48c1ff6d56ecec04.png\" alt=\"\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 UGATIT \u043d\u0430 \u0440\u0430\u0437\u0440\u044f\u0436\u0451\u043d\u043d\u043e\u0439 \u043c\u0430\u0441\u043a\u0435\" title=\"\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 UGATIT \u043d\u0430 \u0440\u0430\u0437\u0440\u044f\u0436\u0451\u043d\u043d\u043e\u0439 \u043c\u0430\u0441\u043a\u0435\" width=\"512\" height=\"256\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/1cd\/f5b\/afc\/1cdf5bafc2affd3a48c1ff6d56ecec04.png\"\/><\/p>\n<div><figcaption>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 UGATIT \u043d\u0430 \u0440\u0430\u0437\u0440\u044f\u0436\u0451\u043d\u043d\u043e\u0439 \u043c\u0430\u0441\u043a\u0435<\/figcaption><\/div>\n<\/figure>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043c\u044b \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u043d\u0430\u0431\u043e\u0440 \u0441\u0438\u043d\u0442\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 (\u043f\u043e\u0440\u044f\u0434\u043a\u0430 10 000 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439), \u043f\u0440\u0435\u043e\u0434\u043e\u0431\u0443\u0447\u0438\u043b\u0438 UNet \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0430 \u043d\u0438\u0445, \u0430 \u0437\u0430\u0442\u0435\u043c \u0434\u043e\u043e\u0431\u0443\u0447\u0438\u043b\u0438 \u043d\u0430 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u042d\u0442\u043e \u0434\u0430\u043b\u043e ~1-2% \u043f\u0440\u0438\u0440\u043e\u0441\u0442\u0430 \u0432 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u043f\u043e \u043c\u0435\u0442\u0440\u0438\u043a\u0430\u043c precision, recall (\u0434\u043b\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432, \u043d\u0435 \u0434\u043b\u044f \u043f\u0438\u043a\u0441\u0435\u043b\u0435\u0439) \u043f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 \u043c\u043e\u0434\u0435\u043b\u044c\u044e, \u043e\u0431\u0443\u0447\u0435\u043d\u043d\u043e\u0439 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>\u0413\u0435\u043d\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0435 \u0441\u0435\u0442\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043b\u0438\u0431\u043e \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0430\u0443\u0433\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438. \u0421\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435, \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043f\u0430\u0440\u044b\u00a0 &#8212; \u043c\u0430\u0441\u043a\u0430 \u0438 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 &#8212; \u043b\u0443\u0447\u0448\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u0434\u0440\u0443\u0433 \u0434\u0440\u0443\u0433\u0443, \u0447\u0435\u043c \u043f\u0430\u0440\u0430 &#8212; \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0438 \u043c\u0430\u0441\u043a\u0430, \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u044c\u044e. \u041d\u043e \u0441\u043e\u0432\u0441\u0435\u043c \u0431\u0435\u0437 \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0438 \u043d\u0435 \u043e\u0431\u043e\u0439\u0442\u0438\u0441\u044c.<\/p>\n<p>\u041a\u0430\u0447\u0435\u0441\u0442\u0432\u043e unsupervised \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0441\u0438\u043b\u044c\u043d\u043e \u043d\u0438\u0436\u0435 supervised. \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u0436\u0435 \u0445\u043e\u0442\u044c \u0438 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u044e\u0442 \u0440\u0435\u0430\u043b\u0438\u0441\u0442\u0438\u0447\u043d\u044b\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f, \u043d\u043e \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u044b\u0435.<\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0441\u0442\u043e\u0438\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0438 \u0443 supervised \u0438 \u0443 unsupervised \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440 \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u044b \u043d\u0430 \u0440\u0430\u0437\u0440\u044f\u0436\u0451\u043d\u043d\u044b\u0445 \u043c\u0430\u0441\u043a\u0430\u0445.<\/p>\n<h2>To be discussed<\/h2>\n<p>\u0410 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u043b\u0438 \u0412\u044b \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0435 \u0441\u0435\u0442\u0438 \u0443 \u0441\u0435\u0431\u044f \u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0435? \u0418 \u0435\u0441\u043b\u0438 \u0434\u0430, \u0442\u043e \u043a\u0430\u043a\u0438\u0435 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b?<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \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\/articles\/676296\/\"> https:\/\/habr.com\/ru\/articles\/676296\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><\/figure>\n<p>\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440! \u042f \u0440\u0430\u0431\u043e\u0442\u0430\u044e \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u043e\u043c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043d\u043e\u0433\u043e \u0437\u0440\u0435\u043d\u0438\u044f \u0432 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u0438\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u043b\u043b\u0435\u043a\u0442\u0430 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u041d\u043e\u0440\u043d\u0438\u043a\u0435\u043b\u044c. \u041c\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u0438 \u0432\u043d\u0435\u0434\u0440\u044f\u0435\u043c \u043c\u043e\u0434\u0435\u043b\u0438 \u0441 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043d\u0430 \u043d\u0430\u0448\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u043f\u043b\u043e\u0449\u0430\u0434\u043a\u0438.<\/p>\n<p>\u0412 \u0441\u043a\u043e\u0443\u043f \u043d\u0430\u0448\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442 \u043a\u0430\u043a \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0435 (\u0438\u043b\u0438 \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0435) \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u043c (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0444\u043b\u043e\u0442\u0430\u0446\u0438\u044f \u0438\u043b\u0438 \u043f\u043b\u0430\u0432\u043a\u0430), \u0442\u0430\u043a \u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043f\u0440\u043e\u043c\u044b\u0448\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u0437\u0440\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e \u0441\u0443\u0442\u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0438\u0437 \u0441\u0435\u0431\u044f \u043e\u0434\u043d\u0443 \u0438\u0437 \u0440\u0430\u0437\u043d\u043e\u0432\u0438\u0434\u043d\u043e\u0441\u0442\u0435\u0439 \u0434\u0430\u0442\u0447\u0438\u043a\u043e\u0432.<\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043f\u0440\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u0441\u0435\u0442\u0435\u0439 \u0434\u043b\u044f \u0437\u0430\u0434\u0430\u0447\u0438 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0438\u0437 \u043e\u0434\u043d\u043e\u0433\u043e \u0434\u043e\u043c\u0435\u043d\u0430 \u0432 \u0434\u0440\u0443\u0433\u043e\u0439 (image-to-image translation). \u0412 \u043a\u043e\u043d\u0446\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443, \u0434\u043b\u044f \u0447\u0435\u0433\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u043c\u044b \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c \u0441\u0438\u043d\u0442\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0430\u043c \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0434\u043e\u0441\u0442\u0438\u0447\u044c. \u041d\u043e \u043f\u0435\u0440\u0435\u0434 \u043f\u043e\u0433\u0440\u0443\u0436\u0435\u043d\u0438\u0435\u043c \u0432 \u0434\u0430\u043d\u043d\u0443\u044e \u0442\u0435\u043c\u0443 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 <a href=\"https:\/\/habr.com\/ru\/post\/348000\/\"><u>\u0441\u0432\u0451\u0440\u0442\u043e\u0447\u043d\u0430\u044f \u0441\u0435\u0442\u044c<\/u><\/a>, <a href=\"https:\/\/arxiv.org\/abs\/1505.04597\"><u>U-Net<\/u><\/a> \u0438 <a href=\"https:\/\/habr.com\/ru\/post\/332000\/\"><u>\u0433\u0435\u043d\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u0430\u044f \u0441\u0435\u0442\u044c<\/u><\/a>. \u0415\u0441\u043b\u0438 \u0436\u0435 \u0412\u044b \u0433\u043e\u0442\u043e\u0432\u044b, \u043f\u043e\u0435\u0445\u0430\u043b\u0438.<\/p>\n<p>\u041a\u0430\u0436\u0434\u043e\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u0432 \u0442\u043e\u0439 \u0438\u043b\u0438 \u0438\u043d\u043e\u0439 \u0441\u0442\u0435\u043f\u0435\u043d\u0438 \u0438\u043d\u0434\u0438\u0432\u0438\u0434\u0443\u0430\u043b\u044c\u043d\u043e. \u041a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u043d\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u043f\u043b\u043e\u0449\u0430\u0434\u043a\u0430\u0445 \u043c\u043e\u0433\u0443\u0442 \u0441\u0438\u043b\u044c\u043d\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u0440\u0435\u043c\u044f, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0443\u0445\u043e\u0434\u0438\u0442 \u043d\u0430 \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0443 \u0434\u0430\u043d\u043d\u044b\u0445. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u043f\u043e \u0431\u0438\u043d\u0430\u0440\u043d\u043e\u0439 \u043c\u0430\u0441\u043a\u0435.<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0421\u043b\u0435\u0432\u0430 &#8212; \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440 \u0441 \u0434\u0440\u043e\u0431\u043b\u0451\u043d\u044b\u043c \u0444\u0430\u0439\u043d\u0448\u0442\u0435\u0439\u043d\u043e\u043c, \u0441\u043f\u0440\u0430\u0432\u0430 &#8212; \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043c\u0430\u0441\u043a\u0430<\/figcaption><\/div>\n<\/figure>\n<p>\u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u043d\u0430 2 \u0442\u0438\u043f\u0430: supervised \u0438 unsupervised. \u0414\u043b\u044f supervised \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u0432\u0445\u043e\u0434\u043d\u0430\u044f \u043c\u0430\u0441\u043a\u0430 \u0438 \u0446\u0435\u043b\u0435\u0432\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0434\u0440\u0443\u0433 \u0434\u0440\u0443\u0433\u0443, \u043a\u0430\u043a \u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435 \u0432\u044b\u0448\u0435. \u0414\u043b\u044f unsupervised \u0442\u0430\u043a\u043e\u0433\u043e \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f. \u0412 \u043e\u0431\u043e\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \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\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u043b\u043e\u0441\u044c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043c\u0430\u0441\u043a\u0438 (\u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432), \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0441\u0442\u0438\u043b\u044c \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u043b \u0441 \u0446\u0435\u043b\u0435\u0432\u044b\u043c.<\/p>\n<h2>Supervised image-to-image translation<\/h2>\n<h3>pix2pix<\/h3>\n<p>[<a href=\"https:\/\/arxiv.org\/abs\/1611.07004\"><u>\u0421\u0442\u0430\u0442\u044c\u044f<\/u><\/a>, <a href=\"https:\/\/github.com\/junyanz\/pytorch-CycleGAN-and-pix2pix\"><u>\u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f<\/u><\/a>]<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u041e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 pix2pix<\/figcaption><\/div>\n<\/figure>\n<h4>\u041f\u0440\u043e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443<\/h4>\n<p>\u0413\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 U-Net \u043f\u043e\u0434\u043e\u0431\u043d\u0443\u044e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443, \u043d\u0430 \u0432\u0445\u043e\u0434 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u043e\u0434\u0430\u0451\u0442\u0441\u044f \u0431\u0438\u043d\u0430\u0440\u043d\u0430\u044f \u043c\u0430\u0441\u043a\u0430. \u0414\u0438\u0441\u043a\u0440\u0438\u043c\u0438\u043d\u0430\u0442\u043e\u0440 &#8212; \u044d\u0442\u043e \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0442\u0438\u043f\u0430 PatchGAN, \u043d\u0430 \u0432\u0445\u043e\u0434 \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043f\u043e\u0434\u0430\u044e\u0442\u0441\u044f \u0431\u0438\u043d\u0430\u0440\u043d\u0430\u044f \u043c\u0430\u0441\u043a\u0430 \u0438 \u0446\u0435\u043b\u0435\u0432\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435.<\/p>\n<p>\u041a\u0430\u043a \u0438 \u0432 \u0437\u0430\u0434\u0430\u0447\u0435 \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438, \u0432 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u043d\u0443\u0436\u043d\u044b skip connections \u0438\u0437 \u044d\u043d\u043a\u043e\u0434\u0435\u0440 \u0431\u043b\u043e\u043a\u043e\u0432 \u0432 \u0434\u0435\u043a\u043e\u0434\u0435\u0440 \u0431\u043b\u043e\u043a\u0438. \u041d\u043e \u0435\u0441\u0442\u044c \u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0442\u043b\u0438\u0447\u0438\u044f \u043e\u0442 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440 \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438.<\/p>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0440\u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0438 \u0413\u0410\u041d\u043e\u0432 \u0434\u043b\u044f \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u044f \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0438 <a href=\"https:\/\/arxiv.org\/abs\/1511.06434\"><u>\u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f<\/u><\/a> \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 max pooling \u043d\u0430 \u0441\u0432\u0451\u0440\u0442\u043a\u0438 \u0441\u043e \u0441\u0442\u0440\u0430\u0439\u0434\u043e\u043c. \u0410 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0433\u0438\u043f\u0435\u0440\u0431\u043e\u043b\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0442\u0430\u043d\u0433\u0435\u043d\u0441, \u0442.\u043a. \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043c\u044b \u0437\u0430\u0442\u0435\u043c \u043f\u043e\u0434\u0430\u0451\u043c \u043d\u0430 \u0432\u0445\u043e\u0434 \u0434\u0438\u0441\u043a\u0440\u0438\u043c\u0438\u043d\u0430\u0442\u043e\u0440\u0443, \u0442.\u0435. \u043c\u0430\u0442. \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u0435 \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u043d\u0443\u043b\u0435\u0432\u044b\u043c, \u0430 \u0434\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u044f \u0435\u0434\u0438\u043d\u0438\u0447\u043d\u043e\u0439.<\/p>\n<p>PatchGAN &#8212; \u044d\u0442\u043e \u0441\u0432\u0451\u0440\u0442\u043e\u0447\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u0435\u0442 \u043a\u0430\u0436\u0434\u044b\u0439 \u043f\u0430\u0442\u0447 (\u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u043b\u0438 \u0444\u0435\u0439\u043a\u043e\u0432\u044b\u0439). \u0420\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043e \u044d\u0442\u043e <a href=\"https:\/\/github.com\/junyanz\/pytorch-CycleGAN-and-pix2pix\/blob\/master\/models\/networks.py#L538\">\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c<\/a>.<\/p>\n<details class=\"spoiler\">\n<summary>NLayerDiscriminator<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">import functools  import torch.nn as nn   class NLayerDiscriminator(nn.Module):     \"\"\"Defines a PatchGAN discriminator\"\"\"      def __init__(self, input_nc, ndf=64, n_layers=3, norm_layer=nn.BatchNorm2d):         \"\"\"Construct a PatchGAN discriminator         Parameters:             input_nc (int)  -- the number of channels in input images             ndf (int)       -- the number of filters in the last conv layer             n_layers (int)  -- the number of conv layers in the discriminator             norm_layer      -- normalization layer         \"\"\"         super(NLayerDiscriminator, self).__init__()         if type(norm_layer) == functools.partial:  # no need to use bias as BatchNorm2d has affine parameters             use_bias = norm_layer.func == nn.InstanceNorm2d         else:             use_bias = norm_layer == nn.InstanceNorm2d          kw = 4         padw = 1         sequence = [nn.Conv2d(input_nc, ndf, kernel_size=kw, stride=2, padding=padw), nn.LeakyReLU(0.2, True)]         nf_mult = 1         nf_mult_prev = 1         for n in range(1, n_layers):  # gradually increase the number of filters             nf_mult_prev = nf_mult             nf_mult = min(2 ** n, 8)             sequence += [                 nn.Conv2d(ndf * nf_mult_prev, ndf * nf_mult, kernel_size=kw, stride=2, padding=padw, bias=use_bias),                 norm_layer(ndf * nf_mult),                 nn.LeakyReLU(0.2, True)             ]          nf_mult_prev = nf_mult         nf_mult = min(2 ** n_layers, 8)         sequence += [             nn.Conv2d(ndf * nf_mult_prev, ndf * nf_mult, kernel_size=kw, stride=1, padding=padw, bias=use_bias),             norm_layer(ndf * nf_mult),             nn.LeakyReLU(0.2, True)         ]          sequence += [nn.Conv2d(ndf * nf_mult, 1, kernel_size=kw, stride=1, padding=padw)]  # output 1 channel prediction map         self.model = nn.Sequential(*sequence)      def forward(self, input):         \"\"\"Standard forward.\"\"\"         return self.model(input)       <\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0412 \u0434\u0438\u0441\u043a\u0440\u0438\u043c\u0438\u043d\u0430\u0442\u043e\u0440\u0435 ReLU \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438 \u0437\u0430\u043c\u0435\u043d\u0435\u043d\u044b \u043d\u0430 LeakyRELU, \u0443\u0434\u0430\u043b\u0435\u043d\u044b \u0432\u0441\u0435 fully connected \u0441\u043b\u043e\u0438, \u0430 \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u043d\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u043e\u0439 \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438, \u0442.\u0435. \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043d\u0438\u0447\u0435\u043c \u043d\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u044b. <em>\u0422\u0435\u043e\u0440\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a gradient explosion, \u043e\u0434\u043d\u0430\u043a\u043e \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e.<\/em><\/p>\n<h4>\u041f\u0440\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u0438 \u0431\u043e\u0440\u044c\u0431\u0443 \u0441 \u0437\u0430\u0442\u0443\u0445\u0430\u043d\u0438\u0435\u043c \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u043e\u0432<\/h4>\n<p>\u041c\u043e\u0434\u0435\u043b\u0438 \u043e\u0431\u0443\u0447\u0430\u044e\u0442\u0441\u044f \u0432 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e-\u0441\u043e\u0441\u0442\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435. \u0422.\u0435. \u0446\u0435\u043b\u044c \u0434\u0438\u0441\u043a\u0440\u0438\u043c\u0438\u043d\u0430\u0442\u043e\u0440\u0430 &#8212; \u043d\u0430\u0443\u0447\u0438\u0442\u044c\u0441\u044f \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043e\u0442 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445, \u0446\u0435\u043b\u044c \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 &#8212; \u043d\u0430\u0443\u0447\u0438\u0442\u044c\u0441\u044f \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u0438\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f, \u0447\u0442\u043e \u0434\u0438\u0441\u043a\u0440\u0438\u043c\u0438\u043d\u0430\u0442\u043e\u0440 \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u0442 \u0438\u0445 \u043e\u0442\u043b\u0438\u0447\u0438\u0442\u044c \u043e\u0442 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445.<\/p>\n<p>\u0422\u0430\u043a\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f minimax game. \u0412 \u044d\u0442\u043e\u0439 \u0438\u0433\u0440\u0435 \u0434\u0438\u0441\u043a\u0440\u0438\u043c\u0438\u043d\u0430\u0442\u043e\u0440 \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u043a\u0440\u043e\u0441\u0441-\u044d\u043d\u0442\u0440\u043e\u043f\u0438\u044e \u043c\u0435\u0436\u0434\u0443 \u0446\u0435\u043b\u0435\u0432\u044b\u043c \u043a\u043b\u0430\u0441\u0441\u043e\u043c \u0438 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u043c \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435\u043c \u0430 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442 \u043c\u0430\u043a\u0441\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u043a\u0440\u043e\u0441\u0441-\u044d\u043d\u0442\u0440\u043e\u043f\u0438\u044e. \u042d\u0442\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u0442\u043e\u043c\u0443, \u0447\u0442\u043e, \u043a\u043e\u0433\u0434\u0430 \u0434\u0438\u0441\u043a\u0440\u0438\u043c\u0438\u043d\u0430\u0442\u043e\u0440 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u043e \u043e\u0442\u043a\u043b\u043e\u043d\u044f\u0435\u0442 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f, \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u044b \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 <a href=\"https:\/\/arxiv.org\/abs\/1701.00160\"><u>\u0437\u0430\u0442\u0443\u0445\u0430\u044e\u0442<\/u><\/a>.<\/p>\n<p>\u041e\u0434\u0438\u043d \u0438\u0437 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u0434\u043b\u044f \u0431\u043e\u0440\u044c\u0431\u044b \u0441 \u0437\u0430\u0442\u0443\u0445\u0430\u043d\u0438\u0435\u043c \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u043e\u0432 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 &#8212; non-saturating game, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u044b\u043b <a href=\"https:\/\/arxiv.org\/abs\/1701.00160\"><u>\u043d\u0430\u0439\u0434\u0435\u043d<\/u><\/a> \u044d\u0432\u0440\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043f\u0443\u0442\u0451\u043c:<\/p>\n<p>\u0412\u043c\u0435\u0441\u0442\u043e \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438<\/p>\n<p> \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u043c\u0430\u043a\u0441\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u0435\u043c <\/p>\n<p>\u0410\u0432\u0442\u043e\u0440\u044b pix2pix \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 non-saturating game.<\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043e\u043d\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442 \u043a \u043b\u043e\u0441\u0441-\u0444\u0443\u043d\u043a\u0446\u0438\u0438 (L2 loss \u0434\u0430\u0451\u0442 \u0431\u043e\u043b\u0435\u0435 \u0440\u0430\u0437\u043c\u044b\u0442\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b):<\/p>\n<p>\u0418 L1 \u0438 L2 loss \u043c\u0435\u0436\u0434\u0443 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u043c \u0438 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0445\u043e\u0440\u043e\u0448\u043e \u0443\u043b\u0430\u0432\u043b\u0438\u0432\u0430\u044e\u0442 \u043d\u0438\u0437\u043a\u043e\u0447\u0430\u0441\u0442\u043e\u0442\u043d\u044b\u0435 \u0434\u0435\u0442\u0430\u043b\u0438, \u043d\u043e \u043d\u0435 \u0432\u044b\u0441\u043e\u043a\u043e\u0447\u0430\u0441\u0442\u043e\u0442\u043d\u044b\u0435 \u0434\u0435\u0442\u0430\u043b\u0438.<\/p>\n<figure class=\"full-width\">\n<div><figcaption>cGAN &#8212; non-saturating game; L1 &#8212; minimax game + L1 loss between real and fake images<\/figcaption><\/div>\n<\/figure>\n<p>\u0414\u043b\u044f \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u044f \u0444\u043e\u043a\u0443\u0441\u0430 \u043d\u0430 \u0432\u044b\u0441\u043e\u043a\u043e\u0447\u0430\u0441\u0442\u043e\u0442\u043d\u044b\u0445 \u0434\u0435\u0442\u0430\u043b\u044f\u0445, \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443 \u0434\u0435\u043b\u044f\u0442 \u043d\u0430 \u043f\u0430\u0442\u0447\u0438, \u043a\u0430\u043a \u044d\u0442\u043e \u0438 \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u0432 PatchGAN.<\/p>\n<p>\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 pix2pix \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u0434\u043b\u044f supervised image-to-image translation. Pix2pixHD \u0438 SPADE, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0434\u0430\u043b\u044c\u0448\u0435, \u0443\u043b\u0443\u0447\u0448\u0430\u044e\u0442 \u0435\u0451 \u0438\u0434\u0435\u0438.<\/p>\n<h3>pix2pixHD<\/h3>\n<p>[<a href=\"https:\/\/arxiv.org\/abs\/1711.11585\"><u>\u0421\u0442\u0430\u0442\u044c\u044f<\/u><\/a>, <a href=\"https:\/\/github.com\/NVIDIA\/pix2pixHD\"><u>\u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f<\/u><\/a>]<\/p>\n<p>\u0414\u0430\u043d\u043d\u0430\u044f \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430, \u043a\u0430\u043a \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0438\u0437 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f, \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0430 \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u0431\u043e\u043b\u0435\u0435 \u0432\u044b\u0441\u043e\u043a\u043e\u0433\u043e \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f, \u0447\u0435\u043c \u0435\u0451 \u043f\u0440\u0435\u0434\u0448\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u0438\u0446\u0430.<\/p>\n<h4>\u041f\u0440\u043e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443<\/h4>\n<p>\u041c\u043e\u0436\u043d\u043e \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438:<\/p>\n<h3>Multi-scale discriminators<\/h3>\n<p>\u0418\u0441\u0445\u043e\u0434\u043d\u0430\u044f \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u0435\u0442\u0441\u044f \u0432 2 \u0438 4 \u0440\u0430\u0437\u0430 &#8212; \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c 3 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0440\u0430\u0437\u043d\u043e\u0433\u043e \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0430. \u041d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u043c\u0430\u0441\u0448\u0442\u0430\u0431 \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f \u0441\u0432\u043e\u0439 \u0434\u0438\u0441\u043a\u0440\u0438\u043c\u0438\u043d\u0430\u0442\u043e\u0440 PatchGAN, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u043c\u0435\u044e\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443. <a href=\"https:\/\/github.com\/forcesh\/pix2pixHD\/blob\/master\/models\/networks.py#L292\">\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f<\/a>.<\/p>\n<details class=\"spoiler\">\n<summary>MultiscaleDiscriminator<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">class MultiscaleDiscriminator(nn.Module):     def __init__(self, input_nc, ndf=64, n_layers=3, norm_layer=nn.BatchNorm2d,                   use_sigmoid=False, num_D=3, getIntermFeat=False):         super(MultiscaleDiscriminator, self).__init__()         self.num_D = num_D         self.n_layers = n_layers         self.getIntermFeat = getIntermFeat               for i in range(num_D):             netD = NLayerDiscriminator(input_nc, ndf, n_layers, norm_layer, use_sigmoid, getIntermFeat)             if getIntermFeat:                                                 for j in range(n_layers+2):                     setattr(self, 'scale'+str(i)+'_layer'+str(j), getattr(netD, 'model'+str(j)))                                                else:                 setattr(self, 'layer'+str(i), netD.model)          self.downsample = nn.AvgPool2d(3, stride=2, padding=[1, 1], count_include_pad=False)      def singleD_forward(self, model, input):         if self.getIntermFeat:             result = [input]             for i in range(len(model)):                 result.append(model[i](result[-1]))             return result[1:]         else:             return [model(input)]      def forward(self, input):                 num_D = self.num_D         result = []         input_downsampled = input         for i in range(num_D):             if self.getIntermFeat:                 model = [getattr(self, 'scale'+str(num_D-1-i)+'_layer'+str(j)) for j in range(self.n_layers+2)]             else:                 model = getattr(self, 'layer'+str(num_D-1-i))             result.append(self.singleD_forward(model, input_downsampled))             if i != (num_D-1):                 input_downsampled = self.downsample(input_downsampled)         return result<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<h3>Progressive generator<\/h3>\n<figure class=\"full-width\">\n<div><figcaption>\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 pix2pixHD<\/figcaption><\/div>\n<\/figure>\n<p>\u0421\u043f\u0435\u0440\u0432\u0430 \u0441\u0435\u0442\u044c G1 \u043e\u0431\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u043d\u0438\u0437\u043a\u043e\u043c \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0438, \u043f\u043e\u0442\u043e\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0441\u043b\u043e\u0438 G2 \u0438 \u043c\u043e\u0434\u0435\u043b\u044c \u0434\u043e\u043e\u0431\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0432\u044b\u0441\u043e\u043a\u043e\u043c \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0438.<\/p>\n<h4>\u041f\u0440\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435<\/h4>\n<h3>Feature matching + perceptual loss<\/h3>\n<p>\u0412\u043e \u0432\u0440\u0435\u043c\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0438\u0437 \u0434\u0438\u0441\u043a\u0440\u0438\u043c\u0438\u043d\u0430\u0442\u043e\u0440\u0430 \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u044e\u0442\u0441\u044f \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u044b\u0435 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438 \u0441 \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u043b\u043e\u0451\u0432 \u0438 \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f L1 loss \u043c\u0435\u0436\u0434\u0443 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0430\u043c\u0438 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0438 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e. <a href=\"https:\/\/github.com\/NVIDIA\/pix2pixHD\/blob\/master\/models\/pix2pixHD_model.py#L177\">\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f<\/a>.<\/p>\n<p>Perceptual loss \u043f\u043e\u0445\u043e\u0436 \u043d\u0430 Feature matching, \u043d\u043e \u0432\u043c\u0435\u0441\u0442\u043e \u0434\u0438\u0441\u043a\u0440\u0438\u043c\u0438\u043d\u0430\u0442\u043e\u0440\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u0435\u0434\u043e\u0431\u0443\u0447\u0435\u043d\u043d\u0430\u044f \u043d\u0430 Imagenet \u043c\u043e\u0434\u0435\u043b\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, VGG16 <em>(\u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f GAN\u043e\u0432 \u043e\u043d\u0430 \u043d\u0435 \u043e\u0431\u0443\u0447\u0430\u0435\u0442\u0441\u044f)<\/em>. <a href=\"https:\/\/github.com\/NVIDIA\/pix2pixHD\/blob\/master\/models\/pix2pixHD_model.py#L187\">\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f<\/a>.<\/p>\n<p>\u041e\u0431\u0435 \u043b\u043e\u0441\u0441-\u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0441\u0442\u0430\u0431\u0438\u043b\u0438\u0437\u0438\u0440\u0443\u044e\u0442 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435, \u0442.\u043a. \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c \u043f\u0440\u0430\u0432\u0434\u043e\u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u043d\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0430\u0445 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f.<\/p>\n<h3>Lsgan<\/h3>\n<p>\u0412\u043c\u0435\u0441\u0442\u043e cross-entropy \u0432 minimax game \u0441\u0447\u0438\u0442\u0430\u0435\u043c L2 loss [<a href=\"https:\/\/arxiv.org\/pdf\/1611.04076.pdf\"><u>lsgan<\/u><\/a>].<\/p>\n<h3>\u041f\u0440\u043e instance-wise \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044e. Boundary map<\/h3>\n<figure class=\"full-width\"><\/figure>\n<figure class=\"full-width\">\n<div><figcaption>\u041f\u0440\u0438\u043c\u0435\u0440 (\u0440\u0438\u0441. (\u0430) \u0432\u043d\u0438\u0437\u0443) \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043f\u043e \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043c\u0430\u0441\u043a\u0435 \u0438 \u043f\u0440\u0438\u043c\u0435\u0440 (\u0440\u0438\u0441. (b) \u0432\u043d\u0438\u0437\u0443) \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043f\u043e \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043c\u0430\u0441\u043a\u0435 \u0438 boundary map<\/figcaption><\/div>\n<\/figure>\n<p>\u041a\u043e \u0432\u0445\u043e\u0434\u043d\u043e\u0439 \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043c\u0430\u0441\u043a\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f boundary map, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 instance-wise \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e. \u042d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0440\u0430\u0437\u043d\u044b\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u043d\u0435 \u0441\u043b\u0438\u0432\u0430\u043b\u0438\u0441\u044c \u0432 \u043e\u0434\u0438\u043d \u043e\u0431\u044a\u0435\u043a\u0442, \u043a\u0430\u043a \u043d\u0430 \u0440\u0438\u0441\u0443\u043d\u043a\u0435 \u0432\u044b\u0448\u0435.<\/p>\n<h4>\u041f\u0440\u043e instance-wise \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044e. Feature encoder network\u00a0\u00a0\u00a0\u00a0<\/h4>\n<figure class=\"full-width\">\n<div><figcaption>Instance-wise \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 Feature Encoder Network<\/figcaption><\/div>\n<\/figure>\n<p>Feature Encoder Network \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 encoder-decoder \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443 (\u0431\u0435\u0437 skip-connections), \u0432\u044b\u0445\u043e\u0434 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u043e\u0434\u0430\u0451\u0442\u0441\u044f \u043d\u0430<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\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-386159","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/386159","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=386159"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/386159\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=386159"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=386159"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=386159"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}