Repolode
sczhou

sczhou/CodeFormer

Python tool for blind face restoration, enhancing blurry, low-quality or damaged faces in photos and videos using a codebook lookup transformer.

Estrellas
18,185
Forks
3,723
Issues abiertos
283
Último commit
hace 11 meses

¿Qué es?

CodeFormer restores faces in images and videos when the degradation type is unknown, a setting called blind face restoration. It is the official implementation of a NeurIPS 2022 paper that uses a learned codebook of facial priors and a transformer to predict clean facial details from degraded input.

The tool exposes a fidelity weight that trades off output quality against similarity to the original face, so users can favor cleaner results or closer identity. Beyond restoration, it includes scripts for colorizing black-and-white or faded face photos and for inpainting masked regions of aligned faces.

For whole images and video, it can enhance background regions with Real-ESRGAN and upsample the restored face. Pretrained models are downloaded via a provided script, and the project includes training code and configuration files.

Funciones clave

  • 01Blind face restoration for images and cropped, aligned 512x512 faces
  • 02Adjustable fidelity weight to balance quality and similarity to the input
  • 03Video enhancement from .mp4, .mov and .avi inputs
  • 04Face colorization for black-and-white or faded photos
  • 05Face inpainting for masked regions
  • 06Optional Real-ESRGAN background enhancement and face upsampling

Casos de uso

  • Restoring old or low-resolution family photos
  • Enhancing blurry frames in older video clips
  • Fixing distorted faces in AI-generated art
  • Researchers comparing blind face restoration methods on aligned face datasets

Temas

Preguntas frecuentes

¿Qué es CodeFormer?
Python tool for blind face restoration, enhancing blurry, low-quality or damaged faces in photos and videos using a codebook lookup transformer. CodeFormer restores faces in images and videos when the degradation type is unknown, a setting called blind face restoration. It is the official implementation of a NeurIPS 2022 paper that uses a learned codebook of facial priors and a transformer to predict clean facial details from degraded input.
¿CodeFormer es gratuito? ¿Qué licencia tiene?
CodeFormer es open source bajo la licencia Other. Revisa los términos de la licencia antes de usarlo en productos comerciales.
¿CodeFormer sigue mantenido?
Sin commits en más de 6 meses. El último commit de CodeFormer fue el 18 nov 2025.
¿Para qué puedo usar CodeFormer?
Restoring old or low-resolution family photos Enhancing blurry frames in older video clips Fixing distorted faces in AI-generated art Researchers comparing blind face restoration methods on aligned face datasets
¿Dónde consigo CodeFormer?
El código fuente y las instrucciones de instalación están en GitHub: https://github.com/sczhou/CodeFormer

Resumen generado por IA a partir del README del proyecto. Las estadísticas de GitHub se actualizan a diario.

Proyectos relacionados