There is a newer version of the record available.

Published November 25, 2025 | Version 1.0
Preprint Open

Face Morphing in Images: A Novel Approach Using Aligned Facial Landmarks

Authors/Creators

Description

Face swapping, the process of replacing one individual’s facial identity with another while preserving visual realism, has attracted increasing attention across digital entertainment, augmented reality, creative media, and digital forensics. This work presents an animated face-swapping system for static images that enables continuous and seamless cycling of facial identities among multiple individuals detected within a single frame.

The proposed method employs precise facial landmark detection to compute tightly aligned, rotation-aware bounding boxes that isolate only the inner facial oval, intentionally excluding hair, background regions, and other non-facial artifacts. To achieve visually coherent integration across identities, the pipeline combines color normalization, lighting transfer via homomorphic filtering, and unsharp masking, followed by seamless cloning using OpenCV. Facial transitions are animated through easing functions and temporal interpolation, producing smooth morphing effects rather than abrupt identity replacements.

The system is implemented as a high-performance, React-based web component optimized for execution on consumer-grade hardware. Experimental observations demonstrate improved facial alignment, smoother temporal transitions, and enhanced perceptual realism when compared with baseline static face-swapping techniques. These characteristics make the system suitable for interactive media applications, creative visual tools, and privacy-preserving identity transformation workflows.

Features

1. Face Mapping (Interactive Identity Reassignment)

The system introduces an interactive face-mapping mechanism that allows dynamic reassignment of facial identities within a single image. Upon image upload, all detected faces are extracted and displayed as individually indexed entities. Users may select any index to trigger a morph toward the corresponding detected face or restore the original identity at any time.

This mapping mechanism enables continuous, cyclic morphing between multiple faces, with animations running automatically by default. Transitions may be paused or resumed at any moment, allowing detailed inspection of intermediate morphing states. Face mappings can also be reassigned dynamically through a selection interface. While reassignment may briefly adjust spatial positioning, the underlying alignment and morphing logic remain stable, ensuring uninterrupted animation continuity.

2. Swap Intensity (Temporal Morphing Control)

Swap Intensity regulates the degree of temporal smoothing applied during facial transitions. At maximum intensity, morphing appears highly fluid and cinematic, with facial identities blending naturally over time. Lower intensity values progressively reduce motion smoothness, resulting in more rigid yet functionally correct transitions.

This parameter reflects the evolutionary development of the system itself. Early iterations relied on static facial replacement with limited motion. Through successive refinements, including improved landmark alignment, easing functions, and temporal filtering, the system evolved into a fully animated and lifelike morphing framework. Swap Intensity, therefore, functions both as a creative control and as a visual indicator of this progression.

Usage Recommendation and Privacy Considerations

For optimal performance and visual quality, input images should contain faces that are clearly visible, well-lit, and centrally positioned. Such conditions improve landmark detection accuracy, alignment stability, and overall morphing fidelity.

Images uploaded through the interface are processed entirely in-session and are never stored or persisted. All uploaded data is automatically deleted once the modal is closed, ensuring strong user privacy guarantees. Minor variations in skin tone may occur due to differences in illumination conditions and rendering during the morphing process.

Safety Considerations

To ensure ethical and professional usage, the system integrates NSFW content detection directly within the interface. Images containing explicit or inappropriate material are automatically identified, masked, and restricted from further processing. Clear on-screen notifications inform users when content has been blocked, maintaining suitability for academic, professional, and creative environments.

Future Work and Publication

This project forms part of an ongoing effort to develop production-ready facial morphing systems for the web. A forthcoming publication will provide a comprehensive treatment of the techniques presented here, including architectural design decisions, mathematical foundations, optimization strategies, and extended experimental evaluations for animated face swapping and interactive visual effects.

Files

Couple_Morph.mp4

Files (9.4 MB)

Name Size Download all
md5:3f4bf9c772aaa68732fff231339fb6cb
263.4 kB Preview Download
md5:fd50447dfa0bd060a986aea9a919714b
7.8 MB Preview Download
md5:a6ff90ad240551d2561ab64cb8b227e4
575.9 kB Preview Download
md5:e02a4d88b93aa60c74cd919211b7a623
62.3 kB Preview Download
md5:0551b54dc0da4a7b13bca617b04922ac
232.4 kB Preview Download
md5:32ace6d44af68d4a1a6efc9ad351db8f
400.7 kB Preview Download

Additional details

Software

Programming language
TypeScript , Python
Development Status
Active