Multi-Identity Mode

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.

1

Enable multi-identity mode

In the Quick Recast interface, toggle the Multi-Identity switch. The source drop zone will change to accept multiple files.

2

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

3

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

The same guidelines for single-source photos apply to multi-identity mode. Use clear, well-lit photos with the face prominently visible. Each source photo should contain only one person's face to avoid ambiguity.

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 SettingResolutionEffect on Multi-Identity
Fast (320px)320pxMay miss small or distant faces in group shots
Balanced (640px)640pxGood for most group scenes with 3-5 faces
Accurate (1024px)1024pxBest for large group shots or scenes with distant faces

Detection Quality for Multi-Identity

For multi-identity scenes, consider using Balanced (640px) or Accurate (1024px) detection quality. The default Fast (320px) setting may miss smaller faces in group shots. You can switch detection quality in the settings panel before processing.

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

"No Swap" is useful when you want to replace some faces but leave others untouched. For example, in a group scene you might only want to replace two out of five faces. Assign sources to those two and set the rest to "No Swap."

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

The FairFace model is downloaded from Hugging Face on first use (~85MB). After the initial download, it is cached locally and loads instantly on subsequent uses.

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

Remember that Recaster's Challenge-25 content safety policy blocks processing of any face that appears to be under 25 years old. This policy applies regardless of multi-identity assignments. Even if you explicitly assign a source to a young-appearing face, the safety check will prevent processing.

Example Workflow

Here is a complete multi-identity workflow for a two-person dialogue scene:

1

Enable multi-identity mode

Toggle the Multi-Identity switch in the Quick Recast interface.

2

Upload source faces

Drag two source face photos into the multi-source drop zone. They appear as Source A and Source B.

3

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.

4

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.

5

Configure enhancement (optional)

Enable a face enhancer like GFPGAN 1.4 if you want improved face quality. The enhancer applies to all swapped faces.

6

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.