


The powerful combination of diffusion + super-resolution models, the technology behind Google's image generator Imagen
In recent years, multimodal learning has received attention, especially in the two directions of text-image synthesis and image-text contrastive learning. Some AI models have attracted widespread public attention due to their application in creative image generation and editing, such as the text image models DALL・E and DALL-E 2 launched by OpenAI, and NVIDIA's GauGAN and GauGAN2.
Not to be outdone, Google released its own text-to-image model Imagen at the end of May, which seems to further expand the boundaries of caption-conditional image generation.
Given just a description of a scene, Imagen can generate high-quality, high-resolution images, regardless of whether the scene makes sense in the real world. The following figure shows several examples of Imagen text-generated images, with corresponding subtitles displayed below the image.
These impressive generated images make you wonder: How does Imagen work?
Recently, developer lecturer Ryan O'Connor wrote a long article "How Imagen Actually Works" on the AssemblyAI blog, explaining in detail the working principle of Imagen, giving an overview of Imagen, analyzing and understanding its High-level components and the relationships between them.
Overview of Imagen's working principle
In this part, the author shows the overall architecture of Imagen and gives a high-level explanation of other working principles; and then analyzes each of Imagen's features more thoroughly in turn. components. The following animation shows the workflow of Imagen.
First, input the subtitles into the text encoder. This encoder converts text subtitles into numerical representations that encapsulate semantic information in the text. The text encoder in Imagen is a Transformer encoder, which ensures that the text encoding understands how the words in the subtitles relate to each other, using self-attention methods.
If Imagen only focuses on individual words rather than the associations between them, although high-quality images capable of capturing individual elements of subtitles can be obtained, describing these images cannot reflect the subtitle semantics in an appropriate manner. As shown in the example below, if the association between words is not considered, a completely different generation effect will occur.
Although the text encoder generates a useful representation for Imagen's subtitle input, a method still needs to be devised to generate images that use this representation, that is, Image Generator. To do this, Imagen uses the diffusion model, a generative model that has gained popularity in recent years thanks to its SOTA performance on multiple tasks.
The diffusion model destroys the training data by adding noise to achieve training, and then learns to recover the data by reversing this noise process. Given an input image, the diffusion model will iteratively corrupt the image with Gaussian noise over a series of time steps, eventually leaving Gaussian noise or TV static. The following figure shows the iterative noise process of the diffusion model:
The diffusion model will then work backwards, learning how to isolate and eliminate the noise at each time step, canceling out what just happened the destruction process. After training is complete, the model can be split into two. In this way, you can start from randomly sampling Gaussian noise and use a diffusion model to gradually denoise to generate an image, as shown in the following figure:
Подводя итог, можно сказать, что обученная модель диффузии начинается с гауссовского шума, а затем итеративно генерирует изображения, аналогичные обучающим изображениям. Очевидно, что нет никакого контроля над фактическим выводом изображения: просто введите в модель гауссов шум, и она выведет случайное изображение, которое выглядит так, как будто оно принадлежит набору обучающих данных. Однако
цель состоит в том, чтобы создать изображения, которые инкапсулируют семантическую информацию субтитров, входящую в Imagen, поэтому необходим способ включения субтитров в процесс распространения. Как это сделать? Как упоминалось выше, кодировщик текста создает репрезентативную кодировку субтитров, которая на самом деле представляет собой векторную последовательность. Чтобы внедрить эту закодированную информацию в модель диффузии,
эти векторы объединяются вместе, и модель диффузии корректируется на их основе. Регулируя этот вектор, модель диффузии учится настраивать процесс шумоподавления для создания изображений, которые хорошо соответствуют субтитрам. Визуализация процесса показана ниже:
Поскольку генератор изображений или базовая модель выводит небольшое изображение размером 64x64, чтобы повысить частоту этой модели до окончательной версии 1024x1024,
Интеллектуальное повышение разрешения изображений с использованием моделей сверхвысокого разрешения.
Для модели сверхвысокого разрешения Imagen снова использует модель диффузии. Общий процесс в основном такой же, как и в базовой модели, за исключением того, что он настраивается исключительно на основе кодирования субтитров, а также с повышением разрешения изображений меньшего размера. Визуализация всего процесса выглядит следующим образом:
Вывод этой модели со сверхвысоким разрешением на самом деле не является конечным результатом, а изображением среднего размера
. Чтобы масштабировать это изображение до окончательного разрешения 1024x1024, используется другая модель сверхвысокого разрешения. Две архитектуры сверхвысокого разрешения примерно одинаковы, поэтому они не будут описываться снова. Результат второй модели сверхвысокого разрешения является окончательным результатом Imagen.
Почему Imagen лучше, чем DALL-E 2?
Точно ответить, почему Imagen лучше, чем DALL-E 2, сложно. Однако значительная часть разницы в производительности связана с различиями в субтитрах и репликах. DALL-E 2 использует контрастные цели, чтобы определить, насколько тесно текстовые кодировки связаны с изображениями (по сути, CLIP). Кодеры текста и изображения корректируют свои параметры таким образом, чтобы косинусное подобие аналогичных пар субтитр-изображение было максимальным, в то время как косинусное подобие несходных пар субтитр-изображение было минимизировано.
Значительная часть разницы в производительности связана с тем, что текстовый кодер Imagen намного больше и обучен на большем количестве данных, чем текстовый кодер DALL-E 2. В качестве доказательства этой гипотезы мы можем изучить производительность Imagen при масштабировании кодировщика текста. Вот кривая Парето для производительности Imagen:
Эффект от масштабирования текстовых кодировщиков на удивление высок, тогда как эффект от масштабирования U-Net на удивление низок. Этот результат показывает, что относительно простые модели диффузии могут давать высококачественные результаты, если они обусловлены строгим кодированием.
Учитывая, что текстовый кодер T5 намного больше, чем текстовый кодер CLIP, а также тот факт, что данные для обучения естественному языку обязательно богаче, чем пары «изображение-подпись», большая часть разницы в производительности, вероятно, связана с этой разницей. .
###Кроме того, автор также перечисляет несколько ключевых моментов Imagen, в том числе следующие: ###- Расширение кодировщика текста очень эффективно;
- Расширение кодировщика текста более важно, чем увеличение размера U-Net;
- Динамическое пороговое определение имеет решающее значение;
- Улучшение условий шума имеет решающее значение в моделях сверхвысокого разрешения;
- Очень важно использовать перекрестное внимание для обработки текста;
- Эффективная U-Net имеет решающее значение.
Эти идеи дают ценные указания для исследователей, работающих над моделями диффузии, которые полезны не только в области преобразования текста в изображение.
The above is the detailed content of The powerful combination of diffusion + super-resolution models, the technology behind Google's image generator Imagen. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



Imagine an artificial intelligence model that not only has the ability to surpass traditional computing, but also achieves more efficient performance at a lower cost. This is not science fiction, DeepSeek-V2[1], the world’s most powerful open source MoE model is here. DeepSeek-V2 is a powerful mixture of experts (MoE) language model with the characteristics of economical training and efficient inference. It consists of 236B parameters, 21B of which are used to activate each marker. Compared with DeepSeek67B, DeepSeek-V2 has stronger performance, while saving 42.5% of training costs, reducing KV cache by 93.3%, and increasing the maximum generation throughput to 5.76 times. DeepSeek is a company exploring general artificial intelligence

AI is indeed changing mathematics. Recently, Tao Zhexuan, who has been paying close attention to this issue, forwarded the latest issue of "Bulletin of the American Mathematical Society" (Bulletin of the American Mathematical Society). Focusing on the topic "Will machines change mathematics?", many mathematicians expressed their opinions. The whole process was full of sparks, hardcore and exciting. The author has a strong lineup, including Fields Medal winner Akshay Venkatesh, Chinese mathematician Zheng Lejun, NYU computer scientist Ernest Davis and many other well-known scholars in the industry. The world of AI has changed dramatically. You know, many of these articles were submitted a year ago.

Boston Dynamics Atlas officially enters the era of electric robots! Yesterday, the hydraulic Atlas just "tearfully" withdrew from the stage of history. Today, Boston Dynamics announced that the electric Atlas is on the job. It seems that in the field of commercial humanoid robots, Boston Dynamics is determined to compete with Tesla. After the new video was released, it had already been viewed by more than one million people in just ten hours. The old people leave and new roles appear. This is a historical necessity. There is no doubt that this year is the explosive year of humanoid robots. Netizens commented: The advancement of robots has made this year's opening ceremony look like a human, and the degree of freedom is far greater than that of humans. But is this really not a horror movie? At the beginning of the video, Atlas is lying calmly on the ground, seemingly on his back. What follows is jaw-dropping

Earlier this month, researchers from MIT and other institutions proposed a very promising alternative to MLP - KAN. KAN outperforms MLP in terms of accuracy and interpretability. And it can outperform MLP running with a larger number of parameters with a very small number of parameters. For example, the authors stated that they used KAN to reproduce DeepMind's results with a smaller network and a higher degree of automation. Specifically, DeepMind's MLP has about 300,000 parameters, while KAN only has about 200 parameters. KAN has a strong mathematical foundation like MLP. MLP is based on the universal approximation theorem, while KAN is based on the Kolmogorov-Arnold representation theorem. As shown in the figure below, KAN has

The performance of JAX, promoted by Google, has surpassed that of Pytorch and TensorFlow in recent benchmark tests, ranking first in 7 indicators. And the test was not done on the TPU with the best JAX performance. Although among developers, Pytorch is still more popular than Tensorflow. But in the future, perhaps more large models will be trained and run based on the JAX platform. Models Recently, the Keras team benchmarked three backends (TensorFlow, JAX, PyTorch) with the native PyTorch implementation and Keras2 with TensorFlow. First, they select a set of mainstream

The latest video of Tesla's robot Optimus is released, and it can already work in the factory. At normal speed, it sorts batteries (Tesla's 4680 batteries) like this: The official also released what it looks like at 20x speed - on a small "workstation", picking and picking and picking: This time it is released One of the highlights of the video is that Optimus completes this work in the factory, completely autonomously, without human intervention throughout the process. And from the perspective of Optimus, it can also pick up and place the crooked battery, focusing on automatic error correction: Regarding Optimus's hand, NVIDIA scientist Jim Fan gave a high evaluation: Optimus's hand is the world's five-fingered robot. One of the most dexterous. Its hands are not only tactile

Target detection is a relatively mature problem in autonomous driving systems, among which pedestrian detection is one of the earliest algorithms to be deployed. Very comprehensive research has been carried out in most papers. However, distance perception using fisheye cameras for surround view is relatively less studied. Due to large radial distortion, standard bounding box representation is difficult to implement in fisheye cameras. To alleviate the above description, we explore extended bounding box, ellipse, and general polygon designs into polar/angular representations and define an instance segmentation mIOU metric to analyze these representations. The proposed model fisheyeDetNet with polygonal shape outperforms other models and simultaneously achieves 49.5% mAP on the Valeo fisheye camera dataset for autonomous driving

This paper explores the problem of accurately detecting objects from different viewing angles (such as perspective and bird's-eye view) in autonomous driving, especially how to effectively transform features from perspective (PV) to bird's-eye view (BEV) space. Transformation is implemented via the Visual Transformation (VT) module. Existing methods are broadly divided into two strategies: 2D to 3D and 3D to 2D conversion. 2D-to-3D methods improve dense 2D features by predicting depth probabilities, but the inherent uncertainty of depth predictions, especially in distant regions, may introduce inaccuracies. While 3D to 2D methods usually use 3D queries to sample 2D features and learn the attention weights of the correspondence between 3D and 2D features through a Transformer, which increases the computational and deployment time.
