Realistic Skin Blend
The #1 reason patients distrust simulations: waxy, airbrushed skin. This skill keeps pores, fine lines, and natural imperfections.
Anti-Patterns
- ❌ Full-face Gaussian blur after warp
- ❌ High denoise SD inpaint (>0.45) on entire face
- ❌ Uniform skin tone flattening
- ❌ Removing moles/freckles patient didn't ask to remove
Pipeline
- Warp geometry on structure layer (landmarks only)
- Extract high-frequency texture from original:
blur = cv2.GaussianBlur(img, (0,0), 3) texture = img.astype(float) - blur.astype(float) - Apply warp to low-frequency (color/shape) only
- Re-add texture:
result = warped_low + original_texture - Poisson blend boundary at ROI edge:
cv2.seamlessClone(src, dst, mask, center, cv2.NORMAL_CLONE)
Frequency Separation (preferred)
| Layer | Content | Edit allowed |
|---|---|---|
| Low | Color, shadow, volume | Yes (warp, tone) |
| High | Pores, fine hair, micro-wrinkles | Copy from original |
Parameter Guardrails
- Texture reattach strength: 0.85–1.0
- Optional subtle grain injection: 1–2% noise if over-smoothed
- Preserve asymmetry: don't mirror-fix natural asymmetry unless requested
Script
python scripts/texture_preserve.py before.jpg warped_raw.jpg --output natural.jpg --roi nose
ROI options: nose, lip, jaw, full (full uses frequency separation globally)
QA Checklist
- Zoom 200%: pores visible in cheek (unchanged region)
- No halo at nose bridge boundary
- Moles/freckles in unchanged areas intact
- Lighting gradient on forehead preserved