CRITICAL FIXES FOR VISUAL ARTIFACTS: 1. BLACK LINE ARTIFACT FIX: - Added feathered_mask clipping (0.1 to 0.9) to avoid pure black/white values - Prevents harsh transitions that create black lines from nose to chin - Smoother mask blending in mouth area 2. HAIR ON FOREHEAD FIX: - Added fix_forehead_hair_issue() function - Blends forehead area back to original (70% original + 30% swapped) - Focuses on upper 35% of face to preserve natural hairline - Strong Gaussian blur (31x31) for very soft transitions ISSUES RESOLVED: - No more black line artifacts in mouth mask mode - Hair from source image no longer falls on forehead - Better preservation of original hairline and forehead - Smoother overall face swapping TECHNICAL IMPROVEMENTS: - Mask value clamping prevents harsh boundaries - Forehead protection preserves natural hair coverage - Soft blending maintains realistic appearance - Maintained good FPS performance EXPECTED RESULTS: - Clean mouth mask without black lines - Natural forehead appearance without source hair - Better overall face swap quality - Professional-looking results |
||
---|---|---|
.. | ||
__init__.py | ||
core.py | ||
face_enhancer.py | ||
face_swapper.py |