{"id":1583,"date":"2023-02-05T05:17:26","date_gmt":"2023-02-05T03:17:26","guid":{"rendered":"https:\/\/www.lbscience.org\/en\/2025\/11\/20\/%d7%90%d7%99%d7%96%d7%95-%d7%aa%d7%9e%d7%95%d7%a0%d7%94-%d7%aa%d7%a8%d7%a6%d7%95-%d7%a9%d7%90%d7%a6%d7%95%d7%a8-%d7%90%d7%a4%d7%a9%d7%a8-%d7%9c%d7%99%d7%a6%d7%95%d7%a8-%d7%aa%d7%99%d7%90%d7%95\/"},"modified":"2026-03-07T05:45:35","modified_gmt":"2026-03-07T03:45:35","slug":"generate-a-picture-for-us","status":"publish","type":"post","link":"https:\/\/www.lbscience.org\/en\/2023\/02\/05\/generate-a-picture-for-us\/","title":{"rendered":"Generate a Picture for Us"},"content":{"rendered":"<p>The new applications include an image generator. It generates a random picture from an initial image that is composed of randomly selected pixels (\u201cnoise\u201d), as well as a component that uses the text you enter to influence the content of the image. This method described below is known as a \u201cdiffusion model\u201d and it is used in drawing apps such as Stable Diffusion. An excellent explanation can be found in video [2] of the Computerphile series.<\/p>\n<p>We will explain how the app works by comparing it to the process of creating a sculpture. Imagine a skilled, well-trained sculptor is given an unhewn block of stone (like an image made up of random pixels), and he begins to chisel it. Uncertain what to create, so he cuts away a few protrusions that will probably not be part of the final sculpture. After a while, he stops to look at what he has made so far. He notices that the stone he has started to sculpt resembles many different types of sculptures he is familiar with from his extensive experience. He randomly chooses a direction that could lead to various possibilities, and starts chiselling again. After some time, he pauses again and realizes that the stone could take the shape of a more specific type of sculpture.\u00a0 He randomly selects a direction, chisels a little, takes a look, and repeats this process over and over again. Eventually, the statue takes shape, becoming similar to, but not identical to, one of the sculptures stored in his memory. This gradual creation process, involving random choices at every stage, produces a random yet high-quality result.<\/p>\n<p>And there is another important addition: imagine that, at each stage of the construction process, a disembodied voice whispers an instruction to the sculptor, such as \u201cMake us an angel statue\u201d (similar to selecting an image theme by entering text). The sculptor then follows the same process, but at every stage he only considers angel statues, gradually tuning himself towards creating a random angel statue.<\/p>\n<p>Similarly, in an image-generation app that uses a neural network for \u201cdeep learning\u201d [1], the network starts with a picture made of random pixels (\u201can unhewn block of stone\u201d in our analogy) and by gradually changing the pixels, produces a high-quality image defined by text. To achieve this, the network must first be trained using real images. The Stable Diffusion software has a database of 2.3 billion images for this purpose. During training, images are taken from the database and a random positive or negative value is added to each pixel, representing normally distributed noise (\u201cGaussian noise\u201d), producing noisy images. The aim is to teach the network to locate and identify the added noise so that the original image can be recovered by subtracting the noise component from the noisy image.<\/p>\n<p>In our analogy, an instructor gives a novice sculptor a block of stone containing the beginnings of a well-known statue, but with extra layers of stone (\u201cnoise\u201d) on top. The novice must then learn how to proceed. As the famous saying by Michelangelo's goes, \u201cThe statue is already in the stone, and the sculptor\u2019s task is to remove the excess stone.\u201d The developers found that it is sometimes easier to first estimate the noise component and then find a suitable image. For example, if a noisy image contains a black area with a single white pixel, this pixel is likely to be noise that should be removed.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-23746 size-full\" src=\"https:\/\/www.lbscience.org\/wp-content\/uploads\/2023\/01\/Picture1.png\" alt=\"\" width=\"498\" height=\"373\" \/><\/p>\n<p>The learning algorithm is executed in many small steps, around a thousand for example. For each image in the database, we start with a clean image, adding random noise at each step. We then inform the network of the total amount of noise (in mathematical terms, the mean and variance of the Gaussian distribution), and train it to produce an image that is closer to the original. In the early stages, when the noise level is low, the network performs well. However, in the later stages, when the images are mostly noise, its performance drops and it struggles. Yet the process works! How?<\/p>\n<p>Having described the training process, we will now describe the inference phase. Let\u2019s create an image of random pixels and feed it to the network. We inform the network that we have reached the final step, and provide the corresponding noise level. The network will do its best, as it was trained, to estimate the noise and thereby generate an approximation of the original image (which never actually existed\u2026). This estimate is quite poor, but it is presumably \u201csmoother\u201d, and this is only the beginning. Next, we add Gaussian noise to the estimated image at the intensity corresponding to the penultimate step, before feeding it back to the network. The network will use its experience to estimate the noise for this step and will create a slightly less noisy image. As this process continues, the noise level decreases, until, miraculously, we obtain a random image based on one of those in the database.<\/p>\n<p>This sounds lovely, but what's more important, and more complex, is the ability to integrate text into this process. As mentioned, users can direct the creation of the image by writing a sentence. First, the software interprets the semantic meaning of the sentence. The algorithms currently used for this purpose are called Transformers. We wrote about such an algorithm called BERT[3],\u00a0and we are all familiar with ChatGPT. The result of this stage is a numerical representation of the sentence\u2019s semantic meaning. Each image in the software\u2019s vast database, which was created by collecting images from the web, is also accompanied by a text description. Therefore, the network can direct the image creation process towards images that match the text we wrote. At each stage of creation, the application instructs the network: \u201cClean the noise so that the image matches the set of images relevant to the text.\u201d Since the process consists of many stages, the network gradually synchronizes and uses only the desired images. The final product is an image composed of a random combination of pictures related to the text. Users can run the application multiple times with the same text and receive different images, choosing the one that looks best.<\/p>\n<p>Since they appeared, these applications have generated enormous media buzz, attracting plenty of enthusiasts and detractors alike. We asked Miri, an artist and designer who recently created several images for our posts using Midjourney, how she thinks artists can add a personal touch. She said that she likes to guide the application by using an advanced option called \u201cimage to image\u201d. She feeds the application a sketch or a photograph that she has created herself. For the illustration she created for this post, Miri used a quick sketch she had prepared. Once she was happy with the result, she redrew it in her own illustrative style. Compare the featured image of this post with the image produced by an application:<\/p>\n<div id=\"attachment_23807\" style=\"width: 764px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-23807\" class=\"wp-image-23807\" src=\"https:\/\/www.lbscience.org\/wp-content\/uploads\/2023\/01\/328466963_583631006521517_7063661700643801627_n-1024x683.jpg\" alt=\"\" width=\"754\" height=\"503\" \/><p id=\"caption-attachment-23807\" class=\"wp-caption-text\">Image design: Miri Orenstein with the assistance of the Midjourney AI software<\/p><\/div>\n<p>Hebrew editing: Smadar Raban<br \/>\nEnglish editing: Gloria Volohonsky<\/p>\n<hr \/>\n<p><strong>References:<\/strong><\/p>\n<ol>\n<li><a href=\"https:\/\/www.lbscience.org\/en\/2019\/04\/29\/deep-learning\/\">Deep learning<\/a><\/li>\n<li><a href=\"https:\/\/www.youtube.com\/watch?v=1CIpzeNxIhU\">Video on stable-diffusion<\/a><\/li>\n<li><a href=\"https:\/\/en.wikipedia.org\/wiki\/BERT_(language_model)\">BERT algorithm, Wikipedia<\/a><\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>The new applications include an image generator. It generates a random picture from an initial image that is composed of randomly selected pixels (\u201cnoise\u201d), as well as a component that uses the text you enter to influence the content of the image. This method described below is known as a \u201cdiffusion model\u201d and it is [&hellip;]<\/p>\n","protected":false},"author":31,"featured_media":1803,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[20],"tags":[],"class_list":["post-1583","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-computer-science"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Generate a Picture for Us - Little, Big Science<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.lbscience.org\/en\/2023\/02\/05\/generate-a-picture-for-us\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Generate a Picture for Us - Little, Big Science\" \/>\n<meta property=\"og:description\" content=\"The new applications include an image generator. It generates a random picture from an initial image that is composed of randomly selected pixels (\u201cnoise\u201d), as well as a component that uses the text you enter to influence the content of the image. This method described below is known as a \u201cdiffusion model\u201d and it is [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.lbscience.org\/en\/2023\/02\/05\/generate-a-picture-for-us\/\" \/>\n<meta property=\"og:site_name\" content=\"Little, Big Science\" \/>\n<meta property=\"article:published_time\" content=\"2023-02-05T03:17:26+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-03-07T03:45:35+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.lbscience.org\/en\/wp-content\/uploads\/sites\/3\/2023\/02\/en_meme-4.jpeg\" \/>\n\t<meta property=\"og:image:width\" content=\"2400\" \/>\n\t<meta property=\"og:image:height\" content=\"1350\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"\u05d3\u05d5\u05e8\u05d5\u05df \u05d0\u05d5\u05e8\u05e0\u05e9\u05d8\u05d9\u05d9\u05df\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@dororen7\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u05d3\u05d5\u05e8\u05d5\u05df \u05d0\u05d5\u05e8\u05e0\u05e9\u05d8\u05d9\u05d9\u05df\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.lbscience.org\/en\/2023\/02\/05\/generate-a-picture-for-us\/\",\"url\":\"https:\/\/www.lbscience.org\/en\/2023\/02\/05\/generate-a-picture-for-us\/\",\"name\":\"Generate a Picture for Us - Little, Big Science\",\"isPartOf\":{\"@id\":\"https:\/\/www.lbscience.org\/en\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.lbscience.org\/en\/2023\/02\/05\/generate-a-picture-for-us\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.lbscience.org\/en\/2023\/02\/05\/generate-a-picture-for-us\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.lbscience.org\/en\/wp-content\/uploads\/sites\/3\/2023\/02\/en_meme-4.jpeg\",\"datePublished\":\"2023-02-05T03:17:26+00:00\",\"dateModified\":\"2026-03-07T03:45:35+00:00\",\"author\":{\"@id\":\"https:\/\/www.lbscience.org\/en\/#\/schema\/person\/c018c5220ef9f4f688be3c9f9e067ccc\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.lbscience.org\/en\/2023\/02\/05\/generate-a-picture-for-us\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.lbscience.org\/en\/2023\/02\/05\/generate-a-picture-for-us\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.lbscience.org\/en\/2023\/02\/05\/generate-a-picture-for-us\/#primaryimage\",\"url\":\"https:\/\/www.lbscience.org\/en\/wp-content\/uploads\/sites\/3\/2023\/02\/en_meme-4.jpeg\",\"contentUrl\":\"https:\/\/www.lbscience.org\/en\/wp-content\/uploads\/sites\/3\/2023\/02\/en_meme-4.jpeg\",\"width\":2400,\"height\":1350},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.lbscience.org\/en\/2023\/02\/05\/generate-a-picture-for-us\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.lbscience.org\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Generate a Picture for Us\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.lbscience.org\/en\/#website\",\"url\":\"https:\/\/www.lbscience.org\/en\/\",\"name\":\"Little, Big Science\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.lbscience.org\/en\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.lbscience.org\/en\/#\/schema\/person\/c018c5220ef9f4f688be3c9f9e067ccc\",\"name\":\"\u05d3\u05d5\u05e8\u05d5\u05df \u05d0\u05d5\u05e8\u05e0\u05e9\u05d8\u05d9\u05d9\u05df\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.lbscience.org\/en\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/791fd5d338119276a2d912a7c40cf707?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/791fd5d338119276a2d912a7c40cf707?s=96&d=mm&r=g\",\"caption\":\"\u05d3\u05d5\u05e8\u05d5\u05df \u05d0\u05d5\u05e8\u05e0\u05e9\u05d8\u05d9\u05d9\u05df\"},\"description\":\"\u05de\u05d4\u05e0\u05d3\u05e1 \u05de\u05d7\u05e9\u05d1\u05d9\u05dd, \u05d7\u05d5\u05e7\u05e8 \u05d5\u05d9\u05d6\u05dd \u05d1\u05ea\u05d7\u05d5\u05dd \u05d4\u05d7\u05d9\u05e0\u05d5\u05da \u05d4\u05de\u05ea\u05de\u05d8\u05d9.\",\"sameAs\":[\"https:\/\/x.com\/dororen7\"],\"url\":\"https:\/\/www.lbscience.org\/en\/author\/dorono\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Generate a Picture for Us - Little, Big Science","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.lbscience.org\/en\/2023\/02\/05\/generate-a-picture-for-us\/","og_locale":"en_US","og_type":"article","og_title":"Generate a Picture for Us - Little, Big Science","og_description":"The new applications include an image generator. It generates a random picture from an initial image that is composed of randomly selected pixels (\u201cnoise\u201d), as well as a component that uses the text you enter to influence the content of the image. This method described below is known as a \u201cdiffusion model\u201d and it is [&hellip;]","og_url":"https:\/\/www.lbscience.org\/en\/2023\/02\/05\/generate-a-picture-for-us\/","og_site_name":"Little, Big Science","article_published_time":"2023-02-05T03:17:26+00:00","article_modified_time":"2026-03-07T03:45:35+00:00","og_image":[{"width":2400,"height":1350,"url":"https:\/\/www.lbscience.org\/en\/wp-content\/uploads\/sites\/3\/2023\/02\/en_meme-4.jpeg","type":"image\/jpeg"}],"author":"\u05d3\u05d5\u05e8\u05d5\u05df \u05d0\u05d5\u05e8\u05e0\u05e9\u05d8\u05d9\u05d9\u05df","twitter_card":"summary_large_image","twitter_creator":"@dororen7","twitter_misc":{"Written by":"\u05d3\u05d5\u05e8\u05d5\u05df \u05d0\u05d5\u05e8\u05e0\u05e9\u05d8\u05d9\u05d9\u05df","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.lbscience.org\/en\/2023\/02\/05\/generate-a-picture-for-us\/","url":"https:\/\/www.lbscience.org\/en\/2023\/02\/05\/generate-a-picture-for-us\/","name":"Generate a Picture for Us - Little, Big Science","isPartOf":{"@id":"https:\/\/www.lbscience.org\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.lbscience.org\/en\/2023\/02\/05\/generate-a-picture-for-us\/#primaryimage"},"image":{"@id":"https:\/\/www.lbscience.org\/en\/2023\/02\/05\/generate-a-picture-for-us\/#primaryimage"},"thumbnailUrl":"https:\/\/www.lbscience.org\/en\/wp-content\/uploads\/sites\/3\/2023\/02\/en_meme-4.jpeg","datePublished":"2023-02-05T03:17:26+00:00","dateModified":"2026-03-07T03:45:35+00:00","author":{"@id":"https:\/\/www.lbscience.org\/en\/#\/schema\/person\/c018c5220ef9f4f688be3c9f9e067ccc"},"breadcrumb":{"@id":"https:\/\/www.lbscience.org\/en\/2023\/02\/05\/generate-a-picture-for-us\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.lbscience.org\/en\/2023\/02\/05\/generate-a-picture-for-us\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.lbscience.org\/en\/2023\/02\/05\/generate-a-picture-for-us\/#primaryimage","url":"https:\/\/www.lbscience.org\/en\/wp-content\/uploads\/sites\/3\/2023\/02\/en_meme-4.jpeg","contentUrl":"https:\/\/www.lbscience.org\/en\/wp-content\/uploads\/sites\/3\/2023\/02\/en_meme-4.jpeg","width":2400,"height":1350},{"@type":"BreadcrumbList","@id":"https:\/\/www.lbscience.org\/en\/2023\/02\/05\/generate-a-picture-for-us\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.lbscience.org\/en\/"},{"@type":"ListItem","position":2,"name":"Generate a Picture for Us"}]},{"@type":"WebSite","@id":"https:\/\/www.lbscience.org\/en\/#website","url":"https:\/\/www.lbscience.org\/en\/","name":"Little, Big Science","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.lbscience.org\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.lbscience.org\/en\/#\/schema\/person\/c018c5220ef9f4f688be3c9f9e067ccc","name":"\u05d3\u05d5\u05e8\u05d5\u05df \u05d0\u05d5\u05e8\u05e0\u05e9\u05d8\u05d9\u05d9\u05df","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.lbscience.org\/en\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/791fd5d338119276a2d912a7c40cf707?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/791fd5d338119276a2d912a7c40cf707?s=96&d=mm&r=g","caption":"\u05d3\u05d5\u05e8\u05d5\u05df \u05d0\u05d5\u05e8\u05e0\u05e9\u05d8\u05d9\u05d9\u05df"},"description":"\u05de\u05d4\u05e0\u05d3\u05e1 \u05de\u05d7\u05e9\u05d1\u05d9\u05dd, \u05d7\u05d5\u05e7\u05e8 \u05d5\u05d9\u05d6\u05dd \u05d1\u05ea\u05d7\u05d5\u05dd \u05d4\u05d7\u05d9\u05e0\u05d5\u05da \u05d4\u05de\u05ea\u05de\u05d8\u05d9.","sameAs":["https:\/\/x.com\/dororen7"],"url":"https:\/\/www.lbscience.org\/en\/author\/dorono\/"}]}},"_links":{"self":[{"href":"https:\/\/www.lbscience.org\/en\/wp-json\/wp\/v2\/posts\/1583","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.lbscience.org\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.lbscience.org\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.lbscience.org\/en\/wp-json\/wp\/v2\/users\/31"}],"replies":[{"embeddable":true,"href":"https:\/\/www.lbscience.org\/en\/wp-json\/wp\/v2\/comments?post=1583"}],"version-history":[{"count":21,"href":"https:\/\/www.lbscience.org\/en\/wp-json\/wp\/v2\/posts\/1583\/revisions"}],"predecessor-version":[{"id":2693,"href":"https:\/\/www.lbscience.org\/en\/wp-json\/wp\/v2\/posts\/1583\/revisions\/2693"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.lbscience.org\/en\/wp-json\/wp\/v2\/media\/1803"}],"wp:attachment":[{"href":"https:\/\/www.lbscience.org\/en\/wp-json\/wp\/v2\/media?parent=1583"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.lbscience.org\/en\/wp-json\/wp\/v2\/categories?post=1583"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.lbscience.org\/en\/wp-json\/wp\/v2\/tags?post=1583"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}