Flash-00007's picture
Update README.md
04dcb1c verified
|
Raw
History Blame Contribute Delete
1.76 kB
metadata
license: apache-2.0
tags:
  - image-to-image
  - gan
  - facial-restoration
  - pytorch
datasets:
  - CelebA
  - FFHQ
metrics:
  - psnr
  - ssim
  - lpips
pipeline_tag: image-to-image
library_name: pytorch

SocialFace-Restore-GAN

A Component-Based Hybrid GAN architecture designed to restore high-fidelity facial features (eyes, nose, mouth) in images degraded by social media compression, motion blur, and sensor noise.

🎯 Goal

The primary objective is to achieve perceptual realism while strictly preserving the subject's unique identity. This model leverages specialized discriminators for local facial components and an identity-consistency module.

🧡 Dataset

The model was trained using paired training data generated via synthetic distortion from:

  • CelebA: Large-scale face attributes dataset.
  • FFHQ: Flickr-Faces-HQ dataset.

🧾 Description

Images on social media often suffer from aggressive lossy compression. This project implements a Hybrid GAN featuring:

  • Generator (U-Net): A symmetric encoder-decoder with residual learning.
  • Global Discriminator (PatchGAN): For full-image texture realism.
  • Local Feature Discriminator: Specialized networks focusing on eyes, nose, and mouth.
  • Identity Preserver: VGG-based feature extraction for identity-consistency loss.

πŸ“Š Performance Metrics

The model achieves the following target benchmarks:

  • PSNR: > 28dB
  • SSIM: > 0.85
  • LPIPS: < 0.15 (indicating high human-perceived realism)

πŸš€ Usage

You can load the model in PyTorch using:

import torch
# Assuming your model architecture class 'Generator' is defined
model = Generator()
model.load_state_dict(torch.load("socialface_restore_gan.pth", map_location="cpu"))
model.eval()