{"id":1152,"date":"2022-02-23T01:20:58","date_gmt":"2022-02-23T06:20:58","guid":{"rendered":"https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/?page_id=1152"},"modified":"2022-02-28T08:30:17","modified_gmt":"2022-02-28T13:30:17","slug":"machine-learning-i","status":"publish","type":"page","link":"https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/daily-notes\/02-28-machine-learning\/machine-learning-i\/","title":{"rendered":"Machine Learning I"},"content":{"rendered":"<h2>\u201cMore Like This, Please\u201d<\/h2>\n<p><em>Much of today\u2019s presentation focuses on the use of deep convolutional neural networks in generating imagery.<\/em><\/p>\n<p>Recall how earlier in the semester, we discussed computer arts pioneer, Vera Moln\u00e1r, born 1924 (and still working at 98), a Hungarian-French artist who was one of the first dozen or so people to make art with a computer. Moln\u00e1r described her interest in using the computer <em>to create designs that could \u201csurprise\u201d her<\/em>.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-1157\" src=\"https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-content\/uploads\/2022\/02\/Screen-Shot-2021-04-12-at-12.37.25-AM-1536x867-1.png\" alt=\"\" width=\"1536\" height=\"867\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-content\/uploads\/2022\/02\/Screen-Shot-2021-04-12-at-12.37.25-AM-1536x867-1.png 1536w, https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-content\/uploads\/2022\/02\/Screen-Shot-2021-04-12-at-12.37.25-AM-1536x867-1-640x361.png 640w, https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-content\/uploads\/2022\/02\/Screen-Shot-2021-04-12-at-12.37.25-AM-1536x867-1-1024x578.png 1024w, https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-content\/uploads\/2022\/02\/Screen-Shot-2021-04-12-at-12.37.25-AM-1536x867-1-768x434.png 768w, https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-content\/uploads\/2022\/02\/Screen-Shot-2021-04-12-at-12.37.25-AM-1536x867-1-1200x677.png 1200w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<p>Consider this generative 1974 plotter artwork by Moln\u00e1r, below. How did she create this artwork? We might suppose there was something like a double-for-loop to create the main grid; another iterative loop to create the interior squares; and some randomness that determined whether or not to draw these interior squares, and if so, some additional randomness to govern the extent to which the positions of their vertices would be randomized. We suppose that there were some variables, specified by the artist, that controlled the amount of randomness, the dimensions of the grid, the various probabilities, etc.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/github.com\/golanlevin\/lectures\/raw\/master\/lecture_cnns_and_gans\/images\/vera-molnar.jpg\" alt=\"\" \/><\/p>\n<p class=\"p1\">Molnar\u2019s process is a great illustration of how generative computer artworks were created during their first half-century. The artist writes a program that renders a form. This form is mathematically governed, or <i>parameterized<\/i>, by\u00a0<b>variables<\/b>\u00a0\u2014 specified by the artist. Change the values of these variables, and the form changes. She might link these variables to\u00a0<b>randomness<\/b>, as Molnar does, or perhaps to gestural inputs, or perhaps link them to a stream of data, so that the form\u00a0<i>visualizes<\/i>\u00a0that data. She has created an artwork (software) that makes artworks (prints). If she want \u201cMore like this, please\u201d, she just runs the software again.<\/p>\n<p>Just as with \u2018traditional\u2019 generative art (e.g. Vera Moln\u00e1r), artists using machine learning (ML) develop programs that generate an infinite variety of forms, and these forms are still characterized (or parameterized) by variables. What\u2019s interesting about the use of ML in the arts, is:<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\n<li>That the values of these variables are no longer specified by the artist. Instead, the variables are now <em>deduced indirectly<\/em>\u00a0from the training data that the artist provides. As Kyle McDonald has pointed out:\u00a0<span style=\"color: #ff0000;\"><strong><em>machine learning is<\/em>\u00a0<em>programming with examples, not instructions<\/em>.<\/strong>\u00a0<\/span>Give the computer lots of examples, and ML algorithms figure out the rules by which a computer can generate \u201cmore like this, please\u201d.<\/li>\n<li>The use of ML typically means that the <span style=\"color: #ff0000;\"><em><strong>artists\u2019 new variables control\u00a0perceptually higher-order properties.<\/strong><\/em><\/span> (The parameter space, or number of possible variables, may also be significantly larger.) The artist\u2019s job becomes (in part) one of\u00a0<em>selecting, curating, or creating training sets<\/em>.<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<p>Here\u2019s\u00a0<strong>Helena Sarin\u2019s\u00a0<a href=\"https:\/\/twitter.com\/glagolista\/status\/1089157286684184576\" rel=\"nofollow\"><em>Leaves<\/em><\/a>\u00a0(2018).<\/strong>\u00a0Sarin has trained a\u00a0<em>Generative Adversarial Network<\/em>\u00a0on images of leaves: specifically, photos of a few thousand leaves that she collected in her back yard.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/github.com\/golanlevin\/lectures\/raw\/master\/lecture_cnns_and_gans\/images\/helena_sarin_leaves.jpg\" alt=\"Leaves by Helena Sarin\" \/><\/p>\n<p>GANs operate by establishing a battle between two different neural networks, a generator and a discriminator. As with feedback between counterfeiters and authorities, Sarin\u2019s\u00a0<em>generator<\/em>\u00a0attempts to synthesize a leaf-like image; the\u00a0<em>discriminator<\/em>\u00a0then attempts to determine whether or not it is a real image of a leaf. Using evaluative feedback from the discriminator, the generator improves its fakes\u2014eventually creating such good leaves that the discriminator can\u2019t tell real from fake.<\/p>\n<p>Here is\u00a0<strong>Robbie Barrat\u2019s\u00a0<a href=\"https:\/\/robbiebarrat.github.io\/oth\/bale.html\" rel=\"nofollow\"><em>Neural Network Balenciaga<\/em><\/a><\/strong>\u00a0(2018):<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/github.com\/golanlevin\/lectures\/raw\/master\/lecture_cnns_and_gans\/images\/robbie_barrat_balenciaga.jpg\" alt=\"Balenciaga by Robbie Barrat\" \/><\/p>\n<p>Where Helena Sarin has been training networks using collections of leaves, Robbie Barrat has trained them with a different \u201cfall collection\u201d: photos of high couture from Balenciaga that he downloaded from the Internet. Barrat collected a large dataset of images from Balenciaga runway shows and catalogues, in order to generate outfits that are novel, but at the same time heavily inspired by Balenciaga\u2019s recent fashion lines. Barrat has pointed out that his network lacks any contextual awareness of the non-visual functions of clothing (e.g. why people carry bags, why people prefer symmetrical outfits) \u2013 and thus produces strange outfits that completely disregard these functions \u2014 such as a pair of pants with a wrap-around bag attached to the shin, and a multi-component asymmetrical coat with an enormous blue sleeve. Barrat\u2019s project circulated on the Internet; soon he was approached by a fashion company, which used his designs as inspiration for real artifacts.<\/p>\n<p>For some artists, GANs present a way of understanding and simulating genres of human creativity. A subtle point that is sometimes lost in the AI hype is that<span style=\"color: #ff0000;\"><strong><em> the goal of this work is not to \u201creplace\u201d human artists, but to create works in which these genres are made fresh through <\/em><\/strong><\/span><a href=\"https:\/\/en.wikipedia.org\/wiki\/Defamiliarization\"><em><span style=\"color: #ff0000;\"><strong>defamiliarization<\/strong><\/span><\/em><\/a>\u2014 Please generate \u201cMore\u00a0<em>almost<\/em> like this, please, but with a strikingly unfamiliar new twist\u201d. <strong><em>Eliciting<\/em><\/strong> and <strong><em>curating<\/em><\/strong> that twist is where the AI artist now puts their effort.<\/p>\n<p>Here\u2019s another\u00a0<strong><a href=\"https:\/\/robbiebarrat.github.io\/oldwork.html\">set of examples (2018)<\/a><\/strong>\u00a0by Robbie Barrat, who trained a GAN on a large collection of traditional oil paintings of nudes:<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-1155\" src=\"https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-content\/uploads\/2022\/02\/Screen-Shot-2021-04-12-at-12.47.40-AM.png\" alt=\"\" width=\"1680\" height=\"809\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-content\/uploads\/2022\/02\/Screen-Shot-2021-04-12-at-12.47.40-AM.png 1680w, https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-content\/uploads\/2022\/02\/Screen-Shot-2021-04-12-at-12.47.40-AM-640x308.png 640w, https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-content\/uploads\/2022\/02\/Screen-Shot-2021-04-12-at-12.47.40-AM-1024x493.png 1024w, https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-content\/uploads\/2022\/02\/Screen-Shot-2021-04-12-at-12.47.40-AM-768x370.png 768w, https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-content\/uploads\/2022\/02\/Screen-Shot-2021-04-12-at-12.47.40-AM-1536x740.png 1536w, https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-content\/uploads\/2022\/02\/Screen-Shot-2021-04-12-at-12.47.40-AM-1200x578.png 1200w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<p>A master of this form is Berlin-based\u00a0<strong><a href=\"https:\/\/sofiacrespo.com\/\" rel=\"nofollow\">Sofia Crespo<\/a><\/strong>, an artist using GANs to generate biological imagery. One of her main focal points is the way organic life uses artificial mechanisms to simulate itself and evolve. Placing great effort into creating custom datasets of biological imagery, she has produced a remarkable body of organic images using GANs.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/github.com\/golanlevin\/lectures\/raw\/master\/lecture_cnns_and_gans\/images\/crespo.jpeg\" alt=\"Sofia Crespo's Neural Zoo\" \/><\/p>\n<p>Note that it\u2019s also possible to generate\u00a0<em>music<\/em>\u00a0with GANs. For example, here is\u00a0<strong><a href=\"https:\/\/www.youtube.com\/watch?v=MwtVkPKx3RA\" rel=\"nofollow\"><em>Relentless Doppelganger<\/em><\/a>\u00a0by DADABOTS<\/strong>\u00a0(CJ Carr and Zack Zukowski)\u2014an infinite live stream of generated death metal:<\/p>\n<p><iframe loading=\"lazy\" title=\"RELENTLESS DOPPELGANGER m\/ m\/ m\/ m\/ m\/ m\/ m\/ m\/ m\/ m\/ m\/ m\/ m\/ m\/\" src=\"https:\/\/www.youtube.com\/embed\/MwtVkPKx3RA?feature=oembed\" width=\"840\" height=\"630\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\" data-mce-fragment=\"1\"><\/iframe><\/p>\n<p>Here\u2019s artist-researcher\u00a0<strong>Janelle Shane\u2019s\u00a0<a href=\"https:\/\/aiweirdness.com\/post\/182633984547\/gancats\" rel=\"nofollow\"><em>GANcats<\/em><\/a><\/strong>(2019):<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/github.com\/golanlevin\/lectures\/raw\/master\/lecture_cnns_and_gans\/images\/janelle_shane_cats.png\" alt=\"Synthetic cats by Janelle Shane\" \/><\/p>\n<p>Janelle Shane\u2019s project makes clear that <span style=\"color: #ff0000;\"><em><strong>when training sets are too small, the synthesized results can show biases that reveal the limits to the data on which it was trained.<\/strong><\/em><\/span> For example, above are results from a network that synthesizes \u2018realistic\u2019 cats. But many of the cat images in Shane\u2019s training dataset were from\u00a0<em>memes<\/em>. And some cat images contain people\u2026 but\u00a0<em>not enough<\/em>\u00a0examples from which to realistically synthesize one. Janelle Shane points out that cats, in particular, are also highly variable. When the training sets are too small to capture that variability, other misinterpretations show up as well.<\/p>\n<p>In his earlier video project\u00a0<strong><a href=\"https:\/\/www.youtube.com\/watch?v=5h4R959O0cY\">Face Feedback III<\/a>\u00a0(2017), Mario Klingemann<\/strong>\u00a0puts a generative adversarial network into feedback with itself, trying to enforce as much of the image as possible to look like a face. We observe the algorithm working over time to better resolve its previous results into faces.<\/p>\n<p><iframe loading=\"lazy\" title=\"Face Feedback III - Faces in 1024x1024 generated by neural networks\" src=\"https:\/\/www.youtube.com\/embed\/5h4R959O0cY?feature=oembed\" width=\"840\" height=\"630\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\" data-mce-fragment=\"1\"><\/iframe><\/p>\n<p>An interesting response to GAN\u00a0<em>face<\/em>\u00a0synthesis is\u00a0<strong><a href=\"https:\/\/thisfootdoesnotexist.com\/\">https:\/\/thisfootdoesnotexist.com\/<\/a>, by the Brooklyn artist collective, MSCHF<\/strong>. By texting a provided telephone number (currently not working), visitors to the site receive text messages containing images of synthetic feet produced by a GAN:<\/p>\n<div class=\"wp-video\">\n<div id=\"mep_0\" class=\"mejs-container mejs-container-keyboard-inactive wp-video-shortcode mejs-video\" tabindex=\"0\" role=\"application\" aria-label=\"Video Player\">\n<div class=\"mejs-inner\">\n<div class=\"mejs-controls\">\n<div class=\"mejs-button mejs-volume-button mejs-mute\"><div id=\"kgvid_kgvid_0_wrapper\" class=\"kgvid_wrapper\">\n\t\t\t<div id=\"video_kgvid_0_div\" class=\"fitvidsignore kgvid_videodiv\" data-id=\"kgvid_0\" data-kgvid_video_vars=\"{&quot;id&quot;:&quot;kgvid_0&quot;,&quot;attachment_id&quot;:&quot;1159&quot;,&quot;player_type&quot;:&quot;Video.js v7&quot;,&quot;width&quot;:&quot;512&quot;,&quot;height&quot;:&quot;512&quot;,&quot;fullwidth&quot;:&quot;true&quot;,&quot;countable&quot;:true,&quot;count_views&quot;:&quot;start_complete&quot;,&quot;start&quot;:&quot;&quot;,&quot;autoplay&quot;:&quot;false&quot;,&quot;pauseothervideos&quot;:&quot;true&quot;,&quot;set_volume&quot;:&quot;1&quot;,&quot;muted&quot;:&quot;false&quot;,&quot;meta&quot;:true,&quot;endofvideooverlay&quot;:&quot;&quot;,&quot;resize&quot;:&quot;true&quot;,&quot;auto_res&quot;:&quot;automatic&quot;,&quot;pixel_ratio&quot;:&quot;true&quot;,&quot;right_click&quot;:&quot;on&quot;,&quot;playback_rate&quot;:&quot;false&quot;,&quot;title&quot;:&quot;a52d925&quot;,&quot;nativecontrolsfortouch&quot;:&quot;false&quot;,&quot;locale&quot;:&quot;en&quot;,&quot;enable_resolutions_plugin&quot;:false}\" itemprop=\"video\" itemscope itemtype=\"https:\/\/schema.org\/VideoObject\"><meta itemprop=\"embedUrl\" content=\"https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/?attachment_id=1159&amp;kgvid_video_embed[enable]=true\" \/><meta itemprop=\"contentUrl\" content=\"https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-content\/uploads\/2022\/02\/a52d925.mp4\" \/><meta itemprop=\"name\" content=\"a52d925\" \/><meta itemprop=\"description\" content=\"Video\" \/><meta itemprop=\"uploadDate\" content=\"2022-02-23T01:07:32-05:00\" \/>\n\t\t\t\t<video id=\"video_kgvid_0\" playsinline controls preload=\"metadata\" width=\"512\" height=\"512\" class=\"fitvidsignore video-js kg-video-js-skin\">\n\t\t\t\t\t<source src=\"https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-content\/uploads\/2022\/02\/a52d925.mp4?id=0\" type=\"video\/mp4\" data-res=\"512p\">\n\t\t\t\t<\/video>\n\t\t\t<\/div>\n\t\t\t<div style=\"display:none;\" id=\"video_kgvid_0_meta\" class=\"kgvid_video_meta kgvid_video_meta_hover \">\n\t\t\t\t<span class='kgvid_meta_icons'><\/span>\n\t\t\t\t<span id='video_kgvid_0_title' class='kgvid_title'>a52d925<\/span>\n<\/div>\n\t\t<\/div><\/div>\n<div class=\"mejs-button mejs-fullscreen-button\"><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>Here is a highly edited excerpt from the terrific essay which accompanies their project:<\/p>\n<p><em>Foot pics are hot hot hot, and you love to see \u2018em! At their base level they are pictures of feet as a prominent visual element. Feet are, by general scientific consensus, the most common non-sexual-body-part fetish. Produced as a niche fetishistic commodity, feet pics have all the perceived transgressive elements of more traditionally recognized pornography, but without relying on specific pornographic or explicit content. And therein lies their potential.<\/em><\/p>\n<p><em>Foot pics are CHAMELEONIC BI-MODAL CONTENT. Because foot pics can operate in two discrete modes of content consumption simultaneously (i.e. they can be memes and nudes simultaneously, in the same public sphere), their perception depends entirely upon the viewer and the context in which the image appears. Thus the foot pic is both highly valuable and almost worthless at the same time \u2013 and this creates a highly intriguing supply &amp; demand dynamic when creators\/consumers fall on different ends of this valuation scale.<\/em><\/p>\n<p><em>The foot pic specifically confounds the famous Supreme Court working definition of pornography \u2013 \u201c[You] Know It When You See It.\u201d Because the foot pic may be devoid of any mainstream pornographic signifiers it is both low barrier to entry and significantly safer to distribute. The production of the picture may, depending entirely upon the person to whom the foot belongs, be essentially valueless in the mind of the producer \u2013 and yet the resulting image strongly valued by the right consumer.<\/em><\/p>\n<hr \/>\n<h2>What Neural Networks See. (n.b. NSFW)<\/h2>\n<p>Neural networks build up understandings of images, beginning with simple visual phenomena (edges, spots), then textures, patterns, constituent parts (like wheels or noses), and objects (like cars or dogs). This is a great article to understand more:<em>\u00a0\u201c<a href=\"https:\/\/distill.pub\/2017\/feature-visualization\/\" rel=\"nofollow\">Feature Visualization: How neural networks build up their understanding of images<\/a>\u201c, Olah, Chris and Mordvintsev, Alexander and Schubert, Ludwig.\u00a0<\/em><\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-1161\" src=\"https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-content\/uploads\/2022\/02\/Screen-Shot-2021-04-12-at-3.09.22-AM-1200x373-1.png\" alt=\"\" width=\"1200\" height=\"373\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-content\/uploads\/2022\/02\/Screen-Shot-2021-04-12-at-3.09.22-AM-1200x373-1.png 1200w, https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-content\/uploads\/2022\/02\/Screen-Shot-2021-04-12-at-3.09.22-AM-1200x373-1-640x199.png 640w, https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-content\/uploads\/2022\/02\/Screen-Shot-2021-04-12-at-3.09.22-AM-1200x373-1-1024x318.png 1024w, https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-content\/uploads\/2022\/02\/Screen-Shot-2021-04-12-at-3.09.22-AM-1200x373-1-768x239.png 768w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<p>Here\u2019s Jason Yosinski\u2019s video,\u00a0<a href=\"https:\/\/www.youtube.com\/watch?v=AgkfIQ4IGaM\" rel=\"nofollow\"><em>Understanding Neural Networks Through Deep Visualization<\/em><\/a>:<\/p>\n<p><iframe loading=\"lazy\" title=\"Deep Visualization Toolbox\" src=\"https:\/\/www.youtube.com\/embed\/AgkfIQ4IGaM?feature=oembed\" width=\"840\" height=\"473\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\" data-mce-fragment=\"1\"><\/iframe><\/p>\n<h5>Demo:\u00a0<a href=\"https:\/\/distill.pub\/2019\/activation-atlas\/\"><strong>Distill.pub\u00a0<em>Activation Atlas<\/em><\/strong><\/a><\/h5>\n<p>\u201cDeepDream\u201d, by Alex Mordvintsev, is a kind of iterative feedback algorithm in which an architecture whose neurons detect specific things (say, dogs) is asked: what small changes would need to be made to this image, so that any part that already resembled a dog, looked\u00a0<em>even more<\/em>\u00a0like a dog? Then, make those changes\u2026.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-1162\" src=\"https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-content\/uploads\/2022\/02\/spaghetti-meatballs-become-really-frightening.jpg\" alt=\"\" width=\"1150\" height=\"766\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-content\/uploads\/2022\/02\/spaghetti-meatballs-become-really-frightening.jpg 1150w, https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-content\/uploads\/2022\/02\/spaghetti-meatballs-become-really-frightening-640x426.jpg 640w, https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-content\/uploads\/2022\/02\/spaghetti-meatballs-become-really-frightening-1024x682.jpg 1024w, https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-content\/uploads\/2022\/02\/spaghetti-meatballs-become-really-frightening-768x512.jpg 768w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<p>The next investigation is by\u00a0<strong>Gabriel Goh, circa 2017, from\u00a0<a href=\"https:\/\/web.archive.org\/web\/20190212013118\/https:\/\/open_nsfw.gitlab.io\/\" rel=\"nofollow\"><em>Image Synthesis from Yahoo\u2019s open_nsfw:<\/em><\/a><\/strong><\/p>\n<p><a href=\"https:\/\/github.com\/golanlevin\/lectures\/blob\/master\/lecture_cnns_and_gans\/images\/gabriel_goh_1.jpg\"><img decoding=\"async\" src=\"https:\/\/github.com\/golanlevin\/lectures\/raw\/master\/lecture_cnns_and_gans\/images\/gabriel_goh_1.jpg\" alt=\"\" \/><\/a><\/p>\n<p><strong>Detecting pornography is a major challenge for Internet hosts and providers.<\/strong>\u00a0To help, Yahoo released an open-source classifier, open_nsfw, which rates images from 0 to 1. Gabriel Goh, a PHD student at UC Davis, wanted to understand this tool better. He started by using a neural network to synthesize some \u201cnatural-looking\u201d images, shown in the bottom row, using white noise as a starting point. He then used a generative adversarial technique to\u00a0<em>maximally activate<\/em>\u00a0certain neurons of the Yahoo classifier: what he called \u201cneural-net guided gradient descent\u201d. Goh\u2019s program basically asked, in many iterative steps, \u201chow would this image need to change if it were to look slightly more like pornography?\u201d<\/p>\n<p><a href=\"https:\/\/github.com\/golanlevin\/lectures\/blob\/master\/lecture_cnns_and_gans\/images\/gabriel_goh_open_nsfw.jpg\"><img decoding=\"async\" src=\"https:\/\/github.com\/golanlevin\/lectures\/raw\/master\/lecture_cnns_and_gans\/images\/gabriel_goh_open_nsfw.jpg\" alt=\"\" \/><\/a><\/p>\n<p>The result is a remarkable study in the abstract depiction of nudity. In short, Goh\u2019s machine makes images that another machine believes are porno. These images are clearly not safe for work, but it\u2019s difficult, or humorous perhaps, to say why. From the standpoint of conceptual art, this is really extraordinary.<\/p>\n<p><a href=\"https:\/\/github.com\/golanlevin\/lectures\/blob\/master\/lecture_cnns_and_gans\/images\/gabriel_goh_3.jpg\"><img decoding=\"async\" src=\"https:\/\/github.com\/golanlevin\/lectures\/raw\/master\/lecture_cnns_and_gans\/images\/gabriel_goh_3.jpg\" alt=\"\" \/><\/a><\/p>\n<p>Not only is it possible to synthesize images which maximally activate the porn-detecting neurons, it is also possible to generate images \u201cwhose activations span two networks\u201d. Goh bred these images to be recognized as \u201cbeach\u201d scenes by the\u00a0<em>places_CNN<\/em>\u00a0network \u2026 and then generated the bottom row, which activates detectors in both\u00a0<em>places_CNN<\/em>\u00a0and\u00a0<em>open_NSFW<\/em>. Goh explains that these images fascinate him because \u201cthey are only seemingly innocent. The NSFW elements are all present, just hidden in plain sight. Once you see the true nature of these images, something clicks and it becomes impossible to unsee.\u201d<\/p>\n<p>Artist\u00a0<strong>Tom White<\/strong>\u00a0has been working in the inverse way, creating images which are designed to fool machine vision systems, in order to better understand how computers see. The next work is from his 2018 series,\u00a0<strong><a href=\"https:\/\/drib.net\/\" rel=\"nofollow\"><em>Synthetic Abstractions:<\/em><\/a><\/strong><\/p>\n<p><a href=\"https:\/\/drib.net\/\" rel=\"nofollow\"><img decoding=\"async\" src=\"https:\/\/github.com\/golanlevin\/lectures\/raw\/master\/lecture_cnns_and_gans\/images\/tom_white_animation.gif\" alt=\"Diagram by Tom White\" \/><\/a><\/p>\n<p><a href=\"https:\/\/drib.net\/\" rel=\"nofollow\"><img decoding=\"async\" src=\"https:\/\/github.com\/golanlevin\/lectures\/raw\/master\/lecture_cnns_and_gans\/images\/tom_white_mustard_dream.png\" alt=\"Mustard Dream by Tom White\" \/><\/a><\/p>\n<p>Tom White\u2019s\u00a0<em>Synthetic Abstractions<\/em>\u00a0series are seemingly innocent images, generated from simple lines and shapes, which trick algorithms into being classified as something else. Above is an arrangement of 10 lines which fools six widely-used classifiers into being perceived as a hammerhead shark, or an iron. Below this is a silkscreen print, \u201cMustard Dream\u201d, which White explains is flagged as \u201cExplicit Nudity\u201d by Amazon Web Services, \u201cRacy\u201d by Google SafeSearch, and \u201cNSFW\u201d by Yahoo. White\u2019s work is \u201cart by AI, for AI\u201d, which helps us see the world through the eyes of a machine. He writes: \u201cMy artwork investigates the Algorithmic Gaze: how machines see, know, and articulate the world. As machine perception becomes more pervasive in our daily lives, the world as seen by computers becomes our dominant reality.\u201d This print literally\u00a0<em>cannot be shown<\/em>\u00a0on the internet; taking a selfie in his gallery may get you banned from Instagram.<\/p>\n<hr \/>\n<h2>Style Transfer, Pix2Pix, &amp; Related Methods<\/h2>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-1163\" src=\"https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-content\/uploads\/2022\/02\/6mjVFgH-1.gif\" alt=\"\" width=\"300\" height=\"286\" \/><br \/>\n<em>(Image:\u00a0<a href=\"https:\/\/twitter.com\/zzznah\/status\/1116634357257658368?s=20\">Alex Mordvintsev<\/a>, 2019)<\/em><\/p>\n<p>You may already be aware of \u201cneural style transfer\u201d, developed by a\u00a0<a href=\"http:\/\/bethgelab.org\/research\/machine_learning\/style_transfer\/\">Dutch computing lab<\/a>\u00a0in 2015. Neural style transfer is an optimization technique used to take two images\u2014a\u00a0<em>content<\/em>\u00a0image and a\u00a0<em>style reference<\/em>\u00a0image (such as an artwork by a famous painter)\u2014and blend them together so the output image looks like the content image, but \u201cpainted\u201d in the style of the style reference image. It is like saying, \u201cI want more like (the details of)\u00a0<em>this<\/em>, please, but resembling (the overall structure of)\u00a0<em>that<\/em>.\u201d<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-1164\" src=\"https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-content\/uploads\/2022\/02\/styletransfer-1200x594-1.jpg\" alt=\"\" width=\"1200\" height=\"594\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-content\/uploads\/2022\/02\/styletransfer-1200x594-1.jpg 1200w, https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-content\/uploads\/2022\/02\/styletransfer-1200x594-1-640x317.jpg 640w, https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-content\/uploads\/2022\/02\/styletransfer-1200x594-1-1024x507.jpg 1024w, https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-content\/uploads\/2022\/02\/styletransfer-1200x594-1-768x380.jpg 768w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<p>This is implemented by optimizing the output image to match the content statistics of the content image and the style statistics of the style reference image.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-1165\" src=\"https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-content\/uploads\/2022\/02\/Screen-Shot-2021-04-12-at-1.43.40-AM-1200x302-1.png\" alt=\"\" width=\"1200\" height=\"302\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-content\/uploads\/2022\/02\/Screen-Shot-2021-04-12-at-1.43.40-AM-1200x302-1.png 1200w, https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-content\/uploads\/2022\/02\/Screen-Shot-2021-04-12-at-1.43.40-AM-1200x302-1-640x161.png 640w, https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-content\/uploads\/2022\/02\/Screen-Shot-2021-04-12-at-1.43.40-AM-1200x302-1-1024x258.png 1024w, https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-content\/uploads\/2022\/02\/Screen-Shot-2021-04-12-at-1.43.40-AM-1200x302-1-768x193.png 768w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<p>Various new media artists are now using style transfer code, and they\u2019re not using it to make more\u00a0<em>Starry Night clones<\/em>. Here\u2019s a project by artist\u00a0<strong><a href=\"https:\/\/superrare.co\/aspalter7\/creations\">Anne Spalter<\/a><\/strong>, who has processed a photo of a highway with Style Transfer from a charcoal drawing:<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-1166\" src=\"https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-content\/uploads\/2022\/02\/UX5o7Io-1200x1200-1.jpg\" alt=\"\" width=\"1200\" height=\"1200\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-content\/uploads\/2022\/02\/UX5o7Io-1200x1200-1.jpg 1200w, https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-content\/uploads\/2022\/02\/UX5o7Io-1200x1200-1-480x480.jpg 480w, https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-content\/uploads\/2022\/02\/UX5o7Io-1200x1200-1-1024x1024.jpg 1024w, https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-content\/uploads\/2022\/02\/UX5o7Io-1200x1200-1-150x150.jpg 150w, https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-content\/uploads\/2022\/02\/UX5o7Io-1200x1200-1-768x768.jpg 768w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<p>Some particularly stunning work has been made by French new-media artist\u00a0<strong><a href=\"https:\/\/linktr.ee\/luluxXX\">Luluixix<\/a><\/strong>., who uses custom textures for style-transferred video. Originally a special effects designer, she now is active in NFT marketplaces:<\/p>\n<p><iframe loading=\"lazy\" title=\"Noj Dot Forest 2 : the &quot;Stoner&quot; Edition\" src=\"https:\/\/www.youtube.com\/embed\/ZGHr4_kZS8U?feature=oembed\" width=\"840\" height=\"473\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\" data-mce-fragment=\"1\"><\/iframe><\/p>\n<p>More lovely work in the realm of style transfer is done by\u00a0<a href=\"https:\/\/en.wikipedia.org\/wiki\/Nettrice_Gaskins\" target=\"_blank\" rel=\"noopener\"><strong>Dr. Nettrice R. Gaskins<\/strong><\/a>, a digital artist and professor at Lesley University. Her recent works use a combination of traditional generative techniques and neural algorithms to explore what she terms \u201ctechno-vernacular creativity\u201d.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-1167\" src=\"https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-content\/uploads\/2022\/02\/nettrice-1-1200x549-1.jpg\" alt=\"\" width=\"1200\" height=\"549\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-content\/uploads\/2022\/02\/nettrice-1-1200x549-1.jpg 1200w, https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-content\/uploads\/2022\/02\/nettrice-1-1200x549-1-640x293.jpg 640w, https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-content\/uploads\/2022\/02\/nettrice-1-1200x549-1-1024x468.jpg 1024w, https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-content\/uploads\/2022\/02\/nettrice-1-1200x549-1-768x351.jpg 768w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<p>Style transfer has also been used by artists in the context of interactive installations.\u00a0<strong>Memo Akten\u2019s\u00a0<a href=\"https:\/\/www.memo.tv\/portfolio\/learning-to-see\/\" rel=\"nofollow\">Learning to See<\/a>\u00a0(2017)<\/strong>\u00a0uses style transfer techniques to reinterpret imagery on a table from an overhead webcam:<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-1168\" src=\"https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-content\/uploads\/2022\/02\/MSA_LearningToSee_Barbican2019-12-thumb-1200x850-1.jpg\" alt=\"\" width=\"1200\" height=\"850\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-content\/uploads\/2022\/02\/MSA_LearningToSee_Barbican2019-12-thumb-1200x850-1.jpg 1200w, https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-content\/uploads\/2022\/02\/MSA_LearningToSee_Barbican2019-12-thumb-1200x850-1-640x453.jpg 640w, https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-content\/uploads\/2022\/02\/MSA_LearningToSee_Barbican2019-12-thumb-1200x850-1-1024x725.jpg 1024w, https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-content\/uploads\/2022\/02\/MSA_LearningToSee_Barbican2019-12-thumb-1200x850-1-768x544.jpg 768w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<p><iframe loading=\"lazy\" title=\"Learning to see: Gloomy Sunday\" src=\"https:\/\/player.vimeo.com\/video\/260612034?dnt=1&amp;app_id=122963\" width=\"840\" height=\"473\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\" data-mce-fragment=\"1\"><\/iframe><\/p>\n<p>A related interactive project is the whimsical\u00a0<strong><a href=\"https:\/\/twitter.com\/quasimondo\/status\/982711735001010176\"><em>Fingerplay<\/em><\/a>\u00a0(2018) by Mario Klingemann<\/strong>, which uses a model trained on images of portrait paintings:<\/p>\n<blockquote class=\"twitter-tweet\">\n<p dir=\"ltr\" lang=\"en\">Fingerplay (Take 1) <a href=\"https:\/\/t.co\/oyys84Al0e\">pic.twitter.com\/oyys84Al0e<\/a><\/p>\n<p>\u2014 Mario Klingemann (@quasimondo) <a href=\"https:\/\/twitter.com\/quasimondo\/status\/982711735001010176?ref_src=twsrc%5Etfw\">April 7, 2018<\/a><\/p><\/blockquote>\n<p><script async src=\"https:\/\/platform.twitter.com\/widgets.js\" charset=\"utf-8\"><\/script><\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-1169\" src=\"https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-content\/uploads\/2022\/02\/Screen-Shot-2021-04-09-at-3.39.58-PM-1200x576-1.png\" alt=\"\" width=\"1200\" height=\"576\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-content\/uploads\/2022\/02\/Screen-Shot-2021-04-09-at-3.39.58-PM-1200x576-1.png 1200w, https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-content\/uploads\/2022\/02\/Screen-Shot-2021-04-09-at-3.39.58-PM-1200x576-1-640x307.png 640w, https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-content\/uploads\/2022\/02\/Screen-Shot-2021-04-09-at-3.39.58-PM-1200x576-1-1024x492.png 1024w, https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-content\/uploads\/2022\/02\/Screen-Shot-2021-04-09-at-3.39.58-PM-1200x576-1-768x369.png 768w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<p>Conceptually related to style transfer is the\u00a0<em>Pix2Pix<\/em>\u00a0algorithm by Isola et al. In this way of working, the artist working with neural networks does not specify the rules; instead, she specifies pairs of\u00a0<i>inputs<\/i>\u00a0and\u00a0<i>outputs<\/i>, and\u00a0<b>allows the network to learn the rules<\/b>\u00a0that characterize the transformation \u2014 whatever those rules may be. For example, a network might study the relationship between:<\/p>\n<ul>\n<li><strong>color and grayscale<\/strong>\u00a0versions of an image<\/li>\n<li><strong>sharp and blurry<\/strong>\u00a0versions of an image<\/li>\n<li><strong>day and night<\/strong>\u00a0versions of a scene<\/li>\n<li><strong>satellite-photos and cartographic map<\/strong>s of terrain<\/li>\n<li><strong>labeled versions and unlabeled versions<\/strong>\u00a0of a photo<\/li>\n<\/ul>\n<p>And then\u2014remarkably\u2014these networks can run these rules\u00a0<b>backwards<\/b>: They can realistically colorize black-and-white images, or produce sharp, high-resolution images from low-resolution ones. Where they need to invent information to do this, they do so using inferences derived from thousands or millions of real examples.<\/p>\n<p class=\"p1\">I\u2019d like to present you a good example of this, and something fun you can experiment with yourself at home. This is a program called\u00a0<a href=\"https:\/\/affinelayer.com\/pixsrv\/\"><b>Edges2Cats<\/b><\/a>\u00a0by Christopher Hesse, which we will be using in our exercises. In this project, Hesse took a large number of images of cats. He ran these through an\u00a0<b>edge-detector<\/b>, which is a very standard image processing operation, to produce images of their outlines. He trained a network to understand the\u00a0<i>relationship<\/i>\u00a0between these image pairs. And then he created an interaction where you can run this relationship\u00a0<i>backwards<\/i>.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-1170\" src=\"https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-content\/uploads\/2022\/02\/edges2cats-website-817-1200x715-1.png\" alt=\"\" width=\"1200\" height=\"715\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-content\/uploads\/2022\/02\/edges2cats-website-817-1200x715-1.png 1200w, https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-content\/uploads\/2022\/02\/edges2cats-website-817-1200x715-1-640x381.png 640w, https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-content\/uploads\/2022\/02\/edges2cats-website-817-1200x715-1-1024x610.png 1024w, https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-content\/uploads\/2022\/02\/edges2cats-website-817-1200x715-1-768x458.png 768w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-1171\" src=\"https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-content\/uploads\/2022\/02\/edges2cats_main_1920x1080-351-1200x675-1.jpg\" alt=\"\" width=\"1200\" height=\"675\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-content\/uploads\/2022\/02\/edges2cats_main_1920x1080-351-1200x675-1.jpg 1200w, https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-content\/uploads\/2022\/02\/edges2cats_main_1920x1080-351-1200x675-1-640x360.jpg 640w, https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-content\/uploads\/2022\/02\/edges2cats_main_1920x1080-351-1200x675-1-1024x576.jpg 1024w, https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-content\/uploads\/2022\/02\/edges2cats_main_1920x1080-351-1200x675-1-768x432.jpg 768w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-1172\" src=\"https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-content\/uploads\/2022\/02\/1KLgJkrfRMhXdS2ToLwnvYv41w39zkMESf0W_-grqXPMkxWlciLI9RiPoKhuNb90w88IEjspgzqXqxofQKgN8X0eRd8UN74pAGHOw8hu1mDGJX-aqeYLKQYWjBzPdQztjuht_5E9xA-927-1200x675-1.png\" alt=\"\" width=\"1200\" height=\"675\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-content\/uploads\/2022\/02\/1KLgJkrfRMhXdS2ToLwnvYv41w39zkMESf0W_-grqXPMkxWlciLI9RiPoKhuNb90w88IEjspgzqXqxofQKgN8X0eRd8UN74pAGHOw8hu1mDGJX-aqeYLKQYWjBzPdQztjuht_5E9xA-927-1200x675-1.png 1200w, https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-content\/uploads\/2022\/02\/1KLgJkrfRMhXdS2ToLwnvYv41w39zkMESf0W_-grqXPMkxWlciLI9RiPoKhuNb90w88IEjspgzqXqxofQKgN8X0eRd8UN74pAGHOw8hu1mDGJX-aqeYLKQYWjBzPdQztjuht_5E9xA-927-1200x675-1-640x360.png 640w, https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-content\/uploads\/2022\/02\/1KLgJkrfRMhXdS2ToLwnvYv41w39zkMESf0W_-grqXPMkxWlciLI9RiPoKhuNb90w88IEjspgzqXqxofQKgN8X0eRd8UN74pAGHOw8hu1mDGJX-aqeYLKQYWjBzPdQztjuht_5E9xA-927-1200x675-1-1024x576.png 1024w, https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-content\/uploads\/2022\/02\/1KLgJkrfRMhXdS2ToLwnvYv41w39zkMESf0W_-grqXPMkxWlciLI9RiPoKhuNb90w88IEjspgzqXqxofQKgN8X0eRd8UN74pAGHOw8hu1mDGJX-aqeYLKQYWjBzPdQztjuht_5E9xA-927-1200x675-1-768x432.png 768w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<p>It\u2019s worth pointing out that evil twin of Edges2Cats is a project like the one above, which is aimed at occluded or disguised face recognition. These researchers have trained their network on pairs of images: your face, and your face with a disguise \u2014 in the hope of running that network backwards.\u00a0<em>See someone with a mask, and guess who it is\u2026<\/em><\/p>\n<p>Newer variations of style transfer, such as CycleGAN, allow a network to be trained with<em>\u00a0unpaired photographs<\/em>, such as a collection of horse images, and a collection of zebra images.<\/p>\n<p><iframe loading=\"lazy\" title=\"Turning a horse video into a zebra video (by CycleGAN)\" src=\"https:\/\/www.youtube.com\/embed\/9reHvktowLY?feature=oembed\" width=\"840\" height=\"473\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\" data-mce-fragment=\"1\"><\/iframe><\/p>\n<hr \/>\n<h2>Latent Space Navigation<\/h2>\n<p>When a GAN is trained, it produces a \u201clatent space\u201d \u2014 a multi-thousand-dimensional mathematical representation of how a given subject varies. Those dimensions correspond to the\u00a0<em>modes of variability<\/em>\u00a0in that dataset, some of which we have conventional names for. For example, for faces, these dimensions might encode visually salient continuums such as:<\/p>\n<ul>\n<li>looking left \u2026 looking right<\/li>\n<li>facing up \u2026 facing down<\/li>\n<li>smiling \u2026 frowning<\/li>\n<li>young \u2026 old<\/li>\n<li>\u201cmale\u201d \u2026 \u201cfemale\u201d<\/li>\n<li>smiling \u2026 frowning<\/li>\n<li>mouth open \u2026 mouth closed<\/li>\n<li>dark-skinned \u2026 light skinned<\/li>\n<li>no facial hair \u2026 long beard<\/li>\n<\/ul>\n<p>Some artists have created work which is centered on<em>\u00a0moving through<\/em>\u00a0this latent space. Here is\u00a0<strong><a href=\"https:\/\/www.youtube.com\/watch?v=A6bo_mIOto0&amp;t=120s\">a 2020 project by Mario Klingemann<\/a><\/strong>, in which he has linked some variables extracted from music analysis (such as amplitude), to various parameters in the StyleGAN2 latent space. Every frame in the video visualizes a different point in the latent space. Note that Klingemann has made artistic choices about these mappings, and it is possible to see uncanny or monstrous faces at extreme coordinates in this space: (<em>play at slow speed<\/em>)<\/p>\n<p><iframe loading=\"lazy\" title=\"StyleGAN2 - mapping music to facial expressions in real time\" src=\"https:\/\/www.youtube.com\/embed\/A6bo_mIOto0?start=120&amp;feature=oembed\" width=\"840\" height=\"630\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\" data-mce-fragment=\"1\"><\/iframe><\/p>\n<p>It\u2019s also possible to navigate these latent spaces interactively. Here\u2019s\u00a0<strong><em><a href=\"https:\/\/vimeo.com\/322525369\">Xoromancy<\/a><\/em>\u00a0(2019)<\/strong>, an interactive installation by CMU students Aman Tiwari (Art) and Gray Crawford (Design), shown at the Frame Gallery:<\/p>\n<p><iframe loading=\"lazy\" title=\"Xoromancy: Image Creation via Gestural Control of High-Dimensional Spaces\" src=\"https:\/\/player.vimeo.com\/video\/322525369?dnt=1&amp;app_id=122963\" width=\"840\" height=\"473\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\" data-mce-fragment=\"1\"><\/iframe><\/p>\n<p>The <em>Xoromancy<\/em> installation uses a LEAP sensor (which understands the structure of the visitors\u2019 hands); the installation maps variables from the user\u2019s hands to the latent space of the BigGAN network.<\/p>\n<p>In a similar vein, here\u2019s Anna Ridler\u2019s\u00a0<a href=\"http:\/\/annaridler.com\/mosaic-virus\" rel=\"nofollow\"><em>Mosaic Virus<\/em><\/a>\u00a0(2019,\u00a0<a href=\"https:\/\/vimeo.com\/273192356\" rel=\"nofollow\">video<\/a>). Anna Ridler\u2019s real-time video installation shows a tulip blooming, whose appearance is governed by the trading price of Bitcoin. Ridler writes that \u201c<em>getting an AI to \u2018imagine\u2019 or \u2018dream\u2019 tulips echoes 17th century Dutch still life flower paintings which, despite their realism, are \u2018botanical impossibilities\u2019<\/em>\u201c.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/github.com\/golanlevin\/lectures\/raw\/master\/lecture_cnns_and_gans\/images\/anna_ridler_mosaic_virus.jpg\" alt=\"Anna Ridler, Mosaic Virus\" \/><\/p>\n<p>We will watch 6 minutes of this presentation by Anna Ridler (0:48 \u2013 7:22), where she discusses how GANs work; her tulip project; and some of the extremely problematic ways in which the images in datasets that are used to train GANS, have been labeled.<\/p>\n<p><iframe loading=\"lazy\" title=\"Nicer Tuesdays: Anna Ridler\" src=\"https:\/\/www.youtube.com\/embed\/VlJfvoEXKbk?start=48&amp;feature=oembed\" width=\"840\" height=\"473\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\" data-mce-fragment=\"1\"><\/iframe><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u201cMore Like This, Please\u201d Much of today\u2019s presentation focuses on the use of deep convolutional neural networks in generating imagery. Recall how earlier in the semester, we discussed computer arts pioneer, Vera Moln\u00e1r, born 1924 (and still working at 98), a Hungarian-French artist who was one of the first dozen or so people to make &hellip; <a href=\"https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/daily-notes\/02-28-machine-learning\/machine-learning-i\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Machine Learning I&#8221;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"parent":1363,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"_links":{"self":[{"href":"https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-json\/wp\/v2\/pages\/1152"}],"collection":[{"href":"https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-json\/wp\/v2\/comments?post=1152"}],"version-history":[{"count":10,"href":"https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-json\/wp\/v2\/pages\/1152\/revisions"}],"predecessor-version":[{"id":1405,"href":"https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-json\/wp\/v2\/pages\/1152\/revisions\/1405"}],"up":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-json\/wp\/v2\/pages\/1363"}],"wp:attachment":[{"href":"https:\/\/courses.ideate.cmu.edu\/60-212\/s2022\/wp-json\/wp\/v2\/media?parent=1152"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}