Files
2nd/10_Wiki/Topics/AI_and_ML/Deepfake-Technology.md
T
koriweb d8a80f6272 chore(wiki): dangling 링크 canonical 정규화 (768파일/1200건)
이름만 다른(표기 변형) [[위키링크]]를 대상 문서의 canonical 제목으로 치환해
끊겼던 1,200개 링크를 연결. 제목/파일명 정규화 일치만 적용하고 별칭 매칭은
과병합 위험으로 제외(애매성 가드). 원본은 _link_reconcile_backup/ 에 백업.
도구: Datacollect/scripts/link_reconcile_apply.mjs

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-08 12:24:15 +09:00

9.0 KiB

id, title, category, status, canonical_id, aliases, duplicate_of, source_trust_level, confidence_score, verification_status, tags, raw_sources, last_reinforced, github_commit, tech_stack
id title category status canonical_id aliases duplicate_of source_trust_level confidence_score verification_status tags raw_sources last_reinforced github_commit tech_stack
wiki-2026-0508-deepfake Deepfake Technology 10_Wiki/Topics verified self
deepfake
face swap
voice cloning
synthetic media
FaceForensics
C2PA
ElevenLabs
none B 0.85 applied
deepfake
generative-ai
face-swap
voice-cloning
synthetic-media
c2pa
detection
ethics
2026-05-10 pending
language framework
Python Diffusers / Roop / Stable Diffusion / ElevenLabs / Whisper

Deepfake Technology

매 한 줄

"매 truth 의 boundary 의 erode". 매 GAN / Diffusion / Autoencoder 의 face + voice 의 synthesize. 매 commercial application + 매 election / fraud / 비동의 abuse 의 dual-use. 매 detection arms race + 매 C2PA provenance 의 standard.

매 핵심 technique

Face swap

  • Roop / DeepFaceLab: 매 open-source.
  • Autoencoder-based: 매 encode → 매 decode 의 다른 face.
  • InstantID / PhotoMaker: 매 single image.
  • Diffusion-based: 매 InstantID + ControlNet.

Face reenactment

  • 매 source 의 expression → 매 target.
  • First Order Motion Model.
  • DPE (Disentangled Portrait Editing).

Voice cloning

  • ElevenLabs: 매 commercial.
  • OpenVoice (MyShell): 매 open.
  • Tortoise TTS.
  • 3 sec sample 의 sufficient (modern).

Lip sync

  • Wav2Lip: 매 audio + face.
  • SadTalker.

Full body / pose

  • AnimateAnyone.
  • MagicAnimate.

Video generation (modern, 2024+)

  • Sora (OpenAI).
  • Veo (Google).
  • Runway Gen-3.

매 detection

  • FaceForensics++: 매 dataset benchmark.
  • CLIP-based: 매 zero-shot.
  • Frequency domain.
  • Inconsistency (lighting, eye blink rate).
  • Liveness check (camera, depth).

매 disclosure / provenance

  • C2PA (Adobe + others): 매 cryptographic chain.
  • SynthID (Google): 매 watermark.
  • Statistical watermark (LLM).
  • 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.

매 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

매 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.

💻 패턴 (응용 — defense + ethical use)

Liveness check (anti-deepfake auth)

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
    }

Deepfake detection (CLIP-based)

import open_clip
import torch

model, _, preprocess = open_clip.create_model_and_transforms('ViT-L-14', pretrained='openai')

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,
    }

Frequency-domain detection

import numpy as np
from scipy.fft import fft2, fftshift

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

C2PA verification

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

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)

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)

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)

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

🤖 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.

🧪 검증 / 중복

🕓 Changelog

날짜 변경
2026-05-08 Phase 1
2026-05-10 Manual cleanup — technique + legal + 매 liveness / detection / C2PA / Glaze / NCII code