Multi-Identity Mode
Map different sources to different targets in the same scene.
Multi-identity mode allows you to replace multiple different faces in a single image or video, each with a different source identity. For example, in a scene with two people talking, you can replace Person A with Source Face 1 and Person B with Source Face 2, all in a single processing pass.
What Is Multi-Identity Mode?
In standard Quick Recast mode, a single source face is applied to all detected faces in the target. Multi-identity mode extends this by letting you:
- Upload multiple source face images (one per identity)
- View all detected faces in the target
- Assign each target face to a specific source face
- Skip specific faces by leaving them unassigned
- Use automatic gender/age matching for smart assignment
This is particularly useful for group scenes, interview footage, or any content where multiple people appear on screen simultaneously.
Uploading Multiple Source Faces
When multi-identity mode is enabled, the source area changes to a multi-source drop zone that accepts multiple images. Each image represents one source identity.
Enable multi-identity mode
In the Quick Recast interface, toggle the Multi-Identity switch. The source drop zone will change to accept multiple files.
Add source faces
Drag multiple face images into the source area, or click to browse and select multiple files. Each image should contain a clear, front-facing photo of a different person. Source faces appear as labeled thumbnails (Source A, Source B, Source C, etc.).
Review source faces
The source panel displays thumbnails of all loaded source faces. You can remove individual sources by clicking the remove button on their thumbnail, or add more at any time.
Source Face Quality
Face Detection in Target
When you load a target image or video, Recaster automatically detects all faces in the first frame. Each detected face is highlighted and numbered. The number of faces detected depends on the detection quality setting:
| Detection Setting | Resolution | Effect on Multi-Identity |
|---|---|---|
| Fast (320px) | 320px | May miss small or distant faces in group shots |
| Balanced (640px) | 640px | Good for most group scenes with 3-5 faces |
| Accurate (1024px) | 1024px | Best for large group shots or scenes with distant faces |
Detection Quality for Multi-Identity
Face Mapping Panel
The Face Mapping Panel is the core interface for multi-identity assignment. It appears below the target preview when multi-identity mode is enabled and faces have been detected.
How It Works
The panel displays a row for each detected face in the target:
- Face thumbnail: A cropped preview of the detected face in the target image
- Face label: An identifier like "Face 1", "Face 2", etc.
- Source dropdown: A dropdown menu to assign a source face (Source A, Source B, etc.) or "No Swap"
- Demographics: If auto-detection is enabled, gender and estimated age range are displayed
Assigning Source Faces
To assign a source face to a target face, click the dropdown next to the target face thumbnail and select the desired source. Available options include:
- Source A, B, C... — Map this target face to a specific source identity
- No Swap — Leave this face unchanged in the output
Selective Face Swapping
Automatic Assignment with FairFace
Recaster includes a FairFace classifier that can automatically detect gender and age range for each face. This information can be used for automatic face assignment in multi-identity mode.
FairFace Classifier
The FairFace classifier is a dedicated ONNX model (~85MB) that analyzes each detected face and outputs:
- Gender: Male or Female classification
- Age range: One of 9 ranges (0-2, 3-9, 10-19, 20-29, 30-39, 40-49, 50-59, 60-69, 70+)
The classifier runs automatically when multi-identity mode is enabled and a target is loaded. Results are displayed alongside each face in the mapping panel and are cached for performance.
Model Auto-Download
Gender & Age Filtering
You can filter which faces to process based on the FairFace classification results. This is useful for scenes with many people where you only want to affect certain demographics:
Gender Filtering
Filter by gender to automatically assign different sources based on male/female classification. For example:
- All Male faces → Source A: Replace all male-classified faces with a single source
- All Female faces → Source B: Replace all female-classified faces with a different source
- Only Male faces: Process only male-classified faces, leave female faces unchanged
Age Range Filtering
Filter by age range to target specific demographics. The FairFace model classifies faces into 9 age ranges. You can select one or more ranges to include or exclude.
Content Safety Interaction
Example Workflow
Here is a complete multi-identity workflow for a two-person dialogue scene:
Enable multi-identity mode
Toggle the Multi-Identity switch in the Quick Recast interface.
Upload source faces
Drag two source face photos into the multi-source drop zone. They appear as Source A and Source B.
Load the target video
Drag the video file onto the target drop zone. Recaster detects both faces and displays them in the Face Mapping Panel.
Assign face mappings
In the Face Mapping Panel, set Face 1 → Source A and Face 2 → Source B. Review the thumbnails to make sure the assignments match your intent.
Configure enhancement (optional)
Enable a face enhancer like GFPGAN 1.4 if you want improved face quality. The enhancer applies to all swapped faces.
Process
Click Process. The pipeline replaces each target face with its assigned source on every frame. The before/after preview updates in real time.
Settings Persistence
Face mapping assignments are saved in your session settings. If you close and reopen the Quick Recast interface with the same target loaded, your previous mappings are restored. This prevents you from needing to re-assign faces when iterating on results.
Limitations
- Face tracking across frames: In videos, face identity is re-detected per frame. If a face temporarily leaves and re-enters the frame, it may be assigned a different face index. For best results, use scenes where faces remain consistently visible.
- Overlapping faces: When faces significantly overlap (one person partially behind another), detection may merge them or miss the occluded face.
- FairFace accuracy: Gender and age classification is probabilistic and may not always be correct. Use it as a helpful starting point and manually adjust mappings as needed.
- Maximum sources: While there is no hard limit on the number of source faces, performance decreases as more sources are added because each target face must be matched against all sources.
Was this page helpful?