[G1-Sync] Manual knowledge update
This commit is contained in:
@@ -1,89 +1,279 @@
|
||||
---
|
||||
id: wiki-2026-0508-deepfake-technology
|
||||
id: wiki-2026-0508-deepfake
|
||||
title: Deepfake Technology
|
||||
category: 10_Wiki/Topics
|
||||
status: needs_review
|
||||
status: verified
|
||||
canonical_id: self
|
||||
aliases: [DEEPFAKE-001]
|
||||
aliases: [deepfake, face swap, voice cloning, synthetic media, FaceForensics, C2PA, ElevenLabs]
|
||||
duplicate_of: none
|
||||
source_trust_level: A
|
||||
confidence_score: 1.0
|
||||
tags: [ai, deepfake, generative-model, Computer-Vision, ai-ethics]
|
||||
source_trust_level: B
|
||||
confidence_score: 0.85
|
||||
verification_status: applied
|
||||
tags: [deepfake, generative-ai, face-swap, voice-cloning, synthetic-media, c2pa, detection, ethics]
|
||||
raw_sources: []
|
||||
last_reinforced: 2026-04-26
|
||||
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 / Roop / Stable Diffusion / ElevenLabs / Whisper
|
||||
---
|
||||
|
||||
# Deepfake Technology (딥페이크 기술)
|
||||
# Deepfake Technology
|
||||
|
||||
## 📌 한 줄 통찰 (The Karpathy Summary)
|
||||
> "데이터로 빚은 가상의 얼굴과 목소리로 진실과 거짓의 경계를 무너뜨려라" — 딥러닝 기반의 이미지/음성 합성 기술(특히 GAN)을 활용하여, 특정 인물의 얼굴이나 음성을 다른 영상이나 오디오에 정교하게 덧씌우는 조작 기술.
|
||||
## 매 한 줄
|
||||
> **"매 truth 의 boundary 의 erode"**. 매 GAN / Diffusion / Autoencoder 의 face + voice 의 synthesize. 매 commercial application + 매 election / fraud / 비동의 abuse 의 dual-use. 매 detection arms race + 매 C2PA provenance 의 standard.
|
||||
|
||||
## 📖 구조화된 지식 (Synthesized Content)
|
||||
- **추출된 패턴:** 대상 인물의 미세한 표정 변화와 음성 톤의 특징을 학습하여 가상의 소스에 투영함으로써 육안이나 청각으로 구분하기 힘든 정교한 복제본을 생성하는 합성 패턴.
|
||||
- **주요 기술:**
|
||||
- **GAN (Generative Adversarial Networks):** 생성자와 판별자가 경쟁하며 극도로 사실적인 이미지 생성.
|
||||
- **Autoencoders:** 얼굴의 핵심 특징을 압축하고 다른 얼굴 데이터로 복원하여 얼굴 교체(Face Swap) 수행.
|
||||
- **Voice Conversion:** 특정 인물의 발화 특성을 유지하며 텍스트를 음성으로 변환(TTS).
|
||||
- **양면성:** 영화 제작, 엔터테인먼트, 가상 비서 등 긍정적 활용 사례와 가짜 뉴스, 사기, 성범죄 등 심각한 사회적 역기능 공존.
|
||||
## 매 핵심 technique
|
||||
|
||||
## ⚠️ 모순 및 업데이트 (Contradictions & Updates)
|
||||
- **과거 데이터와의 충돌:** 단순한 영상 편집 기술에서, 데이터만 있으면 누구나 정교한 위조 영상을 만들 수 있는 민주화된(?) 위협으로 진화. 이에 대응하는 '딥페이크 탐지 기술'이 또 다른 AI 전장으로 부상.
|
||||
- **정책 변화:** Antigravity 프로젝트는 생성형 AI 활용 시 콘텐츠의 진위 여부를 보장하기 위해 워터마킹 및 메타데이터 기록을 강화하며, 딥페이크 오남용 방지를 위한 윤리 가이드라인을 준수함.
|
||||
### Face swap
|
||||
- **Roop / DeepFaceLab**: 매 open-source.
|
||||
- **Autoencoder-based**: 매 encode → 매 decode 의 다른 face.
|
||||
- **InstantID / PhotoMaker**: 매 single image.
|
||||
- **Diffusion-based**: 매 InstantID + ControlNet.
|
||||
|
||||
## 🔗 지식 연결 (Graph)
|
||||
- [[Generative-Adversarial-Networks|Generative-Adversarial-Networks]]-GAN, Autoencoder, [[Trustworthy-AI|Trustworthy-AI]], Computer-Vision-[[Mastery|Mastery]]
|
||||
- **Raw Source:** 10_Wiki/Topics/AI/Deepfake-Technology.md
|
||||
### Face reenactment
|
||||
- 매 source 의 expression → 매 target.
|
||||
- **First Order Motion Model**.
|
||||
- **DPE** (Disentangled Portrait Editing).
|
||||
|
||||
## 🤖 LLM 활용 힌트 (How to Use This Knowledge)
|
||||
### Voice cloning
|
||||
- **ElevenLabs**: 매 commercial.
|
||||
- **OpenVoice** (MyShell): 매 open.
|
||||
- **Tortoise TTS**.
|
||||
- **3 sec sample** 의 sufficient (modern).
|
||||
|
||||
**언제 이 지식을 쓰는가:**
|
||||
- *(TODO)*
|
||||
### Lip sync
|
||||
- **Wav2Lip**: 매 audio + face.
|
||||
- **SadTalker**.
|
||||
|
||||
**언제 쓰면 안 되는가:**
|
||||
- *(TODO)*
|
||||
### Full body / pose
|
||||
- **AnimateAnyone**.
|
||||
- **MagicAnimate**.
|
||||
|
||||
## 🧪 검증 상태 (Validation)
|
||||
### Video generation (modern, 2024+)
|
||||
- **Sora** (OpenAI).
|
||||
- **Veo** (Google).
|
||||
- **Runway Gen-3**.
|
||||
|
||||
- **정보 상태:** needs_review
|
||||
- **출처 신뢰도:** A
|
||||
- **검토 이유:** *(P-Reinforce Phase 1 자동 정규화. 본문 검증 필요.)*
|
||||
### 매 detection
|
||||
- **FaceForensics++**: 매 dataset benchmark.
|
||||
- **CLIP-based**: 매 zero-shot.
|
||||
- **Frequency domain**.
|
||||
- **Inconsistency** (lighting, eye blink rate).
|
||||
- **Liveness check** (camera, depth).
|
||||
|
||||
## 🧬 중복 검사 (Duplicate Check)
|
||||
### 매 disclosure / provenance
|
||||
- **C2PA** (Adobe + others): 매 cryptographic chain.
|
||||
- **SynthID** (Google): 매 watermark.
|
||||
- **Statistical watermark** (LLM).
|
||||
|
||||
- **기존 유사 문서:** *(TODO: 인덱서 클러스터 리포트 참조)*
|
||||
- **처리 방식:** UPDATE (자동 정규화)
|
||||
- **처리 이유:** Phase 1 정규화 — 옛 템플릿/누락 필드 보강.
|
||||
### 매 legal landscape
|
||||
- **EU AI Act** (2024): 매 disclosure required.
|
||||
- **TAKE IT DOWN Act** (US 2025): 매 NCII 의 takedown.
|
||||
- **California**: 매 election deepfake 의 ban.
|
||||
- **Korea**: 매 형법 244-2 의 sexual deepfake 의 처벌.
|
||||
- **Civil**: 매 right of publicity, defamation.
|
||||
|
||||
## 🕓 변경 이력 (Changelog)
|
||||
### 매 dual-use
|
||||
| Positive | Negative |
|
||||
|---|---|
|
||||
| Film (de-aging) | Election interference |
|
||||
| Education (historical figure) | NCII (non-consensual intimate imagery) |
|
||||
| Accessibility (sign language) | Identity theft |
|
||||
| Game / VR | Fraud (CEO voice scam) |
|
||||
| Localization (lip sync) | Deepfake harassment |
|
||||
|
||||
| 날짜 | 변경 내용 | 처리 방식 | 신뢰도 |
|
||||
|------|-----------|-----------|--------|
|
||||
| 2026-05-08 | P-Reinforce Phase 1 정규화 (frontmatter + 헤더 표준화) | UPDATE | A |
|
||||
### 매 mitigation strategy
|
||||
1. **Training data filter**: 매 NCII / illegal 의 prevent.
|
||||
2. **Watermarking** (Glaze, Nightshade, SynthID).
|
||||
3. **Disclosure mandate**.
|
||||
4. **Detection at platform**.
|
||||
5. **Liveness** for high-stakes auth.
|
||||
6. **Provenance** (C2PA chain).
|
||||
7. **Legal recourse**.
|
||||
|
||||
## 💻 코드 패턴 (Code Patterns)
|
||||
## 💻 패턴 (응용 — defense + ethical use)
|
||||
|
||||
**패턴 1:** *(TODO: 이 프로젝트 컨벤션 반영한 구조 스켈레톤)*
|
||||
|
||||
```text
|
||||
# TODO
|
||||
### Liveness check (anti-deepfake auth)
|
||||
```python
|
||||
def liveness_check(video_stream):
|
||||
"""매 camera challenge: 매 head movement + blink + utterance."""
|
||||
# 매 random challenge
|
||||
challenge = random.choice(['blink twice', 'turn head left', 'say YES'])
|
||||
show_to_user(challenge)
|
||||
|
||||
response = capture_response(video_stream, duration=3)
|
||||
|
||||
return {
|
||||
'blink_detected': detect_eye_blink(response),
|
||||
'head_movement': detect_head_motion(response),
|
||||
'utterance_match': verify_speech(response, expected=challenge),
|
||||
'depth_check': detect_depth_inconsistency(response), # 매 2D photo 의 detect
|
||||
}
|
||||
```
|
||||
|
||||
## 🤔 의사결정 기준 (Decision Criteria)
|
||||
### Deepfake detection (CLIP-based)
|
||||
```python
|
||||
import open_clip
|
||||
import torch
|
||||
|
||||
**선택 A를 써야 할 때:**
|
||||
- *(TODO)*
|
||||
model, _, preprocess = open_clip.create_model_and_transforms('ViT-L-14', pretrained='openai')
|
||||
|
||||
**선택 B를 써야 할 때:**
|
||||
- *(TODO)*
|
||||
def detect_deepfake(image_path, threshold=0.6):
|
||||
image = preprocess(Image.open(image_path)).unsqueeze(0)
|
||||
|
||||
candidates = ['a real photo of a person', 'an AI-generated synthetic face']
|
||||
text_emb = model.encode_text(open_clip.tokenize(candidates))
|
||||
img_emb = model.encode_image(image)
|
||||
|
||||
sim = (100 * img_emb @ text_emb.T).softmax(-1)
|
||||
return {
|
||||
'real_score': sim[0, 0].item(),
|
||||
'synthetic_score': sim[0, 1].item(),
|
||||
'is_deepfake': sim[0, 1].item() > threshold,
|
||||
}
|
||||
```
|
||||
|
||||
**기본값:**
|
||||
> *(TODO)*
|
||||
### Frequency-domain detection
|
||||
```python
|
||||
import numpy as np
|
||||
from scipy.fft import fft2, fftshift
|
||||
|
||||
## ❌ 안티패턴 (Anti-Patterns)
|
||||
def fft_anomaly_score(image):
|
||||
"""매 GAN 의 typical 의 frequency artifact."""
|
||||
gray = np.mean(image, axis=-1)
|
||||
spectrum = np.abs(fftshift(fft2(gray)))
|
||||
|
||||
# 매 high-frequency 의 GAN typical
|
||||
high_freq_energy = spectrum[image.shape[0]//4:].mean()
|
||||
return high_freq_energy
|
||||
```
|
||||
|
||||
- **[안티패턴]:** *(TODO: 무엇을 하면 안 되는가 + 이유 + 대신 무엇을)*
|
||||
### C2PA verification
|
||||
```python
|
||||
from c2pa import C2pa
|
||||
|
||||
def verify_c2pa(image_path):
|
||||
c2pa = C2pa()
|
||||
try:
|
||||
manifest = c2pa.read_manifest(image_path)
|
||||
return {
|
||||
'has_provenance': True,
|
||||
'chain': manifest.actions,
|
||||
'signature_valid': c2pa.verify_signature(manifest),
|
||||
'creator': manifest.author,
|
||||
'tools_used': manifest.softwareAgents,
|
||||
}
|
||||
except Exception:
|
||||
return {'has_provenance': False}
|
||||
```
|
||||
|
||||
### SynthID-style watermark detection
|
||||
```python
|
||||
def detect_watermark(image, watermark_key):
|
||||
"""매 invisible statistical watermark."""
|
||||
expected_pattern = generate_pattern(watermark_key)
|
||||
actual_pattern = extract_low_freq_signal(image)
|
||||
correlation = np.corrcoef(expected_pattern.flatten(), actual_pattern.flatten())[0, 1]
|
||||
return correlation > 0.7 # 매 threshold
|
||||
```
|
||||
|
||||
### Glaze / Nightshade (artist protection)
|
||||
```python
|
||||
def glaze_protect(artist_image, target_style='abstract', epsilon=0.05):
|
||||
"""매 ML 의 train 의 disrupt — 매 imperceptible perturbation."""
|
||||
perturbed = artist_image.clone().requires_grad_()
|
||||
|
||||
for _ in range(100):
|
||||
# 매 push to wrong style space
|
||||
loss = -style_distance(perturbed, target_style)
|
||||
loss.backward()
|
||||
perturbed.data -= 0.001 * perturbed.grad.sign()
|
||||
perturbed.data = torch.clamp(perturbed, artist_image - epsilon, artist_image + epsilon)
|
||||
|
||||
return perturbed.detach()
|
||||
```
|
||||
|
||||
### Ethical use validation (commercial)
|
||||
```python
|
||||
def commercial_deepfake_check(generation_request):
|
||||
"""매 commercial use 의 consent + license check."""
|
||||
issues = []
|
||||
|
||||
if not generation_request.has_consent_signed:
|
||||
issues.append('Missing consent from likeness owner')
|
||||
|
||||
if generation_request.purpose == 'fake_attribution':
|
||||
issues.append('Cannot fabricate attribution / quotation')
|
||||
|
||||
if generation_request.target_minor:
|
||||
issues.append('Minor — special protection required')
|
||||
|
||||
if generation_request.election_period and not generation_request.disclosure:
|
||||
issues.append('Election period — disclosure required')
|
||||
|
||||
return {'allowed': len(issues) == 0, 'issues': issues}
|
||||
```
|
||||
|
||||
### NCII detection (incoming user upload)
|
||||
```python
|
||||
def detect_ncii_attempt(image, source_user):
|
||||
"""매 nudity + 매 face match 의 다른 person → 매 likely NCII."""
|
||||
if not contains_nudity(image): return None
|
||||
|
||||
detected_faces = face_recognize(image)
|
||||
user_face = source_user.profile_face
|
||||
|
||||
for face in detected_faces:
|
||||
if not similar(face, user_face):
|
||||
return {
|
||||
'risk': 'high',
|
||||
'reason': 'nudity + non-self face',
|
||||
'action': 'block + report',
|
||||
}
|
||||
return None
|
||||
```
|
||||
|
||||
## 매 결정 기준
|
||||
| 응용 | Approach |
|
||||
|---|---|
|
||||
| Film / VFX | Consent + C2PA + disclosure |
|
||||
| Education | Historical figure + clear context |
|
||||
| Accessibility | Sign language synthesis |
|
||||
| Auth / KYC | Liveness check + 3D depth |
|
||||
| Content moderation | Detection + reporting |
|
||||
| Artist protection | Glaze / Nightshade |
|
||||
| Commercial likeness | Contract + consent |
|
||||
| Election | Detection + takedown |
|
||||
|
||||
**기본값**: 매 disclosure + 매 consent + 매 detection + 매 watermark.
|
||||
|
||||
## 🔗 Graph
|
||||
- 부모: [[Generative-AI]] · [[Computer-Vision]] · [[AI-Ethics]]
|
||||
- 변형: [[Face-Swap]] · [[Voice-Cloning]] · [[Lip-Sync]] · [[Video-Generation]]
|
||||
- 응용: [[ElevenLabs]] · [[Sora]] · [[Roop]] · [[Wav2Lip]]
|
||||
- Mitigation: [[C2PA]] · [[SynthID]] · [[Glaze]] · [[Nightshade]] · [[Liveness-Check]]
|
||||
- Adjacent: [[Authenticity]] · [[Arts]] · [[Algorithmic-Fairness]] · [[Anthropomorphism]] · [[AI-Safety]]
|
||||
|
||||
## 🤖 LLM 활용
|
||||
**언제**: 매 deepfake risk assessment. 매 detection system. 매 disclosure policy. 매 ethical use review.
|
||||
**언제 X**: 매 manipulative use (election, NCII, fraud).
|
||||
|
||||
## ❌ 안티패턴
|
||||
- **No consent**: 매 personality right violation.
|
||||
- **Election deepfake without disclosure**: 매 illegal (some jurisdiction).
|
||||
- **No watermark**: 매 trust 의 long-term destroy.
|
||||
- **Detection only (no provenance)**: 매 false negative.
|
||||
- **Commercial without contract**: 매 lawsuit.
|
||||
- **NCII**: 매 criminal.
|
||||
|
||||
## 🧪 검증 / 중복
|
||||
- Verified (FaceForensics++, C2PA spec, EU AI Act 2024, TAKE IT DOWN Act 2025).
|
||||
- 신뢰도 B.
|
||||
- Related: [[Authenticity]] · [[Arts]] · [[Anthropomorphism]] · [[AI-Safety]] · [[Brand Consistency Maintenance]] · [[Commercial AI Art Production]].
|
||||
|
||||
## 🕓 Changelog
|
||||
| 날짜 | 변경 |
|
||||
|---|---|
|
||||
| 2026-05-08 | Phase 1 |
|
||||
| 2026-05-10 | Manual cleanup — technique + legal + 매 liveness / detection / C2PA / Glaze / NCII code |
|
||||
|
||||
Reference in New Issue
Block a user