이전 게시글에 이어서 depth에 관련된 내용을 살펴보기로 한다. (내용이 겹치지만 training에 초점을 두고 일반적인 text-driven image inpainting과 무엇이 다른지에 대해서 간략하게 다루어 보았다.)
[배경 지식] Depth - Stable Diffusion :: Computer Vision 대학원생 기록지 (tistory.com)
[배경 지식] Depth - Stable Diffusion
https://stable-diffusion-art.com/how-stable-diffusion-work/#Depth-to-image How does Stable Diffusion work? - Stable Diffusion Art Stable Diffusion is a deep-learning model. We will dig deep into understanding how Stable Diffusion work under the hood. stabl
lime-juice.tistory.com
우선 텍스트 기반 image inpainting pipeline 개념에 대해서 알아보자.
Text-driven Image Inpainting Pipeline
- 텍스트 기반 이미지 inpainting 모델은 image-text 입력 쌍 데이터셋으로 훈련된다
- 훈련 중에는 mask, image, text prompt를 사용하여 직접 missing pixel을 inpaint하는 방법을 배우지 않는다.
- 대신, 주어진 text 설명과 일치하는 이미지를 생성하는 방법을 학습한다. (text-guided image generation)
- 즉 텍스트 기반 이미지 inpainting 모델은 훈련 중에 이미지 마스크, 이미지 및 텍스트 프롬프트를 직접적으로 inpaint하는 방법을 배우지 않고, 주어진 텍스트 설명과 일치하는 이미지를 생성하는 방법을 학습한다.
- 모델이 훈련된 후에는 추론 시에 masked image와 text prompt를 조건으로 text 기반 image inpainting을 수행한다.
- 추론 과정에서는 masked image, text prompt 그리고 sampling strategy가 모델에 주어진다. 이를 기반으로 모델은 masked image의 missing pixel을 채워넣은 이미지를 생성한다.
- sampling strategy: 추론 시에 여러 plausible 이미지를 생성하는 방법을 뜻한다. 이를 결합하여 최종 inpainted 이미지를 형성한다.
- 핟습 데이터셋에 image mask를 제외시킴으로써 모델은 학습 동안에 textual description과 image 사이의 관계를 학습하는 것에 더 포커스를 둘 수 있다. (Mask를 포함시키면 모델이 inpainting을 mask에 의존할 수 있기 때문이다.)
- 따라서 텍스트 기반 image inpaintring 모델은 image mask, text prompt 그리고 image pairs으로 훈련되지 않지만 추론 시에는 이들을 사용하여 새로운 이미지를 생성한다.
- 이러한 모델들은 image와 text의 복잡한 관계를 학습하기 위해 대규모의 image-text 데이터셋으로 훈련되며, 이를 통해 추론 시에 주어진 text-prompt에 대응되는 이미지를 생성할 수 있다.
- 즉, 모델은 text-image 관계에 대한 학습된 이해력을 활용하여 주어진 text prompt에 기반하여 마스크된 이미지를 inpaint한다. 모델은 text를 guide로 활용하여 제공된 text description과 조화를 이루는 이미지를 생성하며, 훈련 중에 습득한 텍스트 기반 image generation 능력을 추론 과정에서 inpainting 작업에 적용한다.
Depth-Conditioned Image Inpainting Pipeline
- 위의 텍스트 기반 이미지 inpainting 모델과 달리 depth-conditioned image generation pipeline의 경우 훈련 시 image와 이에 대응하는 depth map과 text prompt로 학습이 된다.
- 훈련 중에는 image-depth-text 세트가 주어지며, 이미지와 대응하는 depth map은 원하는 컨텐츠나 수정 사항을 설명하는 text prompt와 짝을 이룬다. 모델은 주어진 text prompt의 의도를 고려하여 image와 depth map에 맞추어 이미지를 생성한다.
- 이와 같은 데이터셋을 기반으로 모델은 제공된 depth map을 이미지 생성중에 추가적인 condition으로 활용하여 학습을 진행하게 된다.
- 이를 통해 모델은 text description과 일치하는 이미지를 생성하면서도 depth 정보를 고려하여 visually consistent한 결과출을 생성할 수 있다.
- 추론 시에는 depth-conditioned image generation에 모델이 사용될 때, 모델은 masked image와 대응되는 depth map 그리고 text prompt를 입력 받는다. 그리고 missing pixel을 depth information과 text description에 맞추어 inpainting한다.
요약하자면 두 pipeline 모두 text prompt를 기반으로 이미지를 생성하지만, text-driven depth-conditioned inpainting pipeline은 depth 정보를 학습 동안에 포함한다. 이를 통해서 생성된 이미지의 품질과 일관성을 향상시킨다.
'Novel View Synthesis' 카테고리의 다른 글
[논문 리뷰] Text2Room: Extracting Textured 3D Meshes from 2D Text-to-Image Models (0) | 2023.06.07 |
---|---|
[논문 리뷰] SceneScape: Text-Driven Consistent Scene Generation (0) | 2023.06.05 |
[논문 리뷰] SynSin: End-to-end View Synthesis from a Single Image (0) | 2023.06.01 |
[배경 지식] Depth - Stable Diffusion (0) | 2023.06.01 |
[논문 리뷰] PixelSynth: Generative a 3D-Consistent Experience from a Single Image (0) | 2023.05.24 |