# RotationDrag: 포인트를 조작하여 이미지를 편집 / 변경 (+ 다른 이미지 편집 모델들 소개)

**URL:** https://discuss.pytorch.kr/t/rotationdrag/3354
**Category:** 읽을거리&정보공유
**Tags:** point-to-image, text-to-image, image-editing, diffusion, rotationdrag, dragdiffusion, instructpix2pix, freedrag, imagic
**Created:** [1월 25, 2024, 11:25오후 UTC](https://discuss.pytorch.kr/t/rotationdrag/3354 "2024-01-25T23:25:10Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![9bow](https://discuss.pytorch.kr/user_avatar/discuss.pytorch.kr/9bow/32/16301_2.png) [@9bow](https://discuss.pytorch.kr/u/9bow)
#### Post date: [1월 25, 2024, 11:25오후 UTC](https://discuss.pytorch.kr/t/rotationdrag/3354/1 "2024-01-25T23:25:10Z")

</div>

### PyTorchKR​🔥🇰🇷🤔💬

- 작년 중순쯤 핫했던 [Drag Your GAN: 포인트를 조작하여 이미지를 생성 / 변경](https://discuss.pytorch.kr/t/drag-your-gan/1608) 이나 DragDiffusion, FreeDrag 등과 같은 점-기반(point-based, 포인트 기반)의 이미지 편집 모델들이 속속 등장하고 있는데요, 오늘은 점-기반의 이미지 편집 모델을 하나 더 들고왔습니다. 프롬프트 기반으로 이미지를 생성하거나 편집하는 경우 더 풍부한 표현이 가능하지만, 아직은 직관적인 방법이 더 편하기도 한 것 같습니다. 😅 같이 한 번 살펴보실까요?

- _이 글은 GPT 모델로 정리한 것으로, 잘못된 부분이 있을 수 있으니 글 아래쪽의 원문도 함께 참고해주세요! 읽으시면서 어색하거나 잘못된 내용을 발견하시면 덧글로 알려주시기를 부탁드립니다._ 🤗

* * *

## 소개

 ![RotationDrag: 포인트를 조작하여 이미지를 편집 / 변경하는 모델 - 모델 개요](https://discuss.pytorch.kr/uploads/default/original/2X/4/4f1c7359a94ef5ad77b96eb47b47a3126092b4a5.png)

디지털 아트와 사진 편집 분야에서 정교한 작업을 가능하게 하는 새로운 모델인 RotationDrag가 공개되었습니다. RotationDrag는 회전된 이미지의 특징 맵을 사용하여 더 정확한 핸들 포인트 추적을 가능하게 하는 것에 주요 특징이 있습니다. 이 방법은 초기 핸들 포인트와 현재 핸들 포인트 간의 회전 각도를 계산하여 입력 이미지를 해당 각도로 회전시키고, 그 특징 맵을 사용하여 새로운 핸들 포인트를 찾는 방식으로 이루어집니다.

 ![RotationDrag: 포인트를 조작하여 이미지를 편집 / 변경하는 모델](https://discuss.pytorch.kr/uploads/default/original/2X/f/fc90f0b25f8234d14700548762a05cf1bca273b7.jpeg)

이러한 방식은 기존의 점-기반 이미지 편집 방법들과 다른 접근으로,  
기존의 방법들은 편집 중에 특징이 일정하다고 가정합니다. 하지만, 이 가정은 이미지 평면 회전 중 핸들 포인트를 정확하게 추적하는 데 문제를 일으키며, 부정확하거나 원치 않는 편집 결과를 초래했었습니다.

 ![다른 모델들과의 비교 #1](https://discuss.pytorch.kr/uploads/default/original/2X/8/8b271110860f6c86882b31c3ab9a86308c55e554.jpeg)

 ![다른 모델들과의 비교 #2](https://discuss.pytorch.kr/uploads/default/original/2X/b/b332971970802bba3a5acba192a4d3d3ea9713d4.jpeg)

RotationDrag는 DragDiffusion과 같은 기존 방법보다 평면 회전을 처리하는 능력이 뛰어남을 입증하였습니다. 이는 높은 정확도를 달성하고 강한 편집 중에도 이미지 충실도를 유지합니다. 하지만, RotationDrag는 회전 및 특징 맵 추출과 같은 단계들이 추가되어 기존의 방법보다 느리다는 문제점이 있습니다.

 ![성능 비교: HOMOGRAPHY ESTIMATION ACCURACY [%] AT 3 PIXELS.](https://discuss.pytorch.kr/uploads/default/original/2X/9/94e7198eab6b9aede2119b0be6c8c691d4d689a8.png)  
 ![성능 비교: Results of user study.](https://discuss.pytorch.kr/uploads/default/original/2X/6/61f6b8efea0349f1d6876098e58391940ea36412.png)

## 더 읽어보기

### GitHub 저장소

[https://github.com/tony-lowe/rotationdrag](https://github.com/tony-lowe/rotationdrag)

### RotationDrag 논문

> **[RotationDrag: Point-based Image Editing with Rotated Diffusion Features](https://arxiv.org/abs/2401.06442)**
>
> A precise and user-friendly manipulation of image content while preserving image fidelity has always been crucial to the field of image editing. Thanks to the power of generative models, recent point-based image editing methods allow users to...

* * *

## 참고 모델: DragDiffusion (Point 기반 편집)

### DragDiffusion 소개

DragDiffusion은 디퓨전 모델을 활용한 대화형 점 기반 이미지 편집 방법입니다. 이 모델은 대규모 사전 훈련된 디퓨전 모델을 활용하여 실제 세계 시나리오에서의 인터랙티브 점 기반 편집의 적용 범위를 크게 개선합니다. DragDiffusion은 텍스트 임베딩을 사용하는 기존 디퓨전 기반 이미지 편집 방법과 달리, 정확한 공간 제어를 위해 디퓨전 잠재 변수를 최적화합니다.

DragDiffusion은 반복적인 방식으로 이미지를 생성하지만, 단일 단계에서의 디퓨전 잠재 변수 최적화만으로도 일관된 결과를 생성할 수 있음을 실증적으로 보여줍니다. 이 모델은 다양한 도전적인 경우(예: 다중 객체, 다양한 객체 카테고리, 다양한 스타일 등)에서의 광범위한 실험을 통해 DragDiffusion의 다재다능함과 일반성을 입증합니다​​​​.

### DragDiffusion 논문

> **[DragDiffusion: Harnessing Diffusion Models for Interactive Point-based Image...](https://arxiv.org/abs/2306.14435)**
>
> Accurate and controllable image editing is a challenging task that has attracted significant attention recently. Notably, DragGAN is an interactive point-based image editing framework that achieves impressive editing results with pixel-level...

### DragDiffusion GitHub 저장소

[https://github.com/Yujun-Shi/DragDiffusion](https://github.com/Yujun-Shi/DragDiffusion)

## 참고 모델: FreeDrag (Point 기반 편집)

### FreeDrag 소개

FreeDrag은 점 추적에 의존하지 않고, 특징 지향적 접근 방식을 사용하는 "드래그" 편집을 위한 모델입니다. 이 모델은 적응적 템플릿 특징의 개념을 도입하여 움직임 중 핸들 포인트의 특징을 신뢰성 있게 기록합니다. 특히, FreeDrag는 지정된 점으로 특징을 이동시킴으로써 핸들 포인트가 대상 점으로 점진적으로 이동하도록 유도하여 모호한 점에 의한 잠재적 오도를 완화하기 위해 선 검색 전략을 도입합니다. FreeDrag는 다양한 복잡한 시나리오에서 안정적이고 정확한 점 기반 편집을 제공하는 것으로 나타났습니다​​​​.

### FreeDrag 논문

> **[FreeDrag: Feature Dragging for Reliable Point-based Image Editing](https://arxiv.org/abs/2307.04684)**
>
> To serve the intricate and varied demands of image editing, precise and flexible manipulation in image content is indispensable. Recently, Drag-based editing methods have gained impressive performance. However, these methods predominantly center on...

### FreeDrag GitHub 저장소

[https://github.com/LPengYang/FreeDrag](https://github.com/LPengYang/FreeDrag)

## 참고 모델: InstructPix2Pix (텍스트 기반 편집)

### InstructPix2Pix 소개

InstructPix2Pix는 사람의 편집 지시를 따르는 이미지 편집 방법으로, 입력 이미지와 텍스트 지시를 받아 이미지를 편집합니다. 학습 시에는 GPT-3와 Stable Diffusion 같은 큰 사전 학습된 모델을 활용하여 생성합니다.

조건부 디퓨전 모델로 학습되며, 실제 이미지와 사용자 작성 지시에서 일반화됩니다. 이미지 편집을 빠르게 수행하며, 다양한 입력 이미지와 지시에 대해 인상적인 편집 결과를 보여줍니다​​​​​​​​​​.

### InstructPix2Pix 논문

> **[InstructPix2Pix: Learning to Follow Image Editing Instructions](https://arxiv.org/abs/2211.09800)**
>
> We propose a method for editing images from human instructions: given an input image and a written instruction that tells the model what to do, our model follows these instructions to edit the image. To obtain training data for this problem, we...

### InstructPix2Pix GitHub 저장소

[https://github.com/timothybrooks/instruct-pix2pix](https://github.com/timothybrooks/instruct-pix2pix)

### InstructPix2Pix 모델 가중치

> **[timbrooks/instruct-pix2pix · Hugging Face](https://huggingface.co/timbrooks/instruct-pix2pix)**
>
> We’re on a journey to advance and democratize artificial intelligence through open source and open science.

## 참고 모델: Imagic (텍스트 기반 편집)

### Imagic 소개

Imagic는 텍스트 기반의 실제 이미지 편집을 위한 모델로, 실제 이미지에 복잡한 (예: 비강성) 텍스트 가이드 세맨틱 편집을 적용할 수 있습니다. #text-to-image 디퓨전 모델을 활용하여 입력 이미지와 목표 텍스트와 일치하는 텍스트 임베딩을 생성합니다. 이 방식은 디퓨전 모델을 미세 조정하여 입력 이미지에 더 잘 맞출 수 있으며, 스타일, 색상, 자세, 구성 등 다양한 편집 유형에 대해 높은 품질의 복잡한 의미적 이미지 편집을 보여줍니다​​​​​​.

### Imagic 논문

> **[Imagic: Text-Based Real Image Editing with Diffusion Models](https://arxiv.org/abs/2210.09276)**
>
> Text-conditioned image editing has recently attracted considerable interest. However, most methods are currently either limited to specific editing types (e.g., object overlay, style transfer), or apply to synthetically generated images, or require...

### Imagic 프로젝트 홈페이지

> **[Imagic: Text-Based Real Image Editing with Diffusion Models](https://imagic-editing.github.io/)**

* * *

[🔥파이토치 한국 사용자 모임🇰🇷](https://pytorch.kr/)이 정리한 이 글이 유용하셨나요? [회원으로 가입](https://discuss.pytorch.kr/signup)하시면 주요 글들을 이메일💌로 보내드립니다! (기본은 Weekly지만 [Daily로 변경도 가능](https://discuss.pytorch.kr/my/preferences/emails)합니다.)

🎁 아래↘쪽에 좋아요❤를 눌러주시면 뉴스 발행에 힘이 됩니다~ 🤩
