{"id":23,"date":"2015-10-13T10:28:18","date_gmt":"2015-10-13T10:28:18","guid":{"rendered":"http:\/\/liipetti.net\/erratic\/?p=23"},"modified":"2015-10-13T10:28:18","modified_gmt":"2015-10-13T10:28:18","slug":"my-portrait-in-the-making","status":"publish","type":"post","link":"https:\/\/liipetti.net\/erratic\/2015\/10\/13\/my-portrait-in-the-making\/","title":{"rendered":"My portrait in the making"},"content":{"rendered":"<p>After covering the basics of using neural-style, I ventured into making my own portrait, based on a photo taken when I was defending my PhD thesis.<\/p>\n<p><a href=\"http:\/\/liipetti.net\/erratic\/wp-content\/uploads\/2015\/10\/532644_10151321063243729_1030640907_n.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-24\" src=\"http:\/\/liipetti.net\/erratic\/wp-content\/uploads\/2015\/10\/532644_10151321063243729_1030640907_n-300x291.jpg\" alt=\"532644_10151321063243729_1030640907_n\" width=\"198\" height=\"192\" srcset=\"https:\/\/liipetti.net\/erratic\/wp-content\/uploads\/2015\/10\/532644_10151321063243729_1030640907_n-300x291.jpg 300w, https:\/\/liipetti.net\/erratic\/wp-content\/uploads\/2015\/10\/532644_10151321063243729_1030640907_n-155x150.jpg 155w, https:\/\/liipetti.net\/erratic\/wp-content\/uploads\/2015\/10\/532644_10151321063243729_1030640907_n-150x145.jpg 150w, https:\/\/liipetti.net\/erratic\/wp-content\/uploads\/2015\/10\/532644_10151321063243729_1030640907_n.jpg 960w\" sizes=\"auto, (max-width: 198px) 100vw, 198px\" \/><\/a><\/p>\n<p>But to start with, the style was taken not from any painting but from some text in Yiddish.<\/p>\n<p><a href=\"http:\/\/liipetti.net\/erratic\/wp-content\/uploads\/2015\/10\/nesienahman.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-26\" src=\"http:\/\/liipetti.net\/erratic\/wp-content\/uploads\/2015\/10\/nesienahman-300x155.png\" alt=\"nesienahman\" width=\"300\" height=\"155\" srcset=\"https:\/\/liipetti.net\/erratic\/wp-content\/uploads\/2015\/10\/nesienahman-300x155.png 300w, https:\/\/liipetti.net\/erratic\/wp-content\/uploads\/2015\/10\/nesienahman-250x129.png 250w, https:\/\/liipetti.net\/erratic\/wp-content\/uploads\/2015\/10\/nesienahman-150x78.png 150w, https:\/\/liipetti.net\/erratic\/wp-content\/uploads\/2015\/10\/nesienahman.png 620w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>The immediate result, after 100 iterations (which usually can be interesting but does not yet produce quality images) looked like this.<\/p>\n<p><a href=\"http:\/\/liipetti.net\/erratic\/wp-content\/uploads\/2015\/10\/hannu_jiddish_100.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-27\" src=\"http:\/\/liipetti.net\/erratic\/wp-content\/uploads\/2015\/10\/hannu_jiddish_100-300x291.png\" alt=\"hannu_jiddish_100\" width=\"300\" height=\"291\" srcset=\"https:\/\/liipetti.net\/erratic\/wp-content\/uploads\/2015\/10\/hannu_jiddish_100-300x291.png 300w, https:\/\/liipetti.net\/erratic\/wp-content\/uploads\/2015\/10\/hannu_jiddish_100-155x150.png 155w, https:\/\/liipetti.net\/erratic\/wp-content\/uploads\/2015\/10\/hannu_jiddish_100-150x145.png 150w, https:\/\/liipetti.net\/erratic\/wp-content\/uploads\/2015\/10\/hannu_jiddish_100.png 512w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>This experiment did not seem to be converging into something resembling a portrait, so I quit after 800 iterations. Now, neural-style by default starts from a picture of random noise, so that the new picture is really created from scratch. But you can also make it start from the target picture instead, so I tried it, and got this after already 100 iterations.<\/p>\n<p><a href=\"http:\/\/liipetti.net\/erratic\/wp-content\/uploads\/2015\/10\/hannu_jiddish_from_image_100.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-29\" src=\"http:\/\/liipetti.net\/erratic\/wp-content\/uploads\/2015\/10\/hannu_jiddish_from_image_100-300x291.png\" alt=\"hannu_jiddish_from_image_100\" width=\"300\" height=\"291\" srcset=\"https:\/\/liipetti.net\/erratic\/wp-content\/uploads\/2015\/10\/hannu_jiddish_from_image_100-300x291.png 300w, https:\/\/liipetti.net\/erratic\/wp-content\/uploads\/2015\/10\/hannu_jiddish_from_image_100-155x150.png 155w, https:\/\/liipetti.net\/erratic\/wp-content\/uploads\/2015\/10\/hannu_jiddish_from_image_100-150x145.png 150w, https:\/\/liipetti.net\/erratic\/wp-content\/uploads\/2015\/10\/hannu_jiddish_from_image_100.png 512w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Letting it run further made the portrait lose all color, presumable because the style image was in black and white. So I then added another style image, just to give some color input to the process. At the same time, I change the style scale to 0.5, so that the quasi-letter images would become smaller. So I got this after 800 iterations. Letting it run further removed the &#8220;beard&#8221; made of letters, so I decided to stop the process here.<\/p>\n<p><a href=\"http:\/\/liipetti.net\/erratic\/wp-content\/uploads\/2015\/10\/hannu_jiddish_and_Moria_scale05_800.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-30\" src=\"http:\/\/liipetti.net\/erratic\/wp-content\/uploads\/2015\/10\/hannu_jiddish_and_Moria_scale05_800-300x291.png\" alt=\"hannu_jiddish_and_Moria_scale05_800\" width=\"300\" height=\"291\" srcset=\"https:\/\/liipetti.net\/erratic\/wp-content\/uploads\/2015\/10\/hannu_jiddish_and_Moria_scale05_800-300x291.png 300w, https:\/\/liipetti.net\/erratic\/wp-content\/uploads\/2015\/10\/hannu_jiddish_and_Moria_scale05_800-155x150.png 155w, https:\/\/liipetti.net\/erratic\/wp-content\/uploads\/2015\/10\/hannu_jiddish_and_Moria_scale05_800-150x145.png 150w, https:\/\/liipetti.net\/erratic\/wp-content\/uploads\/2015\/10\/hannu_jiddish_and_Moria_scale05_800.png 512w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>I did not particularly like the results, though, and exchanged to second style image (the color model) to another image showing some portrait done with a palette knife. This image comes from the 2000th iteration.<\/p>\n<p><a href=\"http:\/\/liipetti.net\/erratic\/wp-content\/uploads\/2015\/10\/hannu_jiddish_and_palettiveitsi_scale051.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-32\" src=\"http:\/\/liipetti.net\/erratic\/wp-content\/uploads\/2015\/10\/hannu_jiddish_and_palettiveitsi_scale051-300x291.png\" alt=\"hannu_jiddish_and_palettiveitsi_scale05\" width=\"300\" height=\"291\" srcset=\"https:\/\/liipetti.net\/erratic\/wp-content\/uploads\/2015\/10\/hannu_jiddish_and_palettiveitsi_scale051-300x291.png 300w, https:\/\/liipetti.net\/erratic\/wp-content\/uploads\/2015\/10\/hannu_jiddish_and_palettiveitsi_scale051-155x150.png 155w, https:\/\/liipetti.net\/erratic\/wp-content\/uploads\/2015\/10\/hannu_jiddish_and_palettiveitsi_scale051-150x145.png 150w, https:\/\/liipetti.net\/erratic\/wp-content\/uploads\/2015\/10\/hannu_jiddish_and_palettiveitsi_scale051.png 512w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>In all these examples, it is also interesting to look at what happens to the Yiddish letters from\u00a0the first style image. The result image is filled with shapes somehow resembling those letters, while the shapes are never actual, recognizable letters.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>After covering the basics of using neural-style, I ventured into making my own portrait, based on a photo taken when I was defending my PhD thesis. But to start with, the style was taken not from any painting but from some text in Yiddish. The immediate result, after 100 iterations \u2026<\/p>\n<p class=\"continue-reading-button\"> <a class=\"continue-reading-link\" href=\"https:\/\/liipetti.net\/erratic\/2015\/10\/13\/my-portrait-in-the-making\/\">Continue reading<i class=\"crycon-right-dir\"><\/i><\/a><\/p>\n","protected":false},"author":1,"featured_media":29,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,3],"tags":[],"class_list":["post-23","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-art","category-neural-networks"],"_links":{"self":[{"href":"https:\/\/liipetti.net\/erratic\/wp-json\/wp\/v2\/posts\/23","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/liipetti.net\/erratic\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/liipetti.net\/erratic\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/liipetti.net\/erratic\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/liipetti.net\/erratic\/wp-json\/wp\/v2\/comments?post=23"}],"version-history":[{"count":3,"href":"https:\/\/liipetti.net\/erratic\/wp-json\/wp\/v2\/posts\/23\/revisions"}],"predecessor-version":[{"id":33,"href":"https:\/\/liipetti.net\/erratic\/wp-json\/wp\/v2\/posts\/23\/revisions\/33"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/liipetti.net\/erratic\/wp-json\/wp\/v2\/media\/29"}],"wp:attachment":[{"href":"https:\/\/liipetti.net\/erratic\/wp-json\/wp\/v2\/media?parent=23"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/liipetti.net\/erratic\/wp-json\/wp\/v2\/categories?post=23"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/liipetti.net\/erratic\/wp-json\/wp\/v2\/tags?post=23"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}