# ZPdesu/Barbershop

Barbershop: GAN-based Image Compositing using Segmentation Masks (SIGGRAPH Asia 2021)

Repository: https://github.com/ZPdesu/Barbershop
Canonical: https://ross.abutalabs.com/products/barbershop
Homepage: https://zpdesu.github.io/Barbershop/
Language: Python
License: MIT
License Family: permissive
Last push: 2023-06-25T17:53:30+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 1918, "days_push": 1165, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1439, forks 272 (observed 2026-08-28T04:04:44.123219+00:00)

## What it is
Official PyTorch implementation of Barbershop (SIGGRAPH Asia 2021), a GAN-inversion-based method for compositing images using segmentation masks, focused on hairstyle transfer between face photos. It blends features from multiple reference images in a latent space to produce coherent, realistic results.

## Use cases
- transfer a hairstyle from one photo to another
- blend facial features from multiple images seamlessly
- composite face images using segmentation masks
- GAN inversion research on StyleGAN latent spaces
- generate realistic face images combining hair and identity references

## When to choose
- you need research-grade hairstyle transfer with detail preservation like moles and wrinkles
- you want the official implementation of the SIGGRAPH Asia 2021 paper
- you are doing GAN-inversion or image-blending research

## When to avoid
- you need a polished end-user photo editing app
- you lack a GPU or cannot set up a conda environment
- you need general-purpose image compositing beyond faces and hair

## Facets
- artifact type: library
- maturity: maintenance
- function: image-processing, machine-learning, deep-learning
- domain: computer-vision, image-processing, artificial-intelligence
- platform: python
- tags: gan, stylegan, gan-inversion, image-compositing, hairstyle-transfer, segmentation-masks, research-code, face-blending, linux, gpu

## Member repositories
- ZPdesu/Barbershop (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:44.123219+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:36:35.597088+00:00, confidence not recorded.
  - readme: https://github.com/ZPdesu/Barbershop (fetched 2026-08-28T04:04:44.123219+00:00, sha bea0279ecce6)
  - homepage: https://zpdesu.github.io/Barbershop/ (fetched 2026-08-29T11:46:57.327506+00:00, sha 3047d6f5517f)
- Data as of 2026-08-30T08:39:29.467469+00:00.
