Skip to main content
QUICK REVIEW

[논문 리뷰] Controllable Text-to-Image Generation with GPT-4

Tianjun Zhang, Yi Zhang|arXiv (Cornell University)|2023. 05. 29.
Multimodal Machine Learning ApplicationsComputer Science인용 수 10
한 줄 요약

본 연구는 Control-GPT를 제시하며, 이는 GPT-4를 사용해 ControlNet 기반 확산 모델을 안내하는 TikZ 스케치를 생성하고 텍스트-이미지 생성에서 최첨단 공간 제어를 달성합니다.

ABSTRACT

Current text-to-image generation models often struggle to follow textual instructions, especially the ones requiring spatial reasoning. On the other hand, Large Language Models (LLMs), such as GPT-4, have shown remarkable precision in generating code snippets for sketching out text inputs graphically, e.g., via TikZ. In this work, we introduce Control-GPT to guide the diffusion-based text-to-image pipelines with programmatic sketches generated by GPT-4, enhancing their abilities for instruction following. Control-GPT works by querying GPT-4 to write TikZ code, and the generated sketches are used as references alongside the text instructions for diffusion models (e.g., ControlNet) to generate photo-realistic images. One major challenge to training our pipeline is the lack of a dataset containing aligned text, images, and sketches. We address the issue by converting instance masks in existing datasets into polygons to mimic the sketches used at test time. As a result, Control-GPT greatly boosts the controllability of image generation. It establishes a new state-of-art on the spatial arrangement and object positioning generation and enhances users' control of object positions, sizes, etc., nearly doubling the accuracy of prior models. Our work, as a first attempt, shows the potential for employing LLMs to enhance the performance in computer vision tasks.

연구 동기 및 목표

  • 공간 제어를 갖춘 정밀하고 지시를 따르는 텍스트-이미지 생성을 촉진하고 구현한다.
  • 확산 모델을 안내하는 프로그래밍된 스케치를 생성하기 위해 GPT-4를 활용한다.
  • 다각형 기반의 학습 데이터를 구성하여 GPT가 생성한 스케치와 확산 모델 간의 이해 차이를 완화한다.

제안 방법

  • 텍스트 프롬프트로부터 TikZ 스케치와 객체 그라운딩 토큰을 생성하도록 GPT-4에 프롬프트를 제공한다.
  • LVIS/COCO의 인스턴스 마스크를 폴리곤 스케치로 변환하여 그라운딩 토큰과 함께 ControlNet을 학습-튜닝한다.
  • 백본 확산 구성 요소를 동결한 채로 폴리곤 스케치와 그라운딩 토큰을 포함한 COCO/LVIS 파생 데이터셋에서 ControlNet을 미세조정한다.
  • 스케치를 객체 이름과 위치에 명시적으로 연결하기 위한 객체 그라운딩 토큰을 도입한다.
  • 추론 시 GPT-4를 질의하여 새로운 프롬프트에 대한 제로샷 스케치와 대응하는 그라운딩 토큰을 생성한다.
Figure 1 : Controllable text-to-image generation with GPT-4 in the loop . Among all the models, Control-GPT is both good at generating multiple objects, and the generated image follows exactly the TikZ sketch. Both DALL-E 2 and Stable Diffusion are not only unable to generate all the objects stated
Figure 1 : Controllable text-to-image generation with GPT-4 in the loop . Among all the models, Control-GPT is both good at generating multiple objects, and the generated image follows exactly the TikZ sketch. Both DALL-E 2 and Stable Diffusion are not only unable to generate all the objects stated

실험 결과

연구 질문

  • RQ1GPT-4가 텍스트 프롬프트를 따르는 정확한 프로그래밍 스케치(TikZ)를 생성하여 미세한 이미지 제어를 가능하게 할 수 있는가?
  • RQ2LLM 생성 스케치의 통합이 확산 기반 모델의 공간 정확도와 객체 그라운딩을 얼마나 향상시키는가?
  • RQ3가이드로서 GPT-4 스케치를 사용할 때 그라운딩 토큰을 추가하는 것이 객체 오인 식별을 줄이는가?
  • RQ4LVIS/COCO의 다각형으로부터 얻은 학습 데이터 구성의 스케치를 이미지 콘텐츠와 정합성에 어떤 영향을 주는가?
  • RQ5배포 범위를 벗어난 프롬프트와 다중 객체 장면에서 프레임워크의 성능은 어떠한가?

주요 결과

  • GPT-4는 공간 관계 벤치마크에서 약 97%의 지시 이행 정확도로 컴파일 가능한 TikZ 스케치를 생성할 수 있다.
  • Control-GPT는 최첨단 공간 정확도를 달성하여 Stable Diffusion과 같은 베이스라인을 거의 두 배로 웃돌았다(Visor 지표에서 44.2% 대 18.8% Uncond).
  • 폴리곤 스케치와 그라운딩 토큰으로 ControlNet을 미세조정하면 컨트롤러 정확도가 향상되고 객체 아이덴티티 오류가 감소한다.
  • Control-GPT는 객체 배치 작업에서 SOTA 성능을 얻고 다중 객체가 포함된 복잡한 장면에서도 OpenAI DALL-E 2 및 기타 베이스라인보다 우수하게 처리한다.
  • 그라운딩 토큰은 스케치를 명시적 객체 이름과 위치에 연결하여 모호성을 더 줄이고 프롬프트와 생성 콘텐츠 간의 정합성을 향상시킨다.
Figure 2 : Control-GPT Architecture . Our model is built on top of ControlNet to take additional grounding text. The model takes in both reference images and grounding object text, fusing them using attention layers before feeding to Stable Diffusion.
Figure 2 : Control-GPT Architecture . Our model is built on top of ControlNet to take additional grounding text. The model takes in both reference images and grounding object text, fusing them using attention layers before feeding to Stable Diffusion.

이 논문 읽기

누빈트 뷰어에서 원문을 열고, 읽으면서 궁금한 곳을 바로 물어보세요.

누빈트에서 이 논문 읽기

이 리뷰는 AI가 논문 원문을 바탕으로 만들었습니다. 인용하기 전에 원문을 확인해 주세요.