explaingit

kayariyan28/ghost-score-face-swap

Analysis updated 2026-05-18

0PythonAudience · researcherComplexity · 4/5Setup · moderate

TLDR

A local Python research tool that swaps faces in photos using three pipelines chosen automatically by a quality score.

Mindmap

mindmap
  root((Ghost-Score-Face-Swap))
    What it does
      Swaps faces locally
      Uses ghost score metric
      Routes to best pipeline
    Tech stack
      Python
    Use cases
      Research face swapping
      Compare pipelines
      Reproduce benchmark
    Audience
      Researchers
      Computer vision hobbyists
    Requirements
      Local execution only
      Apple Silicon tuned
      No cloud API

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Swap a face in a photo using an automatically chosen pipeline based on transfer quality.

USE CASE 2

Study how a ghost score metric decides between classical compositing, AI synthesis, and adaptive recovery.

USE CASE 3

Reproduce or extend the benchmark results published in the accompanying research paper.

What is it built with?

Python

How does it compare?

kayariyan28/ghost-score-face-swap0xhassaan/nn-from-scratch3ks/embedoc
Stars00
LanguagePythonPythonPython
Last pushed2023-06-08
MaintenanceDormant
Setup difficultymoderatemoderatehard
Complexity4/54/51/5
Audienceresearcherdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 1h+

Runtime is tuned for macOS on Apple Silicon, Linux is also supported.

In plain English

Ghost-Score-Driven Multi-Pipeline Face Swap is a local research prototype written in Python that replaces one person's face in a photo with another person's face. Rather than using a single approach, it routes each swap through one of three pipelines depending on how well the transfer went, using a metric called the ghost score to decide. The ghost score is a simple measurement: it compares how similar the output face looks to the source identity versus the target identity. A negative score means the swap succeeded, the result looks more like the source. A positive score signals leakage, meaning the original target face is still showing through, and the system escalates to a stronger recovery pipeline. The three pipelines are Classical Compositing, AI Synthesis, and Pro Adaptive. Classical Compositing focuses on preserving fine pixel detail and texture from the source. AI Synthesis is faster and more tolerant of difficult head poses. Pro Adaptive is the most powerful: it runs multiple candidate approaches and applies a 3D-aware visible-surface mask to avoid blending parts of the face that are hidden by occlusion, such as hair or other objects in front of the face. The tool is designed for local execution only, there is no cloud API and no telemetry. A 200-pair benchmark reported in the accompanying research paper found that the Pro Adaptive mode reached a 92.5 percent identity match rate, outperforming the simpler pipelines. The research paper is published on Zenodo (DOI 10.5281/zenodo.20179682). The README states the runtime is tuned for macOS on Apple Silicon, though Linux can run the tool as well.

Copy-paste prompts

Prompt 1
Explain how the ghost score decides which face swap pipeline to use
Prompt 2
Walk me through the difference between Classical Compositing, AI Synthesis, and Pro Adaptive
Prompt 3
Help me run this face swap tool locally on Apple Silicon
Prompt 4
Summarize the benchmark results from the linked Zenodo research paper

Frequently asked questions

What is ghost-score-face-swap?

A local Python research tool that swaps faces in photos using three pipelines chosen automatically by a quality score.

What language is ghost-score-face-swap written in?

Mainly Python. The stack also includes Python.

How hard is ghost-score-face-swap to set up?

Setup difficulty is rated moderate, with roughly 1h+ to a first successful run.

Who is ghost-score-face-swap for?

Mainly researcher.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.