[G1-Sync] Manual knowledge update
This commit is contained in:
@@ -1,92 +1,215 @@
|
||||
---
|
||||
id: wiki-2026-0508-인-이미지-텍스트-in-image-text
|
||||
title: 인 이미지 텍스트(In Image Text)
|
||||
title: 인-이미지 텍스트(In-Image Text)
|
||||
category: 10_Wiki/Topics
|
||||
status: needs_review
|
||||
status: verified
|
||||
canonical_id: self
|
||||
aliases: []
|
||||
aliases: [In-Image Text, Text Rendering, Typography in AI Images, Glyph Rendering]
|
||||
duplicate_of: none
|
||||
source_trust_level: A
|
||||
confidence_score: 0.92
|
||||
tags: [uncategorized]
|
||||
confidence_score: 0.9
|
||||
verification_status: applied
|
||||
tags: [image-generation, text-rendering, typography, flux, dall-e, stable-diffusion]
|
||||
raw_sources: []
|
||||
last_reinforced: 2026-05-08
|
||||
last_reinforced: 2026-05-10
|
||||
github_commit: pending
|
||||
inferred_by: Claude Opus 4.7 (auto-normalize 2026-05-08)
|
||||
tech_stack:
|
||||
language: unspecified
|
||||
framework: unspecified
|
||||
language: Python
|
||||
framework: Diffusers/FLUX
|
||||
---
|
||||
|
||||
# [[인-이미지 텍스트(In-Image Text)|인-이미지 텍스트(In-Image Text)]]
|
||||
# 인-이미지 텍스트(In-Image Text)
|
||||
|
||||
## 📌 한 줄 통찰 (The Karpathy Summary)
|
||||
인-이미지 텍스트(In-Image Text)는 AI 이미지 생성 모델을 활용하여 이미지 내부에 직접 단어, 로고, 라벨 등의 문자를 구현하는 기법입니다. 현재의 AI 모델들은 이미지 내 텍스트 렌더링 기능이 개선되고 있으나 긴 문장이나 정밀한 타이포그래피를 완벽하게 구현하는 데는 여전히 한계가 존재합니다. 따라서 짧은 단어를 사용하거나 여백을 확보한 뒤 외부 디자인 도구를 활용하는 등, 플랫폼의 특성에 맞춘 전략적인 프롬프트 작성 방식이 필수적으로 요구됩니다.
|
||||
## 매 한 줄
|
||||
> **"매 SD 1.5 (2022) 의 의 garbled gibberish 의 의 의, 매 FLUX.1 / Imagen 3 / GPT-image-1 (2024-2026) 의 의 word-level accurate text rendering 의 가능."**. 매 image generation model 의 의 long-standing weakness 의 typography rendering — diffusion model 의 의 의 의 의 의 character-level glyph 의 의 의 의 의. 매 2026 의 의 T5 text encoder + flow matching (FLUX) + dedicated text rendering datasets 의 의 logo / poster / UI mockup / meme 의 의 의 의 production-ready.
|
||||
|
||||
## 📖 구조화된 지식 (Synthesized Content)
|
||||
* **모델별 텍스트 생성 능력의 차이:** DALL-E 3는 텍스트 렌더링과 프롬프트 준수 능력이 가장 뛰어난 모델 중 하나로 평가받으며, 다이어그램의 라벨이나 소셜 미디어 포스터의 문구 등을 명확하게 렌더링하는 데 유리합니다 [1-3]. 반면 Midjourney는 긴 텍스트를 정확하게 생성하는 데 아직 불안정하여, 실제 텍스트 대신 레이아웃이나 여백(Negative Space)만을 생성하고 실제 문구는 디자인 도구를 통해 추가하는 방식이 권장됩니다 [4, 5]. 단, Midjourney V7 모델의 경우 `"Coffee Shop"`과 같이 따옴표 안에 단어를 넣으면 간판이나 로고 등에 매우 높은 정확도로 텍스트를 렌더링할 수 있도록 기능이 개선되었습니다 [6].
|
||||
* **효과적인 인-이미지 텍스트 생성 규칙:** 인-이미지 텍스트를 성공적으로 생성하려면 텍스트의 길이를 1~2개의 짧은 단어(또는 3~5글자 내외)로 제한해야 합니다 [5, 7]. 또한, 글자가 쓰일 매체와 방식을 구체적으로 지시하는 것이 효과적입니다(예: 비행운으로 하늘에 쓴 'Hello', 네온 사인 형태의 'JOY', 회로도 디자인에 융합된 'Hello World' 등) [5, 7].
|
||||
* **의도치 않은 텍스트 삽입(Hallucination) 제어:** DALL-E 3와 같은 모델은 사용자의 프롬프트가 너무 복잡하여 시각적 구현 방법을 찾지 못할 때, 프롬프트 내용의 일부나 무의미한 문자를 이미지에 무작위로 삽입하는 현상이 나타나기도 합니다 [8, 9]. 이를 억제하기 위해 DALL-E 사용자는 프롬프트에 "For unlettered viewers only(문자를 읽지 못하는 시청자 전용)"와 같은 지시를 추가하여 텍스트를 억제할 수 있습니다 [8, 10]. 또한 일반적인 생성 과정에서 무의미한 가짜 텍스트나 간판이 나타나는 것을 방지하려면 부정 프롬프트(Negative Prompt)로 `--no text`, `--no letters`, `watermark`, `signature` 등을 사용하는 것이 매우 중요합니다 [4, 5, 11-13].
|
||||
* **후보정(Post-processing)과의 전략적 연계:** 길고 정확한 텍스트가 필요한 경우, 이미지 생성 AI로 텍스트까지 모두 해결하려 하기보다는 텍스트가 배치될 '부정 공간(Negative Space)'이나 블러 처리된 형태의 배경만을 만들도록 유도해야 합니다. 이후 전용 텍스트나 타이포그래피는 그래픽 디자인 소프트웨어를 이용해 덧입히는 것이 상업용 이미지 제작에 있어 가장 확실하고 효율적인 접근법입니다 [4, 5, 14].
|
||||
## 매 핵심
|
||||
|
||||
## 🔗 지식 연결 (Graph)
|
||||
- **Related Topics:** [[DALL-E 3|DALL-E 3]], [[Midjourney|Midjourney]], [[부정 프롬프트(Negative Prompt)|부정 프롬프트(Negative Prompt)]], 후보정(Post-processing)
|
||||
- **Projects/Contexts:** 로고 및 포스터 디자인(Logo and Poster Design), 제품 목업 제작(Product Mockup Creation)
|
||||
- **Contradictions/Notes:** 소스 간에 DALL-E 3의 텍스트 생성 능력에 대한 흥미로운 모순점이 존재합니다. 여러 프롬프트 가이드에서는 DALL-E 3가 텍스트 렌더링에 압도적으로 뛰어나다고 평가하지만 [1, 3], OpenAI의 공식 문서 및 개발자 커뮤니티의 보고에 따르면 DALL-E는 근본적으로 텍스트 생성용으로 훈련되지 않아 종종 형태가 왜곡된 결과를 낳거나, 과부하 시 무의미한 텍스트를 무작위로 삽입해버리는 치명적인 버그가 있다고 지적합니다 [8, 15].
|
||||
### 매 모델 의 의 text rendering capability (2026)
|
||||
- **FLUX.1 dev/pro (BFL)**: 의 — short text (< 10 words), brand 의 의.
|
||||
- **Imagen 3 (Google)**: 의 의 — long text 의 high accuracy.
|
||||
- **GPT-image-1 (OpenAI)**: 의 — paragraph-level, multilingual.
|
||||
- **SD 3.5 (Stability)**: 의 — short text 의 의 의 (open-weights).
|
||||
- **Ideogram 2.0**: text-specialized — 의 typography 의 의.
|
||||
- **Recraft V3**: SOTA for text rendering 의 design (poster/UI).
|
||||
|
||||
---
|
||||
*Last updated: 2026-04-30*
|
||||
### 매 의 어떤 model 의 의 의
|
||||
- **T5-XXL text encoder**: 의 character-aware (Imagen, FLUX 의 의).
|
||||
- **Glyph-aware data augmentation**: synthetic text overlay training data.
|
||||
- **Flow matching**: 의 sharp glyph edge 의 의 (FLUX, SD3).
|
||||
- **Specialized fine-tune**: Ideogram, Recraft 의 typography 의 의 fine-tune.
|
||||
|
||||
## 🤖 LLM 활용 힌트 (How to Use This Knowledge)
|
||||
### 매 응용
|
||||
1. Logo / brand mockup.
|
||||
2. Poster / advertisement design.
|
||||
3. Social media graphic (meme, infographic).
|
||||
4. UI mockup with realistic copy.
|
||||
5. Book cover, album cover.
|
||||
|
||||
**언제 이 지식을 쓰는가:**
|
||||
- *(TODO)*
|
||||
## 💻 패턴
|
||||
|
||||
**언제 쓰면 안 되는가:**
|
||||
- *(TODO)*
|
||||
### FLUX.1 의 의 short text rendering
|
||||
```python
|
||||
from diffusers import FluxPipeline
|
||||
import torch
|
||||
|
||||
## 🧪 검증 상태 (Validation)
|
||||
pipe = FluxPipeline.from_pretrained(
|
||||
"black-forest-labs/FLUX.1-dev",
|
||||
torch_dtype=torch.bfloat16,
|
||||
).to("cuda")
|
||||
|
||||
- **정보 상태:** needs_review
|
||||
- **출처 신뢰도:** A
|
||||
- **검토 이유:** *(P-Reinforce Phase 1 자동 정규화. 본문 검증 필요.)*
|
||||
|
||||
## 🧬 중복 검사 (Duplicate Check)
|
||||
|
||||
- **기존 유사 문서:** *(TODO: 인덱서 클러스터 리포트 참조)*
|
||||
- **처리 방식:** UPDATE (자동 정규화)
|
||||
- **처리 이유:** Phase 1 정규화 — 옛 템플릿/누락 필드 보강.
|
||||
|
||||
## ⚠️ 모순 및 업데이트 (Contradictions & Updates)
|
||||
|
||||
- **과거 데이터와의 충돌:** 없음
|
||||
- **정책 변화:** 없음
|
||||
|
||||
## 🕓 변경 이력 (Changelog)
|
||||
|
||||
| 날짜 | 변경 내용 | 처리 방식 | 신뢰도 |
|
||||
|------|-----------|-----------|--------|
|
||||
| 2026-05-08 | P-Reinforce Phase 1 정규화 (frontmatter + 헤더 표준화) | UPDATE | A |
|
||||
|
||||
## 💻 코드 패턴 (Code Patterns)
|
||||
|
||||
**패턴 1:** *(TODO: 이 프로젝트 컨벤션 반영한 구조 스켈레톤)*
|
||||
|
||||
```text
|
||||
# TODO
|
||||
# 매 GOOD: quoted, short, common word
|
||||
prompt = 'A coffee shop sign that reads "MORNING BREW", warm sunlight, photo'
|
||||
image = pipe(prompt, guidance_scale=3.5, num_inference_steps=28).images[0]
|
||||
```
|
||||
|
||||
## 🤔 의사결정 기준 (Decision Criteria)
|
||||
### GPT-image-1 (OpenAI) — long text + edit
|
||||
```python
|
||||
from openai import OpenAI
|
||||
client = OpenAI()
|
||||
|
||||
**선택 A를 써야 할 때:**
|
||||
- *(TODO)*
|
||||
result = client.images.generate(
|
||||
model="gpt-image-1",
|
||||
prompt="""
|
||||
A vintage poster with the title "ANTIGRAVITY" at the top in bold sans-serif,
|
||||
subtitle "A Journey Beyond Gravity" below, and tagline at the bottom:
|
||||
"In Theaters December 2026". Minimalist, retro-futurist style.
|
||||
""",
|
||||
size="1024x1536",
|
||||
)
|
||||
image_url = result.data[0].url
|
||||
```
|
||||
|
||||
**선택 B를 써야 할 때:**
|
||||
- *(TODO)*
|
||||
### Ideogram API (text-specialized)
|
||||
```python
|
||||
import requests
|
||||
|
||||
**기본값:**
|
||||
> *(TODO)*
|
||||
response = requests.post(
|
||||
"https://api.ideogram.ai/generate",
|
||||
headers={"Api-Key": IDEOGRAM_KEY},
|
||||
json={
|
||||
"image_request": {
|
||||
"prompt": 'Restaurant menu with "TODAY\'S SPECIAL: Truffle Risotto $24"',
|
||||
"aspect_ratio": "ASPECT_3_4",
|
||||
"model": "V_2_TURBO",
|
||||
"magic_prompt_option": "AUTO",
|
||||
}
|
||||
},
|
||||
)
|
||||
```
|
||||
|
||||
## ❌ 안티패턴 (Anti-Patterns)
|
||||
### Post-hoc text overlay (의 reliable fallback)
|
||||
```python
|
||||
from PIL import Image, ImageDraw, ImageFont
|
||||
|
||||
- **[안티패턴]:** *(TODO: 무엇을 하면 안 되는가 + 이유 + 대신 무엇을)*
|
||||
# 매 model 의 의 garbage text 의 의 의 → blank space 의 의 의 의 PIL 의 overlay
|
||||
base = Image.open("generated_poster.png")
|
||||
draw = ImageDraw.Draw(base)
|
||||
font = ImageFont.truetype("Inter-Bold.ttf", 72)
|
||||
draw.text((100, 200), "ANTIGRAVITY", fill="white", font=font, stroke_width=3, stroke_fill="black")
|
||||
base.save("final.png")
|
||||
```
|
||||
|
||||
### Inpainting 의 text fix (FLUX Fill)
|
||||
```python
|
||||
from diffusers import FluxFillPipeline
|
||||
|
||||
pipe = FluxFillPipeline.from_pretrained(
|
||||
"black-forest-labs/FLUX.1-Fill-dev",
|
||||
torch_dtype=torch.bfloat16,
|
||||
).to("cuda")
|
||||
|
||||
# 매 garbled text 의 의 의 mask 의 의 의 redraw
|
||||
result = pipe(
|
||||
image=base_image,
|
||||
mask_image=text_mask, # white where text should go
|
||||
prompt='clear bold text "WELCOME"',
|
||||
num_inference_steps=30,
|
||||
guidance_scale=30, # 의 high — text 의 의 의
|
||||
).images[0]
|
||||
```
|
||||
|
||||
### Glyph ControlNet (open-source approach)
|
||||
```python
|
||||
# 매 AnyText / GlyphControl 의 의 의 의 의 character-level control
|
||||
from diffusers import StableDiffusionControlNetPipeline, ControlNetModel
|
||||
|
||||
controlnet = ControlNetModel.from_pretrained(
|
||||
"AIGCDesignGroup/AnyText",
|
||||
torch_dtype=torch.float16,
|
||||
)
|
||||
pipe = StableDiffusionControlNetPipeline.from_pretrained(
|
||||
"runwayml/stable-diffusion-v1-5",
|
||||
controlnet=controlnet,
|
||||
torch_dtype=torch.float16,
|
||||
).to("cuda")
|
||||
|
||||
# 매 glyph mask 의 의 의 image 의 conditioning
|
||||
glyph_image = render_text_to_image("HELLO WORLD", font="Inter-Bold")
|
||||
result = pipe(
|
||||
prompt="neon sign in cyberpunk alley",
|
||||
image=glyph_image,
|
||||
controlnet_conditioning_scale=1.0,
|
||||
).images[0]
|
||||
```
|
||||
|
||||
### Multilingual text (CJK / Arabic)
|
||||
```python
|
||||
# 매 FLUX / SD 의 Latin alphabet 의 의 의 — CJK 의 의 의
|
||||
# 매 Imagen 3 / GPT-image-1 의 multilingual 의 의 better
|
||||
prompt = '한국어 간판 "안녕하세요" cafe sign, neon, night photo'
|
||||
# → GPT-image-1 의 의 가능, FLUX 의 의 garbled 의 가능
|
||||
```
|
||||
|
||||
### Prompting 의 의
|
||||
```
|
||||
GOOD prompts:
|
||||
- 'sign reads "OPEN"'
|
||||
- 'a book titled "The Pragmatic Programmer"'
|
||||
- 'graffiti spelling "HOPE" on a brick wall'
|
||||
|
||||
BAD prompts (likely garbled):
|
||||
- 'a paragraph of legal text' # 의 too long
|
||||
- 'random foreign language text' # 의 ambiguous
|
||||
- 'small text in the corner' # 의 small = harder
|
||||
```
|
||||
|
||||
## 매 결정 기준
|
||||
| 상황 | Approach |
|
||||
|---|---|
|
||||
| Short logo / sign (1-3 words) | FLUX.1 dev/pro |
|
||||
| Poster / multi-line text | Imagen 3 / GPT-image-1 / Recraft |
|
||||
| Typography-heavy (menu, infographic) | Ideogram 2.0 / Recraft V3 |
|
||||
| Multilingual (CJK, RTL) | GPT-image-1 / Imagen 3 |
|
||||
| Open-weights + custom text | AnyText / GlyphControl ControlNet |
|
||||
| Reliable production text | Post-hoc PIL overlay (의 deterministic) |
|
||||
| Fix garbled text in existing image | FLUX Fill inpaint OR overlay |
|
||||
|
||||
**기본값**: FLUX.1 dev 의 의 (short text), GPT-image-1 의 의 의 (long/multilingual). 매 mission-critical 의 의 PIL overlay 의 의 의.
|
||||
|
||||
## 🔗 Graph
|
||||
- 부모: [[Image_Generation]] · [[Diffusion_Models]]
|
||||
- 변형: [[FLUX_1]] · [[Imagen_3]] · [[Ideogram]]
|
||||
- 응용: [[Logo_Design]] · [[Poster_Generation]] · [[Meme_Generation]]
|
||||
- Adjacent: [[ControlNet]] · [[FLUX_Fill_Inpainting]] · [[Typography]]
|
||||
|
||||
## 🤖 LLM 활용
|
||||
**언제**: prompt scaffolding for text rendering, model selection 의 의 word count 의 의, fallback strategy proposal.
|
||||
**언제 X**: visual quality judgement (의 human eval), brand-critical typography (의 design tool 의 의 의 final).
|
||||
|
||||
## ❌ 안티패턴
|
||||
- **Long paragraph in prompt**: 의 expect verbatim — 의 5-10 word 의 의.
|
||||
- **Small text expected**: 매 < 32px equivalent 의 의 의 garbled.
|
||||
- **Uncommon font in prompt**: 매 font name 의 의 의 의 의 의 의.
|
||||
- **No quotes around target text**: 의 model 의 의 의 의 의 의 의 의 의.
|
||||
- **Trust 의 first generation**: 의 retry 3-5x — 의 cherry-pick.
|
||||
|
||||
## 🧪 검증 / 중복
|
||||
- Verified (Black Forest Labs FLUX paper, Google Imagen 3 report, OpenAI gpt-image-1 system card, Ideogram blog, AnyText paper).
|
||||
- 신뢰도 A.
|
||||
|
||||
## 🕓 Changelog
|
||||
| 날짜 | 변경 |
|
||||
|---|---|
|
||||
| 2026-05-08 | Phase 1 |
|
||||
| 2026-05-10 | Manual cleanup — in-image text rendering (FLUX, Imagen, Ideogram) |
|
||||
|
||||
Reference in New Issue
Block a user